-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
npm/yarn: Always use registry source when available
Previously there was some logic in place to determine if a package came from a public package repo or not, and if it came from a registry considered central/public, we would not parse its source. However, in the case of private packages that specify yarnpkg.com as their source, this resulted in some calls expecting that package to exist on npmjs.org, which it technically is (yarnpkg.com is a proxy for it), but we would have no credentials configured for npmjs.org, so those requests will fail. This PR changes that behavior to always parse a package's source and add it to the requirement if it exists. We previously only did this for registries we considered "private", hence the name `private_registry`, but since we cannot reliably determine if a package hosted on `yarnpkg.com` or `npmjs.org` is private or not, this has been renamed to just `registry`. This means we no longer fall back to `npmjs.org` for private packages that go through `yarnpkg.com`, so any credentials that are configured can be reliably used. I considered always configuring creds for `npmjs.org` for `yarnpkg.com` and vice versa, but it seemed a little gnarly, and I think this change is more clear.
- Loading branch information
Showing
11 changed files
with
115 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.