Skip to content

fix(@angular/cli): remove forceAuth and unscoped credential parsing#33332

Merged
clydin merged 2 commits into
angular:mainfrom
clydin:refactor-package-metadata-remove-forceauth
Jun 10, 2026
Merged

fix(@angular/cli): remove forceAuth and unscoped credential parsing#33332
clydin merged 2 commits into
angular:mainfrom
clydin:refactor-package-metadata-remove-forceauth

Conversation

@clydin

@clydin clydin commented Jun 9, 2026

Copy link
Copy Markdown
Member

Remove the non-standard forceAuth option and custom parsing for unscoped registry credentials (token, username, password, auth) in package-metadata.ts.

Since the npm CLI does not support unscoped credentials and ignores them by default, this aligning removes the unnecessary parsing complexity. Unscoped credentials will now behave identically to any other standard configuration property, falling through to default configuration parsing.

@clydin clydin added the target: patch This PR is targeted for the next patch release label Jun 9, 2026

@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 removes auth-related option handling (such as _authToken, token, username, password, _auth, and auth) from the normalizeOptions function in package-metadata.ts, and simplifies the PackageManagerOptions interface. A review comment suggests replacing the now-empty PackageManagerOptions interface with a type alias to make the code cleaner and more idiomatic in TypeScript.

Comment thread packages/angular/cli/src/utilities/package-metadata.ts Outdated
@clydin clydin force-pushed the refactor-package-metadata-remove-forceauth branch from bda5a40 to 0b4e9b3 Compare June 9, 2026 19:20
@clydin clydin changed the title refactor(@angular/cli): remove forceAuth and unscoped credential parsing fix(@angular/cli): remove forceAuth and unscoped credential parsing Jun 9, 2026
clydin added 2 commits June 10, 2026 07:46
…gistry tests

Modern package managers do not support unscoped authentication, and Yarn Classic's
metadata command (yarn info) does not propagate unscoped credentials correctly,
leading to 403 Forbidden failures on secure registries during ng update and ng add.

This commit removes the unscoped authentication test cases from both add and
update secure registry E2E tests, and cleans up the
createNpmConfigForAuthentication helper to default to scoped authentication.
Remove the non-standard forceAuth option and custom parsing for unscoped registry
credentials (token, username, password, auth) in package-metadata.ts.

Since the npm CLI does not support unscoped credentials and ignores them by
default, this aligning removes the unnecessary parsing complexity. Unscoped
credentials will now behave identically to any other standard configuration
property, falling through to default configuration parsing.
@clydin clydin force-pushed the refactor-package-metadata-remove-forceauth branch from 0b4e9b3 to 5a2646b Compare June 10, 2026 11:46
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Jun 10, 2026
@clydin clydin merged commit f8c3df4 into angular:main Jun 10, 2026
39 of 40 checks passed
@clydin

clydin commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the refactor-package-metadata-remove-forceauth branch June 10, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants