Skip to content

Commit

Permalink
feat(pnp): exports support (#2431)
Browse files Browse the repository at this point in the history
* feat(pnp): exports support

* fix(pnp): construct subpath correctly

* fix(pnp): normalize subpath

* chore: add basic test (originally written by bgotink)

Co-authored-by: Bram Gotink <bram@gotink.me>

* test: add another test

* refactor: rename resolveExports to resolveExport

* chore: update resolve.exports

* test: add more tests

* refactor: add note about --conditions flag

* test: improve tests

* test: add tests for no known conditions error

* test: add manifest test

* test: add test for self-referencing

* chore: update babel and jest

* refactor: wording

* Revert "chore: update babel and jest"

This reverts commit 2a4f4eb.

* chore: update hook

* chore: versions

* refactor: add options to resolveUnqualifiedExport

* chore: update pnp hook

* fix: include packages that are discarded from lookup

* test: check that resolveUnqualifiedExport is a method on the pnpapi

* fix: don't throw on missing manifest

* Tolerates paths outside of the dependency tree

* Fixes tests

* Adds support for publishConfig.exports

* test: fix tests on windows

* test: add more link: tests

* fix: support exports with pnpIgnorePatterns

* fix: handle case when path is ignored

* refactor: don't expose resolveUnqualifiedExport

* chore: update hook

* test: add test for ignored path

* Update packages/acceptance-tests/pkg-tests-specs/sources/pnpapi.test.ts

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>

* Reverts accidental comment

* Adds back missing deps

Co-authored-by: Bram Gotink <bram@gotink.me>
Co-authored-by: merceyz <merceyz@users.noreply.github.com>
Co-authored-by: Maël Nison <nison.mael@gmail.com>
  • Loading branch information
4 people committed Feb 26, 2021
1 parent 88ac62a commit 970b73b
Show file tree
Hide file tree
Showing 15 changed files with 1,329 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
TARGET_BRANCH: ${{github.event.pull_request.base.ref}}

- name: 'Check that the PnP hook is consistent with a fresh build (fix w/ "git merge master && yarn build:pnp:hook")'
- name: 'Check that the PnP hook is consistent with a fresh build (fix w/ "git merge master && yarn update:pnp:hook")'
run: |
if [[ $(git diff --name-only "$(git merge-base origin/"$TARGET_BRANCH" HEAD)" HEAD -- packages/yarnpkg-pnp/sources/hook.js | wc -l) -gt 0 ]]; then
node ./scripts/run-yarn.js build:pnp:hook
Expand Down

0 comments on commit 970b73b

Please sign in to comment.