pnpm 12.27.0

This release adds the gh-release: protocol, which installs command-line tools from any GitHub repository's releases. It also installs more aqua: tool formats and gives Windows commands an .exe that Cargo and rustc can run. The release carries a security fix in the node-gyp bundled with pnpm.

pnpm 12.26.0

This release installs command-line tools such as jq and the GitHub CLI from their publishers' releases. It also adds separate supportedArchitectures lists for lockfile coverage and local downloads, and adds sideEffectsCache.key for builds that target other runtimes. The release carries security fixes. Scripts now run with an absolute /bin/sh, and pnpm view strips control characters from registry metadata.

pnpm 12.25.0

This release lets pnpm add -g crate:<name> and pnx crate:<name> build and run Rust crates, lets pnpm pack take package specs, and adds dotted keys to pnpm config set. pnpm patch-commit now records changes to binary files. The release carries security fixes. pnpm now refuses a tarball, git, or directory dependency whose package.json has an invalid name. On Unix, it opens store lock files relative to a verified directory handle.

pnpm 12.24.0

This release adds pnpm audit deprecations and pnpm audit engines, moves install warnings into a checks footer above Done in, and lets global installs link approved agent skills. It carries a security fix: pnpm now reads every package tarball the way npm does, or refuses it. pnpm approve <pkg> also no longer grants every permission to a package that has no pending request.

pnpm 12.23.0

This release adds pnpm edit, pnpm catalog migrate, and pnpm link --hard, and moves deprecation warnings into the install summary. Platform variants are removed, so packages that publish them need to move to optionalDependencies. It also carries security fixes: pnpm no longer reads otp from config files, and it sends registry credentials only over HTTPS.

pnpm 11.29.0

pnpm 11.29.0 stops reading otp from config files, rejects local filesystem dependencies declared by registry packages, adds the --minimum-release-age option, and recreates an incompatible node_modules without a TTY. This release carries several security fixes.

pnpm 12.22.0

pnpm 12.22.0 adds a globalPackagesConfig section to the global config.yaml for settings that apply only to global packages, adds pnpm why --ranges, and lists workspace projects in dependency order in pnpm list --recursive. It also includes a security fix. After the default or a scoped registry changed, pnpm install could skip the minimumReleaseAge and trustPolicy checks against the new registry.

pnpm 11.28.13

pnpm 11.28.13 includes a security fix. After the default or a scoped registry changed, pnpm install could skip the minimumReleaseAge and trustPolicy checks against the new registry. It also fixes pnpm audit dropping advisories with string ids, offline installs failing the minimumReleaseAge check, and peer and injected-package resolution bugs.

pnpm 12.21.0

pnpm 12.21.0 lets pnpm store add prepare tarball and git dependencies for offline installs. It also makes repeated installs keep their peer dependency choices and fixes several lockfile.format: v13, nodeLinker: hoisted, and pnpm deploy failures. If a pnpr server refuses a setting, pnpm now resolves locally.

pnpm 11.28.12

pnpm 11.28.12 fixes many peer dependency, pnpm deploy, frozen-lockfile, and nodeLinker: hoisted bugs. It also includes a security fix. A ${VAR} placeholder in a repository's registry URL now fails the command, so pnpm no longer sends those requests to another registry. The bundled node-gyp no longer ships the undici version that security scanners flag, and remote resolution needs pnpr 0.1.0-alpha.20 or newer.

pnpm 12.20.0

pnpm 12.20.0 records the specifiers of local directory dependencies in the experimental v13 lockfile and fixes several nodeLinker: hoisted, peer dependency, and overrides bugs. The bundled node-gyp no longer ships the undici version that security scanners flag. Remote resolution and shared build caches no longer work with pnpr 0.1.0-alpha.19 or older.

pnpm 12.19.0

pnpm 12.19.0 adds pnpm fund, lets the loaded node linker handle packages that need a build, and adds the projectScopedOptionalPeers setting and an experimental JSON lockfile format. It also includes a security fix: an offline install error no longer prints registry credentials. pnpm now checks the engines and platform fields of every workspace project, and many hoisted-linker and frozen-lockfile bugs are fixed.

pnpm 12.18.0

