Skip to content

feat(@schematics/angular): enable npm engine-strict in new workspaces - #34473

Open
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:feat/ng-new-engine-strict
Open

MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:feat/ng-new-engine-strict

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

npm only warns when a dependency's engines doesn't match the installed Node.js version, while Yarn and pnpm fail. Generate an .npmrc with engine-strict=true for new workspaces that use npm, so installs with an unsupported Node.js version fail instead of printing an easy-to-miss warning.

Closes #31271

npm only warns when a dependency's `engines` doesn't match the installed Node.js version, while
Yarn and pnpm fail. Generate an `.npmrc` with `engine-strict=true` for new workspaces that use npm,
so installs with an unsupported Node.js version fail instead of printing an easy-to-miss warning.

Closes angular#31271

@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 configures the workspace schematic to generate an .npmrc file with engine-strict=true when npm is selected as the package manager. This ensures that npm strictly enforces engine version requirements, matching the default behavior of other package managers like yarn, pnpm, and bun. Corresponding unit tests have been added to verify this behavior. There are no review comments, and I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate projects with engine-strict by default

1 participant