Zum Inhalt springen
verdict:

pnpm 11.6.0

notable

note: die Zusammenfassung und die Release Notes sind auf Englisch

note: keine Zusammenfassung für dieses ältere Release

Wir fassen die neueren Releases zusammen. Die originalen Release Notes dieser Version stehen hier unten.

release-notesgithub.com/pnpm/pnpm · 148 Zeilen
  1. ### ⚠️ Security fix — environment variables in a project `.npmrc` (action may be required)
  2. Following [GHSA-3qhv-2rgh-x77r](https://github.com/pnpm/pnpm/security/advisories/GHSA-3qhv-2rgh-x77r), pnpm no longer expands `${ENV_VAR}` placeholders that come from a **repository-controlled** config file, because a malicious repository could otherwise use them to leak your environment secrets (npm tokens, CI job tokens, etc.) to an attacker-controlled registry during install. This applies to:
  3. - the project/workspace `.npmrc` — `registry`, `@scope:registry`, proxy URLs, URL-scoped keys (`//host/…`), and credential values (`_authToken`, `_auth`, `_password`, `username`, `tokenHelper`, `cert`, `key`);
  4. - registry URLs in `pnpm-workspace.yaml`.
  5. Environment variables are **still** expanded in trusted config: your user-level `~/.npmrc`, the global config, CLI options, and environment config.
  6. **If your authentication broke after upgrading**, move the token out of the committed `.npmrc`:
  7. ```sh
  8. # Writes to your user/global config, not the repository:
  9. pnpm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
  10. ```
  11. Or keep the `${NPM_TOKEN}` line but put it in your user-level `~/.npmrc` instead of the repo. In **GitHub Actions**, `actions/setup-node` with `registry-url` already writes a user-level `.npmrc`, so `NODE_AUTH_TOKEN` keeps working. For other CI where editing each pipeline is hard, set `PNPM_CONFIG_NPMRC_AUTH_FILE=.npmrc` (or `NPM_CONFIG_USERCONFIG=.npmrc`) in the CI environment to declare the project `.npmrc` trusted.
  12. See https://pnpm.io/npmrc for full migration details.
  13. ## Minor Changes
  14. * `pnpm install` completes without re-resolving when `pnpm-lock.yaml` was deleted but `node_modules` is intact: the up-to-date check now treats the current lockfile (`node_modules/.pnpm/lock.yaml`) — the record of what the previous install materialized — as the wanted lockfile, verifies the manifests still match it, restores `pnpm-lock.yaml` from it, and reports "Already up to date". Previously this scenario triggered a full resolution and a re-verification of every locked package against the registry.
  15. * 615c669: Added support for configuring URL-scoped registry settings through `npm_config_//…` and `pnpm_config_//…` environment variables, for example:
  16. ```text
  17. npm_config_//registry.npmjs.org/:_authToken=<token>
  18. pnpm_config_//registry.npmjs.org/:_authToken=<token>
  19. ```
  20. This provides a file-free way to supply registry authentication. Because the registry a value applies to is encoded in the (trusted) environment variable name, it is host-scoped by construction and cannot be redirected to another registry by repository-controlled config. The environment value is treated as trusted config: it takes precedence over a project/workspace `.npmrc` but is still overridden by command-line options. When the same key is provided through both prefixes, `pnpm_config_` wins.
  21. * Raised the default network concurrency from `min(64, max(cpuCores * 3, 16))` to `min(96, max(cpuCores * 3, 64))`. Package downloads are I/O-bound, not CPU-bound, so deriving the floor from the core count left machines with few cores (for example 4-vCPU CI runners) downloading only 16 tarballs at a time and unable to saturate a low-latency registry. The `networkConcurrency` setting still overrides the default.
  22. ## Patch Changes
  23. * Improved the warning printed when a project `.npmrc` uses an environment variable in a registry/proxy URL or in registry credentials. The message now explains why the setting was ignored and how to migrate it to a trusted source — for example by moving the line to the user-level `~/.npmrc` or running `pnpm config set "<key>" <value>` — with a link to https://pnpm.io/npmrc. The `pnpm config set` example is only suggested when the key has no `${...}` placeholder, so the snippet is always safe to copy-paste.
  24. * Print a "Lockfile passes supply-chain policies (verified 2h ago)" message when lockfile verification is skipped because a cached verdict for the same lockfile content and policy is reused. Previously the cached short-circuit was completely silent, which made it look like the policy gate never ran [#12324](https://github.com/pnpm/pnpm/issues/12324).
  25. * Platform-specific optional dependencies are now skipped even when their `os`/`cpu`/`libc` fields are missing from the registry metadata or the lockfile. Some registries strip these fields from the package metadata, which made pnpm download and install the binaries of every platform regardless of `supportedArchitectures`. The missing platform fields of an optional dependency are now inferred from its name (e.g. `@nx/nx-win32-arm64-msvc` → `os: win32`, `cpu: arm64`), so foreign-platform binaries are skipped without even downloading them [#11702](https://github.com/pnpm/pnpm/issues/11702).
  26. <!-- sponsors -->
  27. ## Platinum Sponsors
  28. <table>
  29. <tbody>
  30. <tr>
  31. <td align="center" valign="middle">
  32. <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>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td align="center" valign="middle">
  37. <a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  38. <picture>
  39. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
  40. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
  41. <img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
  42. </picture>
  43. </a>
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. ## Gold Sponsors
  49. <table>
  50. <tbody>
  51. <tr>
  52. <td align="center" valign="middle">
  53. <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  54. <picture>
  55. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
  56. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
  57. <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
  58. </picture>
  59. </a>
  60. </td>
  61. <td align="center" valign="middle">
  62. <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  63. <picture>
  64. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
  65. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
  66. <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
  67. </picture>
  68. </a>
  69. </td>
  70. <td align="center" valign="middle">
  71. <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>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td align="center" valign="middle">
  76. <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  77. <picture>
  78. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
  79. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
  80. <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
  81. </picture>
  82. </a>
  83. </td>
  84. <td align="center" valign="middle">
  85. <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  86. <picture>
  87. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
  88. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
  89. <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
  90. </picture>
  91. </a>
  92. </td>
  93. <td align="center" valign="middle">
  94. <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  95. <picture>
  96. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
  97. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
  98. <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
  99. </picture>
  100. </a>
  101. </td>
  102. </tr>
  103. <tr>
  104. <td align="center" valign="middle">
  105. <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  106. <picture>
  107. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
  108. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
  109. <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
  110. </picture>
  111. </a>
  112. </td>
  113. <td align="center" valign="middle">
  114. <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  115. <picture>
  116. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
  117. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
  118. <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
  119. </picture>
  120. </a>
  121. </td>
  122. </tr>
  123. </tbody>
  124. </table>
  125. <!-- sponsors end -->

auf github ansehenimported 2026-09-28 über npm