fix(@angular/cli): support registry metadata fetching under bun package manager#33369
Open
clydin wants to merge 1 commit into
Open
fix(@angular/cli): support registry metadata fetching under bun package manager#33369clydin wants to merge 1 commit into
clydin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an optional getRegistryMetadata method to the PackageManagerDescriptor interface, allowing package managers like Bun to customize how registry metadata is fetched. For Bun, this method is implemented to query dist-tags and versions separately. The PackageManager class has been updated to support this custom fetching logic with caching, and corresponding unit tests have been added. Feedback suggests normalizing the returned dist-tags and versions in the Bun implementation to prevent potential runtime errors if the registry returns unexpected formats.
…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.
19c35c0 to
309a236
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bun's
pm viewcommand 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
getRegistryMetadatahandler in the package manager descriptor, allowing individual package managers to override registry metadata fetching entirely. Thebundescriptor now implements this by queryingdist-tagsandversionsseparately in parallel, and returning the aggregated metadata object.