-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(npm): fuzzy merge registries in .yarnrc.yml #26922
Merged
Merged
Conversation
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
match registries in the npmRegistries fuzzily see: renovatebot#26919
viceice
changed the title
feat: fuzzy merge registries in .yarnrc.yml
feat(npm): fuzzy merge registries in .yarnrc.yml
Jan 29, 2024
viceice
reviewed
Jan 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some small things 😊
move function to module scope Add additional tests
viceice
reviewed
Jan 29, 2024
use a Map to reduce the number of calculations
viceice
reviewed
Jan 30, 2024
viceice
reviewed
Jan 30, 2024
move fuzzyMatchAdditionalYarnrcYml and remove tests that are now covered by a mock
viceice
previously approved these changes
Jan 30, 2024
viceice
approved these changes
Jan 30, 2024
🎉 This PR is included in version 37.161.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
rvanbutselaar
pushed a commit
to rvanbutselaar/renovate
that referenced
this pull request
Feb 2, 2024
Co-authored-by: Rhys Arkins <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Changes
match registries in the npmRegistries fuzzily, so that //my.registry will match with https://my.registry when merging .yarnrc.yml files instead of creating a .yarnrc.yml with 2 registries.
Context
see: #26919
At the moment, when constructing the yarnrc from the hostRules the https: prefix is stripped off the url, however, configuring yarn@4 with
yarn config set --home npmRegistryServer "https://my-private-regsistry" && yarn config login
would set the protocol on the registry on the developers machine. this then causes problems when a repository needs to set additional npm config e.g. npmAlwaysAuthProposed fix is that instead of merging in such a way that 2 items in the npmRegistries are created, we instead fizzy match to identify that the registry is the same so they should be the same item in the registries array.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: