fix(@angular/cli): support registry metadata fetching under bun package manager - #33369
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 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. |
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.