`getNpmPackageAccess` not reading `publishConfig`
<!--- Provide a short summary of the issue in the title above -->
## Description
<!-- Write a clear and concise description of what the issue is -->
## Steps to reproduce
<!--- Let us how how we can reproduce the issue on our end -->
1. Add custom registry to `.npmrc`
2. Add `publishConfig` with NPM registry `https://registry.npmjs.org/`
3. Run `np`
## Expected behavior
<!--- Tell us what you expected to happen -->
```
× Error: Command failed with exit code 1: npm access get status git-hooks-list --json
npm error code E404
npm error 404 Not Found - GET https://registry.npmmirror.com/-/package/git-hooks-list/visibility - [NOT_FOUND] /-/package/git-hooks-list/visibility not found
npm error A complete log of this run can be found in: <...>\npm-cache\_logs\2025-02-05T02_18_03_843Z-debug-0.log
{
"error": {
"code": "E404",
"summary": "Not Found - GET https://registry.npmmirror.com/-/package/git-hooks-list/visibility - [NOT_FOUND] /-/package/git-hooks-list/visibility not found",
"detail": ""
}
}
```
## Environment
<!-- Mention which versions of np, Node.js, npm and Git you're using, as well as your OS and version -->
np - 10.2.0
Node.js - 10.2.0
npm - 10.7.0
Git - git version 2.42.0.windows.2
OS - Windows 10
[`getNpmPackageAccess`](https://github.com/sindresorhus/np/blob/04dc20651316ba4697ac998bfe864cf53c776b83/source/util.js#L158) should use `registry` from `publishConfig`
0 条评论