From 69f419213ecae370fc0499bbf5ddeeeafcbc5d23 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 27 Sep 2024 20:26:48 +0800 Subject: [PATCH] Revert "Pin Node.js to v22.6.0" (#16642) --- .github/workflows/dev-test.yml | 4 ++-- .github/workflows/prod-test.yml | 4 ++-- cspell.json | 1 + tests/integration/__tests__/config-resolution.js | 9 ++++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 117cd62b0e12..1d698f00fdc4 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -27,13 +27,13 @@ jobs: - "windows-latest" node: # Latest even version - - "22.6.0" + - "22" # Minimal version for development - "18" include: - os: "ubuntu-latest" # Pick a version that is fast (normally highest LTS version) - node: "22.6.0" + node: "22" ENABLE_CODE_COVERAGE: true FULL_TEST: true CHECK_TEST_PARSERS: true diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index b1853ca63b30..61b25b2e0dfe 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -56,13 +56,13 @@ jobs: - "windows-latest" node: # Latest even version - - "22.6.0" + - "22" # Minimal version for production - "14" include: - os: "ubuntu-latest" # Pick a version that is fast (normally highest LTS version) - node: "22.6.0" + node: "22" FULL_TEST: true # Versions not tested on linux, normally only even versions # If latest version is an odd number, it can be listed below too diff --git a/cspell.json b/cspell.json index 4eef9272b474..5c4e2dc743f7 100644 --- a/cspell.json +++ b/cspell.json @@ -290,6 +290,7 @@ "TSJS", "typecasted", "typecheck", + "TYPELESS", "Ubie", "Uchino", "Umidbek", diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js index 54f0b037ff0b..2689e4b72865 100644 --- a/tests/integration/__tests__/config-resolution.js +++ b/tests/integration/__tests__/config-resolution.js @@ -276,7 +276,8 @@ test(".js config file", async () => { "cjs-prettier-config-js-in-type-commonjs", "cjs-prettier-config-js-in-type-none", "cjs-prettierrc-js-in-type-commonjs", - "cjs-prettierrc-js-in-type-none", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "cjs-prettierrc-js-in-type-none", "mjs-prettier-config-js-in-type-module", "mjs-prettierrc-js-in-type-module", ]) { @@ -296,9 +297,11 @@ test(".js config file", async () => { const mjsError = /Unexpected token 'export'/u; for (const directoryName of [ "mjs-prettier-config-js-in-type-commonjs", - "mjs-prettier-config-js-in-type-none", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "mjs-prettier-config-js-in-type-none", "mjs-prettierrc-js-in-type-commonjs", - "mjs-prettierrc-js-in-type-none", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "mjs-prettierrc-js-in-type-none", ]) { const file = new URL(`./${directoryName}/foo.js`, parentDirectory); await expect(prettier.resolveConfig(file)).rejects.toThrow(mjsError);