Files
pnpm/config/reader
shiminshen ba2c8844c9 fix(config): apply pmOnFail default to devEngines.packageManager (singular) (#11682)
* fix(config): apply pmOnFail default to devEngines.packageManager (singular)

The pnpm v11 release notes document the `pmOnFail` default as `download`
(via the migration table that maps `managePackageManagerVersions: true` →
`pmOnFail: download (default)`). The legacy `packageManager` field already
gets that default applied at the central onFail-resolution site, but the
singular form of `devEngines.packageManager` short-circuited it by setting
`onFail = 'error'` inside `parseDevEnginesPackageManager`, so projects that
pinned a different pnpm via `devEngines.packageManager` saw a hard version
mismatch instead of an auto-download.

Drop that local `?? 'error'` and let the central default apply. The array
form of `devEngines.packageManager` keeps its own per-element defaults
('error' for the last entry, 'ignore' for the rest) — those reflect
explicit prioritisation by the user, not a system-wide fallback. Explicit
`onFail` values are still honored everywhere.

Closes #11676.

* chore: fix spelling (prioritisation → prioritization)

cspell flagged the British spelling at pre-push.

---------

Co-authored-by: Damon <damon@deeplearning.ai>
2026-05-17 14:47:59 +02:00
..
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +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