From 7a5dfebd43b10f7ff77a4d495fbfca5e8ed609ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Chalk?= Date: Mon, 22 Sep 2025 16:15:38 +0200 Subject: [PATCH] ci: update local node version --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/code-coverage.yml | 4 ++-- .github/workflows/code-pushup-fork.yml | 2 +- .github/workflows/code-pushup.yml | 2 +- .github/workflows/release.yml | 4 ++-- .node-version | 1 + .nvmrc | 1 - .tool-versions | 1 - CONTRIBUTING.md | 2 +- eslint.config.js | 11 +++++++++++ package-lock.json | 3 --- package.json | 3 --- 12 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 .node-version delete mode 100644 .nvmrc delete mode 100644 .tool-versions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 962854194..c71f05f4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 @@ -42,7 +42,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 @@ -66,7 +66,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 @@ -90,7 +90,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 @@ -114,7 +114,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 @@ -134,7 +134,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index dcb157422..ad3287365 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Install dependencies run: npm ci @@ -43,7 +43,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Install dependencies run: npm ci diff --git a/.github/workflows/code-pushup-fork.yml b/.github/workflows/code-pushup-fork.yml index 4e89e0fae..0b920491d 100644 --- a/.github/workflows/code-pushup-fork.yml +++ b/.github/workflows/code-pushup-fork.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 diff --git a/.github/workflows/code-pushup.yml b/.github/workflows/code-pushup.yml index 9d236913e..a15c6c3e7 100644 --- a/.github/workflows/code-pushup.yml +++ b/.github/workflows/code-pushup.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Set base and head for Nx affected commands uses: nrwl/nx-set-shas@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99ae11618..6b7d2fce1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Install dependencies run: npm ci @@ -74,7 +74,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version-file: .node-version cache: npm - name: Install dependencies run: npm ci diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..b40402760 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24.8.0 diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 7d41c735d..000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -22.14.0 diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 604be079d..000000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -nodejs 22.14.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8c8e23a5..4c87bcf90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Prerequisites: -- Node.js installed (LTS version) +- Node.js installed (version specified in [`.node-version`](./.node-version)) Make sure to install dependencies: diff --git a/eslint.config.js b/eslint.config.js index 5830ca0f7..c25afb9dc 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,7 @@ import nxEslintPlugin from '@nx/eslint-plugin'; import jestExtendedPlugin from 'eslint-plugin-jest-extended'; import jsoncParser from 'jsonc-eslint-parser'; +import fs from 'node:fs'; import tseslint from 'typescript-eslint'; import node from '@code-pushup/eslint-config/node.js'; import typescript from '@code-pushup/eslint-config/typescript.js'; @@ -123,6 +124,16 @@ export default tseslint.config( 'sonarjs/no-duplicate-string': 'off', }, }, + { + // tests need only be compatible with local Node version + // publishable packages should pick up version range from "engines" in their package.json + files: ['e2e/**/*.ts', 'testing/**/*.ts'], + settings: { + node: { + version: fs.readFileSync('.node-version', 'utf8'), + }, + }, + }, { ignores: [ '**/*.mock.*', diff --git a/package-lock.json b/package-lock.json index 6b81834f4..ceb8ab72f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,9 +112,6 @@ "vitest": "1.3.1", "zod2md": "^0.2.4" }, - "engines": { - "node": ">=22.14" - }, "optionalDependencies": { "@esbuild/darwin-arm64": "^0.25.9", "@nx/nx-darwin-arm64": "^21.4.1", diff --git a/package.json b/package.json index 385e84c8c..f70cc974b 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,6 @@ "knip": "knip" }, "private": true, - "engines": { - "node": ">=22.14" - }, "dependencies": { "@code-pushup/portal-client": "^0.16.0", "@isaacs/cliui": "^8.0.2",