Files
pnpm/config/reader
Zoltan Kochan 7bcfd970e9 fix(config): align scoped registry resolution between config get and publish (#11494)
Fixes [#11492](https://github.com/pnpm/pnpm/issues/11492).

In pnpm v11 a scoped registry resolved to different URLs depending on which command read it:

- `pnpm config get @<scope>:registry` returned the value from `.npmrc`
- `pnpm publish` used the value from `pnpm-workspace.yaml`'s `registries` block

When the two sources disagreed, `pnpm publish` silently targeted the URL from `pnpm-workspace.yaml`, even though `pnpm config get` reported a different (and seemingly authoritative) URL — so users could publish to the wrong registry without any indication.

This PR makes `pnpm config get @<scope>:registry` read from the merged `Config.registries` map (the same map `publish` and the resolvers use) before falling back to `authConfig`. Both commands now report and use the same URL.
2026-05-06 17:06:18 +02:00
..
2026-05-05 19:50:32 +02:00
2026-05-05 19:50:32 +02:00

@pnpm/config.reader

Gets configuration options for pnpm

npm version

Installation

pnpm add @pnpm/config.reader

Usage

import { getConfig } from '@pnpm/config.reader'

getConfig().then(pnpmConfig => console.log(pnpmConfig))

License

MIT