v11.0.0-alpha.10
Breaking Changes📦 pnpmView on GitHub →
⚠ 20 breaking✨ 16 features🐛 2 fixes🔧 17 symbols
Summary
This release introduces major performance improvements by switching internal store formats to MessagePack and optimizing index storage. Configuration handling has been significantly overhauled, moving away from rc files and standardizing on YAML for pnpm-specific settings, alongside dropping support for older Node.js versions.
⚠️ Breaking Changes
- The `pnpm config get` command (without `--json`) no longer outputs INI formatted text; it now outputs JSON for objects/arrays and raw strings for primitives. Use `pnpm config get --json` if you require JSON output for all types.
- `pnpm config get <array>` now prints a JSON array instead of INI format.
- `pnpm config list` now prints a JSON object instead of INI formatted text.
- Auth-related settings are hidden by default from `pnpm config list` and `pnpm config get` (without arguments).
- `pnpm config list` and `pnpm config get` (without argument) now show top-level keys as camelCase, except for keys starting with @ or //.
- `pnpm config get` and `pnpm config list` no longer load non camelCase options from the workspace manifest (`pnpm-workspace.yaml`).
- pnpm no longer loads non-auth and non-registry settings from rc files. These settings must now be defined in `pnpm-workspace.yaml`.
- Workspace project specific `.npmrc` files are replaced by the `packageConfigs` field in `pnpm-workspace.yaml`.
- This package is now pure ESM; CommonJS usage is no longer supported.
- Support for Node.js v18, v19, v20, and v21 has been discontinued. Users must upgrade to a supported Node.js version.
- The standalone exe version of pnpm requires at least glibc 2.27.
- Deprecated build dependency settings (`onlyBuiltDependencies`, `onlyBuiltDependenciesFile`, `neverBuiltDependencies`, and `ignoredBuiltDependencies`) have been removed. Use the `allowBuilds` setting instead.
- The deprecated `allowNonAppliedPatches` option has been completely removed in favor of `allowUnusedPatches`.
- The `ignorePatchFailures` option has been removed; all patch application failures will now throw an error.
- The `pnpm server` command has been removed.
- Support for the `useNodeVersion` and `executionEnv.nodeVersion` fields has been removed. Use `devEngines.runtime` and `engines.runtime` instead.
- Support for `hooks.fetchers` has been removed. Use the new API via the `fetchers` field of `pnpmfile` for custom fetchers and resolvers.
- The default value of the `type` field in `package.json` initialized by `pnpm init` is now `module`.
- When using `pnpm add`: `-p` is now an alias for `--save-prod` (was `--parseable`), and `-d` is now an alias for `--save-dev` (was `--loglevel=info`).
- The `pnpm publish` command no longer relies on the `npm` CLI. The OTP feature now reads from `PNPM_CONFIG_OTP` instead of `NPM_CONFIG_OTP`.
Migration Steps
- If you relied on the output format of `pnpm config get` (without `--json`), update scripts to handle JSON output or use `pnpm config get --json`.
- Replace usage of deprecated build dependency settings (`onlyBuiltDependencies`, etc.) with the `allowBuilds` map in configuration files.
- Remove usage of `allowNonAppliedPatches`; use `allowUnusedPatches` instead.
- Remove any configuration related to `ignorePatchFailures`; patch failures will now halt execution.
- Update scripts that relied on `useNodeVersion` or `executionEnv.nodeVersion` to use `devEngines.runtime` or `engines.runtime`.
- Update scripts that relied on `hooks.fetchers` to use the `fetchers` field in `pnpmfile`.
- If using `pnpm publish` and relying on OTP, ensure the environment variable is set to `PNPM_CONFIG_OTP` instead of `NPM_CONFIG_OTP`.
- If you were using project-specific `.npmrc` files for configuration within a workspace, migrate those settings to the `packageConfigs` field in `pnpm-workspace.yaml`.
- If you were relying on non-auth/non-registry settings in rc files, move them to `pnpm-workspace.yaml`.
✨ New Features
- Runtime dependencies are always linked from the global virtual store.
- Optimized index file format stores the hash algorithm once per file, and file entries now store only the hex digest, improving performance by eliminating base64-to-hex conversion.
- Internal store and cache files switched from JSON to MessagePack format for faster serialization/deserialization and smaller sizes.
- Bundled manifest (name, version, bin, engines, scripts, etc.) is now stored directly in the package index file, speeding up repeat installs by avoiding reading `package.json` from the store.
- Support for `pnpm config get` to print raw strings for primitives (strings, numbers, booleans, nulls).
- Support for `pnpm config list` to show top-level keys as camelCase (with exceptions).
- The `allowBuilds` setting is now `true` by default.
- The `blockExoticSubdeps` setting is now `true` by default.
- Support for lowercase aliases in `pnpm add`: `-d` for `--save-dev`, `-p` for `--save-prod`, `-o`, and `-e`.
- The `pnpm publish` command now works without the `npm` CLI.
- Environment variables starting with `pnpm_config_` are loaded into config, overriding workspace settings but not CLI arguments.
- Support for reading `allowBuilds` from `pnpm-workspace.yaml` in the global package directory for global installs.
- Support for a global YAML config file named `config.yaml` for pnpm-specific settings.
- Support added for pnpmfiles written in ESM (`.mjs` extension, e.g., `.pnpmfile.mjs`).
- `pnpm why` now shows a reverse dependency tree, making it easier to trace dependents back to workspace roots.
- A new `--yes` flag can be passed to `pnpm` to automatically confirm prompts.
🐛 Bug Fixes
- Fix YAML formatting preservation in `pnpm-workspace.yaml` when running commands like `pnpm update`, ensuring quotes and whitespace are kept.
- The parameter set by the `--allow-build` flag is now correctly written to `allowBuilds`.
Affected Symbols
`pnpm config get``pnpm config list`Store index file formatInternal store/cache files (serialization)`package.json` reading during resolutionBuild dependency settings (removed)`allowNonAppliedPatches` (removed)`ignorePatchFailures` (removed)`pnpm server` (removed)`useNodeVersion` (removed)`executionEnv.nodeVersion` (removed)`hooks.fetchers` (removed)`pnpmfile` (ESM support)`pnpm add` aliases (-d, -p)`pnpm publish` OTP reading`pnpm why` output format`pnpm-workspace.yaml` parsing