Skip to content

Commit d748578

Browse files
committed
[Tests] pin jest-diff/pretty-format to dodge npm-alias install break on node 4/5
`pretty-format@30.4.0` (released 2026-05-07) added `npm:` alias entries to its `dependencies` (`react-is-18`, `react-is-19`). The npm 5.x that ships with node 4 and 5 — used by the `node-minors.yml` matrix — does not recognise the `alias` dependency type and aborts the bare `npm install` with `npm ERR! Invalid dependency type requested: alias` before the `after_install` step ever runs. Pulled into the tree via: eslint-plugin-react -> eslint-doc-generator@^3.0.2 -> jest-diff@^30.2.0 (floats up to 30.4.x) -> pretty-format@<exact same version> Two-pronged pin so both old and new npm installs avoid 30.4.x: - `devDependencies.jest-diff: 30.3.0` — direct pin so npm 5/6 hoists jest-diff@30.3.0 to the top level; eslint-doc-generator's `^30.2.0` range is satisfied by it, so no nested 30.4.x is fetched. - `overrides.pretty-format: 30.3.0` — belt-and-braces for npm >= 8.3 (the eslint-9+ matrix and any node-minors entry on a newer npm). `30.3.0` is the latest pretty-format release without `npm:` aliases.
1 parent 480a7bc commit d748578

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"glob": "=10.3.7",
8181
"istanbul": "^0.4.5",
8282
"jackspeak": "=2.1.1",
83+
"jest-diff": "30.3.0",
8384
"ls-engines": "^0.8.1",
8485
"markdownlint-cli": "^0.8.0 || ^0.32.2",
8586
"mocha": "^5.2.0",
@@ -91,6 +92,9 @@
9192
"peerDependencies": {
9293
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
9394
},
95+
"overrides": {
96+
"pretty-format": "30.3.0"
97+
},
9498
"engines": {
9599
"node": ">=4"
96100
},

0 commit comments

Comments
 (0)