Skip to content

Commit 6b4f702

Browse files
committed
[Tests] always use legacy peer-deps on eslint-8- and node-minors matrices
The strict-peer cells (`(eslint 7, parser 6, babel-eslint *)` on `eslint-8-`, and `(node>=16, eslint>=7)` on `node-minors`) hit a post-`npm install` ERESOLVE at the `after_install` swap-eslint-down step, because `eslint-config-airbnb-base@15.0.0` peers `eslint@^7.32 || ^8.2` and `@typescript-eslint/parser@6` peers `eslint@^7 || ^8`, leaving npm an unsatisfiable graph it sometimes lands and sometimes crashes on. Flipping these env values to `"true"` is strictly more permissive: cells that previously installed under strict peers still install, and the unsatisfiable cells now install with peer warnings instead of an ERESOLVE crash. Closes #4007.
1 parent d748578 commit 6b4f702

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/eslint-8-.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
after_install: |
103103
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint == 8 && 8.17 || matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}"
104104
env:
105-
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.typescript-eslint >= 6 && 'false' || 'true' }}"
105+
NPM_CONFIG_LEGACY_PEER_DEPS: "true"
106106
- run: npx ls-engines
107107
- run: npm run unit-test
108108
- uses: codecov/codecov-action@v3.1.5

.github/workflows/node-minors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 18 && matrix.eslint >= 8 && '8.17' || (matrix.node-version >= 16 && matrix.eslint >= 7 && '6' || (matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))))) }}" "babel-eslint@${{ matrix.babel-eslint }}"
107107
skip-ls-check: ${{ matrix.node-version < 10 && true || false }}
108108
env:
109-
NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.node-version >= 16 && matrix.eslint >= 7 && 'false' || 'true' }}"
109+
NPM_CONFIG_LEGACY_PEER_DEPS: "true"
110110
- run: npx ls-engines
111111
if: ${{ matrix.node-version >= 12 }}
112112
- run: npm run unit-test

0 commit comments

Comments
 (0)