v11.0.0-alpha.0
Breaking Changes📦 pnpmView on GitHub →
⚠ 12 breaking✨ 11 features🐛 1 fixes⚡ 2 deprecations🔧 6 symbols
Summary
pnpm 9 introduces pure ESM, JSON‑based config output, V8‑serialized store files, and drops Node.js v18/v19 support, requiring migration of config files, imports, and runtime versions.
⚠️ Breaking Changes
- `pnpm config get` without `--json` now outputs JSON instead of INI formatted text; update scripts to parse JSON or use `--json` flag.
- `pnpm config list` and `pnpm config get` (no argument) now hide auth‑related settings; adjust any tooling that relied on those values.
- The package is now pure ESM; CommonJS `require` imports will fail and must be converted to `import`.
- `pnpm` no longer loads non‑auth and non‑registry settings from rc files; move such settings to `pnpm-workspace.yaml`.
- Support for Node.js v18 and v19 has been dropped; upgrade to Node.js >=20.
- `pnpm config get <array>` now prints a JSON array; scripts expecting the previous format need to be updated.
- The default `type` field in `package.json` created by `pnpm init` is now `module`; existing projects may need to set `type` manually if they rely on CommonJS.
- Top‑level keys output by `pnpm config list` and `pnpm config get` are now camelCase (except keys starting with `@` or `//`); update any code that parses raw key names.
- The standalone executable now requires glibc 2.27; older Linux distributions must upgrade glibc or use a different installation method.
- `pnpm config list` now outputs a JSON object instead of INI formatted text; adjust consumers accordingly.
- `pnpm config get` and `pnpm config list` no longer load non‑camelCase options from `pnpm-workspace.yaml`; rename such options to camelCase or move them elsewhere.
- Store and cache JSON files have been replaced with V8‑serialized binary files, which cannot be deserialized by older Node.js versions; clear the cache when downgrading Node.
Migration Steps
- Update any scripts that parse the output of `pnpm config get` or `pnpm config list` to handle JSON instead of INI.
- Move non‑auth and non‑registry settings from `.npmrc` or other rc files into `pnpm-workspace.yaml`.
- Convert CommonJS imports of pnpm modules to ESM `import` statements.
- If you rely on auth‑related config values, use explicit flags or environment variables to expose them.
- Rename configuration keys to camelCase or adjust code that expects the original casing.
- Rename `.pnpmfile.js` to `.pnpmfile.mjs` if using ESM pnpmfiles.
- Clear the pnpm store/cache after downgrading Node.js to avoid binary incompatibility.
- Ensure the system glibc version is at least 2.27 when using the standalone executable.
✨ New Features
- Added support for a global YAML config file `config.yaml` for pnpm‑specific settings.
- Environment variables prefixed with `pnpm_config_` are now loaded into the configuration and override `pnpm-workspace.yaml` values.
- Support for pnpmfiles written in ESM (`.pnpmfile.mjs`).
- pnpm CLI is now bundled with a specific Node.js runtime version, making it independent of the globally installed Node.
- Store and cache now use V8‑serialized binary files, improving read performance by ~23%.
- The default `type` field for projects initialized with `pnpm init` is now `module`.
- Top‑level configuration keys are presented in camelCase by default.
- Auth‑related settings are hidden by default in `pnpm config list` and `pnpm config get` without arguments.
- `pnpm config get` without `--json` now prints JSON for objects/arrays and raw primitives.
- `pnpm config get <array>` prints a JSON array.
- Standalone executable now enforces glibc 2.27 minimum.
🐛 Bug Fixes
- Explicitly tell `npm` the path to the global `rc` config file.
🔧 Affected Symbols
pnpm config getpnpm config listpnpm initpnpm-workspace.yaml.pnpmfile.mjsstore/cache serialization⚡ Deprecations
- Node.js v18 and v19 support is deprecated and removed.
- INI‑based rc files for pnpm‑specific settings are deprecated in favor of YAML config files.