Skip to content
verdict:

pnpm 11.0.0-beta.0

preview

note: no summary for this older release

We summarize recent releases. The original release notes for this version are below.

release-notesgithub.com/pnpm/pnpm · 313 lines
  1. ## Major Changes
  2. ### Store
  3. * Runtime dependencies are always linked from the global virtual store [#10233](https://github.com/pnpm/pnpm/pull/10233).
  4. * Optimized index file format to store the hash algorithm once per file instead of repeating it for every file entry. Each file entry now stores only the hex digest instead of the full integrity string (`<algo>-<digest>`). Using hex format improves performance since file paths in the content-addressable store use hex representation, eliminating base64-to-hex conversion during path lookups.
  5. * Store version bumped to v11.
  6. * Store the bundled manifest (name, version, bin, engines, scripts, etc.) directly in the package index file, eliminating the need to read `package.json` from the content-addressable store during resolution and installation. This reduces I/O and speeds up repeat installs [#10473](https://github.com/pnpm/pnpm/pull/10473).
  7. * Use SQLite for storing package index in the content-addressable store. Instead of individual JSON files under `$STORE/index/`, package metadata is now stored in a single SQLite database at `$STORE/index.db` with MessagePack-encoded values. This reduces filesystem syscall overhead, improves space efficiency for small metadata entries, and enables concurrent access via SQLite's WAL mode. Packages missing from the new index are re-fetched on demand [#10500](https://github.com/pnpm/pnpm/pull/10500) [#10826](https://github.com/pnpm/pnpm/issues/10826).
  8. ### Global Packages
  9. * Global installs (`pnpm add -g pkg`) and `pnpm dlx` now use the global virtual store by default. Packages are stored at `{storeDir}/links` instead of per-project `.pnpm` directories. This can be disabled by setting `enableGlobalVirtualStore: false` [#10694](https://github.com/pnpm/pnpm/pull/10694).
  10. * Isolated global packages. Each globally installed package (or group of packages installed together) now gets its own isolated installation directory with its own `package.json`, `node_modules/`, and lockfile. This prevents global packages from interfering with each other through peer dependency conflicts, hoisting changes, or version resolution shifts.
  11. Key changes:
  12. * `pnpm add -g <pkg>` creates an isolated installation in `{pnpmHomeDir}/global/v11/{hash}/`
  13. * `pnpm remove -g <pkg>` removes the entire installation group containing the package
  14. * `pnpm update -g [pkg]` re-installs packages in new isolated directories
  15. * `pnpm list -g` scans isolated directories to show all installed global packages
  16. * `pnpm install -g` (no args) is no longer supported; use `pnpm add -g <pkg>` instead
  17. ### Configuration
  18. * Changed default values: `optimisticRepeatInstall` is now `true` and `verifyDepsBeforeRun` is now `install`.
  19. * `pnpm config get` (without `--json`) no longer print INI formatted text.
  20. Instead, it would print JSON for both objects and arrays and raw string for
  21. strings, numbers, booleans, and nulls.
  22. `pnpm config get --json` would still print all types of values as JSON like before.
  23. * `pnpm config get <array>` now prints a JSON array.
  24. * `pnpm config list` now prints a JSON object instead of INI formatted text.
  25. * `pnpm config list` and `pnpm config get` (without argument) now hide auth-related settings.
  26. * `pnpm config list` and `pnpm config get` (without argument) now show top-level keys as camelCase.
  27. Exception: Keys that start with `@` or `//` would be preserved (their cases don't change).
  28. * `pnpm config get` and `pnpm config list` no longer load non camelCase options from the workspace manifest (`pnpm-workspace.yaml`).
  29. * pnpm no longer loads non-auth and non-registry settings from rc files. Other settings must be defined in `pnpm-workspace.yaml`.
  30. * Replace workspace project specific `.npmrc` with `packageConfigs` in `pnpm-workspace.yaml`.
  31. A workspace manifest with `packageConfigs` would look something like this:
  32. ```yaml
  33. # File: pnpm-workspace.yaml
  34. packages:
  35. - "packages/project-1"
  36. - "packages/project-2"
  37. packageConfigs:
  38. "project-1":
  39. saveExact: true
  40. "project-2":
  41. savePrefix: "~"
  42. ```
  43. Or this:
  44. ```yaml
  45. # File: pnpm-workspace.yaml
  46. packages:
  47. - "packages/project-1"
  48. - "packages/project-2"
  49. packageConfigs:
  50. - match: ["project-1", "project-2"]
  51. modulesDir: "node_modules"
  52. saveExact: true
  53. ```
  54. ### Lockfile
  55. * Simplified `patchedDependencies` lockfile format from `Record<string, { path: string, hash: string }>` to `Record<string, string>` (selector to hash). Existing lockfiles with the old format are automatically migrated [#10911](https://github.com/pnpm/pnpm/pull/10911).
  56. ### Other
  57. * This package is now pure ESM.
  58. * Node.js v18, 19, 20, and 21 support discontinued.
  59. * The standalone exe version of pnpm requires at least glibc 2.27.
  60. * `strictDepBuilds` is `true` by default.
  61. * `blockExoticSubdeps` is `true` by default.
  62. * Remove deprecated build dependency settings: `onlyBuiltDependencies`, `onlyBuiltDependenciesFile`, `neverBuiltDependencies`, and `ignoredBuiltDependencies`.
  63. Use the `allowBuilds` setting instead. It is a map where keys are package name patterns and values are booleans:
  64. * `true` means the package is allowed to run build scripts
  65. * `false` means the package is explicitly denied from running build scripts
  66. Same as before, by default, none of the packages in the dependencies are allowed to run scripts. If a package has postinstall scripts and it isn't declared in `allowBuilds`, an error is printed.
  67. Before:
  68. ```yaml
  69. onlyBuiltDependencies:
  70. - electron
  71. onlyBuiltDependenciesFile: "allowed-builds.json"
  72. neverBuiltDependencies:
  73. - core-js
  74. ignoredBuiltDependencies:
  75. - esbuild
  76. ```
  77. After:
  78. ```yaml
  79. allowBuilds:
  80. electron: true
  81. core-js: false
  82. esbuild: false
  83. ```
  84. * Removed the deprecated `allowNonAppliedPatches` completely in favor of `allowUnusedPatches`.
  85. Remove `ignorePatchFailures` so all patch application failures should throw an error.
  86. * Removed the `pnpm server` command [#10463](https://github.com/pnpm/pnpm/pull/10463).
  87. * Removed support for the `useNodeVersion` and `executionEnv.nodeVersion` fields. `devEngines.runtime` and `engines.runtime` should be used instead [#10373](https://github.com/pnpm/pnpm/pull/10373).
  88. * Removed support for `hooks.fetchers`. We now have a new API for custom fetchers and resolvers via the `fetchers` field of `pnpmfile`.
  89. * The default value of the `type` field in the `package.json` file of the project initialized by `pnpm init` command has been changed to `module`.
  90. * Support lowercase options in `pnpm add`: `-d`, `-p`, `-o`, `-e` [#9197](https://github.com/pnpm/pnpm/issues/9197).
  91. When using `pnpm add` command only:
  92. * `-p` is now an alias for `--save-prod` instead of `--parseable`
  93. * `-d` is now an alias for `--save-dev` instead of `--loglevel=info`
  94. * `pnpm publish` now works without the `npm` CLI.
  95. The One-time Password feature now reads from `PNPM_CONFIG_OTP` instead of `NPM_CONFIG_OTP`:
  96. ```sh
  97. export PNPM_CONFIG_OTP='<your OTP here>'
  98. pnpm publish --no-git-checks
  99. ```
  100. If the registry requests OTP and the user has not provided it via the `PNPM_CONFIG_OTP` environment variable or the `--otp` flag, pnpm will prompt the user directly for an OTP code.
  101. If the registry requests web-based authentication, pnpm will print a scannable QR code along with the URL.
  102. Since the new `pnpm publish` no longer calls `npm publish`, some undocumented features may have been unknowingly dropped. If you rely on a feature that is now gone, please open an issue at <https://github.com/pnpm/pnpm/issues>. In the meantime, you can use `pnpm pack && npm publish *.tgz` as a workaround.
  103. * pnpm no longer reads settings from the `pnpm` field of `package.json`. Settings should be defined in `pnpm-workspace.yaml` [#10086](https://github.com/pnpm/pnpm/pull/10086).
  104. * Breaking changes to `pnpm link`:
  105. * `pnpm link <pkg-name>` no longer resolves packages from the global store. Only relative or absolute paths are accepted. For example, use `pnpm link ./foo` instead of `pnpm link foo`.
  106. * `pnpm link --global` is removed. Use `pnpm add -g .` to register a local package's bins globally.
  107. * `pnpm link` (no arguments) is removed. Use `pnpm link <dir>` with an explicit path instead.
  108. * Do not exclude the root workspace project, when it is explicitly selected via a filter [#10465](https://github.com/pnpm/pnpm/pull/10465).
  109. ## Minor Changes
  110. ### New Commands
  111. * Added `pnpm sbom` command for generating Software Bill of Materials in CycloneDX 1.7 and SPDX 2.3 JSON formats [#9088](https://github.com/pnpm/pnpm/issues/9088).
  112. * Added `pnpm clean` command that safely removes `node_modules` directories from all workspace projects [#10707](https://github.com/pnpm/pnpm/issues/10707). Use `--lockfile` to also remove `pnpm-lock.yaml` files.
  113. * Added a new command `pnpm runtime set <runtime name> <runtime version spec> [-g]` for installing runtimes. Deprecated `pnpm env use` in favor of the new command.
  114. * Add the ability to fix vulnerabilities by updating packages in the lockfile instead of adding overrides. Use `pnpm audit --fix=update` [#10341](https://github.com/pnpm/pnpm/pull/10341).
  115. ### Configuration
  116. * Add support for a global YAML config file named `config.yaml`.
  117. Now configurations are divided into 2 categories:
  118. * Registry and auth settings which can be stored in INI files such as global `rc` and local `.npmrc`.
  119. * pnpm-specific settings which can only be loaded from YAML files such as global `config.yaml` and local `pnpm-workspace.yaml`.
  120. * Load environment variables whose names start with `pnpm_config_` into config. These environment variables override settings from `pnpm-workspace.yaml` but not the CLI arguments.
  121. * Support reading `allowBuilds` from `pnpm-workspace.yaml` in the global package directory for global installs.
  122. * Added support for `pnpm config get globalconfig` to retrieve the global config file path [#9977](https://github.com/pnpm/pnpm/issues/9977).
  123. * Added a new setting `virtualStoreOnly` that populates the virtual store without creating importer symlinks, hoisting, bin links, or running lifecycle scripts. This is useful for pre-populating a store (e.g., in Nix builds) without creating unnecessary project-level artifacts. `pnpm fetch` now uses this mode internally [#10840](https://github.com/pnpm/pnpm/issues/10840).
  124. * Support specifying the pnpm version via `devEngines.packageManager` in `package.json`. Unlike the `packageManager` field, this supports version ranges. The resolved version is stored in `pnpm-lock.yaml` and reused if it still satisfies the range [#10932](https://github.com/pnpm/pnpm/pull/10932).
  125. * Config dependencies are now installed into the global virtual store (`{storeDir}/links/`) and symlinked into `node_modules/.pnpm-config/`. This allows config dependencies to be shared across projects that use the same store, avoiding redundant fetches and imports [#10910](https://github.com/pnpm/pnpm/pull/10910).
  126. * Store config dependency and package manager integrity info in `pnpm-lock.yaml` instead of inlining it in `pnpm-workspace.yaml`. The workspace manifest now contains only clean version specifiers for `configDependencies`, while the resolved versions, integrity hashes, and tarball URLs are recorded in the lockfile as a separate YAML document. The env lockfile section also stores `packageManagerDependencies` resolved during version switching and self-update. Projects using the old inline-hash format are automatically migrated on install [#10912](https://github.com/pnpm/pnpm/pull/10912) [#10964](https://github.com/pnpm/pnpm/pull/10964).
  127. ### Store
  128. * When the global virtual store is enabled, packages that are not allowed to build (and don't transitively depend on packages that are) now get hashes that don't include the engine name (platform, architecture, Node.js major version). This means ~95% of packages in the GVS survive Node.js upgrades and architecture changes without re-import [#10837](https://github.com/pnpm/pnpm/issues/10837).
  129. ### Hooks & Pnpmfiles
  130. * Added support for pnpmfiles written in ESM. They should have the `.mjs` extension: `.pnpmfile.mjs` [#9730](https://github.com/pnpm/pnpm/pull/9730).
  131. * Support `.pnpmfile.mjs` as the default pnpmfile. When `.pnpmfile.mjs` exists, it takes priority over `.pnpmfile.cjs` and only one is loaded.
  132. ### CLI & Other
  133. * Added `-F` as a short alias for the `--filter` option.
  134. ## Patch Changes
  135. * Check if a package is installable for non npm-hosted packages (e.g., git or tarball dependencies) after the manifest has been fetched.
  136. * Explicitly tell `npm` the path to the global `rc` config file.
  137. * Fix YAML formatting preservation in `pnpm-workspace.yaml` when running commands like `pnpm update`. Previously, quotes and other formatting were lost even when catalog values didn't change.
  138. Closes #10425
  139. * The parameter set by the `--allow-build` flag is written to `allowBuilds`.
  140. * Fix a bug in which specifying `filter` on `pnpm-workspace.yaml` would cause pnpm to not detect any projects.
  141. * Defer patch errors until all patches in a group are applied, so that one failed patch does not prevent other patches from being attempted.
  142. * Fail on incompatible lockfiles in CI when frozen lockfile mode is enabled [#10978](https://github.com/pnpm/pnpm/pull/10978).
  143. <!-- sponsors -->
  144. ## Platinum Sponsors
  145. <table>
  146. <tbody>
  147. <tr>
  148. <td align="center" valign="middle">
  149. <a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
  150. </td>
  151. </tr>
  152. </tbody>
  153. </table>
  154. ## Gold Sponsors
  155. <table>
  156. <tbody>
  157. <tr>
  158. <td align="center" valign="middle">
  159. <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  160. <picture>
  161. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
  162. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
  163. <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
  164. </picture>
  165. </a>
  166. </td>
  167. <td align="center" valign="middle">
  168. <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  169. <picture>
  170. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
  171. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
  172. <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
  173. </picture>
  174. </a>
  175. </td>
  176. <td align="center" valign="middle">
  177. <a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td align="center" valign="middle">
  182. <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  183. <picture>
  184. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
  185. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
  186. <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
  187. </picture>
  188. </a>
  189. </td>
  190. <td align="center" valign="middle">
  191. <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  192. <picture>
  193. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
  194. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
  195. <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
  196. </picture>
  197. </a>
  198. </td>
  199. <td align="center" valign="middle">
  200. <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  201. <picture>
  202. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
  203. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
  204. <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
  205. </picture>
  206. </a>
  207. </td>
  208. </tr>
  209. <tr>
  210. <td align="center" valign="middle">
  211. <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  212. <picture>
  213. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
  214. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
  215. <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
  216. </picture>
  217. </a>
  218. </td>
  219. <td align="center" valign="middle">
  220. <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  221. <picture>
  222. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
  223. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
  224. <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
  225. </picture>
  226. </a>
  227. </td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <!-- sponsors end -->

view on githubimported 2026-09-28 via npm