Skip to content

Commit

Permalink
chore: de-support yarn PnP version 1 BREAKING (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Apr 2, 2023
1 parent 491355e commit 9ec0025
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 235 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,3 @@ jobs:
# yarn --version
# yarn test:cover

check-yarn-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_LATEST}}
- run: npm install
- run: npm run test:yarn-pnp
7 changes: 7 additions & 0 deletions doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,13 @@ From version 9.21.3 this works automatically. In earlier versions (from 4.14.0)
you only needed to `yarn-pnp` into _externalModuleResolutionStrategy_ key in
the config (--init took care of that), but that's not necessary anymore.
As of version 13.0.0 dependency-cruiser does not work with the pnp from
yarn 1.x.x anymore. The yarn team has done only life cycle management and security
fixes on that version for several years - but encourages everyone to migrate over
to yarn 3. Our guess is that everyone who is serious about using yarn pnp has
already done so long ago. Moreover the old yarn 1 pnp version was holding us
back from moving on with the nodejs and javascript ecosystem.
</details>
### Q: dependency-cruiser detected a circular dependency. How can I see (one of the) cycles that dependency-cruiser saw?
Expand Down
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"build": "make build",
"build:clean": "make clean",
"check": "npm-run-all build lint depcruise test:cover",
"check:full": "npm-run-all check test:glob test:yarn-pnp",
"check:full": "npm-run-all check test:glob",
"depcruise": "node ./bin/dependency-cruise.js src bin test configs types tools --config --ignore-known",
"depcruise:all": "node ./bin/dependency-cruise.js src bin test configs types tools --config",
"depcruise:baseline": "node ./bin/depcruise-baseline.js src bin test configs types tools",
Expand Down Expand Up @@ -122,15 +122,6 @@
"test:e": "LANG=en_US.UTF-8 mocha --grep \"^\\[[E]\\]\"",
"test:cover": "LANG=en_US.UTF-8 c8 mocha",
"test:glob": "set -f && test \"`bin/dependency-cruise.js test/extract/__mocks__/gather-globbing/packages/**/src/**/*.js | grep \"no dependency violations found\"`\" = \"✔ no dependency violations found (6 modules, 0 dependencies cruised)\"",
"test:yarn-pnp": "npm-run-all test:yarn-pnp:cleanup test:yarn-pnp:cache-clean test:yarn-pnp:pack test:yarn-pnp:copy test:yarn-pnp:install test:yarn-pnp:version test:yarn-pnp:run test:yarn-pnp:test test:yarn-pnp:cleanup",
"test:yarn-pnp:pack": "npm pack",
"test:yarn-pnp:copy": "shx cp -r test/integration/yarn-pnp.template test/integration/yarn-pnp.testing-ground",
"test:yarn-pnp:install": "cd test/integration/yarn-pnp.testing-ground && yarn && yarn add -D ../../../dependency-cruiser*.tgz",
"test:yarn-pnp:version": "cd test/integration/yarn-pnp.testing-ground && yarn dependency-cruise:version",
"test:yarn-pnp:run": "cd test/integration/yarn-pnp.testing-ground && yarn dependency-cruise:json",
"test:yarn-pnp:test": "cd test/integration/yarn-pnp.testing-ground && yarn test",
"test:yarn-pnp:cache-clean": "yarn cache clean",
"test:yarn-pnp:cleanup": "shx rm -rf test/integration/yarn-pnp.testing-ground dependency-cruiser*.tgz",
"test:load": "hyperfine --warmup 3 --runs 30 \"bin/dependency-cruise.js src bin test configs types tools --ignore-known --validate --no-cache --no-progress\"",
"test:load:short": "hyperfine --warmup 1 --runs 5 \"bin/dependency-cruise.js src bin test configs types tools --ignore-known --validate --no-cache --no-progress\"",
"test:watch": "mocha --watch --watch-extensions=json --reporter=min test/\\*\\*/\\*.spec.js",
Expand Down
136 changes: 0 additions & 136 deletions test/integration/yarn-pnp.template/.dependency-cruiser.js

This file was deleted.

21 changes: 0 additions & 21 deletions test/integration/yarn-pnp.template/package.json

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions test/integration/yarn-pnp.template/src/index.js

This file was deleted.

1 change: 0 additions & 1 deletion test/integration/yarn-pnp.template/src/local-module.js

This file was deleted.

45 changes: 0 additions & 45 deletions test/integration/yarn-pnp.template/test/index.js

This file was deleted.

0 comments on commit 9ec0025

Please sign in to comment.