rlidwka / yapm

yapm is a package manager for node.js (npm fork)
Other
77 stars 12 forks source link

add multiple registries #14

Closed rlidwka closed 9 years ago

rlidwka commented 10 years ago

+

Especially important if we're publishing different modules to two different places.

STRML commented 9 years ago

:+1: for this, when maintaining a private registry it is really nice to be able to switch. The publishConfig option in package.json is helpful so I don't have to think about it too often, but I would love a yaml publish <registryAlias>. Would be very useful for packages where I might maintain a private version or two for internal use before/instead of publishing to the public registry.

rlidwka commented 9 years ago

Hmm... I thought this is resolved with scopes in npm@2 (which is merged here as well)? I forgot to close this issue.

Or are you talking about registry aliases?

STRML commented 9 years ago

It's only sort of solved with scopes; I find that I use a private registry for two things:

  1. Completely private modules with no public release, and,
  2. Forks of public modules that have a bug or a feature missing that is critical to us but has not or will not be merged into the mainline repo. This often happens for dependencies of dependencies, so scoped packages won't work here.

We also strongly restrict outgoing traffic from webserver instances, so a private repo that proxies public npm is great for that as well.

A feature I would really love to see is npm publish <registry> or some variant of that, so I can be logged in to multiple registries at once and publish between one and the other without doing a login dance. Or is there a way to do that, that I'm missing?

rlidwka commented 9 years ago

A feature I would really love to see is npm publish <registry> or some variant of that

You can use npm publish --reg <registry>.

Or you can specify publishConfig for every private module in package descriptor file, and just run npm publish.

STRML commented 9 years ago

--reg sounds exactly like what I'm looking for. Is that something you added, or is it in mainline npm? I don't see it documented anywhere. On 12/9/14 7:28 PM, Alex Kocharin wrote:

A feature I would really love to see is |npm publish <registry>|
or some variant of that

You can use |npm publish --reg |.

Or you can specify |publishConfig| for every private module in package descriptor file, and just run |npm publish|.

— Reply to this email directly or view it on GitHub https://github.com/rlidwka/yapm/issues/14#issuecomment-66331780.

rlidwka commented 9 years ago

Is that something you added, or is it in mainline npm?

--reg is a shortcut for --registry, and it was in mainline npm from the very beginning.

It is a config key, but you can override any config key with a command-line argument or an environmental variable.

PS: npm@1.4 or earlier versions can't be simultaneously logged into different registries, it was fixed in yapm@1.4 and npm@2.

STRML commented 9 years ago

Thanks. Very sorry to have wasted your time with something that is already in there - thanks for bearing with me. On 12/9/14 7:46 PM, Alex Kocharin wrote:

Is that something you added, or is it in mainline npm?

|--reg| is a shortcut for |--registry|, and it was in mainline npm from the very beginning.

It is a config key, but you can override any config key with a command-line argument or an environmental variable.

PS: |npm@1.4| or earlier versions can't be simultaneously logged into different registries, it was fixed in |yapm@1.4| and |npm@2|.

— Reply to this email directly or view it on GitHub https://github.com/rlidwka/yapm/issues/14#issuecomment-66334630.