From 7f785ff26ae9b452eda7fbc510f63a28b994e49f Mon Sep 17 00:00:00 2001 From: cluic Date: Tue, 19 May 2026 15:55:04 +0800 Subject: [PATCH 1/4] Fix release workflow lockfile sync --- node/package-lock.json | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/node/package-lock.json b/node/package-lock.json index 70ae340..49ef539 100644 --- a/node/package-lock.json +++ b/node/package-lock.json @@ -307,6 +307,13 @@ "fs-extra": "^8.1.0" } }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@manypkg/find-root/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -398,11 +405,16 @@ } }, "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "version": "25.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.0.tgz", + "integrity": "sha512-AOQwYUNolgy3VosiRqXrACUXTN8nJUtPl7FJXMqZVyxiiCLhQuG3jXKvCS1ALr+Y2OmZhzzLVlYPEqJaiqkaJQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } }, "node_modules/ansi-colors": { "version": "4.1.3", @@ -1251,6 +1263,15 @@ "node": ">=8.0" } }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", From 4d07ab16e282da323e84a259abb77ba01e7e9a77 Mon Sep 17 00:00:00 2001 From: cluic Date: Tue, 19 May 2026 16:14:52 +0800 Subject: [PATCH 2/4] Add release preflight workflow --- .github/workflows/release-preflight.yml | 42 +++++++++++++++++++++++++ .github/workflows/release.yml | 3 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/release-preflight.yml diff --git a/.github/workflows/release-preflight.yml b/.github/workflows/release-preflight.yml new file mode 100644 index 0000000..f7ab128 --- /dev/null +++ b/.github/workflows/release-preflight.yml @@ -0,0 +1,42 @@ +name: Release Preflight + +on: + pull_request: + paths: + - ".github/workflows/release.yml" + - ".github/workflows/release-preflight.yml" + - "node/package.json" + - "node/package-lock.json" + - "node/.changeset/**" + - "node/RELEASING.md" + +permissions: + contents: read + +jobs: + preflight: + runs-on: ubuntu-latest + defaults: + run: + working-directory: node + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: node/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Run tests if present + run: npm run test --if-present + + - name: Validate changeset state + run: npm run changeset -- status diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02ef802..cdca31a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Run tests if present + run: npm run test --if-present + - name: Create release PR or publish uses: changesets/action@v1 with: From 106798de6d5a190e034a8d03ca78b38c802ae9e4 Mon Sep 17 00:00:00 2001 From: cluic Date: Tue, 19 May 2026 16:20:25 +0800 Subject: [PATCH 3/4] Relax release preflight changeset check --- .github/workflows/release-preflight.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-preflight.yml b/.github/workflows/release-preflight.yml index f7ab128..5ad6b37 100644 --- a/.github/workflows/release-preflight.yml +++ b/.github/workflows/release-preflight.yml @@ -38,5 +38,15 @@ jobs: - name: Run tests if present run: npm run test --if-present + - name: Detect changeset files + id: changesets + run: | + if find .changeset -name "*.md" ! -name "README.md" | grep -q .; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "present=false" >> "$GITHUB_OUTPUT" + fi + - name: Validate changeset state - run: npm run changeset -- status + if: steps.changesets.outputs.present == 'true' + run: npm run changeset -- status --since=origin/main From 8fb1727432d704cf6fcd395cff9e4481697bfddd Mon Sep 17 00:00:00 2001 From: cluic Date: Tue, 19 May 2026 16:22:52 +0800 Subject: [PATCH 4/4] Only require changesets for PR changes --- .github/workflows/release-preflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preflight.yml b/.github/workflows/release-preflight.yml index 5ad6b37..733fe80 100644 --- a/.github/workflows/release-preflight.yml +++ b/.github/workflows/release-preflight.yml @@ -41,7 +41,7 @@ jobs: - name: Detect changeset files id: changesets run: | - if find .changeset -name "*.md" ! -name "README.md" | grep -q .; then + if git diff --name-only origin/main...HEAD | grep -E '^node/\.changeset/.*\.md$' | grep -v 'README.md' >/dev/null; then echo "present=true" >> "$GITHUB_OUTPUT" else echo "present=false" >> "$GITHUB_OUTPUT"