From f83a50008ac7681b3578e29ff4b8ea6c519691db Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Fri, 21 Aug 2026 17:17:02 -0400 Subject: [PATCH] feat!: require Node.js 22.12+ The same change was made in our dependency `@netlify/dev`, so we must make this change as well before cutting a release: https://github.com/netlify/primitives/pull/745. --- .github/workflows/nuxt-module.yaml | 5 +---- .github/workflows/test.yaml | 5 ++--- package-lock.json | 6 +++--- packages/nuxt-module/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/vite-plugin/package.json | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nuxt-module.yaml b/.github/workflows/nuxt-module.yaml index 07b12001..acae8c66 100644 --- a/.github/workflows/nuxt-module.yaml +++ b/.github/workflows/nuxt-module.yaml @@ -17,7 +17,7 @@ jobs: node-version: ['24'] include: - os: ubuntu-latest - node-version: '20.19.0' + node-version: '22.12.0' fail-fast: false steps: - run: git config --global core.symlinks true @@ -42,9 +42,6 @@ jobs: - name: Build run: npm run build --workspaces - name: Lint - # skip linting on node 20 due to eslint issues - # specifically, TypeError: Object.groupBy is not a function - if: matrix.node-version != '20.19.0' run: npm run lint -w ./packages/nuxt-module - name: Typecheck run: npm run test:types -w ./packages/nuxt-module diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8559ff40..ad0445ed 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,9 +23,8 @@ jobs: node-install-version: ['24.15.0'] include: - os: ubuntu-latest - # min node-version required by optional native bindings (e.g. @oxc-parser) - node-version: '20.19.0' - node-install-version: '20.19.0' + node-version: '22.12.0' + node-install-version: '22.12.0' fail-fast: false steps: # Increasing the maximum number of open files. See: diff --git a/package-lock.json b/package-lock.json index 8f91c047..f455b635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31017,7 +31017,7 @@ "vue-tsc": "^3.3.5" }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=22.12.0" } }, "packages/nuxt-module/node_modules/typescript": { @@ -31047,7 +31047,7 @@ "vitest": "^4.1.9" }, "engines": { - "node": "^20.6.1 || >=22" + "node": ">=22.12.0" } }, "packages/test-utils/node_modules/@types/node": { @@ -31079,7 +31079,7 @@ "vitest": "^4.1.9" }, "engines": { - "node": "^20.6.1 || >=22" + "node": ">=22.12.0" }, "peerDependencies": { "vite": "^5 || ^6 || ^7 || ^8" diff --git a/packages/nuxt-module/package.json b/packages/nuxt-module/package.json index c6016050..77b9d199 100644 --- a/packages/nuxt-module/package.json +++ b/packages/nuxt-module/package.json @@ -4,7 +4,7 @@ "description": "Nuxt module providing local emulation of the Netlify environment", "type": "module", "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=22.12.0" }, "main": "./dist/module.mjs", "typesVersions": { diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 6e60b059..5e4d3b7e 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "engines": { - "node": "^20.6.1 || >=22" + "node": ">=22.12.0" }, "exports": "./src/main.ts", "scripts": { diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 4ec28757..caa312ef 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -4,7 +4,7 @@ "description": "Vite plugin with a local emulation of the Netlify environment", "type": "module", "engines": { - "node": "^20.6.1 || >=22" + "node": ">=22.12.0" }, "main": "./dist/main.js", "exports": "./dist/main.js",