-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(core): whitelist registries that support obtaining migration config via 'npm view' #16423
Conversation
…ig via 'npm view' Registries other than npmjs.org may not support obtaining non standard package metadata via 'npm view'. In the event that migration config is not returned when using other registries, migration will fallback to determining config using install. closed nrwl#16387, nrwl#10223
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
This looks good to me, I want to get 1 more opinion first.
|
||
// Registries other than npmjs and the local registry may not support full metadata via npm view | ||
// so throw error so that fetcher falls back to getting config via install | ||
if (!['registry.npmjs.org', 'localhost'].includes(registry)) { |
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.
Yarn's registry just redirects to npmjs, and can be in lock files, but still shows npm's url for the tarball 🤔 interesting.
I think this is fine.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Determining migration config for plugins that are published to a different registry than npmjs.org doesn't work if the registry doesn't support full package metadata. Such registries return no results via 'npm view' which causes migrate to think that no migrations are necessary.
Expected Behavior
Migrate will fallback to determining migration config via install in the event that no config is returned from 'npm view' for registries other then npmjs.org.
Related Issue(s)
Fixes #16387, #10223