pnpm 12.3.0 → 12.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # pnpm
2
2
 
3
+ ## 12.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - `pnpm audit --fix update` no longer aborts when a vulnerable package has no safe version inside its declared range [#14508](https://github.com/pnpm/pnpm/issues/14508). The run updates every package it can and lists the rest as remaining.
8
+
9
+ - `pnpm install` no longer reruns root lifecycle scripts when the global virtual store contains an unfinished-build marker in a package slot that the current lockfile does not use [pnpm/pnpm#14485](https://github.com/pnpm/pnpm/issues/14485).
10
+
11
+ - Sped up installs that have no lockfile. pnpm now links packages whose dependency subtree has no peer dependencies into the virtual store while resolution is still running.
12
+
13
+ - `pnpm run` and `pnpm exec` now start without reinstalling on filesystems that keep sub-millisecond mtimes, such as NTFS. Previously, every run on those filesystems reinstalled first [pnpm/pnpm#14486](https://github.com/pnpm/pnpm/issues/14486).
14
+
15
+ - `pnpm import` now keeps the versions recorded in `package-lock.json`, `npm-shrinkwrap.json`, or `yarn.lock` when it generates `pnpm-lock.yaml`. A range in `package.json`, a catalog, or an override still decides which versions are eligible, and the recorded version is preferred among them. The generated lockfile previously could pin newer versions than the source lockfile [#14476](https://github.com/pnpm/pnpm/issues/14476).
16
+
17
+ `pnpm import` in a workspace now imports every workspace project into the shared lockfile. It previously imported only the project in the current directory.
18
+
19
+ `pnpm import` now fails with `ERR_PNPM_LOCKFILE_NOT_FOUND` when none of the three source lockfiles is present. It also fails with `ERR_PNPM_YARN_LOCKFILE_PARSE_FAILED` when it cannot parse `yarn.lock`. It previously generated a lockfile from scratch in both cases.
20
+
21
+ `pnpm import` always resolves locally. It warns when `--pnpr-server` or the `pnpr-server` setting is given and does not use the server.
22
+
23
+ - Sped up installs in large workspaces. Discovering the workspace projects no longer enumerates every matched directory to learn which manifest files it holds [#14352](https://github.com/pnpm/pnpm/issues/14352).
24
+
25
+ - Sped up installs in large workspaces. The resolver and the peer pass allocate less for every dependency edge [#14352](https://github.com/pnpm/pnpm/issues/14352).
26
+
27
+ - `pnpm self-update`, `pnpm with`, and automatic package-manager version switching no longer wait through registry retry delays when a configured registry has no signatures and `registry.npmjs.org` is unavailable [#14483](https://github.com/pnpm/pnpm/issues/14483).
28
+
29
+ - Sped up installs in large workspaces. Saving the lockfile is faster, and the install finishes without waiting for memory cleanup [#14352](https://github.com/pnpm/pnpm/issues/14352).
30
+
31
+ - `pnpm install` now relinks workspace packages when `publishConfig.linkDirectory` changes. Frozen installs report an outdated lockfile until it is regenerated [pnpm/pnpm#14488](https://github.com/pnpm/pnpm/issues/14488).
32
+
33
+ - The pnpm npm wrapper keeps its placeholder shebang-less so pnpm 11 can install pnpm 12 through the version store. Wrapper installs must allow lifecycle scripts to install the native binary [#14502](https://github.com/pnpm/pnpm/issues/14502).
34
+
35
+ - Sped up dependency resolution when there is no lockfile, and for the dependencies a lockfile does not cover.
36
+
37
+ - Sped up installs in large workspaces. Workspace `link:` targets and importer ids are now derived from the paths' suffixes under the workspace root [#14352](https://github.com/pnpm/pnpm/issues/14352).
38
+
39
+ - `pnpm install` now reports "Already up to date" when local tarball dependencies have not changed [#14495](https://github.com/pnpm/pnpm/issues/14495).
40
+
41
+ - `pnpm update` now accepts `--ignore-scripts` and skips lifecycle scripts during the update [pnpm/pnpm#14512](https://github.com/pnpm/pnpm/issues/14512).
42
+
43
+ - Sped up installs that restore a deleted `node_modules` from a warm global virtual store. pnpm no longer re-links packages that are already fully present in the global virtual store [#14510](https://github.com/pnpm/pnpm/issues/14510).
44
+
45
+ ## 12.3.1
46
+
47
+ ### Patch Changes
48
+
49
+ - Sped up installs in large workspaces: the anchor for re-rendering workspace `link:` targets is now derived once per project instead of once per dependency edge, and project ordering hashes paths by their raw bytes [#14352](https://github.com/pnpm/pnpm/issues/14352).
50
+
51
+ - After a self-update from pnpm 12.2 to 12.3, global commands such as `node`, `npm`, and `yarn` failed with `unexpected argument '--shim' found`. Global commands now launch normally, and their first launch migrates the global bin directory to native shims. When self-update downgrades to pnpm 12.2 or older, it keeps the newer native shims so those commands continue to work.
52
+
53
+ - Sped up installs in large workspaces. The check that verifies each project against the lockfile now runs the projects in parallel [#14352](https://github.com/pnpm/pnpm/issues/14352).
54
+
3
55
  ## 12.3.0
4
56
 
5
57
  ### Minor Changes
package/bin/pnpm.mjs CHANGED
@@ -3,17 +3,14 @@
3
3
  // `./bin/pnpx.mjs` for every pnpm >=11 (see its `config.json`) and loads them
4
4
  // into its own Node.js process, which a native executable cannot be loaded into.
5
5
  //
6
- // The `pnpm` placeholder bin runs it too, when the install script that
7
- // replaces it with the native binary did not run (build scripts blocked). An
8
- // ordinary `npm install -g pnpm` never pays for a Node.js startup:
9
- // `package.json#bin` points at the native binary.
6
+ // Only Corepack reaches this file: `package.json#bin` still points at the native
7
+ // binary, so an ordinary `npm install -g pnpm` never pays for a Node.js startup.
10
8
  //
11
9
  // Corepack installs no dependencies and runs no lifecycle scripts, so the
12
10
  // `@pnpm/exe.<target>` package that carries the binary is absent and
13
11
  // `install.js` never ran. The binary is therefore downloaded on first use and
14
12
  // kept next to this wrapper — where the native binary also finds the `dist/`
15
- // payload it ships node-gyp in. The placeholder's installs usually do carry
16
- // that package, and the binary is taken from there.
13
+ // payload it ships node-gyp in.
17
14
  //
18
15
  // The download itself is `get-pnpm`, the package behind https://get.pnpm.io,
19
16
  // which already knows how to verify one; it travels in that same `dist/`
@@ -1,9 +1,9 @@
1
1
  {
2
- "lastValidatedTimestamp": 1788364975827,
2
+ "lastValidatedTimestamp": 1788478744905,
3
3
  "projects": {
4
4
  "/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy": {
5
5
  "name": "pacquet",
6
- "version": "12.3.0"
6
+ "version": "12.3.2"
7
7
  }
8
8
  },
9
9
  "pnpmfiles": [],
@@ -87,7 +87,7 @@
87
87
  "@types/write-file-atomic": "^4.0.3",
88
88
  "@types/yarnpkg__lockfile": "^1.1.9",
89
89
  "@types/zkochan__table": "npm:@types/table@6.3.2",
90
- "@typescript-eslint/utils": "^8.68.0",
90
+ "@typescript-eslint/utils": "^8.69.0",
91
91
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
92
92
  "@yarnpkg/core": "4.9.1",
93
93
  "@yarnpkg/extensions": "2.0.7",
@@ -190,7 +190,7 @@
190
190
  "p-defer": "^4.0.1",
191
191
  "p-every": "^2.0.0",
192
192
  "p-filter": "^4.1.0",
193
- "p-limit": "^7.3.1",
193
+ "p-limit": "^7.3.2",
194
194
  "p-queue": "^9.3.3",
195
195
  "parse-json": "^8.3.0",
196
196
  "parse-npm-tarball-url": "^5.0.0",
@@ -247,7 +247,7 @@
247
247
  "tree-kill": "^1.2.2",
248
248
  "ts-jest-resolver": "2.0.1",
249
249
  "typescript": "6.0.3",
250
- "typescript-eslint": "^8.68.0",
250
+ "typescript-eslint": "^8.69.0",
251
251
  "undici": "^7.29.0",
252
252
  "unified": "^11.0.5",
253
253
  "validate-npm-package-name": "7.0.2",
package/install.js CHANGED
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  // Preinstall for the pnpm v12 wrapper (shared verbatim by `pnpm` and
3
- // `@pnpm/exe`): replace the placeholder bins with the host's native binary so
4
- // `pnpm` runs directly, no Node startup per call. Package managers write bin
5
- // shims after preinstall, so the shims are made from the binary; where build
6
- // scripts are blocked (`--ignore-scripts`, the pnpm/Bun default) the
7
- // placeholder stays and runs pnpm through Node.js (see the `pnpm` file). npm
8
- // does not re-read the rewritten `bin` during the same install pass, so on a
9
- // global Windows install, postinstall asks it to relink.
3
+ // `@pnpm/exe`): replace the shebang-less placeholder bins with the host's native
4
+ // binary so `pnpm` runs directly, no Node startup per call. The placeholder must
5
+ // stay shebang-less because pnpm 11 records its interpreter before installing
6
+ // the native binary at the same path. npm's global Windows shims still target
7
+ // the extensionless path after the `bin` rewrite, so postinstall asks npm to
8
+ // regenerate them against `pnpm.exe`. When lifecycle scripts are blocked
9
+ // (`--ignore-scripts`, pnpm/Bun default), the placeholder remains and pnpm
10
+ // cannot run.
10
11
  //
11
12
  // `pn`/`pnpx`/`pnx` are committed `#!/bin/sh` scripts on Unix (so only `pnpm` is
12
13
  // relinked); on Windows the native binary is hardlinked onto each and
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "./dist/node_modules/node-gyp/gyp/gyp"
10
10
  ]
11
11
  },
12
- "version": "12.3.0",
12
+ "version": "12.3.2",
13
13
  "description": "Fast, disk space efficient package manager",
14
14
  "keywords": [
15
15
  "pnpm",
@@ -46,14 +46,14 @@
46
46
  "THIRD-PARTY-NOTICES.md"
47
47
  ],
48
48
  "optionalDependencies": {
49
- "@pnpm/exe.win32-x64": "12.3.0",
50
- "@pnpm/exe.win32-arm64": "12.3.0",
51
- "@pnpm/exe.darwin-x64": "12.3.0",
52
- "@pnpm/exe.darwin-arm64": "12.3.0",
53
- "@pnpm/exe.linux-x64": "12.3.0",
54
- "@pnpm/exe.linux-arm64": "12.3.0",
55
- "@pnpm/exe.linux-x64-musl": "12.3.0",
56
- "@pnpm/exe.linux-arm64-musl": "12.3.0"
49
+ "@pnpm/exe.win32-x64": "12.3.2",
50
+ "@pnpm/exe.win32-arm64": "12.3.2",
51
+ "@pnpm/exe.darwin-x64": "12.3.2",
52
+ "@pnpm/exe.darwin-arm64": "12.3.2",
53
+ "@pnpm/exe.linux-x64": "12.3.2",
54
+ "@pnpm/exe.linux-arm64": "12.3.2",
55
+ "@pnpm/exe.linux-x64-musl": "12.3.2",
56
+ "@pnpm/exe.linux-arm64-musl": "12.3.2"
57
57
  },
58
58
  "scripts": {
59
59
  "preinstall": "node install.js",
package/pnpm CHANGED
@@ -1,21 +1,4 @@
1
- #!/usr/bin/env node
2
- // pnpm's native binary replaces this file during installation (see
3
- // ./install.js). If this is running, that install script did not — build
4
- // scripts were blocked (pnpm and Bun block them by default) or skipped
5
- // (`--ignore-scripts`) — so pnpm runs through Node.js instead: `bin/pnpm.mjs`
6
- // finds the installed binary, or downloads one, and spawns it.
7
- //
8
- // Package managers write bin shims after preinstall has had its chance to run,
9
- // so a shim made from this file's shebang exists only where the binary never
10
- // arrived. That is also why this file is left in place once it is running: a
11
- // binary put here under such a shim would be run through `node`.
12
- import process from 'node:process'
13
-
14
- if (process.stderr.isTTY) {
15
- process.stderr.write(
16
- 'pnpm is running through Node.js because the script that installs its native binary was skipped. ' +
17
- 'Reinstall pnpm with its build scripts allowed to run the binary directly.\n'
18
- )
19
- }
20
-
21
- await import('./bin/pnpm.mjs')
1
+ This is a placeholder. pnpm's native binary replaces this file during
2
+ installation (see ./install.js). If you are reading this, the install/build
3
+ script did not run — reinstall with build scripts enabled (e.g. allow-list
4
+ pnpm's build under pnpm or Bun, or drop --ignore-scripts).