From d20351536ad486a25cecba643199c22f1bd5debe Mon Sep 17 00:00:00 2001 From: eryue0220 Date: Wed, 30 Aug 2023 16:21:49 +0800 Subject: [PATCH 01/14] chore: upgrade node version --- .circleci/config.yml | 2 +- .github/workflows/test.yml | 2 +- package.json | 2 +- packages/babel-jest/package.json | 2 +- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 2 +- packages/diff-sequences/package.json | 2 +- packages/expect-utils/package.json | 2 +- packages/expect/package.json | 2 +- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-create-cache-key-function/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-environment-jsdom/package.json | 2 +- packages/jest-environment-node/package.json | 2 +- packages/jest-environment/package.json | 2 +- packages/jest-expect/package.json | 2 +- packages/jest-fake-timers/package.json | 2 +- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 2 +- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-leak-detector/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-mock/package.json | 2 +- packages/jest-phabricator/package.json | 2 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve-dependencies/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-schemas/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 2 +- packages/jest-test-sequencer/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- packages/pretty-format/package.json | 2 +- packages/test-globals/package.json | 2 +- packages/test-utils/package.json | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe35a4fc5a7f..7280fa057c1d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,5 +59,5 @@ workflows: matrix: parameters: # For some reason, v20 fails to run yarn install… - node-version: ['14', '16', '18', '19'] + node-version: ['16', '18'] - test-jest-jasmine diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d255fd884342..a9d434961835 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [14.x, 16.x, 18.x, 19.x, 20.x] + node-version: [16.x, 18.x, 20.x] shard: ['1/4', '2/4', '3/4', '4/4'] name: Node v${{ matrix.node-version }} on ${{ inputs.os }} (${{ matrix.shard }}) runs-on: ${{ inputs.os }} diff --git a/package.json b/package.json index 6e7271f5ace3..ab0478b579ab 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "logo": "https://opencollective.com/jest/logo.txt" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "resolutions": { "@types/node": "~14.14.45", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index e986e7d6ad16..73c8133dae81 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -35,7 +35,7 @@ "@babel/core": "^7.8.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 486107b0be41..8b02b72d7962 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -7,7 +7,7 @@ "directory": "packages/babel-plugin-jest-hoist" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index e2e05eaf9129..5f0de61c6e6d 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -20,7 +20,7 @@ "@babel/core": "^7.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 9f5ac6018011..163de0412e6a 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -16,7 +16,7 @@ "diff" ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/packages/expect-utils/package.json b/packages/expect-utils/package.json index d5103feafb41..c76e374845ad 100644 --- a/packages/expect-utils/package.json +++ b/packages/expect-utils/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/expect/package.json b/packages/expect/package.json index 7db38a0a045f..80ba58e7fc23 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -34,7 +34,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index e7bba017b788..156a455f173e 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -22,7 +22,7 @@ "p-limit": "^3.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index e628d65b5fdc..a46cdddd9aa5 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -50,7 +50,7 @@ "tempy": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 067c0744072a..cfc6d4478290 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -46,7 +46,7 @@ "jest": "./bin/jest.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 4157be4645de..fa182a6ce189 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -62,7 +62,7 @@ "typescript": "^5.0.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 7131d13a3062..c0acb77de207 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index d0eded4aa7f5..33d30da2b08a 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -57,7 +57,7 @@ } }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-create-cache-key-function/package.json b/packages/jest-create-cache-key-function/package.json index 547c07bfffd0..4fcd2d089c00 100644 --- a/packages/jest-create-cache-key-function/package.json +++ b/packages/jest-create-cache-key-function/package.json @@ -14,7 +14,7 @@ "jest-util": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 20272a7b67eb..44589904b8f0 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -27,7 +27,7 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 1970c08c8d10..fbf6699595e3 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -23,7 +23,7 @@ "@types/node": "*" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 739341cc553a..dc429ab0b2b8 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -32,7 +32,7 @@ "pretty-format": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 44046683f5a1..7fc299d4ec25 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -38,7 +38,7 @@ } }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 92090fe9757e..92d0ce33137e 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index dd8fd5b493a2..cee6d9d7ce08 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -23,7 +23,7 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-expect/package.json b/packages/jest-expect/package.json index 251fbf73ce09..97b8eb3d5437 100644 --- a/packages/jest-expect/package.json +++ b/packages/jest-expect/package.json @@ -25,7 +25,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 0ec6870b856c..f1283d241621 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -29,7 +29,7 @@ "@types/sinonjs__fake-timers": "^8.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index 356782c0248c..9d1dd162cd1a 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-get-type" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 348fc7311918..a98bbf2ff347 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-globals" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index c9efad3cb459..b0c6126a6888 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -38,7 +38,7 @@ "fsevents": "^2.3.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index b0af3e11a6f0..081df7772ec4 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -39,7 +39,7 @@ "@types/co": "^4.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index aec7029e5d95..836c55bb7767 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -24,7 +24,7 @@ "@types/node": "*" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 7461d736605b..bb3b88a1d8c0 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-matcher-utils" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 46be06525f29..a090d5aedc47 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-message-util" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 37ce57d56f71..5c48cdd8bd5a 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 5b3a32ce29d9..bcd8138832fa 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -18,7 +18,7 @@ "@jest/test-result": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index 7c7efc628aed..cc4e5f8795f7 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -10,7 +10,7 @@ "@types/node": "*" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index dfb451305639..c4b7d94be9dd 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -40,7 +40,7 @@ "jest-runtime": "./bin/jest-runtime-cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 5b065ba34b2b..70991f25abd5 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -63,7 +63,7 @@ } }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 694707bec6be..4ad5912e5dcc 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -28,7 +28,7 @@ "jest-runtime": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index cd66b4e8f988..f6479c0d640d 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -35,7 +35,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 99dde0f6c23d..0562a517af2d 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -49,7 +49,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 8d9fad927ab2..d3df78c2a964 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -47,7 +47,7 @@ "jest-environment-node": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-schemas/package.json b/packages/jest-schemas/package.json index 977931d88965..921dc0ac067c 100644 --- a/packages/jest-schemas/package.json +++ b/packages/jest-schemas/package.json @@ -20,7 +20,7 @@ "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 32a1402a7552..545200d4bd8f 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -54,7 +54,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index b7a2d05b9134..41b14c46d170 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -25,7 +25,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index b462a1548ce5..683f326711a1 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -27,7 +27,7 @@ "jest-resolve": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 7fd6f193945d..15200f8e6821 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -27,7 +27,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 27484d70e262..7c2733d51a2e 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -43,7 +43,7 @@ "dedent": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index fa55541874b9..99cd1cb468d2 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-types" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 4b5b1c0cd36e..6bd292e546b6 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -29,7 +29,7 @@ "@types/picomatch": "^2.2.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 98513f30df49..3b9d34e46ab3 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -28,7 +28,7 @@ "@types/yargs": "^17.0.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index a74eaafc50b6..0e0487b7d823 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -30,7 +30,7 @@ "url": "https://github.com/jestjs/jest/issues" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "homepage": "https://jestjs.io/", "license": "MIT", diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 2321b78a6bc2..353db3d2f12f 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -33,7 +33,7 @@ "worker-farm": "^1.6.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest/package.json b/packages/jest/package.json index 86da00852d86..260d4cbbb9c0 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -32,7 +32,7 @@ }, "bin": "./bin/jest.js", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 2f0481fa767c..2dd1fe704758 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -34,7 +34,7 @@ "react-test-renderer": "17.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/test-globals/package.json b/packages/test-globals/package.json index 2e92280850ae..dea7dd8deb4d 100644 --- a/packages/test-globals/package.json +++ b/packages/test-globals/package.json @@ -18,6 +18,6 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" } } diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 63be4ec2907e..16e41f0620d5 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -24,6 +24,6 @@ "@types/semver": "^7.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" } } From 44f0b41fccdfb672b266d71c3db040190d16128d Mon Sep 17 00:00:00 2001 From: eryue0220 Date: Wed, 30 Aug 2023 16:49:19 +0800 Subject: [PATCH 02/14] fix: ci && upgrade changelog --- CHANGELOG.md | 2 ++ constraints.pro | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c34ab955b6..c69c60b1ba0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Chore & Maintenance +- `[jest]` Upgrade jest support node version ([#14460](https://github.com/jestjs/jest/pull/14460)) + ## 29.6.4 ### Fixes diff --git a/constraints.pro b/constraints.pro index e0f1abbe277e..92ed9f982484 100644 --- a/constraints.pro +++ b/constraints.pro @@ -57,7 +57,7 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :- workspace_field(WorkspaceCwd, 'private', true). % Enforces the engines.node field for public workspace -gen_enforced_field(WorkspaceCwd, 'engines.node', '^14.15.0 || ^16.10.0 || >=18.0.0') :- +gen_enforced_field(WorkspaceCwd, 'engines.node', '^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Enforces the main and types field to start with ./ From d341437a67df6716ceecbcf2cd141ae99413046a Mon Sep 17 00:00:00 2001 From: eryue0220 Date: Thu, 31 Aug 2023 15:18:30 +0800 Subject: [PATCH 03/14] fix: dep version --- constraints.pro | 2 +- package.json | 2 +- packages/babel-jest/package.json | 2 +- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 2 +- packages/diff-sequences/package.json | 2 +- packages/expect-utils/package.json | 2 +- packages/expect/package.json | 2 +- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-create-cache-key-function/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-environment-jsdom/package.json | 2 +- packages/jest-environment-node/package.json | 2 +- packages/jest-environment/package.json | 2 +- packages/jest-expect/package.json | 2 +- packages/jest-fake-timers/package.json | 2 +- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 2 +- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-leak-detector/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-mock/package.json | 2 +- packages/jest-phabricator/package.json | 2 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve-dependencies/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-schemas/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 2 +- packages/jest-test-sequencer/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- packages/pretty-format/package.json | 2 +- packages/test-globals/package.json | 2 +- packages/test-utils/package.json | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/constraints.pro b/constraints.pro index 92ed9f982484..5e91586b3084 100644 --- a/constraints.pro +++ b/constraints.pro @@ -57,7 +57,7 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :- workspace_field(WorkspaceCwd, 'private', true). % Enforces the engines.node field for public workspace -gen_enforced_field(WorkspaceCwd, 'engines.node', '^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0') :- +gen_enforced_field(WorkspaceCwd, 'engines.node', '^16.10.0 || ^18.0.0 || >=20.0.0') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Enforces the main and types field to start with ./ diff --git a/package.json b/package.json index ab0478b579ab..c03edfd4c88c 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "logo": "https://opencollective.com/jest/logo.txt" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "resolutions": { "@types/node": "~14.14.45", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 73c8133dae81..e76ca1187d7b 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -35,7 +35,7 @@ "@babel/core": "^7.8.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 8b02b72d7962..1b00d5fedd51 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -7,7 +7,7 @@ "directory": "packages/babel-plugin-jest-hoist" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 5f0de61c6e6d..d9fa3d3ec6c3 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -20,7 +20,7 @@ "@babel/core": "^7.0.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 163de0412e6a..7945c54f3f42 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -16,7 +16,7 @@ "diff" ], "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/packages/expect-utils/package.json b/packages/expect-utils/package.json index c76e374845ad..6a3e0dcf4bc0 100644 --- a/packages/expect-utils/package.json +++ b/packages/expect-utils/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/expect/package.json b/packages/expect/package.json index 80ba58e7fc23..064e34d09384 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -34,7 +34,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 156a455f173e..34056e680805 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -22,7 +22,7 @@ "p-limit": "^3.1.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index a46cdddd9aa5..2ccdd4ae0a56 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -50,7 +50,7 @@ "tempy": "^1.0.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index cfc6d4478290..5f0a60886954 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -46,7 +46,7 @@ "jest": "./bin/jest.js" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index fa182a6ce189..e692c1265892 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -62,7 +62,7 @@ "typescript": "^5.0.4" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index c0acb77de207..ea4e7728a761 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 33d30da2b08a..4ba742820c69 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -57,7 +57,7 @@ } }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-create-cache-key-function/package.json b/packages/jest-create-cache-key-function/package.json index 4fcd2d089c00..9920a3e3fa8d 100644 --- a/packages/jest-create-cache-key-function/package.json +++ b/packages/jest-create-cache-key-function/package.json @@ -14,7 +14,7 @@ "jest-util": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 44589904b8f0..11ae0c3d2cf4 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -27,7 +27,7 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index fbf6699595e3..5259461eb92f 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -23,7 +23,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index dc429ab0b2b8..4982ba3172f0 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -32,7 +32,7 @@ "pretty-format": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 7fc299d4ec25..451e2d931f17 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -38,7 +38,7 @@ } }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 92d0ce33137e..6baaaeb0b398 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index cee6d9d7ce08..cac433516e07 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -23,7 +23,7 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-expect/package.json b/packages/jest-expect/package.json index 97b8eb3d5437..656ee6db5ed7 100644 --- a/packages/jest-expect/package.json +++ b/packages/jest-expect/package.json @@ -25,7 +25,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index f1283d241621..306bd5f44ad4 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -29,7 +29,7 @@ "@types/sinonjs__fake-timers": "^8.1.2" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index 9d1dd162cd1a..7008684128c7 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-get-type" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index a98bbf2ff347..35fee7ae7423 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-globals" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index b0c6126a6888..d24e70ef2397 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -38,7 +38,7 @@ "fsevents": "^2.3.2" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 081df7772ec4..32c3835523c5 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -39,7 +39,7 @@ "@types/co": "^4.6.2" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 836c55bb7767..4e4ff07ff3c4 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -24,7 +24,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index bb3b88a1d8c0..2e6aca00d98b 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-matcher-utils" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index a090d5aedc47..c82517549bea 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-message-util" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 5c48cdd8bd5a..9ee27bfcdd18 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index bcd8138832fa..c5f2417e06b2 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -18,7 +18,7 @@ "@jest/test-result": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index cc4e5f8795f7..8960706dca12 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -10,7 +10,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index c4b7d94be9dd..d58bef9cef78 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -40,7 +40,7 @@ "jest-runtime": "./bin/jest-runtime-cli.js" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 70991f25abd5..4f12a1b14cae 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -63,7 +63,7 @@ } }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 4ad5912e5dcc..4e26e9ac7fd5 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -28,7 +28,7 @@ "jest-runtime": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index f6479c0d640d..c3a9815b1953 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -35,7 +35,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 0562a517af2d..3c4eb8d12067 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -49,7 +49,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index d3df78c2a964..9fcd92061268 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -47,7 +47,7 @@ "jest-environment-node": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-schemas/package.json b/packages/jest-schemas/package.json index 921dc0ac067c..5d104f1a61ab 100644 --- a/packages/jest-schemas/package.json +++ b/packages/jest-schemas/package.json @@ -20,7 +20,7 @@ "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 545200d4bd8f..3710ebc7260a 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -54,7 +54,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index 41b14c46d170..e860a1c19a1c 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -25,7 +25,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 683f326711a1..b2a7511b1203 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -27,7 +27,7 @@ "jest-resolve": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 15200f8e6821..e486749f3ec8 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -27,7 +27,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 7c2733d51a2e..63c7ae960578 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -43,7 +43,7 @@ "dedent": "^1.0.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 99cd1cb468d2..c060f9779b5d 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-types" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 6bd292e546b6..f1aa1e5a9a0b 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -29,7 +29,7 @@ "@types/picomatch": "^2.2.2" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 3b9d34e46ab3..51959e59435e 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -28,7 +28,7 @@ "@types/yargs": "^17.0.8" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 0e0487b7d823..e260a310ab4d 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -30,7 +30,7 @@ "url": "https://github.com/jestjs/jest/issues" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "homepage": "https://jestjs.io/", "license": "MIT", diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 353db3d2f12f..8c34a82e6ac5 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -33,7 +33,7 @@ "worker-farm": "^1.6.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest/package.json b/packages/jest/package.json index 260d4cbbb9c0..1757cd5aace4 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -32,7 +32,7 @@ }, "bin": "./bin/jest.js", "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 2dd1fe704758..66403c3a1b4a 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -34,7 +34,7 @@ "react-test-renderer": "17.0.2" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/test-globals/package.json b/packages/test-globals/package.json index dea7dd8deb4d..c7987e3e20b4 100644 --- a/packages/test-globals/package.json +++ b/packages/test-globals/package.json @@ -18,6 +18,6 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" } } diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 16e41f0620d5..0447624d71ba 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -24,6 +24,6 @@ "@types/semver": "^7.1.0" }, "engines": { - "node": "^16.10.0 || >=18.0.0 <19.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" } } From dbde8dbd1f12497bcf752d83b81d962813c30f56 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 31 Aug 2023 10:08:14 +0200 Subject: [PATCH 04/14] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c69c60b1ba0f..f82383871dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ### Chore & Maintenance -- `[jest]` Upgrade jest support node version ([#14460](https://github.com/jestjs/jest/pull/14460)) +`[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) ## 29.6.4 From 992920f8dbbae3d84a3ca4e87af011b52d636e02 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 11 Sep 2023 16:04:00 +0200 Subject: [PATCH 05/14] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a134c84246d..9ce0505afe96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ ### Chore & Maintenance - `[jest-cli]` Move internal config initialisation logic to the `create-jest` package ([#14465](https://github.com/jestjs/jest/pull/14453)) -`[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) +- `[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) ## 29.6.4 From e455a849724c5137a07e4dbf5876cc47cae044eb Mon Sep 17 00:00:00 2001 From: eryue0220 Date: Mon, 11 Sep 2023 22:24:22 +0800 Subject: [PATCH 06/14] chore: dep --- packages/create-jest/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-jest/package.json b/packages/create-jest/package.json index 9daa812dda0d..3b59b734af56 100644 --- a/packages/create-jest/package.json +++ b/packages/create-jest/package.json @@ -29,7 +29,7 @@ "prompts": "^2.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "publishConfig": { "access": "public" From d88a2c53de1e4455400470865fb0569c7eebcf19 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 18 Sep 2023 23:31:17 +0200 Subject: [PATCH 07/14] bump types/node --- package.json | 2 +- packages/jest-environment-jsdom/src/index.ts | 2 +- packages/jest-environment-node/src/index.ts | 1 - packages/jest-leak-detector/src/index.ts | 1 - packages/jest-resolve/src/fileWalkers.ts | 10 +--------- packages/jest-worker/src/workers/ChildProcessWorker.ts | 2 +- yarn.lock | 8 ++++---- 7 files changed, 8 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 196078675b8c..26b1b92f2496 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "resolutions": { - "@types/node": "~16.10.0", + "@types/node": "~16.18.0", "@types/react": "^18.2.21", "ansi-escapes/type-fest": "^2.0.0", "babel-jest": "workspace:^", diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 5fca82395957..994108dd2005 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -73,7 +73,7 @@ export default class JSDOMEnvironment implements JestEnvironment { throw new Error('JSDOM did not return a Window object'); } - // @ts-expect-error - for "universal" code (code should use `globalThis`) + // TODO: remove at some point - for "universal" code (code should use `globalThis`) global.global = global; // Node's error-message stack size is limited at 10, but it's pretty useful diff --git a/packages/jest-environment-node/src/index.ts b/packages/jest-environment-node/src/index.ts index 52e715f7351a..9510fdba8246 100644 --- a/packages/jest-environment-node/src/index.ts +++ b/packages/jest-environment-node/src/index.ts @@ -129,7 +129,6 @@ export default class NodeEnvironment implements JestEnvironment { } } - // @ts-expect-error - Buffer and gc is "missing" global.global = global; global.Buffer = Buffer; global.ArrayBuffer = ArrayBuffer; diff --git a/packages/jest-leak-detector/src/index.ts b/packages/jest-leak-detector/src/index.ts index 3de50dacac7b..bea46b4a45e9 100644 --- a/packages/jest-leak-detector/src/index.ts +++ b/packages/jest-leak-detector/src/index.ts @@ -63,7 +63,6 @@ export default class LeakDetector { } private _runGarbageCollector() { - // @ts-expect-error: not a function on `globalThis` const isGarbageCollectorHidden = globalThis.gc == null; // GC is usually hidden, so we have to expose it before running. diff --git a/packages/jest-resolve/src/fileWalkers.ts b/packages/jest-resolve/src/fileWalkers.ts index 0228a8a723c3..50777ba0fa50 100644 --- a/packages/jest-resolve/src/fileWalkers.ts +++ b/packages/jest-resolve/src/fileWalkers.ts @@ -28,15 +28,7 @@ function statSyncCached(path: string): IPathType { return result; } - let stat; - try { - // @ts-expect-error TS2554 - throwIfNoEntry is only available in recent version of node, but inclusion of the option is a backward compatible no-op. - stat = fs.statSync(path, {throwIfNoEntry: false}); - } catch (e: any) { - if (!(e && (e.code === 'ENOENT' || e.code === 'ENOTDIR'))) { - throw e; - } - } + const stat = fs.statSync(path, {throwIfNoEntry: false}); if (stat) { if (stat.isFile() || stat.isFIFO()) { diff --git a/packages/jest-worker/src/workers/ChildProcessWorker.ts b/packages/jest-worker/src/workers/ChildProcessWorker.ts index 5292a870c581..8040ed953150 100644 --- a/packages/jest-worker/src/workers/ChildProcessWorker.ts +++ b/packages/jest-worker/src/workers/ChildProcessWorker.ts @@ -486,7 +486,7 @@ export default class ChildProcessWorker * @returns Process id. */ getWorkerSystemId(): number { - return this._child.pid; + return this._child.pid!; } getStdout(): NodeJS.ReadableStream | null { diff --git a/yarn.lock b/yarn.lock index 15699dae8446..03a1c01e0684 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5111,10 +5111,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:~16.10.0": - version: 16.10.9 - resolution: "@types/node@npm:16.10.9" - checksum: b47c3e3896ce243d3bc9e356578d4d607357d9ea0c1445a15cb564341580ac4db4f95677bf15fd354e46343edbd171ac19701740a53637234411da5b66c883a4 +"@types/node@npm:~16.18.0": + version: 16.18.52 + resolution: "@types/node@npm:16.18.52" + checksum: 6b1f27a848a69a70039cb27c2583317b5d051990933955c42bc2a2f299266ffa360f7cc3c7089d04fdf39144c476d475931900f00dabbc4f933eeb2d664f9778 languageName: node linkType: hard From 2fc7d7dd2422b10e16adf7cb7fc235d04162e259 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 18 Sep 2023 23:34:58 +0200 Subject: [PATCH 08/14] move changelog entry --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee8210ab3be0..d963b1d77837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Chore & Maintenance +- `[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) + ## 29.7.0 ### Features @@ -30,7 +32,6 @@ ### Chore & Maintenance - `[jest-cli]` Move internal config initialisation logic to the `create-jest` package ([#14465](https://github.com/jestjs/jest/pull/14453)) -- `[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) ## 29.6.4 From 86591bebda0ce5a391e16f5af3febca1b9745ff1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 18 Sep 2023 23:36:06 +0200 Subject: [PATCH 09/14] set v18 minimum --- constraints.pro | 2 +- package.json | 2 +- packages/babel-jest/package.json | 2 +- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 2 +- packages/create-jest/package.json | 2 +- packages/diff-sequences/package.json | 2 +- packages/expect-utils/package.json | 2 +- packages/expect/package.json | 2 +- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-create-cache-key-function/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-environment-jsdom/package.json | 2 +- packages/jest-environment-node/package.json | 2 +- packages/jest-environment/package.json | 2 +- packages/jest-expect/package.json | 2 +- packages/jest-fake-timers/package.json | 2 +- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 2 +- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-leak-detector/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-mock/package.json | 2 +- packages/jest-phabricator/package.json | 2 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve-dependencies/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-schemas/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 2 +- packages/jest-test-sequencer/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- packages/pretty-format/package.json | 2 +- packages/test-globals/package.json | 2 +- packages/test-utils/package.json | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/constraints.pro b/constraints.pro index f4a4f24f44c9..eb59863a1c6c 100644 --- a/constraints.pro +++ b/constraints.pro @@ -57,7 +57,7 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :- workspace_field(WorkspaceCwd, 'private', true). % Enforces the engines.node field for public workspace -gen_enforced_field(WorkspaceCwd, 'engines.node', '^16.10.0 || ^18.0.0 || >=20.0.0') :- +gen_enforced_field(WorkspaceCwd, 'engines.node', '^16.10.0 || ^18.12.0 || >=20.0.0') :- \+ workspace_field(WorkspaceCwd, 'private', true). % Enforces the main and types field to start with ./ diff --git a/package.json b/package.json index 26b1b92f2496..ac6b3fce29c6 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "logo": "https://opencollective.com/jest/logo.txt" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "resolutions": { "@types/node": "~16.18.0", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 6e64b2776fe7..b783f4f16809 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -35,7 +35,7 @@ "@babel/core": "^7.8.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 1b00d5fedd51..9708b66d2490 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -7,7 +7,7 @@ "directory": "packages/babel-plugin-jest-hoist" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index d9fa3d3ec6c3..0fda8bd9bf32 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -20,7 +20,7 @@ "@babel/core": "^7.0.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/create-jest/package.json b/packages/create-jest/package.json index 6e701b18c3ce..627bad9a629a 100644 --- a/packages/create-jest/package.json +++ b/packages/create-jest/package.json @@ -29,7 +29,7 @@ "prompts": "^2.0.1" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 7945c54f3f42..ad26c505acfe 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -16,7 +16,7 @@ "diff" ], "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/packages/expect-utils/package.json b/packages/expect-utils/package.json index 1c4b937b98d8..d5197659c9db 100644 --- a/packages/expect-utils/package.json +++ b/packages/expect-utils/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/expect/package.json b/packages/expect/package.json index 1219190deff2..96fb564168c7 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -34,7 +34,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 4836a767c41e..18981b9a9837 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -22,7 +22,7 @@ "p-limit": "^3.1.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 2dd7812fd1a8..738eb54e7f9c 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -50,7 +50,7 @@ "tempy": "^1.0.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 395b71b4e755..b29d6cb5fa8a 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -43,7 +43,7 @@ "jest": "./bin/jest.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 17dbc606fd6f..d0903e0e6a0b 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -62,7 +62,7 @@ "typescript": "^5.0.4" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index c1863d4a1900..27b8f139ad63 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 04282d93784b..6f2e036df8a3 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -57,7 +57,7 @@ } }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-create-cache-key-function/package.json b/packages/jest-create-cache-key-function/package.json index 551b1bf808d6..ebb08c2fb08f 100644 --- a/packages/jest-create-cache-key-function/package.json +++ b/packages/jest-create-cache-key-function/package.json @@ -14,7 +14,7 @@ "jest-util": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index ebf8df82cecb..eb182798db4d 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -27,7 +27,7 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 1c46a416617a..0497db933410 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -23,7 +23,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index fe33c8c14532..751eeb2610c2 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -32,7 +32,7 @@ "pretty-format": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 0ce56e994781..033614f3d268 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -38,7 +38,7 @@ } }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 50aae7266f5b..b2a7ee424f70 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -28,7 +28,7 @@ "@jest/test-utils": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 78e6ae9a820d..eae4c483baa4 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -23,7 +23,7 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-expect/package.json b/packages/jest-expect/package.json index 2df0ec01a150..3ec6a7497efe 100644 --- a/packages/jest-expect/package.json +++ b/packages/jest-expect/package.json @@ -25,7 +25,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 26f4ce470449..29279d9695d1 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -29,7 +29,7 @@ "@types/sinonjs__fake-timers": "^8.1.2" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index 7008684128c7..5daa3eff7b9f 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-get-type" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index d3d47b357397..097c20179b65 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-globals" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 4ed75750f3e4..bfe0c5e2e4ac 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -38,7 +38,7 @@ "fsevents": "^2.3.2" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 2b1ba5c4b718..2b9e44b7846e 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -39,7 +39,7 @@ "@types/co": "^4.6.2" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 897986f882f2..ab718b7282a5 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -24,7 +24,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 1e520652d3f5..9c276aeba99a 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-matcher-utils" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 14dbd61f4024..a363234e6594 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-message-util" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index b672e639af58..24c2cb7e68be 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -26,7 +26,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 047e6333f97b..8adfa79ebb71 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -18,7 +18,7 @@ "@jest/test-result": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index 8960706dca12..0edb37ecb2de 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -10,7 +10,7 @@ "@types/node": "*" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 24bdd4bfc292..173a70e98116 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -40,7 +40,7 @@ "jest-runtime": "./bin/jest-runtime-cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index cd400b7940b5..5ebf6cfb7403 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -63,7 +63,7 @@ } }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 64ac4fe90571..11934ebc3214 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -28,7 +28,7 @@ "jest-runtime": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 61a5618f045e..11b49ce48523 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -35,7 +35,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index e66ce43c97f9..bd0ec7b49e1a 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -49,7 +49,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index b87f46fb2c79..228a14bdad8e 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -47,7 +47,7 @@ "jest-environment-node": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-schemas/package.json b/packages/jest-schemas/package.json index 5d104f1a61ab..7ed94363463e 100644 --- a/packages/jest-schemas/package.json +++ b/packages/jest-schemas/package.json @@ -20,7 +20,7 @@ "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 35d30d304249..c53b6317fec1 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -54,7 +54,7 @@ "tsd-lite": "^0.7.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index e860a1c19a1c..8a65f241f086 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -25,7 +25,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index dd5df54cff2f..909516fbbd5d 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -27,7 +27,7 @@ "jest-resolve": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 46ab3b3c382b..95d7b5c02fa4 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -27,7 +27,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index e86512532f34..ac40d75b3942 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -43,7 +43,7 @@ "dedent": "^1.0.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index c060f9779b5d..1ac21a8a3759 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-types" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "license": "MIT", "main": "./build/index.js", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index c68826cccaf9..b65d0c5391a5 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -29,7 +29,7 @@ "@types/picomatch": "^2.2.2" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 88200306964c..43df3220f431 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -28,7 +28,7 @@ "@types/yargs": "^17.0.8" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 0e1638dddc78..eef1adf555e3 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -30,7 +30,7 @@ "url": "https://github.com/jestjs/jest/issues" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "homepage": "https://jestjs.io/", "license": "MIT", diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 8a78fb619565..1dbe257653ea 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -33,7 +33,7 @@ "worker-farm": "^1.6.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest/package.json b/packages/jest/package.json index 9253b311111d..21e2081c9fe7 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -32,7 +32,7 @@ }, "bin": "./bin/jest.js", "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "repository": { "type": "git", diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 4aed6a64b939..7c510b886789 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -34,7 +34,7 @@ "react-test-renderer": "17.0.2" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/test-globals/package.json b/packages/test-globals/package.json index c203bb31dece..720062e2d994 100644 --- a/packages/test-globals/package.json +++ b/packages/test-globals/package.json @@ -18,6 +18,6 @@ "jest-mock": "workspace:^" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" } } diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 1c95b34091f9..4239cd8439c1 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -24,6 +24,6 @@ "@types/semver": "^7.1.0" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" } } From 6aec3959cb51c4403aebfa786e5bd8b6edcacd07 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 18 Sep 2023 23:39:37 +0200 Subject: [PATCH 10/14] fix more type errors with newer node types --- packages/jest-circus/src/eventHandler.ts | 11 +++++--- packages/jest-circus/src/run.ts | 6 +++-- packages/jest-circus/src/state.ts | 9 ++++--- packages/jest-circus/src/types.ts | 14 ----------- packages/jest-core/src/runJest.ts | 1 - .../jest-jasmine2/src/jasmine/jasmineLight.ts | 11 +++++--- packages/jest-jasmine2/src/jestExpect.ts | 5 ++-- packages/jest-runner/src/runTest.ts | 1 - packages/jest-runtime/src/index.ts | 25 +++---------------- packages/jest-types/src/Circus.ts | 6 ++--- 10 files changed, 33 insertions(+), 56 deletions(-) diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 4c401cada760..8a7e2403e52b 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {Circus} from '@jest/types'; +import type {Circus, Global} from '@jest/types'; import {invariant} from 'jest-util'; import { injectGlobalErrorHandlers, @@ -217,7 +217,7 @@ const eventHandler: Circus.EventHandler = (event, state) => { case 'test_retry': { const logErrorsBeforeRetry: boolean = // eslint-disable-next-line no-restricted-globals - global[LOG_ERRORS_BEFORE_RETRY] || false; + ((global as Global.Global)[LOG_ERRORS_BEFORE_RETRY] as any) || false; if (logErrorsBeforeRetry) { event.test.retryReasons.push(...event.test.errors); } @@ -227,8 +227,11 @@ const eventHandler: Circus.EventHandler = (event, state) => { case 'run_start': { state.hasStarted = true; /* eslint-disable no-restricted-globals */ - global[TEST_TIMEOUT_SYMBOL] && - (state.testTimeout = global[TEST_TIMEOUT_SYMBOL]); + if ((global as Global.Global)[TEST_TIMEOUT_SYMBOL]) { + state.testTimeout = (global as Global.Global)[ + TEST_TIMEOUT_SYMBOL + ] as number; + } /* eslint-enable */ break; } diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index 0aaf6d612b72..cb1eb7d70b86 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -9,6 +9,7 @@ import {AsyncLocalStorage} from 'async_hooks'; import pLimit = require('p-limit'); import {jestExpect} from '@jest/expect'; import type {Circus} from '@jest/types'; +import type {Global} from '@jest/types'; import {invariant} from 'jest-util'; import shuffleArray, {RandomNumberGenerator, rngBuilder} from './shuffleArray'; import {dispatch, getState} from './state'; @@ -61,8 +62,9 @@ const _runTestsForDescribeBlock = async ( } // Tests that fail and are retried we run after other tests - // eslint-disable-next-line no-restricted-globals - const retryTimes = parseInt(global[RETRY_TIMES], 10) || 0; + const retryTimes = + // eslint-disable-next-line no-restricted-globals + parseInt((global as Global.Global)[RETRY_TIMES] as string, 10) || 0; const deferredRetryTests = []; if (rng) { diff --git a/packages/jest-circus/src/state.ts b/packages/jest-circus/src/state.ts index 0540dfd41116..ecd94cbf14c1 100644 --- a/packages/jest-circus/src/state.ts +++ b/packages/jest-circus/src/state.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {Circus} from '@jest/types'; +import type {Circus, Global} from '@jest/types'; import eventHandler from './eventHandler'; import formatNodeAssertErrors from './formatNodeAssertErrors'; import {STATE_SYM} from './types'; @@ -39,14 +39,15 @@ const createState = (): Circus.State => { /* eslint-disable no-restricted-globals */ export const resetState = (): void => { - global[STATE_SYM] = createState(); + (global as Global.Global)[STATE_SYM] = createState(); }; resetState(); -export const getState = (): Circus.State => global[STATE_SYM]; +export const getState = (): Circus.State => + (global as Global.Global)[STATE_SYM] as Circus.State; export const setState = (state: Circus.State): Circus.State => - (global[STATE_SYM] = state); + ((global as Global.Global)[STATE_SYM] = state); /* eslint-enable */ export const dispatch = async (event: Circus.AsyncEvent): Promise => { diff --git a/packages/jest-circus/src/types.ts b/packages/jest-circus/src/types.ts index 6af26152b661..704a35b3733d 100644 --- a/packages/jest-circus/src/types.ts +++ b/packages/jest-circus/src/types.ts @@ -5,22 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {Circus} from '@jest/types'; - export const STATE_SYM = Symbol('JEST_STATE_SYMBOL'); export const RETRY_TIMES = Symbol.for('RETRY_TIMES'); // To pass this value from Runtime object to state we need to use global[sym] export const TEST_TIMEOUT_SYMBOL = Symbol.for('TEST_TIMEOUT_SYMBOL'); export const LOG_ERRORS_BEFORE_RETRY = Symbol.for('LOG_ERRORS_BEFORE_RETRY'); - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace NodeJS { - interface Global { - [STATE_SYM]: Circus.State; - [RETRY_TIMES]: string; - [TEST_TIMEOUT_SYMBOL]: number; - [LOG_ERRORS_BEFORE_RETRY]: boolean; - } - } -} diff --git a/packages/jest-core/src/runJest.ts b/packages/jest-core/src/runJest.ts index 8aae665e6d23..9b89a56f016a 100644 --- a/packages/jest-core/src/runJest.ts +++ b/packages/jest-core/src/runJest.ts @@ -294,7 +294,6 @@ export default async function runJest({ ...testSchedulerContext, }); - // @ts-expect-error - second arg is unsupported (but harmless) in Node 14 performance.mark('jest/scheduleAndRun:start', { detail: {numTests: allTests.length}, }); diff --git a/packages/jest-jasmine2/src/jasmine/jasmineLight.ts b/packages/jest-jasmine2/src/jasmine/jasmineLight.ts index 3a1cb0b66c1e..9146bde3e1cc 100644 --- a/packages/jest-jasmine2/src/jasmine/jasmineLight.ts +++ b/packages/jest-jasmine2/src/jasmine/jasmineLight.ts @@ -30,6 +30,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* eslint-disable sort-keys, local/prefer-spread-eventually, local/prefer-rest-params-eventually */ +import type {Global} from '@jest/types'; import type {Jasmine, SpecDefinitionsFn} from '../types'; import Env from './Env'; import JsApiReporter from './JsApiReporter'; @@ -58,12 +59,16 @@ export const create = function (createOptions: Record): Jasmine { configurable: true, enumerable: true, get() { - // eslint-disable-next-line no-restricted-globals - return global[testTimeoutSymbol] || createOptions.testTimeout || 5000; + return ( + // eslint-disable-next-line no-restricted-globals + (global as Global.Global)[testTimeoutSymbol] || + createOptions.testTimeout || + 5000 + ); }, set(value) { // eslint-disable-next-line no-restricted-globals - global[testTimeoutSymbol] = value; + (global as Global.Global)[testTimeoutSymbol] = value; }, }); diff --git a/packages/jest-jasmine2/src/jestExpect.ts b/packages/jest-jasmine2/src/jestExpect.ts index 4444ae59c834..c1d15059d161 100644 --- a/packages/jest-jasmine2/src/jestExpect.ts +++ b/packages/jest-jasmine2/src/jestExpect.ts @@ -8,15 +8,16 @@ /* eslint-disable local/prefer-spread-eventually */ import {jestExpect} from '@jest/expect'; +import type {Global} from '@jest/types'; import type {JasmineMatchersObject} from './types'; export default function jestExpectAdapter(config: {expand: boolean}): void { // eslint-disable-next-line no-restricted-globals - global.expect = jestExpect; + (global as Global.Global).expect = jestExpect; jestExpect.setState({expand: config.expand}); // eslint-disable-next-line no-restricted-globals - const jasmine = global.jasmine; + const jasmine = (global as Global.Global).jasmine; jasmine.anything = jestExpect.anything; jasmine.any = jestExpect.any; jasmine.objectContaining = jestExpect.objectContaining; diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index 015956be9857..ffb458157587 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -353,7 +353,6 @@ async function runTestInternal( } if (globalConfig.logHeapUsage) { - // @ts-expect-error - doesn't exist on globalThis globalThis.gc?.(); result.memoryUsage = process.memoryUsage().heapUsed; diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index c38d110c1eb9..61074414b2b5 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -942,6 +942,7 @@ export default class Runtime { exports: {}, filename: modulePath, id: modulePath, + isPreloading: false, loaded: false, path: path.dirname(modulePath), }; @@ -966,9 +967,7 @@ export default class Runtime { requireInternalModule(from: string, to?: string): T { if (to) { - const require = ( - nativeModule.createRequire ?? nativeModule.createRequireFromPath - )(from); + const require = nativeModule.createRequire(from); if (INTERNAL_MODULE_REQUIRE_OUTSIDE_OPTIMIZED_MODULES.has(to)) { return require(to); } @@ -1054,6 +1053,7 @@ export default class Runtime { exports: {}, filename: modulePath, id: modulePath, + isPreloading: false, loaded: false, path: path.dirname(modulePath), }; @@ -1803,6 +1803,7 @@ export default class Runtime { exports: {}, filename, id: filename, + isPreloading: false, loaded: false, path: path.dirname(filename), }); @@ -1821,24 +1822,6 @@ export default class Runtime { if ('createRequire' in nativeModule) { Module.createRequire = createRequire; } - if ('createRequireFromPath' in nativeModule) { - Module.createRequireFromPath = function createRequireFromPath( - filename: string | URL, - ) { - if (typeof filename !== 'string') { - const error: NodeJS.ErrnoException = new TypeError( - `The argument 'filename' must be string. Received '${filename}'.${ - filename instanceof URL - ? ' Use createRequire for URL filename.' - : '' - }`, - ); - error.code = 'ERR_INVALID_ARG_TYPE'; - throw error; - } - return createRequire(filename); - }; - } if ('syncBuiltinESMExports' in nativeModule) { // cast since TS seems very confused about whether it exists or not (Module as any).syncBuiltinESMExports = diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index 2b27c314f541..72e61500e7ed 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -213,10 +213,8 @@ export type RunResult = { export type TestResults = Array; export type GlobalErrorHandlers = { - uncaughtException: Array<(exception: Exception) => void>; - unhandledRejection: Array< - (exception: Exception, promise: Promise) => void - >; + uncaughtException: Array; + unhandledRejection: Array; }; export type State = { From e4519c528740a8b8fae1376208a4cdf0eeec1dec Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Sep 2023 00:07:08 +0200 Subject: [PATCH 11/14] avoid pnpapi import --- packages/jest-circus/src/globalErrorHandlers.ts | 5 +++-- .../src/legacy-code-todo-rewrite/jestAdapterInit.ts | 3 ++- packages/jest-jasmine2/src/types.ts | 3 ++- packages/jest-types/src/Circus.ts | 3 ++- packages/jest-util/src/createProcessObject.ts | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/jest-circus/src/globalErrorHandlers.ts b/packages/jest-circus/src/globalErrorHandlers.ts index 27146fc4a1f2..317ae3d41d52 100644 --- a/packages/jest-circus/src/globalErrorHandlers.ts +++ b/packages/jest-circus/src/globalErrorHandlers.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import type * as Process from 'process'; import type {Circus} from '@jest/types'; import {dispatchSync} from './state'; @@ -14,7 +15,7 @@ const uncaught: NodeJS.UncaughtExceptionListener & }; export const injectGlobalErrorHandlers = ( - parentProcess: NodeJS.Process, + parentProcess: typeof Process, ): Circus.GlobalErrorHandlers => { const uncaughtException = process.listeners('uncaughtException').slice(); const unhandledRejection = process.listeners('unhandledRejection').slice(); @@ -26,7 +27,7 @@ export const injectGlobalErrorHandlers = ( }; export const restoreGlobalErrorHandlers = ( - parentProcess: NodeJS.Process, + parentProcess: typeof Process, originalErrorHandlers: Circus.GlobalErrorHandlers, ): void => { parentProcess.removeListener('uncaughtException', uncaught); diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts index 8b29cb7d1082..01c121317d97 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import type * as Process from 'process'; import type {JestEnvironment} from '@jest/environment'; import {JestExpect, jestExpect} from '@jest/expect'; import { @@ -51,7 +52,7 @@ export const initialize = async ({ globalConfig: Config.GlobalConfig; localRequire: (path: string) => T; testPath: string; - parentProcess: NodeJS.Process; + parentProcess: typeof Process; sendMessageToJest?: TestFileEvent; setGlobalsForRuntime: (globals: RuntimeGlobals) => void; }): Promise<{ diff --git a/packages/jest-jasmine2/src/types.ts b/packages/jest-jasmine2/src/types.ts index d2d74fae84f9..6ed1323b8ada 100644 --- a/packages/jest-jasmine2/src/types.ts +++ b/packages/jest-jasmine2/src/types.ts @@ -6,6 +6,7 @@ */ import type {AssertionError} from 'assert'; +import type * as Process from 'process'; import type {AsymmetricMatchers, JestExpect} from '@jest/expect'; import type CallTracker from './jasmine/CallTracker'; import type Env from './jasmine/Env'; @@ -69,7 +70,7 @@ export type Jasmine = { version: string; testPath: string; addMatchers: (matchers: JasmineMatchersObject) => void; -} & AsymmetricMatchers & {process: NodeJS.Process}; +} & AsymmetricMatchers & {process: typeof Process}; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index 72e61500e7ed..31906d9b7f95 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -5,9 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import type * as ProcessModule from 'process'; import type * as Global from './Global'; -type Process = NodeJS.Process; +type Process = typeof ProcessModule; export type DoneFn = Global.DoneFn; export type BlockFn = Global.BlockFn; diff --git a/packages/jest-util/src/createProcessObject.ts b/packages/jest-util/src/createProcessObject.ts index 252b121275be..baa6916a64fe 100644 --- a/packages/jest-util/src/createProcessObject.ts +++ b/packages/jest-util/src/createProcessObject.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import type * as Process from 'process'; import deepCyclicCopy from './deepCyclicCopy'; const BLACKLIST = new Set(['env', 'mainModule', '_events']); @@ -79,7 +80,7 @@ function createProcessEnv(): NodeJS.ProcessEnv { return Object.assign(proxy, process.env); } -export default function createProcessObject(): NodeJS.Process { +export default function createProcessObject(): typeof Process { const process = require('process'); const newProcess = deepCyclicCopy(process, { blacklist: BLACKLIST, From 1b406fdc89101ca27a086f6f1227ac3540dead2e Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Sep 2023 00:09:15 +0200 Subject: [PATCH 12/14] fix import --- packages/jest-circus/src/run.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index cb1eb7d70b86..c2cd6063cd1e 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -8,8 +8,7 @@ import {AsyncLocalStorage} from 'async_hooks'; import pLimit = require('p-limit'); import {jestExpect} from '@jest/expect'; -import type {Circus} from '@jest/types'; -import type {Global} from '@jest/types'; +import type {Circus, Global} from '@jest/types'; import {invariant} from 'jest-util'; import shuffleArray, {RandomNumberGenerator, rngBuilder} from './shuffleArray'; import {dispatch, getState} from './state'; From 9e94c5e037681668ea46dc846faf3537728f63dc Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Sep 2023 07:50:59 +0200 Subject: [PATCH 13/14] fix tests --- packages/jest-resolve/src/fileWalkers.ts | 9 ++++++++- .../src/__tests__/runtime_require_module.test.js | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/jest-resolve/src/fileWalkers.ts b/packages/jest-resolve/src/fileWalkers.ts index 50777ba0fa50..6821310439fb 100644 --- a/packages/jest-resolve/src/fileWalkers.ts +++ b/packages/jest-resolve/src/fileWalkers.ts @@ -28,7 +28,14 @@ function statSyncCached(path: string): IPathType { return result; } - const stat = fs.statSync(path, {throwIfNoEntry: false}); + let stat; + try { + stat = fs.statSync(path, {throwIfNoEntry: false}); + } catch (e: any) { + if (!(e && (e.code === 'ENOENT' || e.code === 'ENOTDIR'))) { + throw e; + } + } if (stat) { if (stat.isFile() || stat.isFIFO()) { diff --git a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js index 639e4c4503f5..46bd064769e8 100644 --- a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js +++ b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js @@ -41,6 +41,7 @@ describe('Runtime requireModule', () => { 'exports', 'filename', 'id', + 'isPreloading', 'loaded', 'path', 'parent', @@ -60,6 +61,7 @@ describe('Runtime requireModule', () => { 'exports', 'filename', 'id', + 'isPreloading', 'loaded', 'path', 'parent', From 6d9cec1fb4a91a3dee313d2428f452e4b42c2671 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 19 Sep 2023 08:20:42 +0200 Subject: [PATCH 14/14] type errors in test --- packages/babel-jest/src/__tests__/getCacheKey.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/babel-jest/src/__tests__/getCacheKey.test.ts b/packages/babel-jest/src/__tests__/getCacheKey.test.ts index fbe3a0b34b0c..eb9b2da1107b 100644 --- a/packages/babel-jest/src/__tests__/getCacheKey.test.ts +++ b/packages/babel-jest/src/__tests__/getCacheKey.test.ts @@ -20,6 +20,7 @@ afterEach(() => { jest.resetModules(); if (process.version === 'new-node-version') { + // @ts-expect-error: Testing purpose process.version = processVersion; } @@ -194,6 +195,7 @@ describe('getCacheKey', () => { test('if node version is changing', () => { // @ts-expect-error: Testing purpose delete process.version; + // @ts-expect-error: Testing purpose process.version = 'new-node-version'; const newCacheKey = getCacheKey!(sourceText, sourcePath, transformOptions);