From 90cc768132a45bb7846749877eac9113cded6688 Mon Sep 17 00:00:00 2001 From: humanbydefinition Date: Sun, 2 Aug 2026 12:35:53 +0200 Subject: [PATCH] chore: standardize on Node.js 24 LTS --- .github/workflows/contributors.yml | 11 ++++++++++- .github/workflows/deploy.yml | 17 ++++++++++------- .github/workflows/reconcile-contributors.yml | 15 ++++++++++++--- .nvmrc | 1 + package-lock.json | 3 +++ package.json | 16 ++++++++++++++++ 6 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index 5ab80ed6..cf04153a 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -43,10 +43,19 @@ jobs: exit 1 - name: Checkout canonical source - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@v6 with: persist-credentials: false + - name: Setup Node + uses: actions/setup-node@v7 + with: + node-version-file: .nvmrc + cache: npm + + - name: Report toolchain + run: node --version && npm --version + - name: Validate registry, tests, and generated README run: npm run check:contributors diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 37c41b07..21247324 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,27 +19,30 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + uses: actions/setup-node@v7 with: - node-version: 20 + node-version-file: .nvmrc cache: npm + - name: Report toolchain + run: node --version && npm --version + - name: Setup Pages - uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4 + uses: actions/configure-pages@v4 - name: Install dependencies - run: npm install --frozen-lockfile + run: npm ci - name: Build VitePress site run: npm run build - name: Upload artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 + uses: actions/upload-pages-artifact@v3 with: path: .vitepress/dist @@ -53,4 +56,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/reconcile-contributors.yml b/.github/workflows/reconcile-contributors.yml index 2d14773d..ff380ad1 100644 --- a/.github/workflows/reconcile-contributors.yml +++ b/.github/workflows/reconcile-contributors.yml @@ -66,7 +66,7 @@ jobs: - name: Create short-lived target token id: app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 + uses: actions/create-github-app-token@v3 with: client-id: ${{ inputs.app-client-id }} private-key: ${{ secrets.app-private-key }} @@ -82,7 +82,7 @@ jobs: run: gh api "repos/humanbydefinition/$TARGET_REPOSITORY/branches/dev" --silent - name: Checkout target dev branch - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@v6 with: repository: humanbydefinition/${{ inputs.target-repository }} ref: dev @@ -91,11 +91,12 @@ jobs: token: ${{ steps.app-token.outputs.token }} - name: Checkout canonical contributor source - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@v6 with: repository: humanbydefinition/code.textmode.art ref: ${{ inputs.source-ref }} sparse-checkout: | + .nvmrc .vitepress/data/contribution-types.json .vitepress/data/contributors.json scripts/contributors.mjs @@ -103,6 +104,14 @@ jobs: path: contributor-source persist-credentials: false + - name: Setup Node + uses: actions/setup-node@v7 + with: + node-version-file: contributor-source/.nvmrc + + - name: Report toolchain + run: node --version && npm --version + - name: Resolve canonical source id: source working-directory: contributor-source diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..a45fd52c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/package-lock.json b/package-lock.json index cde4371b..c1ccc6bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,9 @@ "vitepress": "^1.6.3", "vitepress-plugin-mermaid": "^2.0.17", "vitepress-plugin-sandpack": "^1.1.4" + }, + "engines": { + "node": ">=24 <25" } }, "node_modules/@algolia/abtesting": { diff --git a/package.json b/package.json index 0776d7e8..d1baabae 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,20 @@ { + "private": true, + "engines": { + "node": ">=24 <25" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": "^24.0.0", + "onFail": "error" + }, + "packageManager": { + "name": "npm", + "version": "^11.0.0", + "onFail": "error" + } + }, "devDependencies": { "@codesandbox/sandpack-themes": "^2.0.21", "@types/node": "^24.10.1",