ITADN

Switch from `npm-registry-fetch` to another solution broke proper .npmrc handling

#252Closedthegnuu 创建于 2026-04-02
T
thegnuucommented
### Describe the bug For security reasons, we are using our .npmrc with ENV variables, something like this: ``` //npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN} ``` This worked without any issues prior to v19.11.0. It seems like the refactoring broke the behavior completely and private packages resolved over an .npmrc containing ENV variables is simple not possible anymore. Is there a way for you to fix this with your new implementation? I am willing to help out here, but I am not sure whats the idea behind this change and why it was done in the first place, so I might need a bit more info :) ### Reproduction Easily reproducable by adding an ENV variable to .npmrc, I cannot share my secrets here ;) ### System Info ```Shell System: OS: macOS 26.2 CPU: (14) arm64 Apple M4 Pro Memory: 175.67 MB / 48.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.14.1 - /Users/a/.local/share/mise/installs/node/24.14.1/bin/node Yarn: 1.22.22 - /Users/a/.local/share/mise/installs/yarn/1.22.22/bin/yarn npm: 11.11.0 - /Users/a/.local/share/mise/installs/node/24.14.1/bin/npm pnpm: 10.33.0 - /Users/a/.local/share/mise/installs/pnpm/10.33.0/pnpm Browsers: Brave Browser: 146.1.88.134 Firefox: 133.0.3 Safari: 26.2 ``` ### Used Package Manager pnpm ### Validations - [x] Follow our [Code of Conduct](https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md) - [x] Read the [Contributing Guide](https://github.com/antfu/contribute). - [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. - [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. - [x] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. ### Contributions - [x] I am willing to submit a PR to fix this issue - [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
关闭于 2026-04-03 1 条评论