-
Notifications
You must be signed in to change notification settings - Fork 75
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: add user-specified registry support (from npmrc) #470
Conversation
Did you think about using https://www.npmjs.com/package/npm-registry-fetch ? |
this looks nice however has lots of ties with Node.js deps and is CJS (also not sure if it respects corepack env, for reasons) I would personally pick simplest approach (can later refactor it out to nypm for easier maintenance) |
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.
I think we can go ahead and merge as a basic implementation and later improve with finer-grained support for per-package registries etc...
π Linked issue
nuxi always using default npm registry #453
β Type of change
π Description
For user who doesn't have the stable connection to the default npm regsitry, they tend to use the mirror site, but nuxi doesn't have very good support about it (user can set COREPACK_NPM_REGISTRY env to achieve the ideal result, but at least for me, I didn't realize it at first time).
Now the using of nuxi to install a package will directly read the registry info from user's .npmrc file, then change the registry to get package json info as well as the COREPACK_NPM_REGISTRY (if it isn't been set) to download the package