Repository navigation
ci: pin pnpm 10 in canary/publish workflows and set build-script approvals - #534
Merged
Merged
Conversation
…ovals The canary and publish workflows installed pnpm with an unpinned 'npm install -g pnpm', which now resolves to pnpm 12. pnpm 11+ fails the install with ERR_PNPM_IGNORED_BUILDS for any build script that is not explicitly allowed (cpu-features, unrs-resolver), so the v0.5.x canary release failed. - Use pnpm/action-setup@v4 with version 10 and 'pnpm install --frozen-lockfile', matching the other workflows. - Replace the 'set this to true or false' allowBuilds placeholders with explicit false for cpu-features and unrs-resolver.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 36 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The "Canary release on new commit" run for the v0.5.x merge (d508137, run 37732677427) failed at Install dependencies with:
canary-publish.ymlandpublish.ymlinstalled pnpm with an unpinnednpm install -g pnpm && pnpm i(in place since #223). That installs whatever the npmlatesttag points to:latestnow points to 12.10.1. pnpm 11+ fails the install for any build script that is not explicitly allowed. No canary ran between 2026-08-24 and this merge, so this was the first run to use the new major.The
allowBuilds: <pkg>: set this to true or falseplaceholders added in #526 do not cause the failure on their own. They were written by a newer pnpm, and pnpm 12 also rejects them. I verified this in a scratch copy withpnpm@12.10.1 install --frozen-lockfile:allowBuilds(pre-#526)false/false(this PR)Fix
pnpm/action-setup@v4withversion: 10andpnpm install --frozen-lockfile, the same as test.yml, node.js.yml and changeset-check.yml.setup-nodekeepsregistry-url, and the publish steps keepNODE_AUTH_TOKEN, sonpm publishworks as before.cpu-features: false. It is an optionalDependency of the CLI itself, used bysrc/node/install.tsto choose the portable CKB binary. That code already falls back to the portable binary when the addon cannot load.scripts/build.jskeeps it--externalin the ncc bundle, so end users still compile it during their ownnpm i -g @offckb/cli, and thefalsehere has no effect on them. Nothing in this repo's build or tests needs the native addon. CI has never compiled it, because pnpm 10 has been ignoring it all along.unrs-resolver: false. This is a jest-resolve dependency. Its postinstall only runsnapi-postinstall ... checkagainst the prebuilt@unrs/resolver-binding-*optional package, which is already installed.With
false, the behaviour stays exactly as it was under pnpm 10, and the config also works under newer pnpm.pnpm install --frozen-lockfilepasses in a scratch copy with pnpm 10.34.6, 11.28.2 (Node 22) and 12.10.1.An empty changeset is included because Verify Changeset requires one for every PR that has no label.
Checks (local, pnpm 10.33.4)
pnpm install --frozen-lockfile,typecheck,buildandlintpass (lint has 1 pre-existing warning).test:ci: 534 passed and 2 failed. The 2 failures are the knownisStoreLockHeld › with lsofenvironment failures on the dev box.After merge
develop needs to be merged into v0.5.x again to re-trigger the canary release. The canary workflow runs on push to
v0.*.xand reads its workflow file from that branch.