Commit Graph

10701 Commits

Author SHA1 Message Date
Zoltan Kochan
6598867040 ci: run all tests if pnpm-workspace.yaml changes (#10659) 2026-02-20 14:15:36 +01:00
Zoltan Kochan
03c502c1a0 fix: detect overrides and other lockfile-affecting setting changes in optimisticRepeatInstall (#10654)
* fix: detect overrides and other lockfile-affecting setting changes in optimisticRepeatInstall

When optimisticRepeatInstall was enabled, changing overrides,
packageExtensions, ignoredOptionalDependencies, patchedDependencies,
or peersSuffixMaxLength would not trigger a reinstall because these
settings were not tracked in the workspace state file.

* refactor: extract WORKSPACE_STATE_SETTING_KEYS to prevent type/runtime drift

The settings key list in createWorkspaceState's pick() call must stay
in sync with the WorkspaceStateSettings type. Extract a shared const
array so both the type and runtime pick are derived from a single
source, preventing the class of bug fixed in the previous commit.
2026-02-20 14:00:25 +01:00
Zoltan Kochan
7f979f5fdc revert: "fix: update minimatch (#10657)"
This reverts commit 3fa7477af5.
2026-02-20 13:40:54 +01:00
btea
3fa7477af5 fix: update minimatch (#10657) 2026-02-20 13:21:45 +01:00
Zoltan Kochan
98d4485145 test: fix running tests on branch 2026-02-20 13:19:56 +01:00
Zoltan Kochan
e562c42439 chore: update @rushstack/worker-pool 2026-02-20 13:17:08 +01:00
Zoltan Kochan
6d900bf798 chore: update commitlint dependencies 2026-02-20 09:00:17 +01:00
mitchell amihod
a969839845 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:21:18 +01:00
Carey Janecka
315cae83f8 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 00:53:01 +01:00
Zoltan Kochan
e18a879d72 feat!: drop Node.js 22.12 support 2026-02-18 14:54:09 +01:00
Zoltan Kochan
1d6a0c98f8 fix: ignore unrelevant vulnerability 2026-02-18 14:54:09 +01:00
Zoltan Kochan
59d92ca58f chore: update pnpm-lock.yaml 2026-02-18 14:54:09 +01:00
Zoltan Kochan
fd0cc63964 ci(benchmark): fix reported pnpm version 2026-02-17 15:35:30 +01:00
Zoltan Kochan
01d5de08e9 fix(benchmarks): fall back to pnpm.cjs when pnpm.mjs is not present 2026-02-17 15:03:13 +01:00
Zoltan Kochan
ede26ac773 chore: update pnpm to v11 alpha 5 2026-02-17 14:55:43 +01:00
Zoltan Kochan
ea81d07cc8 chore(release): 11.0.0-alpha.5 v11.0.0-alpha.5 2026-02-17 14:48:13 +01:00
Zoltan Kochan
7db6629485 fix: retry existence check in global virtual store race condition handler (#10636)
When 3+ threads/processes concurrently import the same package to the
global virtual store, a third party can rimraf the target between another
thread's failed rename and its existence check. Retry the check up to 4
times with 50ms delays to let the competing operation complete.
2026-02-17 14:46:43 +01:00
Zoltan Kochan
05710b0496 fix: show warning instead of crashing when running on Node.js 20 (#10637) 2026-02-17 14:40:28 +01:00
Zoltan Kochan
d8f3fe0ccf ci: downgrade pnpm to v11 alpha 3 2026-02-17 13:41:30 +01:00
Zoltan Kochan
9cdc94794c chore: update pnpm to v11 alpha 4 2026-02-17 13:19:22 +01:00
Zoltan Kochan
e6c835cc1e chore: update tsgo v11.0.0-alpha.4 2026-02-17 12:58:43 +01:00
Zoltan Kochan
8c4450d064 chore(release): 11.0.0-alpha.4 2026-02-17 12:34:44 +01:00
Zoltan Kochan
d0c6f59285 docs: fix changeset 2026-02-17 12:09:50 +01:00
Zoltan Kochan
56a59df674 perf: persist bundled manifest in store index to avoid reading package.json from CAFS (#10473)
close #10461
2026-02-17 12:03:08 +01:00
Zoltan Kochan
3846366bb0 ci: add job for running benchmarks 2026-02-17 01:47:00 +01:00
Zoltan Kochan
9ae2e03450 chore: add benchmark script for comparing install performance against main (#10632) 2026-02-16 23:55:53 +01:00
Zoltan Kochan
7116f35027 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:25:41 +01:00
Zoltan Kochan
892b985db2 feat: add --depth option to pnpm why to limit display depth (#10627) 2026-02-15 22:25:41 +01:00
Zoltan Kochan
cc7da5dc95 refactor: re-export dependents rendering functions from reviewing/list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:25:40 +01:00
Brandon Cheng
0e9c559068 fix: remove misleading maxAge argument to pMemoize (#10620) 2026-02-15 22:07:29 +01:00
Zoltan Kochan
7d5ada0701 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 14:38:43 +01:00
Brandon Cheng
5ff0e16864 build: rework bundled dist/node_modules (#10508)
* build: bundle `dist/node_modules` using pnpm deploy

* chore: remove copied `pnpm.overrides` for publish-packed

* chore: remove `catalog:` protocol ban in `pnpm/package.json`

* chore: remove `publish-packed` dependency

* build: move `node-gyp` from `optionalDependencies` to `dependencies`

The `node-gyp` dependency is bundled into the `pnpm` package before it's
published. The dependency declaration itself is then removed from the
published package manifest.

This means there's not a point to declaring `node-gyp` as an optional
dependency. It'll always be bundled and the published manifest doesn't
contain the dependency declaration.

https://github.com/pnpm/pnpm/pull/10508#discussion_r2782257620

* build: throw if peerDependencies or optionalDependencies are declared

* build: use meta-updater instead of Jest test for dep kind check
2026-02-14 22:36:27 +01:00
Zoltan Kochan
a7cca3f361 docs(AGENTS): add code reuse and function argument guidelines 2026-02-14 20:44:30 +01:00
Zoltan Kochan
491813fc14 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:08:36 +01:00
Zoltan Kochan
472d3af93d perf: share dependency graph and materialization cache across importers in list/why (#10596) 2026-02-13 21:13:02 +01:00
Victor Sumner
01a0bc9499 fix(core): decouple shouldRefreshResolution from canResolve in custom resolvers (#10593)
* fix(core): decouple shouldForceResolve from canResolve in custom resolvers

shouldForceResolve is now called for every package in the lockfile
without gating on canResolve, since it runs before resolution where
the original specifier is not available. Resolvers should handle their
own filtering within shouldForceResolve (e.g. by inspecting depPath
or pkgSnapshot.resolution).

* refactor: shouldForceResolve=>shouldRefreshResolution

* docs: remove changeset

We don't need a new changeset, we just updated the existing changeset

* refactor(core): use Promise.any for early exit in checkCustomResolverForceResolve

Replace Promise.all + .some(Boolean) with Promise.any so that the check
short-circuits as soon as any shouldRefreshResolution hook returns true,
instead of waiting for every hook to complete. Real errors thrown by hooks
are re-thrown instead of being silently swallowed.

* refactor(core): replace Promise.any with custom anyTrue helper

Handle sync boolean returns from shouldRefreshResolution without
creating unnecessary promises. Only async results go through the
anyTrue helper, which short-circuits on the first true value.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-02-13 11:45:16 +01:00
Zoltan Kochan
c264c92d51 chore: update pnpm-lock.yaml (#10609)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-13 09:35:40 +01:00
Ryo Matsukawa
fa5a5c6c76 fix: dynamically calculate column widths in interactive update table (#10585)
* fix: dynamically calculate column widths in interactive update table

* test: implement copilot suggestions

* style: change order of functions

close #10316
2026-02-13 07:13:29 +01:00
Khải
52556a858a refactor(test): some small polishments (#10603)
* test: full message

* refactor: consistent indentation

* docs: remove extraneous comment

* test: more cases
2026-02-12 22:54:13 +01:00
Zoltan Kochan
3e0a9acf5f fix: vulnerabilities 2026-02-12 22:41:33 +01:00
Zoltan Kochan
92f468b7bb chore: update pnpm-lock.yaml (#10580) 2026-02-12 22:35:02 +01:00
Khải
cc7c0d22df refactor!: replace npm publish with libnpmpublish (#10591)
* chore(deps): add `libnpmpublish` to catalog

* chore(deps): install `libnpmpublish`

* feat: publishableManifest (wip)

* feat: publishableManifest (wip)

* chore(cspell): libnpmpublish

* test: fix

* feat: validate field and version

* chore: @npm/types

* chore: todo

* refactor: reorganize

* feat: transformRequiredFields

* chore(deps): patch `libnpmpublish`

* fix: `BaseManifest.config`

* fix: eslint

* chore(git): revert a patch that doesn't work

This reverts commit 45f2c6a6c2.

We will use type casting

* feat: `engines.runtime`

* feat: normalize bin

* fix: `bin === ''`

* test: fix

* refactor: inference friendly

* feat: `peerDependenciesMeta`

* refactor: group into a directory

* refactor: use `ramda.pipe`

* refactor: less intrusive type assertion

* feat!: returning `ExportedManifest`

* refactor: remove unnecessary file

* docs: add a todo

* refactor: getNetworkConfigs (#10458)

Some tests are added as a bonus

* feat: `publishPackedPkg` (wip)

* feat: replace `\t` with 4 spaces

* fix: newline

* fix: newline

* refactor: extract `FailedToPublishError`

* test: FailedToPublishError

* feat: registryConfigKeys

* feat: `publishPackedPkg` (wip)

* feat(config/getNetworkConfigs): load auth info

* feat(config/getNetworkConfigs): load auth info (#10491)

* feat: `publishPackedPkg` (wip)

* refactor: extract a `static` function

* fix: inheritance, override, and merge

* feat: `executeTokenHelper`

* fix: use the visible `globalWarn`

* feat: add options

* feat: add more options

* docs: more links

* fix: private packages

* fix: --dry-run

* feat: log more things

* fix: name

* fix: tag

* refactor: remove extraneous `assertPublicPackage`

* feat: use `publishPackedPkg` for directories

* refactor: require only necessary fields

* refactor: extractManifestFromPacked

* fix: extractManifestFromPacked

* test: extractManifestFromPacked

* feat: isTarballPath

* feat: use `publishPackedPkg` for tarballs

* style: add an empty line for clarity

* refactor: remove unnecessary works

* feat: --otp

* feat: PNPM_CONFIG_OTP

* feat: oidc

* test: fix name collision

* fix: eslint

* test: disable a false test

* feat: set `provenance`

* docs(todo): auto provenance

* refactor: run oidc in `createPublishOptions`

* fix: correct auth keys for `libnpmpublish`

* docs: changeset

* fix: incorrect `password` field

* fix: typo, grammar

* chore(git): resolve merge conflict ahead of time

In preparation for https://github.com/pnpm/pnpm/pull/10385

* fix: field name

* fix(config): decoding `_password`

* fix: edge case of partial `cert`/`key`

* fix: ensure `registry` always match its config key

* fix: `_password`

* test: correct a name

* test: more specific assertions

* fix: grammar

* docs(changeset): fix grammar

* docs: fix grammar

* fix: clean up after failure

* test: fix windows

* feat(provenance): auto detect

* refactor: consistent name

* fix: correct error names

* refactor: extract the `provenance` code

* feat: show code and body of an error

* refactor: use `encodeURIComponent`

* refactor: rename a type

* refactor: use the try-catch model

* refactor: move `normalizeBinObject`

* refactor: split `oidc` into `idToken` and `authToken`

* refactor: run `next` on `stream`'s `'end'`

* fix: use the correct encoding

* feat: guard against weird names

* test: `transform/engines`

Closes https://github.com/pnpm/pnpm/pull/10599

* test: `transformPeerDependenciesMeta`

Closes https://github.com/pnpm/pnpm/pull/10600

* refactor: dependency inject the `Date` too

* refactor: export an interface

* test: oidc

Closes https://github.com/pnpm/pnpm/pull/10598

* refactor: re-arrange imports

* refactor: remove unnecessary type casts

* refactor: improve test
2026-02-12 21:10:54 +01:00
Brandon Cheng
5bf7768ca4 feat: skip confirm modules purge prompt if --yes is passed (#10383)
* feat: add --yes command line option

* feat: skip confirm modules purge prompt if --yes is passed

* refactor: factor out `ExecPnpmSyncOpts`

* test: add end-to-end test for --yes flag
2026-02-11 02:39:23 +01:00
Ryo Matsukawa
fa5ff08473 fix(dlx): respect minimumReleaseAgeExclude (#10572)
close #10338
2026-02-11 02:32:54 +01:00
Brandon Cheng
4c6c26a7e8 fix: disable global virtual store during pnpm deploy (#10577) 2026-02-11 02:19:43 +01:00
Karl Kaiser
1fd7370639 feat(workspace filtering): 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:05:45 +01:00
Zoltan Kochan
a49b243573 fix: list command should not fail with an OOM error (#10586)
close #8731
2026-02-11 00:38:35 +01:00
Zoltan Kochan
f2a6d0684b docs: update sponsors 2026-02-10 21:22:23 +01:00
Zoltan Kochan
cbb366a7aa fix: virtual store race condition (#10589) 2026-02-10 12:05:17 +01:00
Zoltan Kochan
861dd2a8a8 revert: fix(reviewing): fix memory error in pnpm why (#10582)
ref #7122
2026-02-09 15:05:09 +01:00