Commit Graph

10225 Commits

Author SHA1 Message Date
Zoltan Kochan
e0f7edeb91 fix(link-bins): normalize temp paths in getBinNodePaths tests for Windows
On Windows, temporaryDirectory() may return 8.3 short paths (e.g.,
RUNNER~1) but getBinNodePaths resolves via fs.realpath, returning long
paths (e.g., runneradmin). Use realpathSync to normalize expected paths.
2026-02-23 22:21:33 +01:00
Zoltan Kochan
dac1177ed4 fix(link-bins): stop prepending redundant paths to NODE_PATH in command shims (#10673)
Fixed "input line too long" error on Windows when running lifecycle scripts with the
global virtual store enabled. The `NODE_PATH` in command shims no longer includes all
paths from `Module._nodeModulePaths()`. Instead, it includes only the package's
bundled dependencies directory (e.g., `.pnpm/pkg@version/node_modules/pkg/node_modules`),
the package's sibling dependencies directory (e.g., `.pnpm/pkg@version/node_modules`),
and the hoisted `node_modules` directory. These paths are needed so that tools like
`import-local` (used by jest, eslint, etc.) which resolve from CWD can find the correct
dependency versions.
2026-02-23 16:38:46 +01:00
Zoltan Kochan
942a73abf1 fix: update js-yaml 2026-02-23 13:01:27 +01:00
Zoltan Kochan
4d23d7db38 fix: self-update should install @pnpm/exe when running as executable
Revert the workaround that forced `pnpm self-update` to always install
the `pnpm` package for v11+. Since `@pnpm/exe` works again from
v11.0.0-alpha.7, `getCurrentPackageName()` now simply returns
`@pnpm/exe` when running as an executable, without platform-specific
package names.
2026-02-22 23:46:23 +01:00
Zoltan Kochan
2624472617 fix: respect peer dep range in hoistPeers when preferred versions exist (#10655)
* fix: respect peer dep range in hoistPeers when preferred versions exist

Previously, hoistPeers used semver.maxSatisfying(versions, '*') which
picked the highest preferred version from the lockfile regardless of the
peer dep range. This caused overrides that narrow a peer dep range to be
ignored when a stale version existed in the lockfile.

Now hoistPeers first tries semver.maxSatisfying(versions, range) to find
a preferred version that satisfies the actual peer dep range. If none
satisfies it and autoInstallPeers is enabled, it falls back to the range
itself so pnpm resolves a matching version from the registry.

* fix: only fall back to exact-version range for overrides, handle workspace: protocol

- When no preferred version satisfies the peer dep range, only use the
  range directly if it is an exact version (e.g. "4.3.0" from an override).
  For semver ranges (e.g. "1", "^2.0.0"), fall back to the old behavior
  of picking the highest preferred version for deduplication.
- Guard against workspace: protocol ranges that would cause
  semver.maxSatisfying to throw.
- Add unit tests for hoisting deduplication and workspace: ranges.

* fix: only apply range-constrained peer selection for exact versions

The previous approach used semver.maxSatisfying(versions, range) for all
peer dep ranges, which broke aliased-dependency deduplication — e.g. when
three aliases of @pnpm.e2e/peer-c existed at 1.0.0, 1.0.1, and 2.0.0,
range ^1.0.0 would pick 1.0.1 instead of 2.0.0.

Now the range-aware logic only activates when the range is an exact
version (semver.valid), which is the override case (e.g. "4.3.0").
Regular semver ranges fall back to picking the highest preferred version.
2026-02-22 22:03:53 +01:00
Zoltan Kochan
ade261575d chore: update packageManager version to pnpm@10.30.1 2026-02-20 02:22:19 +01:00
Zoltan Kochan
7f3c9ff9f0 chore(release): 10.30.1 v10.30.1 2026-02-20 02:08:35 +01:00
mitchell amihod
da865b2b37 fix(audit): help text for --ignore-registry-errors was missing a "not" (#10656)
Signed-off-by: meeech <4623+meeech@users.noreply.github.com>
2026-02-20 01:23:44 +01:00
Carey Janecka
6e41f2719d fix(audit): fallback to quick audit endpoint (#10652)
* fix(audit): fallback to quick audit endpoint

Fallback to /audits/quick when /audits fails with non-200, avoiding 5xx hard failures.

Close #10649

* refactor(audit): reuse request options for fallback

Share request options between primary and quick audit endpoints. Use POST for consistency.

* fix(audit): use quick audit endpoint as primary, full as fallback

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-02-20 01:23:29 +01:00
Zoltan Kochan
958ab703d1 chore(release): libs 2026-02-17 16:44:04 +01:00
Zoltan Kochan
279c4861ab docs: add changeset 2026-02-17 16:43:09 +01:00
Zoltan Kochan
bde2bbf5f6 chore: update pnpm 2026-02-17 16:36:55 +01:00
Zoltan Kochan
d12c9028ec chore(release): 10.30.0 v10.30.0 2026-02-17 15:49:12 +01:00
Zoltan Kochan
b21bae08cf ci(benchmark): fix reported pnpm version 2026-02-17 15:34:10 +01:00
Zoltan Kochan
78dc1e8261 ci: add benchmark job 2026-02-17 15:08:04 +01:00
Zoltan Kochan
8850193347 ci: add benchmark job 2026-02-17 15:05:23 +01:00
Zoltan Kochan
301d0defe6 feat: add nameFormatter option to buildDependentsTree for custom display names (#10629)
Allow consumers (e.g. Bit CLI) to provide a nameFormatter callback that
reads the package manifest and returns a custom display name. The resolved
displayName is carried through the DependentsTree/DependentNode data model
and used by all render functions (tree, JSON, parseable).
2026-02-15 22:19:49 +01:00
Zoltan Kochan
cb4991ad05 feat: add --depth option to pnpm why to limit display depth (#10627) 2026-02-15 21:41:31 +01:00
Zoltan Kochan
9a5d4e745f refactor: re-export dependents rendering functions from reviewing/list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 20:56:04 +01:00
Zoltan Kochan
d203a71c98 feat: reverse pnpm why tree and improve list/why output (#10615)
- **`pnpm why` now shows a reverse dependency tree.** The searched package appears at the root with its dependants as branches, walking back to workspace roots. This replaces the previous forward-tree output which was noisy and hard to read for deeply nested dependencies.
- **Replaced `archy` with a new `@pnpm/text.tree-renderer` package** that renders trees using box-drawing characters (├──, └──, │) and supports grouped sections, dim connectors, and deduplication markers.
- **Show peer dependency hash suffixes** in `pnpm list` and `pnpm why` output to distinguish between different peer-dep variants of the same package.
- **Improved `pnpm list` visual output:** bold importer nodes, dimmed workspace paths, dependency grouping, package count summary, and deterministic sort order.
- **Added `--long` support to `pnpm why`** and the ability to read package manifests from the CAS store.
- **Deduplicated shared code** between `list` and `why` commands into a common module, and reused `getPkgInfo` in the why tree builder.
2026-02-15 18:04:18 +01:00
Zoltan Kochan
4718981f78 refactor: simplify dependenciesHierarchyForPackage by delegating to getTree (#10616)
Instead of manually iterating over top-level dependencies, calling
getPkgInfo/getTreeNodeChildId/getTree per dependency, and handling
dedup/search logic in parallel with materializeChildren, delegate
entirely to a single getTree call with the importer as root.

The returned PackageNode[] are then post-categorized into their
dependency fields (dependencies, devDependencies, optionalDependencies)
using a fieldMap built from the lockfile importer snapshot.

This eliminates the duplicated dedup/search handling between
dependenciesHierarchyForPackage and materializeChildren, and removes
the GetTreeResult wrapper type from getTree (now returns PackageNode[]
directly). The materializeChildren cache is now the sole mechanism for
cross-importer deduplication.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:09:19 +01:00
Zoltan Kochan
4071cb7ab6 perf: share dependency graph and materialization cache across importers in list/why (#10596) 2026-02-13 21:16:12 +01:00
Zoltan Kochan
9cf78367a1 chore: update pnpm 2026-02-13 16:01:25 +01:00
Zoltan Kochan
c342f0de4b revert: fix(reviewing): fix memory error in pnpm why (#10582)
ref #7122
2026-02-13 16:01:09 +01:00
Zoltan Kochan
f001ab770f chore(release): 10.29.3 v10.29.3 2026-02-11 13:07:10 +01:00
Ryo Matsukawa
0d3798c216 fix(dlx): respect minimumReleaseAgeExclude (#10572)
close #10338
2026-02-11 02:35:44 +01:00
Brandon Cheng
4794c61dd1 fix: disable global virtual store during pnpm deploy (#10577) 2026-02-11 02:20:56 +01:00
Zoltan Kochan
c02513b58b chore: update pnpm 2026-02-11 02:17:28 +01:00
Karl Kaiser
9a131f4b80 feat: add support for filtering packages since last commit under git worktree (#10542)
support managing repo in git worktree for filtering for packages changed since last commit
2026-02-11 02:17:07 +01:00
Zoltan Kochan
ba1f5960fa fix: list command should not fail with an OOM error (#10586)
close #8731
2026-02-11 00:44:58 +01:00
Zoltan Kochan
87d50fbb18 docs: update sponsors 2026-02-10 21:28:37 +01:00
Zoltan Kochan
00c7677e80 fix: apply allowBuilds config set via pnpmfile (#10564)
close #10516
2026-02-09 15:04:28 +01:00
Zoltan Kochan
ea870c786f chore(release): 10.29.2 v10.29.2 2026-02-09 02:22:45 +01:00
Zoltan Kochan
595cd414f8 revert: "fix: allow pnpm run -r to work with empty pnpm-workspace.yaml (#10578)
* revert: "fix: allow pnpm `run -r` to work with empty pnpm-workspace.yaml (#10520)"

This reverts commit f1cb40c4e1.

* revert: "test: fix"

This reverts commit 1dbbffb6ad.

* docs: add changeset

close #10571
2026-02-09 02:21:46 +01:00
Zoltan Kochan
046c693a0b chore(release): 10.29.1 v10.29.1 2026-02-07 18:56:46 +01:00
Zoltan Kochan
607c2a603d fix: force isexe version that supports Node.js 18 2026-02-07 18:56:10 +01:00
Zoltan Kochan
11202fc1ed chore(release): 10.29.0 v10.29.0 2026-02-07 17:51:43 +01:00
Zoltan Kochan
f3cdd01238 chore: update pnpm 2026-02-07 16:49:51 +01:00
Zoltan Kochan
9b59a83cf4 fix: compile 2026-02-07 16:49:29 +01:00
Zoltan Kochan
6f61c615f7 fix: ignore vulnerability in dev dep 2026-02-07 02:23:40 +01:00
Zoltan Kochan
e364a73408 fix: update tar 2026-02-07 02:22:48 +01:00
Zoltan Kochan
08f28daebd fix: pnpm help should correctly show if pnpm is bundled with Node.js (#10563)
close #10561
2026-02-07 02:10:23 +01:00
Zoltan Kochan
901750fb3f test: fix 2026-02-07 00:50:41 +01:00
Zoltan Kochan
1dbbffb6ad test: fix 2026-02-07 00:07:00 +01:00
Zoltan Kochan
a68f8cfc0f test: fix 2026-02-06 21:57:46 +01:00
Zoltan Kochan
72fd99c6dc test: fix 2026-02-06 21:32:51 +01:00
Zoltan Kochan
c03fc464f1 style: fix 2026-02-06 21:14:29 +01:00
Zoltan Kochan
789b6de5e1 fix: compile 2026-02-06 21:00:34 +01:00
btea
7d8be9f1e9 feat: support auditLevel (#10554)
* feat: support `auditLevel`

* refactor: auditLevel

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-02-06 20:32:20 +01:00
Ryo Matsukawa
22eaf9b50e fix(audit): respect --audit-level in JSON output (#10547)
* fix(audit): respect --audit-level in JSON output

* refactor: audit

* docs: fix changeset

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-02-06 20:21:17 +01:00