Zum Inhalt springen
verdict:

pnpm 12.2.0

notable

note: die Zusammenfassung und die Release Notes sind auf Englisch

warning: Eingriff nötig

1 Breaking Change5 Kernpunkte

Catalogs now resolve workspace dependencies, and wildcard workspace patterns no longer match dot-directories.

Zusammenfassung · nur aus den Release Notes · claude-haiku-5-5 · prompt v7

breaking changesalle zitiert, jeder mit einer Lösung

breaking[1]: Wildcard workspace patterns such as packages/* and ** no longer match dot-prefixed directories.

Workspace patterns now follow the same dot-directory rule as pnpm 11: a wildcard no longer matches a dot-prefixed directory, so packages/* and ** skip packages/.cache and .git. A pattern that names a dot-prefixed directory still matches it, as packages/.cache and packages/.* do.

help: Name the dot-prefixed directory explicitly in the pattern, for example packages/.cache, if it should still be a workspace project.

Kernpunkte

release-notesgithub.com/pnpm/pnpm · 178 Zeilen
  1. ## Minor Changes
  2. - Catalogs can now resolve workspace dependencies through the `workspace:` protocol.
  3. ## Patch Changes
  4. - Fixed `pnpm audit --fix` failing with `ERR_PNPM_INVALID_FIX_OPTION` when used without a value, including when another flag follows it, as in `pnpm audit --fix --json` [#13261](https://github.com/pnpm/pnpm/issues/13261). Fixed `pnpm audit --fix=override` ignoring the `saveExact` and `savePrefix` settings when writing vulnerability overrides [#11523](https://github.com/pnpm/pnpm/issues/11523).
  5. - Authenticate Node.js runtime downloads from `nodeDownloadMirrors` with URL-scoped npm registry credentials, including bearer tokens, basic auth, and `tokenHelper` [pnpm/pnpm#14334](https://github.com/pnpm/pnpm/issues/14334).
  6. - Fixed detached child processes being terminated after successful commands on Windows.
  7. - Sped up installs in large workspaces by resolving each named `workspace:` dependency (`workspace:*`, `workspace:^`, `workspace:1.2.3`) once and reusing it across every project that declares it, instead of re-resolving it per project.
  8. - Fixed `pnpm install --fix-lockfile` to derive its repair and filtered-merge views from one lockfile snapshot.
  9. - Load pnpmfile `updateConfig` hooks before packing so hook-provided catalogs resolve in `pnpm pack`, `pnpm publish`, and `pnpm stage publish` [pnpm/pnpm#14377](https://github.com/pnpm/pnpm/issues/14377).
  10. - `pnpm deploy` no longer requires `injectWorkspacePackages` to be enabled. A linked workspace dependency is rewritten to a `file:` dependency in the dedicated deploy lockfile, and the peer dependencies it declares are bound to the deployed graph's own resolution.
  11. When a peer resolves to more than one version in that graph the binding is ambiguous, and choosing between the candidates is exactly what injecting the package would have decided, so the deploy still fails — now with `ERR_PNPM_DEPLOY_AMBIGUOUS_PEER`, which names the package, the peer, and the competing versions, instead of refusing every non-injected workspace up front, and suggests pinning the peer to one version with an `overrides` entry as the way to keep deploying without injection [#9386](https://github.com/pnpm/pnpm/issues/9386).
  12. - Fixed global virtual store hashes for dependency cycles. Every package that transitively depends on an allowed build now includes the engine in its store path, independent of traversal order [pnpm/pnpm#14341](https://github.com/pnpm/pnpm/issues/14341).
  13. - Fixed `ERR_PNPM_CMD_SHIM_CHMOD` when several installs run at once against a shared global virtual store. One install could remove a command shim while another was making it executable ([pnpm/pnpm#14353](https://github.com/pnpm/pnpm/issues/14353)).
  14. - Fixed the PowerShell shim generated by `npm install -g pnpm` on Windows so it invokes the native `pnpm.exe` binary [pnpm/pnpm#14362](https://github.com/pnpm/pnpm/issues/14362).
  15. - Fixed context-aware global shims on WSL2 so native Linux installations dispatch through the project runtime.
  16. - `pnpm install` no longer writes global `minimumReleaseAgeExclude` entries to the project's `pnpm-workspace.yaml` [pnpm/pnpm#14347](https://github.com/pnpm/pnpm/issues/14347).
  17. - Fixed `catalog:` ranges in workspace package peer dependencies being reported as unmet [pnpm/pnpm#14361](https://github.com/pnpm/pnpm/issues/14361).
  18. - `globalDir` and `globalBinDir` are honored wherever they are set, so `pnpm add -g` no longer fails with `ERR_PNPM_GLOBAL_BIN_DIR_NOT_IN_PATH` after `pnpm config set -g global-bin-dir` [#14336](https://github.com/pnpm/pnpm/issues/14336). The global `config.yaml` is read again, `PNPM_CONFIG_GLOBAL_DIR` / `PNPM_CONFIG_GLOBAL_BIN_DIR` reach the directories derived from them, and a leading `~/` is expanded before that derivation. A project's `pnpm-workspace.yaml` still cannot set either key.
  19. - Fixed the install progress line reporting `added 0` under `nodeLinker: hoisted`, even when packages were linked into `node_modules` [#14348](https://github.com/pnpm/pnpm/issues/14348).
  20. - An auto-installed optional peer is now resolved to a version its declared peer range accepts, even when the workspace root depends on that package at a version outside the range. Previously the root's version was used and then reported as an unmet optional peer [#13867](https://github.com/pnpm/pnpm/issues/13867).
  21. - Fixed `pnpm run "/pattern/"` running matching scripts one at a time in a single project. Matching scripts now run concurrently up to `workspaceConcurrency`, and their output is prefixed so concurrent lines remain distinguishable [pnpm discussion 14357](https://github.com/orgs/pnpm/discussions/14357).
  22. - Fixed a slowdown at the end of a resolving install in a large workspace. The peer-dependency report now inspects only the projects the resolution flagged, rather than every project in the lockfile ([pnpm/pnpm#14359](https://github.com/pnpm/pnpm/issues/14359)).
  23. - Speed up workspace discovery for literal directories and conventional trailing-star patterns.
  24. Workspace patterns now follow the same dot-directory rule as pnpm 11: a wildcard no longer matches a dot-prefixed directory, so `packages/*` and `**` skip `packages/.cache` and `.git`. A pattern that names a dot-prefixed directory still matches it, as `packages/.cache` and `packages/.*` do.
  25. - `pnpm audit` now ends its output with a trailing newline, including the `--json`, `--fix`, and `--ignore` output.
  26. - Retry transient Windows file-lock errors while replacing hoisted packages during installation.
  27. This fixes [pnpm/pnpm#14349](https://github.com/pnpm/pnpm/issues/14349).
  28. - Fixed command-line `--side-effects-cache` overrides being ignored when `pnpm-workspace.yaml` uses the object form of `sideEffectsCache` [pnpm/pnpm#14338](https://github.com/pnpm/pnpm/issues/14338).
  29. - Speed up workspace project discovery in large monorepos: workspace patterns are now probed concurrently and the discovered projects' `package.json` files are read in parallel [#14352](https://github.com/pnpm/pnpm/issues/14352).
  30. - Fixed repeated `pnpm dedupe` runs alternating between peer resolutions when a peer is provided through an npm alias.
  31. - Fixed `pnpm repo <package>` and `pnpm docs <package>` resolving bare package names through the `latest` tag, and prevented malformed package ranges from crashing registry selection.
  32. - Fixed non-ASCII characters in configuration values being mangled during environment-variable substitution. Paths such as `storeDir: ./café-store` are now preserved [#14383](https://github.com/pnpm/pnpm/issues/14383).
  33. <!-- sponsors -->
  34. ## Platinum Sponsors
  35. <table>
  36. <tbody>
  37. <tr>
  38. <td align="center" valign="middle">
  39. <a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
  40. </td>
  41. <td align="center" valign="middle">
  42. <a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  43. <picture>
  44. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
  45. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
  46. <img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
  47. </picture>
  48. </a>
  49. </td>
  50. <td align="center" valign="middle">
  51. <a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  52. <picture>
  53. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/notion.svg" />
  54. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/notion_light.svg" />
  55. <img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion" />
  56. </picture>
  57. </a>
  58. </td>
  59. </tr>
  60. </tbody>
  61. </table>
  62. ## Gold Sponsors
  63. <table>
  64. <tbody>
  65. <tr>
  66. <td align="center" valign="middle">
  67. <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  68. <picture>
  69. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
  70. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
  71. <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
  72. </picture>
  73. </a>
  74. </td>
  75. <td align="center" valign="middle">
  76. <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  77. <picture>
  78. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
  79. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
  80. <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
  81. </picture>
  82. </a>
  83. </td>
  84. <td align="center" valign="middle">
  85. <a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td align="center" valign="middle">
  90. <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  91. <picture>
  92. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
  93. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
  94. <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
  95. </picture>
  96. </a>
  97. </td>
  98. <td align="center" valign="middle">
  99. <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  100. <picture>
  101. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
  102. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
  103. <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
  104. </picture>
  105. </a>
  106. </td>
  107. <td align="center" valign="middle">
  108. <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  109. <picture>
  110. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
  111. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
  112. <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
  113. </picture>
  114. </a>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td align="center" valign="middle">
  119. <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  120. <picture>
  121. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
  122. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
  123. <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
  124. </picture>
  125. </a>
  126. </td>
  127. <td align="center" valign="middle">
  128. <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
  129. <picture>
  130. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
  131. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
  132. <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
  133. </picture>
  134. </a>
  135. </td>
  136. <td align="center" valign="middle">
  137. <a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
  138. </td>
  139. </tr>
  140. </tbody>
  141. </table>
  142. <!-- sponsors end -->

auf github ansehenimported 2026-09-28 über npm