From b7176fc537106718eeb1c24164ef832e842ba735 Mon Sep 17 00:00:00 2001 From: hexqi Date: Thu, 29 Oct 2026 01:08:23 +0800 Subject: [PATCH 1/5] ci(publish): migrate npm release authentication to OIDC --- .github/workflows/Release.yml | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index a498b0bbe2..1ef53bf1d2 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -25,7 +25,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 24 registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -70,7 +70,8 @@ jobs: exit 1 fi + - name: Verify npm supports trusted publishing + run: node -e "const v=require('child_process').execSync('npm --version',{encoding:'utf8'}).trim(); const [a,b,c]=v.split('.').map(Number); if(a<11||(a===11&&(b<5||(b===5&&c<1)))) throw new Error('npm >=11.5.1 required, found '+v); console.log('npm '+v)" + - name: Publish package to npm run: pnpm lerna publish from-package --dist-tag ${{steps.parse_tag.outputs.dist_tag}} --yes - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 618b80e507..fc30cc6e71 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "fs-extra": "^10.1.0", "globals": "^16.0.0", "husky": "^8.0.0", - "lerna": "^7.2.0", + "lerna": "9.0.7", "lint-staged": "^13.2.0", "mysql": "^2.18.1", "picocolors": "^1.0.0", From 771b19d165052ee1d86958add7f69946debd3e6c Mon Sep 17 00:00:00 2001 From: hexqi Date: Thu, 29 Oct 2026 01:33:06 +0800 Subject: [PATCH 2/5] ci(publish): use bundled npm from supported Node 24 --- .github/workflows/Release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1ef53bf1d2..31e8bef7aa 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -25,7 +25,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 24 + node-version: '>=24.19.0 <25' registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -70,8 +70,5 @@ jobs: exit 1 fi - - name: Verify npm supports trusted publishing - run: node -e "const v=require('child_process').execSync('npm --version',{encoding:'utf8'}).trim(); const [a,b,c]=v.split('.').map(Number); if(a<11||(a===11&&(b<5||(b===5&&c<1)))) throw new Error('npm >=11.5.1 required, found '+v); console.log('npm '+v)" - - name: Publish package to npm run: pnpm lerna publish from-package --dist-tag ${{steps.parse_tag.outputs.dist_tag}} --yes From 0c1ed2da3c2e9aa18df0b3b500984fed36513375 Mon Sep 17 00:00:00 2001 From: hexqi Date: Sun, 1 Nov 2026 16:45:52 +0800 Subject: [PATCH 3/5] fix: align Node engine with Lerna 9 requirements --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc30cc6e71..85e996e3a9 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "not dead" ], "engines": { - "node": ">=16", + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", "pnpm": ">=8" }, "pnpm": { From a1de15658e9cf4457bee09007bbf8d9a0dd6ecef Mon Sep 17 00:00:00 2001 From: hexqi Date: Sun, 1 Nov 2026 16:59:03 +0800 Subject: [PATCH 4/5] ci: enforce OIDC Node version floor and document bundled npm --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 31e8bef7aa..6744320534 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -25,7 +25,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: '>=24.19.0 <25' + node-version: '>=24.19.0 <25' # OIDC 需要 Node >=22.14.0 和 npm >=11.5.1;Node 24.5.0 起内置 npm >=11.5.1 registry-url: 'https://registry.npmjs.org' - name: Install dependencies From a474506e40080641d2a8a53482929e881b990e79 Mon Sep 17 00:00:00 2001 From: hexqi Date: Sun, 1 Nov 2026 17:00:50 +0800 Subject: [PATCH 5/5] ci: align Docker build Node with supported engine range --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1de80840e2..647dfeebb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine as build +FROM node:24.19.0-alpine as build WORKDIR /app/ ADD . .