Backport forceauth removal 21.2.x - #33336
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes unscoped authentication handling and its associated tests, simplifying the package manager options and registry authentication utilities. The review feedback suggests reordering the parameters of createNpmConfigForAuthentication to place invalidToken first, which allows simplifying calls when only testing authentication failures.
fab0cdb to
9e7584f
Compare
…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.
9e7584f to
3ba8835
Compare
…ge manager Bun's `pm view` command does not support requesting multiple fields at once (e.g. `pm view <pkg> dist-tags versions --json`), which is required by the default package manager abstraction to fetch package metadata during version compatibility search. This change introduces a custom `getRegistryMetadata` handler in the package manager descriptor, allowing individual package managers to override registry metadata fetching entirely. The `bun` descriptor now implements this by querying `dist-tags` and `versions` separately in parallel, and returning the aggregated metadata object.
dgp1130
left a comment
There was a problem hiding this comment.
Are any amount of these test fixes also useful to port back to v22? Is it worth a follow up PR on that front?
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.