◐ Shell
clean mode source ↗

refactor(@angular/cli): transition update command to use PackageManager abstraction by clydin · Pull Request #33364 · angular/angular-cli

@clydin clydin marked this pull request as ready for review

June 15, 2026 13:15

gemini-code-assist[bot]

alan-agius4

alan-agius4

…er abstraction

Transition the update command's version resolver to utilize the registry methods from the
PackageManager abstraction instead of directly querying the registry via pacote.

This introduces a cached RegistryClient wrapper that retrieves package metadata and manifests
on-demand. Update resolution helper functions are updated to be asynchronous to support the
lazy-loading of registry documents.
…y authentication

Configure always-auth in the written .npmrc and .yarnrc test profiles within
createNpmConfigForAuthentication.

By default, Yarn Classic (v1) does not send the Authorization header on GET requests (such as
retrieving manifest metadata via yarn info) unless always-auth is enabled. When ng update uses the
PackageManager abstraction under Yarn Classic v1, this ensures the necessary authorization headers
are sent to secure registry endpoints.
When running scripts via Yarn Classic (such as yarn ng update), Yarn automatically injects
npm_config_registry=https://registry.yarnpkg.com into the child process environment.

When the PackageManager abstraction spawns child CLI subprocesses (such as yarn info), those child
processes inherit the injected registry environment variable. Because environment variables take
highest precedence, this previously caused spawned subprocesses to ignore local .yarnrc files and
query the public CDN mirror.

Strip npm_config_registry and NPM_CONFIG_REGISTRY from the child process environment when running
under Yarn so that spawned subprocesses correctly respect local repository registry settings.

@clydin clydin deleted the refactor-update-package-manager-abstraction branch

June 17, 2026 13:11