⚡ Sangsakala Proxy 🏠 Home
Skip to content

fix(@schematics/angular): generate pnpm-workspace.yaml with allowBuilds for pnpm projects - #34630

Open
alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:fix/pnpm-workspace-allow-builds
Open

alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:fix/pnpm-workspace-allow-builds

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Starting in pnpm 11, strictDepBuilds is enabled by default and pnpm fails with ERR_PNPM_IGNORED_BUILDS when any dependency in the dependency graph declares lifecycle build scripts that are not listed in allowBuilds in pnpm-workspace.yaml.

Generate a pnpm-workspace.yaml file when scaffolding a new workspace with pnpm (@schematics/angular:workspace) that configures allowBuilds to false for the transitive build dependencies (@parcel/watcher, esbuild, lmdb, and msgpackr-extract), which already ship prebuilt native binaries via optionalDependencies and do not need their fallback install scripts to execute.

Fixes #34622

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for generating a pnpm-workspace.yaml template with predefined allowBuilds configurations when PNPM is selected as the package manager. It also refactors the PackageManager class to handle ignoreScripts defaults more consistently and adds corresponding unit tests. Feedback on the changes suggests destructuring ignoreScripts with a default value of true in the package manager's add method to improve consistency with the install method.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Nov 2, 2026
@alan-agius4
alan-agius4 force-pushed the fix/pnpm-workspace-allow-builds branch from b936b2f to bb007ed Compare November 2, 2026 11:46
…ds for pnpm projects

Starting in pnpm 11, `strictDepBuilds` is enabled by default and pnpm
fails with `ERR_PNPM_IGNORED_BUILDS` when any dependency in the graph
declares lifecycle build scripts that are not listed in `allowBuilds` in
`pnpm-workspace.yaml`.

Generate a `pnpm-workspace.yaml` file when scaffolding a new workspace
with `pnpm` that configures `allowBuilds` to `false` for the transitive
build dependencies (`@parcel/watcher`, `esbuild`, `lmdb`, and
`msgpackr-extract`), which already ship prebuilt native binaries via
`optionalDependencies` and do not need their fallback install scripts
to execute.

Fixes angular#34622
@alan-agius4
alan-agius4 force-pushed the fix/pnpm-workspace-allow-builds branch from 6a7df1f to bc870b8 Compare November 2, 2026 12:11
@alan-agius4
alan-agius4 requested a review from dgp1130 November 4, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/cli area: @schematics/angular target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pnpm add and pnpm install fail after ng new on pnpm 11+ (ERR_PNPM_IGNORED_BUILDS)

1 participant