pnpm 12.18.0 packs, publishes, and installs packages with platform variants on pnpr registries. It also adds per-skill approval of agent skills and pnpm store add for offline installs from downloaded tarballs. Repeat installs and verifyDepsBeforeRun no longer read the package.json of unchanged workspace projects. The release fixes several peer dependency resolution bugs too.

pnpm 11.28.11

pnpm 11.28.11 修复了使用 excludeLinksFromLockfile 时的冻结安装、工作区中的 pnpm link、存在悬空符号链接时的 pnpm deploy,以及 verifyDepsBeforeRun 触发不必要安装的问题。

pnpm 12.17.0

pnpm 12.17.0 adds pnpm peers check --global, dependency-group selectors and wildcards in overrides, and runtime, package manager, Cargo, and Python updates in pnpm outdated and pnpm update. It also fixes files that other users could not read in Docker images, and repeat installs that missed changes to local dependencies.

pnpm 11.28.10

pnpm 11.28.10 阻止 pnpm store prune 在 cacheDir 指向其他存储的父目录时删除这些存储。它还修复了加载提升依赖的全局安装命令,以及遗漏了本地依赖变更的重复安装。

pnpm 12.16.1

This release fixes pnpm install hanging on a cold store in workspaces that install Cargo crates, and pnpm pack shipping a file that files excludes by name.

pnpm 12.16.0

This release adds a global --env-file flag, updates to a symlinked pnpm-lock.yaml, and pnpm setup --no-modify-path. It also fixes two security issues, in zstd decompression and in signing.

pnpm 11.28.9

此版本修复了注册源响应包含过多内容编码时导致的崩溃(GHSA-xjj6-f33q-929c),并根据容器的 CPU 配额设置安装工作池的大小。重复执行 pnpm install 现在会对更多设置变更生效。

pnpm 12.15.0

This release lets pnpm-workspace.yaml delegate settings to other files and config dependencies with include, adds lockfile.integrityTarget: tar and tar-registry support, accepts zstd-compressed registry responses, and honors SOURCE_DATE_EPOCH in pnpm deploy and pnpm install. It also rejects registry metadata that names a different package than the one requested and speeds up workspace installs and macOS file linking.

pnpm 12.14.0

This release adds the sideEffectsCache.exclude setting, stops pnpm install from waiting on the daily update check, and keeps pnpm from aborting with a core dump when the reader of its output exits.

pnpm 11.28.6

此版本阻止 pnpm publish 将 CI 身份令牌发送到并非为其签发的注册源。它还修复了会丢弃同时声明为可选 peer 依赖的依赖项的安装问题,并再次接受空的 httpProxy 和 httpsProxy 设置。

pnpm 12.13.0

This release adds the pnpm profile and pnpm token commands, the storeIndexFormat: files setting for stores shared over a network filesystem, and faster Python dependency resolution.

pnpm 12.12.1

This release adds OIDC authentication to pnpm dist-tag and the tool: protocol. pnpm publish now checks which registry an NPM_ID_TOKEN was issued for before using it.

pnpm 12.12.0

This release shares task results and dependency builds through a remote cache, adds the addMissingPeerTypes setting, and lets pnpm add --config and pnpm update manage configuration dependencies. It also fixes dangerouslyAllowAllBuilds running the build scripts of packages that allowBuilds denies.

pnpm 12.11.2

This release fixes --workspace-concurrency=Infinity, filters set by an updateConfig hook, and store fetches with enable-modules-dir=false.

pnpm 12.11.1

This release fixes two ways pnpm install could fail, runs tools of any Rust release through pnx, and treats registry.npmjs.com as an alias of the npm registry.

pnpm 12.11.0

此版本新增了 Rust 工具链管理,链接了依赖项附带的代理技能,添加了 permissions 设置,并保留了流式脚本输出的颜色。

pnpm 12.10.1

此版本修复了在更改 overrides 后以及在使用 catalogPrune 的过滤冻结安装中 pnpm install 失败的问题。它还修复了实验性 nodeLinker.type: loaded 中的若干缺陷,该选项现在会将其生成的文件保留在 node_modules 中。

pnpm 12.10.0

此版本新增了实验性的 loaded 节点链接器,让 pnpm-lock.yaml 记录解析设置,并更快地读取缓存的注册源元数据。它还包含若干安全修复,其中包括阻止某个依赖版本在全局虚拟存储之外写入文件。

