fix: also declare pnpm build-script policy in package.json#7525
Merged
JohnMcLear merged 1 commit intodevelopfrom Apr 16, 2026
Merged
fix: also declare pnpm build-script policy in package.json#7525JohnMcLear merged 1 commit intodevelopfrom
JohnMcLear merged 1 commit intodevelopfrom
Conversation
Some pnpm versions don't read onlyBuiltDependencies / ignoredBuiltDependencies from pnpm-workspace.yaml — leaving CI on plugin repos to fail with ERR_PNPM_IGNORED_BUILDS even after #7523 added the workspace.yaml entries. Mirror the same configuration into package.json's "pnpm" field, which is the older (and more widely supported) location. The two files are kept in sync; whichever pnpm version reads the values picks them up from one or the other. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review Summary by QodoMirror pnpm build-script policy to package.json for compatibility
WalkthroughsDescription• Mirror pnpm build-script policy from workspace.yaml to package.json • Ensures compatibility with pnpm versions that only read package.json • Fixes ERR_PNPM_IGNORED_BUILDS errors in plugin CI environments • Allows esbuild postinstall while silently skipping @scarf/scarf telemetry Diagramflowchart LR
A["pnpm-workspace.yaml<br/>onlyBuiltDependencies<br/>ignoredBuiltDependencies"]
B["package.json<br/>pnpm field"]
C["pnpm versions<br/>read config"]
A -- "mirrored to" --> B
B -- "compatible with" --> C
File Changes1. package.json
|
Code Review by Qodo
|
Comment on lines
+54
to
+60
| "pnpm": { | ||
| "onlyBuiltDependencies": [ | ||
| "esbuild" | ||
| ], | ||
| "ignoredBuiltDependencies": [ | ||
| "@scarf/scarf" | ||
| ] |
There was a problem hiding this comment.
1. No regression test for pnpm policy 📘 Rule violation ☼ Reliability
This PR fixes ERR_PNPM_IGNORED_BUILDS behavior by changing package.json pnpm configuration but does not add/update any automated regression test to prevent the issue from reoccurring. Without a test that fails when this change is reverted, the bug can silently return in future config refactors.
Agent Prompt
## Issue description
A bug fix was made to pnpm build-script policy configuration, but there is no automated regression test that would fail if the fix were reverted.
## Issue Context
The change mirrors `onlyBuiltDependencies` / `ignoredBuiltDependencies` into `package.json` to avoid `ERR_PNPM_IGNORED_BUILDS` in environments where pnpm reads policy only from `package.json`.
## Fix Focus Areas
- package.json[54-60]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
JohnMcLear
added a commit
that referenced
this pull request
Apr 16, 2026
Plugin CI is still failing on ERR_PNPM_IGNORED_BUILDS even with the build-script policy declared in both pnpm-workspace.yaml (#7523) and package.json (#7525). pnpm's strict-dep-builds defaults to true in 10+, so any transitive dep with an unrecognized postinstall fails the build. For etherpad-lite — and especially for downstream plugin repos that pull this codebase as their core install — that's a footgun: the moment some new transitive ships a postinstall, every plugin's CI explodes. Set strictDepBuilds: false in pnpm-workspace.yaml AND strict-dep-builds=false in .npmrc as a defensive layer, so unknown postinstalls become a warning instead of a hard failure. The allow/ignore lists still control what actually runs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JohnMcLear
added a commit
that referenced
this pull request
Apr 16, 2026
Plugin CI is still failing on ERR_PNPM_IGNORED_BUILDS even with the build-script policy declared in both pnpm-workspace.yaml (#7523) and package.json (#7525). pnpm's strict-dep-builds defaults to true in 10+, so any transitive dep with an unrecognized postinstall fails the build. For etherpad-lite — and especially for downstream plugin repos that pull this codebase as their core install — that's a footgun: the moment some new transitive ships a postinstall, every plugin's CI explodes. Set strictDepBuilds: false in pnpm-workspace.yaml AND strict-dep-builds=false in .npmrc as a defensive layer, so unknown postinstalls become a warning instead of a hard failure. The allow/ignore lists still control what actually runs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JohnMcLear
added a commit
that referenced
this pull request
Apr 16, 2026
Plugin CI is still failing on ERR_PNPM_IGNORED_BUILDS even with the build-script policy declared in both pnpm-workspace.yaml (#7523) and package.json (#7525). pnpm's strict-dep-builds defaults to true in 10+, so any transitive dep with an unrecognized postinstall fails the build. For etherpad-lite — and especially for downstream plugin repos that pull this codebase as their core install — that's a footgun: the moment some new transitive ships a postinstall, every plugin's CI explodes. Set strictDepBuilds: false in pnpm-workspace.yaml AND strict-dep-builds=false in .npmrc as a defensive layer, so unknown postinstalls become a warning instead of a hard failure. The allow/ignore lists still control what actually runs. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
PR #7523 moved the build-script allowlist into `pnpm-workspace.yaml`, which is the modern location. But some pnpm versions / setups still read these settings from `package.json` only — and plugin CI is hitting that case: `ERR_PNPM_IGNORED_BUILDS` is back even though `pnpm-workspace.yaml` correctly lists `esbuild` under `onlyBuiltDependencies` and `@scarf/scarf` under `ignoredBuiltDependencies`.
Mirror the same configuration into `package.json`'s `"pnpm"` field. Whichever location pnpm reads, it now finds the policy.
Verified locally that a fresh `pnpm install` (with store pruned) still:
Generated with Claude Code