メインコンテンツまでスキップ

pnpm 10.14

· 1 分で読む
Zoltan Kochan
Lead maintainer of pnpm

Added support for JavaScript runtime installation

Declare Node.js, Deno, or Bun in devEngines.runtime (inside package.json) and let pnpm download and pin it automatically.

使用例:

{
"devEngines": {
"runtime": {
"name": "node",
"version": "^24.4.0",
"onFail": "download" // we only support the "download" value for now
}
}
}

How it works:

  1. pnpm install resolves your specified range to the latest matching runtime version.
  2. The exact version (and checksum) is saved in the lockfile.
  3. Scripts use the local runtime, ensuring consistency across environments.

Why this is better:

  1. This new setting supports also Deno and Bun (vs. our Node-only settings useNodeVersion and executionEnv.nodeVersion)
  2. Supports version ranges (not just a fixed version).
  3. The resolved version is stored in the pnpm lockfile, along with an integrity checksum for future validation of the Node.js content's validity.
  4. It can be used on any workspace project (like executionEnv.nodeVersion). So, different projects in a workspace can use different runtimes.
  5. For now devEngines.runtime setting will install the runtime locally, which we will improve in future versions of pnpm by using a shared location on the computer.

Related PR: #9755.

Other new features

  • Added --cpu, --libc, and --os to pnpm install, pnpm add, and pnpm dlx to customize supportedArchitectures via the CLI #7510.

Bug Fixes

  • Fix a bug in which pnpm add downloads packages whose libc differ from pnpm.supportedArchitectures.libc.
  • The integrities of the downloaded Node.js artifacts are verified #9750.
  • Allow dlx to parse CLI flags and options between the dlx command and the command to run or between the dlx command and -- #9719.
  • pnpm install --prod should removing hoisted dev dependencies #9782.
  • Fix an edge case bug causing local tarballs to not re-link into the virtual store. This bug would happen when changing the contents of the tarball without renaming the file and running a filtered install.
  • Fix a bug causing pnpm install to incorrectly assume the lockfile is up to date after changing a local tarball that has peers dependencies.

2022年のpnpm

· 1 分で読む
Zoltan Kochan
Lead maintainer of pnpm

年末です。 本当に大変な年でした。 ご存知かもしれませんが、私はウクライナに住んでいるので、ロシアが我々に対して起こした戦争により、このプロジェクトを率いるのは昨年以前よりも大変になりました。 それでも、pnpm にとっては良い年でした。 多くの新しいユーザー、コントリビューターを獲得し、多くの優れた機能を実装しました。

(上のイラストは、Midjourneyで作りました。 寅は寅年を象徴しています)

2021年のpnpm

· 1 分で読む
Zoltan Kochan
Lead maintainer of pnpm

今年はpnpmにとって良い年でした。年末なので、1年を振り返ってみましょう

pnpm でのノードモジュールに関するオプション設定

· 1 分で読む
Zoltan Kochan
Lead maintainer of pnpm

node_modules ディレクトリを生成する方法は多くあります。 ゆるい node_modules を作成する方法もありますが、ここでの目標は最も厳格なものを生成することです。

フラットな node_modules が唯一の方法ではありません

· 1 分で読む
Zoltan Kochan
Lead maintainer of pnpm

pnpm の新規ユーザーから、pnpm が生成する node_modules の奇妙な構造についてよく聞かれます。 なぜ平坦な構造を使用しないのでしょうか。 依存のさらにその依存はどこにあるのでしょうか。