From 80d5dbca6bbe3f369bafe2159778a0b4841b309d Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 18:46:14 +0800 Subject: [PATCH 1/8] ci(musl): replace corepack with oxc-project/setup-node The musl test job runs in a Node Alpine container and used corepack to bootstrap pnpm. Node 25 unbundles corepack, so the renovate bump from node:22-alpine3.21 to node:25-alpine3.21 (#361) fails with \`corepack: command not found\`. Use oxc-project/setup-node@v1.2.0, which installs pnpm directly and gates the pnpm-store cache to main (save on main, restore-only on PRs). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaf12f46..02d8f5f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,10 +201,11 @@ jobs: - name: Run tests run: cargo test - - name: Install pnpm and Node tools - run: | - corepack enable - pnpm install + - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 + + # `pnpm install` prepares test bins used in snapshot tests + # Must run after setup-node so correct native binaries are installed + - run: pnpm install - name: Run ignored tests run: cargo test -- --ignored From 42e67cec270e7c7142d8d80d19ae80bdddc4fd56 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 19:23:23 +0800 Subject: [PATCH 2/8] fix: install pnpm via npm for musl, drop redundant setup-node in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit oxc-project/setup-node uses actions/setup-node, which only distributes glibc Node binaries. Inside node:22-alpine3.21, the glibc binary shadows the container's musl Node and can't run, so fspy's `node_fs` tests fail with ENOENT when spawning a node subprocess. Install pnpm via `npm install -g pnpm` in the musl job — the alpine image already provides musl-native Node + npm. Also drop the now-redundant actions/setup-node + follow-up pnpm install in the matrix `test` job (oxc-project/setup-node already runs pnpm install). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d8f5f2..55da8366 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,18 +139,7 @@ jobs: - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 if: ${{ matrix.target == 'x86_64-apple-darwin' }} - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version-file: .node-version - architecture: x64 - if: ${{ matrix.target == 'x86_64-apple-darwin' }} - - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 - if: ${{ matrix.target != 'x86_64-apple-darwin' }} - - # `pnpm install` prepares test bins used in snapshot tests - # Must run after setup-node so correct native binaries are installed - - run: pnpm install - name: Run ignored tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored @@ -201,10 +190,12 @@ jobs: - name: Run tests run: cargo test - - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 + # oxc-project/setup-node calls actions/setup-node, which only ships glibc + # Node binaries that can't run on Alpine's musl. The container's bundled + # Node is musl-native, so just install pnpm directly via npm. + - name: Install pnpm + run: npm install -g pnpm - # `pnpm install` prepares test bins used in snapshot tests - # Must run after setup-node so correct native binaries are installed - run: pnpm install - name: Run ignored tests From 73e7ecc5d70cf4118f39f61dd5fbc48dd7e0d455 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 20:03:03 +0800 Subject: [PATCH 3/8] chore: trim musl pnpm install comment Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55da8366..c50a8de3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -190,9 +190,7 @@ jobs: - name: Run tests run: cargo test - # oxc-project/setup-node calls actions/setup-node, which only ships glibc - # Node binaries that can't run on Alpine's musl. The container's bundled - # Node is musl-native, so just install pnpm directly via npm. + # Alpine ships musl Node; actions/setup-node only has glibc binaries. - name: Install pnpm run: npm install -g pnpm From ff71534e35048fbb516bdd60c88d2732aebf2459 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 20:29:33 +0800 Subject: [PATCH 4/8] ci: use oxc-project/setup-node for musl Points at oxc-project/setup-node#19 (auto-skip-alpine), which detects Alpine via /etc/alpine-release and skips actions/setup-node so the container's musl Node is preserved. Replaces the npm-install workaround. Will re-pin to the merge SHA once #19 lands. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c50a8de3..4b154b31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -190,11 +190,7 @@ jobs: - name: Run tests run: cargo test - # Alpine ships musl Node; actions/setup-node only has glibc binaries. - - name: Install pnpm - run: npm install -g pnpm - - - run: pnpm install + - uses: oxc-project/setup-node@6d1b0ae8445197eb4ee006b276f8e5b29e4a544d # auto-skip-alpine - name: Run ignored tests run: cargo test -- --ignored From 655c76905d673c958aa87f81b06d394c1f546fb6 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 20:52:58 +0800 Subject: [PATCH 5/8] ci: drop redundant pnpm/action-setup from test job oxc-project/setup-node already runs pnpm/action-setup internally, so the darwin-only step was a no-op. Stale comment referenced an architecture limitation that the action no longer has. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b154b31..cc4eb9a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,13 +132,6 @@ jobs: - name: Run tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} - # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib - # (compiled for x86_64) can be injected into node processes running under Rosetta. - # oxc-project/setup-node doesn't support the architecture input, so use - # pnpm/action-setup + actions/setup-node directly. - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 - if: ${{ matrix.target == 'x86_64-apple-darwin' }} - - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 - name: Run ignored tests From e88bd38cd6a474c6cd9ee7c4c09f301b878e52f9 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 21:31:57 +0800 Subject: [PATCH 6/8] ci: bump oxc-project/setup-node pin Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc4eb9a2..06056ab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,7 +183,7 @@ jobs: - name: Run tests run: cargo test - - uses: oxc-project/setup-node@6d1b0ae8445197eb4ee006b276f8e5b29e4a544d # auto-skip-alpine + - uses: oxc-project/setup-node@a866f096daf8febf6999d4227cbc424f1ac7eddc # auto-skip-alpine - name: Run ignored tests run: cargo test -- --ignored From de1aa177aac02e23638fa6af3c24b2f93f975bcc Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 21:51:58 +0800 Subject: [PATCH 7/8] ci: bump oxc-project/setup-node to v1.3.0 Picks up Alpine auto-skip so the musl job can use the action directly. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06056ab9..ebb309b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,7 @@ jobs: - name: Run tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} - - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 + - uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0 - name: Run ignored tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored @@ -183,7 +183,7 @@ jobs: - name: Run tests run: cargo test - - uses: oxc-project/setup-node@a866f096daf8febf6999d4227cbc424f1ac7eddc # auto-skip-alpine + - uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0 - name: Run ignored tests run: cargo test -- --ignored @@ -204,7 +204,7 @@ jobs: tools: cargo-shear@1.11.1,cargo-autoinherit@0.1.6 components: clippy rust-docs rustfmt - - uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0 + - uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0 - run: pnpm oxfmt --check - run: cargo autoinherit && git diff --exit-code - run: cargo shear --deny-warnings From 28aa8d93eb980365946c89ce8a90e19d804cc653 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 29 Apr 2026 22:13:09 +0800 Subject: [PATCH 8/8] fix(ci): pin x64 Node for x86_64-apple-darwin matrix entry The x86_64-apple-darwin job runs on an arm64 Mac runner under Rosetta. Without explicitly requesting x64 Node, oxc-project/setup-node installs the runner's native arm64 Node and fspy's x86_64 preload dylib can't be injected into spawned node processes, breaking the node_fs tests. Pass architecture: x64 conditionally when matrix.target is the cross target; other targets get the default (runner-native) Node. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebb309b9..b127b1e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,11 @@ jobs: - name: Run tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} + # x86_64-apple-darwin runs on arm64 runner under Rosetta; install x64 Node + # so fspy's x86_64 preload dylib can be injected into spawned node procs. - uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0 + with: + architecture: ${{ matrix.target == 'x86_64-apple-darwin' && 'x64' || '' }} - name: Run ignored tests run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored