Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm publish is not clear about where it's publishing too.
I have a repository that I pulled down with a clone. My local ~/.npmrc file has,
@acme:registry=https://verdaccio-alpha.dev.acme.net/verdaccio/
//verdaccio-alpha.dev.acme.net/verdaccio/:_authToken="TOKEN"
If I run npm publish where does the repository get pushed? From the location in npmrc which hosts the scope? Nope.
It gets published to production because there is a publishConfig entry in the package.json
"publishConfig": {
"registry": "https://verdaccio.dev.acme.net/verdaccio/"
},
This is not what I would expect. And I don't think having two sources for truth on a command like npm publish is a good idea.
Perhaps if the publishConfig entry isn't the same as the scope, we can require --force?
In our case we were setting up a new development box for verdaccio. I thought changing the npmrc would be sufficient but I will also need to scrub all of the publishConfig
Expected Behavior
I would expect it to require -f as the assumption that I was aware publishConfig was set is not sound.
Steps To Reproduce
- Create an npmrc file which sets scope
- Create a package in scope
- Set publishConfig
- Observe publishConfig is taken and scope is ignored.
Environment
~/angular-ui # npm --version
8.1.3
~/angular-ui # node --version
v17.0.1
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npmpublish is not clear about where it's publishing too.I have a repository that I pulled down with a clone. My local
~/.npmrcfile has,If I run
npm publishwhere does the repository get pushed? From the location in npmrc which hosts the scope? Nope.It gets published to production because there is a
publishConfigentry in thepackage.jsonThis is not what I would expect. And I don't think having two sources for truth on a command like
npm publishis a good idea.Perhaps if the
publishConfigentry isn't the same as the scope, we can require--force?In our case we were setting up a new development box for verdaccio. I thought changing the npmrc would be sufficient but I will also need to scrub all of the
publishConfigExpected Behavior
I would expect it to require
-fas the assumption that I was awarepublishConfigwas set is not sound.Steps To Reproduce
Environment
~/angular-ui # npm --version
8.1.3
~/angular-ui # node --version
v17.0.1