Vai al contenuto
verdict:

pnpm 11.2.0

notable

note: la sintesi e le note di rilascio sono in inglese

note: nessuna sintesi per questa release più vecchia

Sintetizziamo le release recenti. Le note di rilascio originali di questa versione sono qui sotto.

release-notesgithub.com/pnpm/pnpm · 137 righe
  1. > See full [v11.0.0 changelog](https://github.com/pnpm/pnpm/releases/tag/v11.0.0)
  2. > Migration guide: [Migrating from v10 to v11](https://pnpm.io/11.x/migration)
  3. ## Minor Changes
  4. * **Experimental:** Adding [`@pnpm/pacquet`](https://npmx.dev/package/@pnpm/pacquet) (the Rust port of pnpm) to `configDependencies` in `pnpm-workspace.yaml` now delegates the materialization phase of `pnpm install` to the pacquet binary. pnpm still owns dependency resolution; pacquet only fetches and imports from the freshly-written lockfile. This is an opt-in preview of the Rust install engine [#11723](https://github.com/pnpm/pnpm/issues/11723).
  5. To configure pacquet in a project, run:
  6. ```
  7. pnpm add @pnpm/pacquet --config
  8. ```
  9. You'll see changes in `pnpm-workspace.yaml` and `pnpm-lock.yaml` that should be committed. If you experience any issues with pacquet, please let us know by mentioning this in the GitHub issue you create.
  10. * `configDependencies` now resolve and install one level of `optionalDependencies` declared by the config dependency, with `os`/`cpu`/`libc` platform filtering applied at install time. This unlocks the esbuild/swc-style pattern where a package ships platform-specific binaries via `optionalDependencies` — a config dependency can now do the same and have the matching binary symlinked next to it in the global virtual store, so `require('pkg-platform-arch')` from inside the config dependency resolves correctly.
  11. The env lockfile records all platform variants regardless of host platform, so it remains portable across machines. Each entry in a config dependency's `optionalDependencies` must declare an exact version — ranges and tags are rejected to keep installs reproducible.
  12. * Implement the documented `pnpm login --scope <scope>` flag. The scope is normalized (a leading `@` is added if missing; blank values are ignored) and an `@<scope>:registry=<registry>` mapping is written to the pnpm auth file alongside the auth token. Subsequent installs of `@<scope>/*` packages then route to the chosen registry. Previously `pnpm login --scope foo` errored with `Unknown option: 'scope'` despite the flag being listed in the online documentation [#11716](https://github.com/pnpm/pnpm/issues/11716).
  13. * `pnpm outdated` and `pnpm update --interactive` now report Node.js, Deno, and Bun runtimes installed as project dependencies (`runtime:` specifiers). Previously these were silently skipped.
  14. ## Patch Changes
  15. * Fix `cafile=<relative-path>` in `.npmrc` being read from the wrong directory when pnpm is invoked from a different cwd (e.g. `pnpm --dir <project> install` from a CI wrapper or monorepo script). The path is now resolved against the directory of the `.npmrc` that declared it, not `process.cwd()`. Before this fix the CA file silently failed to load — the install proceeded without the configured CA and the user only saw TLS errors against a private registry, with no log line tying back to the wrongly resolved path [#11624](https://github.com/pnpm/pnpm/issues/11624).
  16. * Fix `config.registry` getting a trailing slash appended when `registry` is set in `.npmrc` and no `registries.default` is provided by `pnpm-workspace.yaml`. The sync from `registries.default` to `config.registry` introduced in #11744 now only fires when the workspace manifest actually contributes a different default.
  17. * Fix global add/update to handle minimumReleaseAge policy violations instead of surfacing an internal resolver guardrail error.
  18. * Fix two crashes with `injectWorkspacePackages: true` when the lockfile has been pruned (e.g. by `turbo prune --docker`):
  19. * `Cannot use 'in' operator to search for 'directory' in undefined`: a peer-dependency-variant injected snapshot inherits its `resolution` from the base `packages:` entry; when a pruner drops that base entry the readers crash. `convertToLockfileObject` now reconstructs the directory resolution from the `file:` depPath at load time — a single normalization point, so every reader sees a fully-formed snapshot.
  20. * `ERR_PNPM_ENOENT` on `node_modules/.bin/<tool>`: after `prepare`/`postinstall`, `runLifecycleHooksConcurrently` re-imported each injected workspace package; the `scanDir`-into-`filesMap` workaround fed target-internal paths to the importer, which the `makeEmptyDir` fast path (#11088) then wiped. Drop the workaround and pass `keepModulesDir: true` so the importer preserves the target's existing `node_modules` (bin links + transitive deps) and source files keep their hardlinks.
  21. * Fixed `pnpm login` and `pnpm logout` ignoring `registries.default` from `pnpm-workspace.yaml` [#10099](https://github.com/pnpm/pnpm/issues/10099).
  22. * Fix the `minimumReleaseAge` (publishedBy) maturity shortcut to be inclusive at the cutoff. Previously, abbreviated metadata whose `modified` field equalled the cutoff fell off the fast path and triggered a full-metadata re-fetch (or a `MISSING_TIME` error when full metadata wasn't permitted). Since `modified` is an upper bound on every version's publish time, `modified == publishedBy` already implies every version passes the per-version `<=` filter in `filterPkgMetadataByPublishDate`, so the shortcut now accepts the boundary case directly. Strictly `>` (was `>=`) at the rejection branch.
  23. * Honor `publishConfig.access` when publishing packages.
  24. <!-- sponsors -->
  25. ## Platinum Sponsors
  26. <table>
  27. <tbody>
  28. <tr>
  29. <td align="center" valign="middle">
  30. <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>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. ## Gold Sponsors
  36. <table>
  37. <tbody>
  38. <tr>
  39. <td align="center" valign="middle">
  40. <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  41. <picture>
  42. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
  43. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
  44. <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
  45. </picture>
  46. </a>
  47. </td>
  48. <td align="center" valign="middle">
  49. <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  50. <picture>
  51. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
  52. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
  53. <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
  54. </picture>
  55. </a>
  56. </td>
  57. <td align="center" valign="middle">
  58. <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>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td align="center" valign="middle">
  63. <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  64. <picture>
  65. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
  66. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
  67. <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
  68. </picture>
  69. </a>
  70. </td>
  71. <td align="center" valign="middle">
  72. <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  73. <picture>
  74. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
  75. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
  76. <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
  77. </picture>
  78. </a>
  79. </td>
  80. <td align="center" valign="middle">
  81. <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  82. <picture>
  83. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
  84. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
  85. <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
  86. </picture>
  87. </a>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td align="center" valign="middle">
  92. <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  93. <picture>
  94. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
  95. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
  96. <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
  97. </picture>
  98. </a>
  99. </td>
  100. <td align="center" valign="middle">
  101. <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank">
  102. <picture>
  103. <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
  104. <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
  105. <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
  106. </picture>
  107. </a>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. <!-- sponsors end -->

vedi su githubimported 2026-09-28 via npm