Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
For example, If I have publishConfig.registry = registryA in @scope/foo's package.json, and $cwd/.npmrc with @scope:registry=registryB, when I run npm publish on @scope/foo, I'd expect to publish it to registryA instead of registryB.
However, the current behavior is unexpected to publish on registryB.
Expected Behavior
As title
Steps To Reproduce
As described above
Environment
- npm: 9.8.1
- Node.js: v18.18.2
- OS Name: Darwin arm64
- System Model Name: macOS 14.1.2
- npm config:
; "user" config from /Users/JounQin/.npmrc
//internal-mirrors.alauda.cn/repository/npm/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
; "project" config from /Users/JounQin/Workspaces/Alauda/octopus/.npmrc
@alauda/dp-cli:registry = "https://registry.npmjs.org/"
@alauda/dp-dynamic-plugin-backend-core:registry = "https://registry.npmjs.org/"
@alauda/dp-dynamic-plugin-frontend-core:registry = "https://registry.npmjs.org/"
@alauda:registry = "https://build-nexus.alauda.cn/repository/npm/"
; node bin location = /Users/JounQin/Library/Application Support/fnm/node-versions/v18.18.2/installation/bin/node
; node version = v18.18.2
; npm local prefix = /Users/JounQin/Workspaces/Alauda/octopus
; npm version = 9.8.1
; cwd = /Users/JounQin/Workspaces/Alauda/octopus
; HOME = /Users/JounQin
; Run `npm config ls -l` to show all defaults.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
For example, If I have
publishConfig.registry = registryAin@scope/foo'spackage.json, and$cwd/.npmrcwith@scope:registry=registryB, when I runnpm publishon@scope/foo, I'd expect to publish it to registryA instead of registryB.However, the current behavior is unexpected to publish on registryB.
Expected Behavior
As title
Steps To Reproduce
As described above
Environment