pnpm 11.28.5

此版本读取缓存的注册源元数据更快,并使 pnpm config get --global 忽略项目设置。它还包含针对包归档、git 依赖和配置依赖的若干安全修复。

pnpm 12.9.1

This release moves the WebContainer build into a separate @pnpm/wasm package, shrinks the pnpm package back to about 4 MB, and fixes pnpm publish with provenance from GitLab CI.

pnpm 11.28.4

pnpm 11.28.4 修复了两种凭据可能泄露的途径,使 pnpm install --frozen-lockfile 接受此前会被拒绝的若干锁文件,在无法获取可选依赖时给出警告,并阻止 pnpm self-update 在 Homebrew 安装的 pnpm 旁边再安装一个 pnpm。

pnpm 12.9.0

This release runs pnpm in StackBlitz WebContainers, adds a per-registry networkConcurrency setting, and records every installed project in the store. It also carries a security fix for pnpm login.

pnpm 12.8.2

pnpm 12.8.2 fixes a startup crash on Linux ppc64le and UnknownIssuer errors on systems without CA certificates. pnpm run no longer installs before every script on CI when autoDedupe is enabled, and resolution and hoisted installs on macOS are faster.

pnpm 12.8

pnpm 12.8 warns when pnpm pack or pnpm publish would ship a .env file, installs sharedWorkspaceLockfile: false workspaces concurrently, applies every setting passed as --config.<name>=<value>, and no longer leaves the Windows terminal stuck after Ctrl+C in a script. This release also carries a long list of bug fixes.

pnpm 12.7

pnpm 12.7 lets the global node shim follow .nvmrc and .node-version, adds pnpm install --allow-build and pnpm publish --publish-wait-timeout, and creates pnpm-workspace.yaml from the workspaces field of package.json. pnpm install --force no longer installs optional dependencies built for other platforms. This release also carries security fixes and a long list of bug fixes.

pnpm 11.28

pnpm 11.28 新增了 forceIgnoresPlatform 设置和 pnpm update --peer,并将 pnpm 12 中的一大批修复带到 JavaScript CLI:pnpm deploy、--filter、nodeLinker: hoisted 以及自定义 modulesDir 配置 都表现更好。它还包含针对 shell 补全、Nix 上的 bin shim、自定义 modulesDir 内的生命周期脚本,以及 pnpm-workspace.yaml 中 userAgent 占位符的安全修复。

pnpm 12.6

