Skip to content
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

Support custom npm registries for scoped packages updates #220

Open
maksnester opened this issue May 29, 2024 · 2 comments
Open

Support custom npm registries for scoped packages updates #220

maksnester opened this issue May 29, 2024 · 2 comments

Comments

@maksnester
Copy link
Contributor

Description

In my .npmrc file I have custom npm registries for some scoped packages like

@foo:registry=https://gitlab.com/api/v4/projects/000000/packages/npm/
//gitlab.com/api/v4/projects/000000/packages/npm/:_authToken=000000

@bar:registry=https://gitlab.com/api/v4/projects/111111112/packages/npm/
//gitlab.com/api/v4/projects/111111112/packages/npm/:_authToken=111111112

Suggested Solution

It would be nice if the update command

syncpack update --filter '@foo' 

Could respect the custom registries as currently it doesn't show any available updates.

As a reference, the NCU tool currently supports it, but would be nice to do this with Syncpack to avoid using one more tool. It looks like this there:

ncu -ws -f "@foo/*"
@rockshandy
Copy link

I came across this too, my package uses a private registry at the moment and I was hoping the general registry setting in .npmrc would let me use the private one.

@damnhandy
Copy link

damnhandy commented Nov 11, 2024

In corporate environments, it highly likely that you cannot reach registry.npmjs.org directly and will be required to use an internal mirror. Sadly, syncpack doesn't seem to honor the npm config registry value and always requests packages from registry.npmjs.org.

Just looking at the code, it seems this the only place where the registry URL is hard-coded:

fetchJson(`https://registry.npmjs.org/${instance.name}`),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants