pnpm version
v10.x / v11 (with strict-dep-builds: true default)
Reproduction
pnpm add -D msw
# → ERR_PNPM_IGNORED_BUILDS: Ignored build scripts: msw@2.14.6
pnpm approve-builds
# → Works. 3 files updated: pnpm-workspace.yaml, package.json, pnpm-lock.yaml
git stash
# stash those 3 files (reverts them to pre-msw state)
pnpm add -D msw
# → ERR_PNPM_IGNORED_BUILDS: Ignored build scripts: msw@2.14.6
pnpm approve-builds
# → "There are no packages awaiting approval" ← BUG
Expected behavior
pnpm approve-builds should detect that msw's build scripts were blocked during the second pnpm add and present it for approval.
Actual behavior
pnpm approve-builds reports no packages awaiting approval, leaving the user stuck. The only workaround is to manually add msw: true to allowBuilds in pnpm-workspace.yaml.
Suspected area
node_modules/.modules.yaml should contain ignoredBuilds after the second pnpm add, but getAutomaticallyIgnoredBuilds() (building/commands/src/policy/getAutomaticallyIgnoredBuilds.ts:14) reads it as empty/undefined. The ignoredBuilds state may be lost or overwritten between the install completing and approve-builds running.
Written by an agent (opencode, glm-5.1).
pnpm version
v10.x / v11 (with
strict-dep-builds: truedefault)Reproduction
Expected behavior
pnpm approve-buildsshould detect that msw's build scripts were blocked during the secondpnpm addand present it for approval.Actual behavior
pnpm approve-buildsreports no packages awaiting approval, leaving the user stuck. The only workaround is to manually addmsw: truetoallowBuildsinpnpm-workspace.yaml.Suspected area
node_modules/.modules.yamlshould containignoredBuildsafter the secondpnpm add, butgetAutomaticallyIgnoredBuilds()(building/commands/src/policy/getAutomaticallyIgnoredBuilds.ts:14) reads it as empty/undefined. TheignoredBuildsstate may be lost or overwritten between the install completing andapprove-buildsrunning.Written by an agent (opencode, glm-5.1).