Repository navigation
build: move to pnpm 12.18.0 with an explicit build allow list - #186
Conversation
pnpm 11 turned an unlisted build script from a warning into a failed install and removed onlyBuiltDependencies, so this is a migration rather than a version bump: the allow list becomes allowBuilds, and the release age the new major gates on is pinned explicitly at 1440 minutes. packageManager carries both the version and its +sha512 digest, which is what the five pnpm/action-setup steps already read, and engines.pnpm moves to >=12 so a local pnpm 10 cannot install a workspace whose settings it cannot read. pnpm 12 records its own version in a second lockfile document and refuses a frozen install of a lockfile without it, which accounts for every added line in pnpm-lock.yaml; no existing lockfile entry changed.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Owner confirmed allowBuilds esbuild: true (its install script fetches the platform binary that the build and test tools use) and accepted the lockfile deviation (pnpm 12's packageManagerDependencies document; no resolved versions changed). AC4 will be checked in the next release's log. |
Closes #185.
What changed
package.jsonpackageManageris nowpnpm@12.18.0+sha512.9d7882d...63beb3;engines.pnpmis>=12rather than>=10pnpm-workspace.yamlonlyBuiltDependencies: [esbuild]becomesallowBuilds: {esbuild: true};minimumReleaseAge: 1440is set explicitlypnpm-lock.yamlREADME.mdscripts/smoke-consumer.mjs--filtercomment re-tested and rewritten (see below)Version and source. pnpm 12.18.0, from the registry's
latestdist-tag (curl https://registry.npmjs.org/pnpm:latest=latest-12=12.18.0, published 2026-11-05T00:56Z;next-12=12.21.0, so 12.19.0 to 12.21.0 exist only on the next channel). The digest is the tarball'sdist.integritybase64 decoded to hex, the form corepack andpackageManageruse.pnpm/action-setupneeds no bump. The five steps stay pinned to73e46992(v6.1.1); v6.1.0's release note isfeat: support pnpm v12(pnpm/action-setup#288), and none of the steps carries aversion:input, so they followpackageManager.engines.pnpmmoved to>=12as a policy floor rather than a compatibility one. pnpm 10.26.0 already addedallowBuilds(its release note: "Added support forallowBuilds, which is a new field that can be used instead ofonlyBuiltDependenciesandignoredBuiltDependencies"), so 10.34.5 understands this map; what differs is the default on an unlisted script, which 10 skips with a warning and 12 fails (ERR_PNPM_IGNORED_BUILDS), as the issue's own Context section states. The floor names the major whose defaults the workspace is now written and tested against, and the one pnpm major this family is moving to. (This paragraph said earlier that pnpm 10 could not read the field; the reviewer caught it.)allowBuilds, entry by entry (AC2)esbuildtrueERR_PNPM_IGNORED_BUILDS: Ignored build scripts: esbuild@0.28.2).tsupbuilds every package through it andvitesttransforms through it, so its postinstall has to run. Verified:node_modules/.pnpm/esbuild@0.28.2/node_modules/esbuild/bin/esbuild --versionprints0.28.2.No
falseentries.sharp@0.35.5is installed (an optional dependency ofnext) and appears in no ignored-builds report, because 0.35 ships its binaries as optional dependencies and declares no install script, so it gets no entry at all. The evidence isnode_modules/.modules.yamlafter a clean install:ignoredBuildsis absent entirely.strictDepBuildskeeps its default (true), so the next dependency that arrives with an unreviewed build script fails the install rather than being skipped silently.AC6, stated plainly: the lockfile diff is not format-only
pnpm 12 records the version it ran as
packageManagerDependenciesin a second YAML document at the top ofpnpm-lock.yaml(pnpm 11.0.0 release notes, pnpm/pnpm#10912: "the env lockfile section also storespackageManagerDependenciesresolved during version switching and self-update"). A frozen install of a lockfile without that document fails:So AC1 and a literally format-only lockfile cannot both hold, and AC1 wins. What the diff actually is:
pnpm-lock.yamlalone 158 insertions, 0 deletions.old in newis true, at offset 4604, with 0 trailing bytes, so every existing entry (including every resolved version) is untouched. The added document holds the pnpm CLI and its@pnpm/exe.*platform builds, not a dependency.git difftouches noresolution:orversion:line of the original document.If the owner would rather not carry the second document, the lever is to drop the
packageManagerpin and let CI install pnpm itself, which trades away the single-source decision in the issue.managePackageManagerVersions: falseis not an option: pnpm 12 removed that setting (pnpm 11.0.0 notes) and refuses it as unrecognized.The
--filtercomment inscripts/smoke-consumer.mjsThe old comment said pnpm 10 rejects
packthrough a recursive--filterselector. That no longer holds on the new major:pnpm --filter @hwp-editor/core pack --pack-destination <dir>on 12.18.0 ranprepackand wrotehwp-editor-core-1.4.2.tgz. The code is unchanged (packing each package from its own directory still does the same thing and keeps the load-bearing order explicit), and the comment now says so instead of naming a behavior that is gone.Local configuration
pnpm 12 reads a user-level
.npmrconly for auth, registry, TLS and proxy settings, so this machine's user-levelvirtual-store-dirno longer applies. The install fell back on its own tonode_modules/.pnpmand~/Library/pnpm/store/v11; no per-command override was needed, and no global or user pnpm config was edited.Checks
rm -rf node_modules apps/*/node_modules packages/*/node_modules && pnpm install --frozen-lockfileexits 0 and prints no ignored-builds output (Done in 495ms using pnpm v12.18.0).pnpm --versionreports12.18.0from the pin, andpnpm config listshowsallowBuildsandminimumReleaseAge: 1440read out ofpnpm-workspace.yaml.pnpm -r build: all five projects, playgroundnext buildincluded.pnpm -r typecheck: clean.pnpm -r test: core 791 tests in 22 files, react 719 in 26, server 550 in 27 (2,060 tests, 75 files), all passing.git grep -e "pnpm 10" -e "pnpm@10" -e "10\.34\.5"finds nothing outside history.ci.ymlande2e.ymlruns are the report.release.ymlneeds no change because it readspackageManagerlike CI does; the first release after this merges is the check, and this PR does not tag or release.Heavy commands ran through
dot admit(one heavy job per repo).