pnpm 12.6 ships with automatic dependency deduplication, relocatable node_modules, --save-types for installing @types/* packages alongside their counterparts, package.yaml manifest editing, and file: / link: protocols in catalogs.

pnpm 12.5

pnpm 12.5 扩展了 Python 支持,包括可编辑的项目包、共享工作区 环境、自动下载解释器,以及适用于多个平台和 Python 版本的锁文件。它还支持在 pnpm add 中使用软件包 URL,新增机器级任务并发组,并通过 pnpm cache prune 清理过时的注册源元数据。

pnpm 12.4

pnpm 12.4 在同一工作区中于 npm 包旁边安装 crates 和 Python 包,新增 pnpm pipeline 以像 CI 作业那样运行工作区的任务,并为另外六个平台提供二进制文件。与 12.4.1 一同发布的 pnpr 0.1.0-alpha.11 在 npm 之外还提供 Cargo、Python 和容器注册源,在一个事务中跨所有这些注册源发布,并通过 OIDC 让用户登录。

pnpm 11.26

pnpm 11.26 让 JavaScript CLI 与 pnpm 12 在过去两周内新增的功能保持一致:目录中的 workspace: 范围、remove 和 update 上的供应链标志、用于 CI 的 pnpm change check,以及不注入依赖的 pnpm deploy。

pnpm 12.2-12.3

pnpm 12.2 and 12.3 are largely a catch-up pair: a long list of things pnpm 11 did that the Rust CLI did not, put back. Catalogs learned the workspace: protocol, pnpm remove and pnpm update gained the supply-chain flags, every project-aware global command became a real executable, and hostname resolution went back to the system resolver on Linux and Windows. Large workspaces install noticeably faster.

pnpm 12.1

pnpm 12.1 为 Rust CLI 带来了新的工作区任务调度器,持久化成功的递归任务以便精确重试,将共享构建产物扩展到 macOS 和 Windows,并将登录凭据移入 pnpm 的结构化全局配置。随之发布的 pnpr 0.1.0-alpha.9 使产物层独立,并通过兼容 S3 的存储实现水平扩展。

pnpm 11.25

pnpm 11.25 用任务调度器取代了拓扑批次,新增了可配置的工作区任务依赖和每任务并发,并使被中断的递归运行能够从实际通过的工作继续。它还引入了注册源修订、通过 pnpr 共享的签名构建产物、暂存包的批量审批、 自动清理过期的审计例外,以及跟随最新发布版 pnpm 的pnpm init 固定版本。

pnpm 12.0

pnpm 12 已稳定。它是用 Rust 重写的 pnpm。升级不应该感觉像是一次迁移。文档现在默认使用 pnpm 12,pnpm 11 文档可从版本选择器中获取。

少数行为不同的地方列在What's different in pnpm 12中。本文介绍新增内容。

pnpm 11.24

pnpm 11.24 恢复了 pnpm approve-builds --global,该命令在 v11.0 中因全局安装改为隔离模式而被移除;同时让递归批量发布按注册源对包进行分组,以便在发布任何内容之前发现凭据不匹配的问题。它还避免了 --frozen-lockfile 因锁文件所固定的 pnpm 版本而失败。

pnpm 11.23

pnpm 11.23 为 registries 设置赋予了一种新形态,它一次性描述每个注册源——其 tarball 布局、路由到它的作用域、它响应的前缀——因此 Artifactory 或 GitLab 注册源终于可以让其 tarball URL 不出现在 pnpm-lock.yaml 中。它新增了 virtualStoreType,使未声明的导入在 ESM 下借助全局虚拟存储解析而无需插件,让 pnpm config get 报告 pnpm 实际生效的设置,并对任何 pnpm 版本都无法识别的设置发出警告。

pnpm 11.21-11.22

pnpm 11.21 和 11.22 版本对 pnpm install 进行了多项改进:针对大多数日常变更,改为原地更新锁文件而非重新解析整个依赖图;停止记录会导致 CI​​ 环境安装失败的 SSH URL;实现全局安装的原子切换,并支持在全局交互式更新中选择整个安装组;新增 pnpm cache path 命令;同时移除了通过 pnpm-workspace.yaml 重新定位 pnpm 机器级状态的功能。

pnpm 12 有什么不同

pnpm 12 是 Rust 中 pnpm 的重写版本,并且是稳定版。升级不应该感觉像是一次迁移。除了下面的差异之外,它保留了 pnpm 11 的命令、标志、设置和锁文件格式,并且文档对两个版本都适用。

有八处不同。其中六处会改变结果,另外两处会拒绝 pnpm 11 接受的命令行语法。这篇文章将它们汇总在了一起。

pnpm 11.20

pnpm 11.20 修复了从多个注册源安装依赖的项目中存在的包替换风险:现在,从指定注册源解析的包在锁文件中将记录为带有注册源标识的键。它还新增了内置的 npmjs: 别名,解决了因代理设置为空导致安装失败的问题,增强了 pnpm rebuild 对恶意锁文件的防御能力,并加快了依赖解析速度。

pnpm 11.15-11.19

pnpm 11.15 至 11.19 版本为 pnpm update 和 pnpm outdated 增加了对 GitHub Actions 的更新支持,让 pnpm update 在执行版本升级时自动生成变更集,引入了更整洁的 update 和 audit 配置项,新增 publishConfig.name 以支持使用不同名称发布包,增强了 pnpm self-update 对项目级配置的防御能力,实现了在无 TTY 环境下的网页登录功能,并支持将 = 用作 save-prefix。它们还大幅降低了大型工作区在峰值解析阶段的内存占用,并加快了兼容性依赖项变更后的重复安装速度。

pnpm 11.11-11.14

pnpm 11.11 至 11.14 版本引入了原生的工作区发布管理功能(包括 pnpm change、pnpm lane 和纯粹的 pnpm version -r 命令)、用于端到端诊断安装状态的 pnpm doctor 命令、用于管理注册源上包与组织的 pnpm access 和 pnpm team 命令、收敛覆盖机制,以及支持协议标识符的 peerDependencies 声明。它们还修复了一个路径遍历漏洞,将冷缓存解析期间的峰值内存占用降低了约 30%,并解决了对等依赖死锁问题。

pnpm 11.10

pnpm 11.10 引入了 _auth 设置以支持 CI 友好的注册源身份验证,新增了 pnpm prefix 和 pnpm issues 命令,并支持通过 pnpm self-update 安装 pnpm v12(Rust 重写版本)。此外,该版本还提高了 pnpm up 的准确性,加快了针对忽略简略元数据的注册源的解析速度,并增强了全局包管理、pnpm deploy 和 pnpm pack-app 的健壮性。

pnpm 11.9

pnpm 11.9 针对无法发布校验和的注册源计算缺失的 tarball 完整性哈希值,新增 pnpm sbom --exclude-peers 选项,优化了包含循环依赖的锁文件的审计性能,修复了对等依赖解析的不确定性问题,并收紧了 minimumReleaseAge 和 trustPolicy 的排除逻辑。

pnpm 11.8

pnpm 11.8 引入了安装“预演”功能、Node.js 包映射生成、更丰富的 SBOM 输出,使 pnpm view 默认指向当前包,并修正了 pnpm run --no-bail 的退出码。此外,该版本还修复了配置依赖项的锁文件遍历问题,以及多项关于安装/更新确定性的修复。

pnpm 11.7

pnpm 11.7 引入了 frozenStore 设置,支持针对只读包存储进行安装;新增了 --batch 标志,允许在单个请求中发布整个工作区;支持针对特定作用域的身份验证令牌;并将完整的解析与安装过程委托给 pacquet 处理。此外,该版本还增强了对锁文件别名的处理,让多个安装路径确定,并修复了若干与发布及 Windows 平台相关的问题。

pnpm 11.6

pnpm 11.6 新增了一种无需配置文件的注册源身份验证方式,支持通过 npm_config_//… 和 pnpm_config_//… 环境变量进行配置;同时提高了默认网络并发数,并在仅缺失 pnpm-lock.yaml 文件时跳过完整的重新解析过程。它还会推断可选依赖项的平台字段,从而确保绝不会下载针对其他平台的二进制文件。

pnpm 11.5

pnpm 11.5 新增了 hoistingLimits 设置,用于控制 nodeLinker: hoisted 模式下依赖项的提升层级;更换了交互式提示库以修复长选项列表中的滚动问题;在信任级别中识别了暂存发布;并针对安装和 dist-tag 进行了多项修复。

pnpm 11.4

pnpm 11.4 关闭了有关锁文件完整性、凭证范围、git 解析、补丁文件和依赖项别名的一系列供应链漏洞,默认情况下使让 tarball 完整性不匹配导致安装硬失败(通过具有狭窄范围的“--update-checksums”选入),并将 pnpm runtime set 更改为默认写入devEngines.runtime 而不是 engines.runtime。

pnpm 11.3

pnpm 11.3 新增了对 npm 分阶段发布功能(pnpm stage)的支持;引入了全新的 trustLockfile 设置,用于跳过对已受信任的锁文件进行的供应链验证环节;此外,还提供了 pnpm pkg、pnpm repo 和 pnpm set-script 命令的原生实现。此外,它为 pack 和 publish 命令新增了 --skip-manifest-obfuscation 标志,并降低了在大型工作区中执行 minimumReleaseAge 和 trustPolicy 验证时的内存占用。

pnpm 11.2

pnpm 11.2 引入了实验性的选择加入 pacquet(pnpm 的 Rust 移植版)作为安装后端,扩展了 配置依赖项 以安装一层 optionalDependencies(因此 esbuild/swc 平台二进制模式也适用于配置依赖项),连接了文档中长期存在的 pnpm login --scope 标志,并在 pnpm outdated 和 pnpm update --interactive 中显示运行时入口(Node.js、Deno、Bun)。

pnpm 11.1

pnpm 11.1 新增了一些命令——pnpm audit signatures、pnpm bugs 和 pnpm owner——同时还支持从任意名称的注册表安装(包括 GitHub Packages npm 注册源的内置别名),能够在 CI 中跳过运行时安装,以及修复了一些问题。

pnpm 11.0

pnpm 11 来了!此版本加强了 v10 周期中引入的安全默认设置,放弃了 npm CLI 发布回退,转而采用原生实现,将每个包的 JSON 存储索引替换为单个 SQLite 数据库,并将全局安装隔离,使其不再相互干扰。

它还需要 Node.js 22 或更高版本——pnpm 本身现在是纯 ESM。

从 v10 升级?请参阅 从 v10 迁移到 v11 指南。大多数配置更改都是机械性的,可以通过 pnpm-v10-to-v11 代码转换来应用。

pnpm 10.32

pnpm 10.32 为 pnpm approve-builds 添加了 --all 标志,用于在不显示交互式提示的情况下批准所有待处理的构建。

pnpm 10.31

pnpm 10.31 在更新 pnpm-workspace.yaml 时保留注释和格式,并包含大量错误修复。

pnpm 10.30

pnpm 10.30 重新设计了 pnpm why,以显示反向依赖关系树,从而更容易理解为什么安装了一个软件包。

pnpm 10.29

pnpm 10.29 为 pnpm dlx 添加了 catalog: 协议支持,允许在 pnpm-workspace.yaml 中配置 auditLevel,支持裸 workspace: 说明符,并修复了几个错误。

pnpm 10.28

pnpm 10.28 引入了一个新的 beforePacking 钩子,用于在发布时自定义 package.json,提高了过滤安装的性能,并修复了几个错误。

pnpm 10.27

pnpm 10.27 新增了一个设置,可以忽略旧版本软件包的信任策略检查,引入了一个用于全局虚拟存储修剪的项目注册表,并修复了几个错误。

pnpm 10.26

pnpm 10.26 为 git 托管的依赖项引入了更严格的安全默认值,添加了 allowBuilds 以实现细粒度的脚本权限,并包含了一个新设置来阻止特殊的传递依赖项。

pnpm 10.25

pnpm 10.25 改进了证书处理,添加了裸 pnpm init,并修复了一些影响用户体验的问题。

pnpm 10.24

pnpm 现在可以在高核心机器上自动扩展网络并发性,并发布了多项可靠性修复。

pnpm 10.23

为 pnpm list 添加了 --lockfile-only 选项,并对 pnpm self-update 进行了各种改进。

pnpm 10.22

增加了对从信任策略中排除软件包以及在发布时覆盖 engines 字段的支持。

pnpm 10.21

增加了为依赖项安装 Node.js 运行时的支持,以及配置信任策略的设置。

pnpm 10.20

此版本为 pnpm help 命令添加了 --all 标志,用于打印所有命令。

pnpm 10.19

这个版本为两个设置添加了版本控制功能:[[only BuiltDependencies] 和 [minimumReleaseAgeExclude`]。

pnpm 10.18

次要更改#

通过对慢速网络请求(包括元数据提取和 tarball 下载)发出警告,为 pnpm 添加了网络性能监控。

添加了警告阈值的配置选项:fetchWarnTimeoutMs 和 fetchMinSpeedKiBps 。当请求超过时间阈值或低于最低速度时,会显示警告消息

相关 PR:#10025。

补丁更改#

  • 在出现 EAGAIN 错误时重试文件系统操作 #9959。
  • 过时的命令遵守 minimumReleaseAge 配置 #10030。
  • 移除依赖的软件包时,正确使用 cleanupUnusedCatalogs 配置。
  • 当 scriptShell 设置为 false 时,不要因无意义的错误而失败 #8748。
  • pnpm dlx 不应在设置 minimumReleaseAge #10037 时失败。

pnpm 10.17

次要更改#

minimumReleaseAgeExclude 设置现在支持模式。

pnpm 10.16

次要更改#

延迟依赖更新的新设置#

最近发生了几起流行软件包被成功攻击的事件。为了减少安装已损坏版本的风险,我们正在引入一个新的设置,推迟安装新发布的依赖。在大多数情况下,这种攻击很快就被发现,而且恶意的版本在一个小时内从注册表中删除。

pnpm 10.14

增加了对 JavaScript 运行时安装的支持#

在 devEngines.runtime (在 package.json中) 中声明 Node.js, Deno 或 Bun ,并让 pnpm 自动下载并固定它。