◐ Shell
clean mode source ↗

fix(@angular/cli): copy project config files to temp directory during ng update by ptu14 · Pull Request #32959 · angular/angular-cli

Fixes #27163

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

During ng update, the CLI installs a temporary version of itself in a system temp directory (e.g. /tmp/angular-cli-packages-xxx). Since this directory is outside the project tree, npm/pnpm/yarn-classic cannot find the project's .npmrc and falls back to the user-level ~/.npmrc. This causes registry settings defined in the project's .npmrc to be ignored.

Issue Number: #27163

What is the new behavior?

Project configuration files (.npmrc, .yarnrc, pnpm-workspace.yaml) are now copied to the temporary directory before running npm install. This reuses the existing copyConfigFromProject mechanism (previously only enabled for bun) for npm, pnpm, and yarn-classic.

Does this PR introduce a breaking change?

  • Yes
  • No