JamieMason / syncpack

Consistent dependency versions in large JavaScript Monorepos.
https://jamiemason.github.io/syncpack/
MIT License
1.41k stars 49 forks source link

Support custom npm registries for scoped packages updates #220

Open maksnester opened 4 months ago

maksnester commented 4 months ago

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 commented 1 week ago

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.