Skip to content

fix(auth): normalize subpath registry URLs with a trailing slash - #13137

Merged
zkochan merged 2 commits into
mainfrom
login-fix
Jul 19, 2026
Merged

zkochan merged 2 commits into
mainfrom
login-fix

Conversation

@zkochan

@zkochan zkochan commented Jul 19, 2026 •

Copy link
Copy Markdown
Member

Summary

pnpm login (and adduser / logout) failed against a registry hosted under a URL subpath (e.g. https://example.com/npm/registry) whenever the configured URL had no trailing slash. [email protected] returns URLs that already contain a path unchanged instead of appending the trailing slash, and the WHATWG relative resolution used to build the -/v1/login, couchdb-user, and token-revocation endpoints then drops the last path segment — the CLI contacted https://example.com/npm/-/v1/login instead of https://example.com/npm/registry/-/v1/login and stored the auth token under a truncated key. Root-level registries and subpath URLs written with a trailing slash were unaffected.

The fix patches normalize-registry-url through patchedDependencies (the same mechanism as the existing graceful-fs patch) so the trailing slash is always appended. That repairs every consumer at once: the config reader, login, logout, and the publish registry keys. The resulting endpoints match what the npm CLI produces for the same configuration (npm joins registry and path by stripping/re-adding the slash at request time, so it never had this bug).

The Rust CLI already normalizes correctly (registry_url.rs appends the slash unconditionally), so it gains only the mirrored subpath-without-trailing-slash tests for web login, classic login, and logout — no behavior change, hence the changeset targets only pnpm.

The lockfile diff is limited to the patch hashes. A full install also wanted to re-resolve unrelated @types/node jest peer contexts from 22.x to 26.x (against the catalog's documented 22.x pin); that churn was deliberately kept out, and the resulting lockfile was verified with both a full and a --frozen-lockfile install.

Follow-up (out of scope here): publishing a fixed normalize-registry-url 2.0.2 upstream would let us drop the patch on the next dependency bump and would also fix external consumers of the published @pnpm/* v11 library packages, which resolve the unpatched 2.0.1 from npm.

Squash Commit Body

pnpm login, pnpm adduser, and pnpm logout dropped the last path segment
of a registry hosted under a URL subpath when the configured URL had no
trailing slash: normalize-registry-url 2.0.1 returns URLs that already
contain a path unchanged instead of appending the slash, and the WHATWG
relative resolution used to build the -/v1/login, couchdb-user, and
token-revocation endpoints then resolves against the truncated parent
path. The auth token was likewise stored under a truncated key.
Registries at a domain root were unaffected, and so were subpath URLs
written with a trailing slash.

Fix the package once for every consumer (config reader, login, logout,
publish registry keys) with a patchedDependencies patch that always
appends the trailing slash, matching the Rust CLI, whose normalization
was already correct. The lockfile diff is limited to the patch hashes;
the unrelated peer-context re-resolution a full install wanted to make
was reverted deliberately.

The config-reader test expectations that encoded the old truncating
behavior are updated to expect the trailing slash. The Rust side gains
the mirrored subpath-without-trailing-slash tests for web login, classic
login, and logout; its behavior is unchanged.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Claude Code, claude-fable-5).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed pnpm login, adduser, and logout for registries hosted under URL subpaths without trailing slashes.
    • Preserved registry subpaths when creating authentication and token-revocation endpoints.
    • Ensured authentication tokens are stored and removed using the correct normalized registry URL.
    • Standardized normalized registry URLs to include a trailing slash.

zkochan added 2 commits July 19, 2026 09:48
`pnpm login`, `pnpm adduser`, and `pnpm logout` dropped the last path
segment of a registry hosted under a URL subpath when the configured URL
had no trailing slash: `[email protected]` returns URLs that
already contain a path unchanged instead of appending the slash, and the
WHATWG relative resolution used to build the `-/v1/login`, couchdb user,
and token-revocation endpoints then resolves against the truncated
parent path. The auth token was likewise stored under a truncated key.
Registries at a domain root were unaffected, and so were subpath URLs
written with a trailing slash.

Fix the package once for every consumer (config reader, login, logout,
publish registry keys) with a `patchedDependencies` patch that always
appends the trailing slash, matching the Rust CLI, whose normalization
was already correct. The lockfile diff is limited to the patch hashes;
the unrelated peer-context re-resolution a full install wanted to make
was reverted deliberately.

The config-reader test expectations that encoded the old truncating
behavior are updated to expect the trailing slash. The Rust side gains
the mirrored subpath-without-trailing-slash tests for web login, classic
login, and logout; its behavior is unchanged.
Copilot AI review requested due to automatic review settings July 19, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c28a66a-d390-40e2-b620-7e75f0f2b10f

📥 Commits

Reviewing files that changed from the base of the PR and between 00855bb and a63b580.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (10)
  • .changeset/login-subpath-registry.md
  • __patches__/[email protected]
  • pnpm-workspace.yaml
  • pnpm/crates/auth-commands/src/login/test_classic_login.rs
  • pnpm/crates/auth-commands/src/login/test_web_login.rs
  • pnpm/crates/auth-commands/src/logout/tests.rs
  • pnpm11/auth/commands/test/login.test.ts
  • pnpm11/auth/commands/test/logout.test.ts
  • pnpm11/config/reader/test/getNetworkConfigs.test.ts
  • pnpm11/config/reader/test/index.ts

📝 Walkthrough

Walkthrough

Registry URLs with subpaths are normalized with trailing slashes through a patched dependency. Login and logout tests verify correct endpoint construction and token keys, while configuration tests update expected normalized registry mappings.

Changes

Registry subpath normalization

Layer / File(s) Summary
Registry normalization patch
__patches__/[email protected], pnpm-workspace.yaml, .changeset/login-subpath-registry.md
The patched URL normalizer appends a trailing slash to registry URLs with path segments, and the workspace applies the patch.
Authentication flow coverage
pnpm/crates/auth-commands/src/login/*, pnpm/crates/auth-commands/src/logout/tests.rs, pnpm11/auth/commands/test/*
Rust and TypeScript tests cover subpath login, classic-login fallback, logout revocation, normalized messages, and auth token persistence or removal.
Configuration expectation updates
pnpm11/config/reader/test/*
Registry expectations now include trailing slashes across scoped registry, TLS, authentication, file, and priority cases.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • pnpm/pnpm#13000: Also updates normalize-registry-url behavior affecting registry-derived URLs.

Suggested labels: product: pnpm@11, product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch login-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix auth subpath registry URL normalization by enforcing trailing slash

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Patch normalize-registry-url to always append trailing slash for subpath registries.
• Fix pnpm login/adduser/logout endpoint resolution and auth token keying for subpaths.
• Add/adjust TypeScript and Rust tests covering subpath registries without trailing slash.
Diagram

graph TD
  U(["User"]) --> A["pnpm login/logout"] --> N[["normalize-registry-url (patched)"]] --> E["Auth endpoint join"] --> R(["Registry API"])
  A --> C[(".npmrc auth config")]

  subgraph Legend
    direction LR
    _u(["Actor"]) ~~~ _c["Command"] ~~~ _l[["Library"]] ~~~ _cfg[("Config")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Fix at call sites (wrap/join safely in pnpm code)
  • ➕ Avoids carrying a patch file and lockfile patch hashes
  • ➕ Can tailor URL joining logic specifically for login/logout/publish keys
  • ➖ Requires auditing every consumer across TS packages to prevent regressions
  • ➖ Risk of divergence between packages and future reintroductions if a call site is missed
2. Fork/replace normalize-registry-url with an internal utility
  • ➕ Full control over behavior and release cadence
  • ➕ Eliminates reliance on upstream library semantics
  • ➖ More maintenance burden long-term
  • ➖ Harder to keep behavior aligned with npm without ongoing effort
3. Upstream fix and bump dependency (future follow-up)
  • ➕ Removes need for patchedDependencies once released
  • ➕ Benefits broader ecosystem consumers
  • ➖ Not immediately available; blocks on upstream release cycle
  • ➖ Still needs interim mitigation for current users

Recommendation: The patchedDependencies approach is the best immediate fix: it corrects behavior for every existing consumer of normalize-registry-url in the repo (config reader, login/logout, publish registry keys) with minimal code churn and low regression risk. Consider upstreaming the fix and removing the patch on the next dependency bump.

Files changed (11) +263 / -16

Tests (7) +235 / -10
test_classic_login.rsAdd Rust classic-login subpath-without-slash regression test +39/-0

Add Rust classic-login subpath-without-slash regression test

• Introduces a test ensuring web-login fallback to classic login correctly targets subpath registries lacking a trailing slash and stores the token under the normalized (slash-suffixed) key.

pnpm/crates/auth-commands/src/login/test_classic_login.rs

test_web_login.rsAdd Rust web-login subpath-without-slash regression test +30/-0

Add Rust web-login subpath-without-slash regression test

• Adds coverage to confirm web login hits the correct subpath /-/v1/login endpoint when the configured registry URL lacks a trailing slash and persists the token under the normalized registry key.

pnpm/crates/auth-commands/src/login/test_web_login.rs

tests.rsAdd Rust logout subpath-without-slash regression test +32/-0

Add Rust logout subpath-without-slash regression test

• Adds a test verifying logout uses the correct token revocation endpoint under a subpath registry and clears the correct auth token entry when the configured registry URL has no trailing slash.

pnpm/crates/auth-commands/src/logout/tests.rs

login.test.tsAdd TS login tests for subpath registry without trailing slash +91/-0

Add TS login tests for subpath registry without trailing slash

• Adds web-login and classic-login-fallback tests that assert correct endpoint URLs under a subpath registry configured without a trailing slash and correct nerfed auth token key persistence.

pnpm11/auth/commands/test/login.test.ts

logout.test.tsAdd TS logout test for subpath registry without trailing slash +33/-0

Add TS logout test for subpath registry without trailing slash

• Adds a test confirming logout revokes the token at the subpath-scoped endpoint and removes the correct auth token key when registry is configured without a trailing slash.

pnpm11/auth/commands/test/logout.test.ts

getNetworkConfigs.test.tsUpdate config-reader expectations to include normalized trailing slash +8/-8

Update config-reader expectations to include normalized trailing slash

• Adjusts multiple test fixtures to expect scoped registry URLs returned with a trailing slash, reflecting the patched normalization behavior.

pnpm11/config/reader/test/getNetworkConfigs.test.ts

index.tsUpdate registry normalization test expectations for subpath registries +2/-2

Update registry normalization test expectations for subpath registries

• Updates assertions to expect trailing slashes for scoped registries that include subpaths, aligning with the new normalized output.

pnpm11/config/reader/test/index.ts

Documentation (1) +5 / -0
login-subpath-registry.mdAdd pnpm changeset entry for subpath-registry login/logout fix +5/-0

Add pnpm changeset entry for subpath-registry login/logout fix

• Adds a user-facing patch note describing the subpath registry trailing-slash normalization bug and its impact on endpoints and auth token storage keys.

.changeset/login-subpath-registry.md

Other (3) +23 / -6
[email protected]Patch normalize-registry-url to always append trailing slash +15/-0

Patch normalize-registry-url to always append trailing slash

• Modifies [email protected] so URLs with path segments are no longer returned unchanged; only already-slashed URLs bypass appending. This prevents subpath truncation when later joining relative auth endpoints.

patches/[email protected]

pnpm-lock.yamlRecord patch hash for [email protected] +7/-6

Record patch hash for [email protected]

• Adds patchedDependencies entry and applies the patch_hash-qualified version across importers/snapshots, keeping the lockfile change limited to patch metadata.

pnpm-lock.yaml

pnpm-workspace.yamlEnable patchedDependencies mapping for normalize-registry-url +1/-0

Enable patchedDependencies mapping for normalize-registry-url

• Registers the new patch file under patchedDependencies so pnpm applies it during install, alongside the existing graceful-fs patch configuration.

pnpm-workspace.yaml

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the change is a narrow one-line patch to an isolated normalization utility, all existing tests are updated to reflect the corrected behavior, and new tests exercise the previously broken paths on both the TypeScript and Rust sides.

The patch is minimal and surgical: it removes exactly the condition that caused path-containing URLs to skip normalization. Root-level registries (which get a trailing slash from the WHATWG URL constructor itself) and URLs already ending with / are unaffected. The lockfile captures only the expected patch-hash churn. Both CLI implementations are updated consistently, and the new tests directly replicate the reported failure scenario.

No files require special attention. The patch file and lockfile changes are mechanical; the test updates are straightforward expectation corrections.

Reviews (1): Last reviewed commit: "style(auth-commands): end multi-line mac..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.05     11.2±0.04ms    33.3 MB/sec    1.00     10.7±0.20ms    35.0 MB/sec
packument/parse                1.00     37.7±0.19µs  1759.7 MB/sec    1.00     37.6±0.27µs  1763.7 MB/sec
tarball/download_dependency    1.02      2.2±0.06ms  1961.6 KB/sec    1.00      2.2±0.08ms  2002.0 KB/sec

@qodo-code-review

qodo-code-review Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Action required

1. Missing trailing comma in toHaveBeenCalledWith ✗ Dismissed 📘 Rule violation ⚙ Maintainability
Description
The multi-line expect(fetch).toHaveBeenCalledWith(...) call omits a trailing comma after the last
argument. This violates the TypeScript trailing-comma requirement and creates unnecessary diff churn
when adding/reordering arguments.
Code

pnpm11/auth/commands/test/logout.test.ts[R436-439]

+    expect(fetch).toHaveBeenCalledWith(
+      'https://example.com/npm/registry/-/user/token/subpath-token',
+      expect.anything()
+    )
Evidence
PR Compliance ID 713434 requires trailing commas in multi-line TypeScript constructs. The added
toHaveBeenCalledWith call spans multiple lines, but the last argument expect.anything() has no
trailing comma before the closing parenthesis.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/auth/commands/test/logout.test.ts[436-439]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A multi-line argument list in a TypeScript test is missing a trailing comma on the last argument.

## Issue Context
The repository compliance rule requires trailing commas for multi-line TypeScript constructs (including function call argument lists).

## Fix Focus Areas
- pnpm11/auth/commands/test/logout.test.ts[436-439]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Wrong slash with query 🐞 Bug ≡ Correctness
Description
The patched normalize-registry-url appends a trailing slash via raw string concatenation, so for
registry URLs that include a ? or # the slash is appended into the query/fragment instead of the
pathname. Downstream new URL(relative, registry) joins (used for login and token revocation
endpoints) can still resolve against the parent directory and drop the last registry path segment,
recreating the original subpath bug for those inputs.
Code

patches/[email protected][R13-14]

++  if (registry.endsWith('/')) return registry
+   return `${registry}/`
Evidence
The patch shows a raw string append of /. The auth command code then uses the normalized registry
string as the base URL for relative URL construction, which only behaves correctly when the base
URL’s pathname ends with / (directory semantics).

patches/[email protected][9-15]
pnpm11/auth/commands/src/login.ts[164-166]
pnpm11/auth/commands/src/login.ts[230-232]
pnpm11/auth/commands/src/logout.ts[107-112]
pnpm11/auth/commands/src/logout.ts[146-153]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`normalize-registry-url` is patched to always append a trailing `/` when missing, but the patch currently does `return `${registry}/``. For inputs containing a query (`?`) or fragment (`#`), this places `/` after those components (e.g. `.../registry?x=1/`), leaving the URL pathname without a trailing slash. Any code that builds registry endpoints via WHATWG relative resolution (`new URL(path, registry)`) can still drop the last path segment.

### Issue Context
This repo uses `normalize-registry-url` output as the base for `new URL(..., registry)` in auth flows.

### Fix Focus Areas
- __patches__/[email protected][1-15]

### Suggested fix
Update the patch to append the slash to the **pathname**, not the full string. Two safe approaches:

1) URL-aware (preferred when parseable):
- `const u = new URL(registry)`
- `u.pathname = u.pathname.endsWith('/') ? u.pathname : u.pathname + '/'`
- `registry = u.toString()`

2) String fallback (when URL parse fails):
- Find the first `?` or `#` and insert `/` **before** it (and avoid double-slashing).

Keep the existing `endsWith('/')` fast path.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 19, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.66%. Comparing base (0dbf7e6) to head (a63b580).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13137      +/-   ##
==========================================
+ Coverage   85.64%   85.66%   +0.01%     
==========================================
  Files         505      505              
  Lines       83652    83705      +53     
==========================================
+ Hits        71647    71703      +56     
+ Misses      12005    12002       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: a63b580a8287

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.520 ± 0.169 2.345 2.796 1.67 ± 0.19
pacquet@main 2.512 ± 0.187 2.334 2.779 1.66 ± 0.20
pnpr@HEAD 1.511 ± 0.144 1.365 1.793 1.00
pnpr@main 1.547 ± 0.181 1.343 1.785 1.02 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.52009695744,
      "stddev": 0.1687118767420939,
      "median": 2.48585801904,
      "user": 1.64809192,
      "system": 1.2817284399999997,
      "min": 2.34457545354,
      "max": 2.79554210154,
      "times": [
        2.79554210154,
        2.75942473554,
        2.63477454954,
        2.37298370754,
        2.34457545354,
        2.35560359654,
        2.54412464054,
        2.57936519954,
        2.38698419254,
        2.42759139754
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.51239627104,
      "stddev": 0.1874493704508379,
      "median": 2.4315663495399997,
      "user": 1.65179302,
      "system": 1.27895614,
      "min": 2.33409432354,
      "max": 2.77867340354,
      "times": [
        2.73403450554,
        2.64191743054,
        2.34225295554,
        2.33881179254,
        2.40451735654,
        2.73504293554,
        2.33409432354,
        2.45861534254,
        2.77867340354,
        2.35600266454
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.51054647624,
      "stddev": 0.1441334456423289,
      "median": 1.45406370154,
      "user": 1.19016592,
      "system": 1.1425605399999998,
      "min": 1.36459917154,
      "max": 1.79273631954,
      "times": [
        1.79273631954,
        1.44253481454,
        1.66958099254,
        1.5500451265400002,
        1.4635697035400002,
        1.37421690154,
        1.3808555145399999,
        1.44455769954,
        1.62276851854,
        1.36459917154
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5474568300399998,
      "stddev": 0.18062628201870515,
      "median": 1.5132945955400001,
      "user": 1.1831330199999999,
      "system": 1.14073344,
      "min": 1.34272285654,
      "max": 1.78514220954,
      "times": [
        1.78514220954,
        1.40625402654,
        1.68335629954,
        1.73133853554,
        1.34272285654,
        1.75603318754,
        1.35375037754,
        1.3893816165400001,
        1.59889479654,
        1.42769439454
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 248.6 ± 6.7 240.0 264.2 1.01 ± 0.04
pacquet@main 246.3 ± 5.5 237.2 254.7 1.00
pnpr@HEAD 260.3 ± 5.5 253.2 268.7 1.06 ± 0.03
pnpr@main 265.7 ± 7.5 252.0 276.4 1.08 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24859168192000003,
      "stddev": 0.006650543956995059,
      "median": 0.24838027542000002,
      "user": 0.2021626,
      "system": 0.50108856,
      "min": 0.23998276042000002,
      "max": 0.26423810342,
      "times": [
        0.24875228042000003,
        0.26423810342,
        0.24903412742000003,
        0.24088829642,
        0.25065880042,
        0.24576713442,
        0.25102605042000004,
        0.24800827042,
        0.23998276042000002,
        0.24756099542
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24628559922,
      "stddev": 0.005483226192613504,
      "median": 0.24607526842000002,
      "user": 0.2011127,
      "system": 0.50239846,
      "min": 0.23715421842,
      "max": 0.25474077342,
      "times": [
        0.24532352842000002,
        0.24782719242,
        0.25474077342,
        0.25182512942,
        0.23715421842,
        0.25203636141999997,
        0.24344619142,
        0.24123001442000003,
        0.24682700842000002,
        0.24244557442
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26034281922,
      "stddev": 0.005512471528757464,
      "median": 0.25880798342000005,
      "user": 0.2073481,
      "system": 0.50881926,
      "min": 0.25317136742,
      "max": 0.26867011941999996,
      "times": [
        0.26507133642,
        0.26699138442000003,
        0.25887876742000004,
        0.25429916242000006,
        0.25317136742,
        0.26867011941999996,
        0.25588553742,
        0.25873719942000006,
        0.26436145442000003,
        0.25736186342
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26565458112000007,
      "stddev": 0.007527600627795442,
      "median": 0.26588355042000006,
      "user": 0.20879849999999997,
      "system": 0.5155262599999999,
      "min": 0.25195403742,
      "max": 0.27636400642000003,
      "times": [
        0.26365385242000006,
        0.27241066042000006,
        0.27636400642000003,
        0.26804940842,
        0.25840948941999997,
        0.26588933842000007,
        0.25195403742,
        0.26003487642,
        0.27390237942000006,
        0.26587776242000005
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.689 ± 0.013 2.666 2.706 1.75 ± 0.17
pacquet@main 2.669 ± 0.013 2.645 2.683 1.73 ± 0.17
pnpr@HEAD 1.539 ± 0.152 1.415 1.827 1.00
pnpr@main 1.608 ± 0.158 1.390 1.772 1.05 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.68946159972,
      "stddev": 0.013449491101456743,
      "median": 2.68828130802,
      "user": 1.7312919999999998,
      "system": 1.2886735000000002,
      "min": 2.66630823802,
      "max": 2.70600138102,
      "times": [
        2.68581924202,
        2.70600138102,
        2.67764606902,
        2.66630823802,
        2.69074337402,
        2.70229446002,
        2.67689059802,
        2.70472725602,
        2.6852282020200002,
        2.69895717702
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.669474352320001,
      "stddev": 0.012692536464529993,
      "median": 2.67112479252,
      "user": 1.7674879000000001,
      "system": 1.242078,
      "min": 2.6448370490200004,
      "max": 2.6833053170200003,
      "times": [
        2.66588967702,
        2.68155745502,
        2.65587188302,
        2.67906612302,
        2.6833053170200003,
        2.66277992802,
        2.6797745390200003,
        2.6448370490200004,
        2.6653016440200004,
        2.6763599080200002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5390595112200003,
      "stddev": 0.1519980963925698,
      "median": 1.47975369352,
      "user": 1.1270463,
      "system": 1.1353727,
      "min": 1.41526825202,
      "max": 1.82737683002,
      "times": [
        1.41826101602,
        1.45783730002,
        1.41566405802,
        1.43731779202,
        1.82737683002,
        1.41526825202,
        1.58066709402,
        1.50167008702,
        1.78270962502,
        1.55382305802
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6084619410199998,
      "stddev": 0.15788337096308283,
      "median": 1.6626261200199999,
      "user": 1.1000299,
      "system": 1.1410174,
      "min": 1.3897057230199998,
      "max": 1.77178396702,
      "times": [
        1.39050176702,
        1.75679202202,
        1.3897057230199998,
        1.77178396702,
        1.5202641180199998,
        1.6973711570199999,
        1.62788108302,
        1.72661366802,
        1.76028214202,
        1.44342376302
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 549.3 ± 10.2 532.7 563.8 1.90 ± 0.05
pacquet@main 533.0 ± 13.8 515.8 557.0 1.85 ± 0.06
pnpr@HEAD 288.5 ± 4.6 280.9 296.5 1.00
pnpr@main 291.0 ± 5.6 282.7 298.9 1.01 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5493101696400001,
      "stddev": 0.01020588193664249,
      "median": 0.54928730554,
      "user": 0.64410764,
      "system": 0.6874080800000001,
      "min": 0.5327188190400001,
      "max": 0.5637745300400001,
      "times": [
        0.5502148600400001,
        0.5637745300400001,
        0.54228256204,
        0.55680362804,
        0.5596266430400001,
        0.5582447880400001,
        0.5388749700400001,
        0.5483597510400001,
        0.5327188190400001,
        0.54220114504
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.53300698104,
      "stddev": 0.013772166684974432,
      "median": 0.5295155280400001,
      "user": 0.65545324,
      "system": 0.64244198,
      "min": 0.51580086804,
      "max": 0.55704908604,
      "times": [
        0.51580086804,
        0.5181120010400001,
        0.5230515590400001,
        0.54346215604,
        0.52375442404,
        0.5462869920400001,
        0.55704908604,
        0.5435216680400001,
        0.5312171250400001,
        0.5278139310400001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28846679044,
      "stddev": 0.004646522352704796,
      "median": 0.28777636354,
      "user": 0.16721244,
      "system": 0.50822768,
      "min": 0.28094014404,
      "max": 0.29648677904,
      "times": [
        0.28575907204,
        0.28779974404,
        0.28094014404,
        0.29012594104,
        0.29403472104,
        0.28775298304,
        0.28579421104,
        0.29142934004,
        0.28454496904,
        0.29648677904
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29101366714,
      "stddev": 0.005617996075040465,
      "median": 0.28846057404000003,
      "user": 0.17811554000000002,
      "system": 0.48796527999999995,
      "min": 0.28272581604,
      "max": 0.29890738704,
      "times": [
        0.28272581604,
        0.29890738704,
        0.28691607804,
        0.28742156504,
        0.28770605104,
        0.28844609604,
        0.29464198004000003,
        0.29875458404,
        0.29614206204,
        0.28847505204
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.847 ± 0.014 1.827 1.874 6.40 ± 0.20
pacquet@main 1.831 ± 0.013 1.819 1.853 6.35 ± 0.20
pnpr@HEAD 0.292 ± 0.007 0.284 0.306 1.01 ± 0.04
pnpr@main 0.288 ± 0.009 0.279 0.307 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8467664818400003,
      "stddev": 0.014261727001288516,
      "median": 1.8457444547400002,
      "user": 0.8530418599999997,
      "system": 0.7870064,
      "min": 1.82744143724,
      "max": 1.87437228524,
      "times": [
        1.8517881492400001,
        1.8402672312400001,
        1.8589213152400001,
        1.84996678424,
        1.83713047224,
        1.87437228524,
        1.84152212524,
        1.83042407524,
        1.82744143724,
        1.8558309432400002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.8310194246399998,
      "stddev": 0.012540513863049102,
      "median": 1.8232166632400002,
      "user": 0.8724095599999998,
      "system": 0.7145886,
      "min": 1.81927487124,
      "max": 1.8527511222400002,
      "times": [
        1.8527511222400002,
        1.84175943324,
        1.84600613024,
        1.82278993124,
        1.82182353824,
        1.8220541112400002,
        1.8394336902400001,
        1.8236433952400002,
        1.81927487124,
        1.82065802324
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29201887563999995,
      "stddev": 0.0071508478991054985,
      "median": 0.29022750624,
      "user": 0.17403285999999998,
      "system": 0.4944426,
      "min": 0.28425217124,
      "max": 0.30611625824,
      "times": [
        0.28559097824,
        0.29546789824,
        0.29739049924,
        0.28913422924,
        0.28458093824,
        0.28805302724,
        0.29828197324,
        0.28425217124,
        0.29132078324,
        0.30611625824
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28839726073999994,
      "stddev": 0.008932966639008857,
      "median": 0.28588438074,
      "user": 0.18299406,
      "system": 0.48405810000000005,
      "min": 0.27944575724,
      "max": 0.30654858124,
      "times": [
        0.28429490524,
        0.28747385624,
        0.27944575724,
        0.28397760524,
        0.28046505924,
        0.28231667424,
        0.30654858124,
        0.30144911424,
        0.28944422824,
        0.28855682624
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 330.4 ± 7.5 322.4 345.6 3.77 ± 0.15
pacquet@main 329.6 ± 9.1 316.3 341.1 3.76 ± 0.16
pnpr@HEAD 88.4 ± 3.8 83.7 98.6 1.01 ± 0.05
pnpr@main 87.6 ± 2.7 84.2 95.9 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.33039386274000004,
      "stddev": 0.007521954578635853,
      "median": 0.32824798524,
      "user": 0.31672876,
      "system": 0.07235322,
      "min": 0.32244229674,
      "max": 0.34564459474000003,
      "times": [
        0.34564459474000003,
        0.32538439274000003,
        0.32289946874000003,
        0.33592947974,
        0.32244229674,
        0.32674316674000004,
        0.32975280374,
        0.32439085774,
        0.33435389274,
        0.33639767374
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.32957669824,
      "stddev": 0.00906002776765496,
      "median": 0.32929701924,
      "user": 0.31513376,
      "system": 0.07310362,
      "min": 0.31630480674,
      "max": 0.34109324574,
      "times": [
        0.33533179374,
        0.31630480674,
        0.32725628374,
        0.32745610174,
        0.34109324574,
        0.31842844174,
        0.34040670674,
        0.32073044874,
        0.33113793674,
        0.33762121674
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0883519283157576,
      "stddev": 0.0038312884940508345,
      "median": 0.08707810974,
      "user": 0.020803566060606057,
      "system": 0.011028532121212119,
      "min": 0.08373564174,
      "max": 0.09858479974,
      "times": [
        0.08442933474,
        0.08707810974,
        0.09049432174000001,
        0.08692505074000001,
        0.08560513474,
        0.09410810074,
        0.09797973374,
        0.09083267374000001,
        0.08583299974000001,
        0.09858479974,
        0.08373564174,
        0.08590646174000001,
        0.08764791074,
        0.08459904374,
        0.09003299974000001,
        0.08634598174000001,
        0.08770578774000001,
        0.08888962874,
        0.08716927374000001,
        0.08599584574000001,
        0.08982527874,
        0.08558598474000001,
        0.08616388374,
        0.08660097374,
        0.08514131174,
        0.08728471674,
        0.08535639874,
        0.08627655774000001,
        0.08608402074,
        0.09079858574,
        0.09239324674,
        0.09663715274000001,
        0.08756668774000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08757941906258064,
      "stddev": 0.00271762966503031,
      "median": 0.08652669874,
      "user": 0.02181641161290323,
      "system": 0.00918671870967742,
      "min": 0.08422356374000001,
      "max": 0.09589005374000001,
      "times": [
        0.08974419974,
        0.08648163374000001,
        0.08909570174,
        0.08734383374,
        0.08985611474,
        0.08647730174000001,
        0.08600418874,
        0.08516765974000001,
        0.08652669874,
        0.08613877274000001,
        0.08587409474,
        0.08710989974000001,
        0.09589005374000001,
        0.08731111374,
        0.09179187474,
        0.08527666674,
        0.08619340174000001,
        0.08890496274000001,
        0.08457744574,
        0.08647533474,
        0.08888642174000001,
        0.08723365074,
        0.08598117874000001,
        0.08606943874,
        0.08783166374000001,
        0.08426707974,
        0.09407067174,
        0.08422356374000001,
        0.08581236574000001,
        0.09103290374,
        0.08731209874000001
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.544 ± 0.161 4.414 4.836 1.29 ± 0.06
pacquet@main 4.506 ± 0.079 4.420 4.614 1.28 ± 0.05
pnpr@HEAD 3.549 ± 0.139 3.442 3.862 1.01 ± 0.05
pnpr@main 3.511 ± 0.124 3.443 3.851 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.544303234619999,
      "stddev": 0.16080697168942157,
      "median": 4.46553987032,
      "user": 1.78176314,
      "system": 1.3988615999999998,
      "min": 4.41425423982,
      "max": 4.83643617782,
      "times": [
        4.83643617782,
        4.429109760819999,
        4.47627054182,
        4.45480919882,
        4.56935683482,
        4.44125629982,
        4.58378168182,
        4.41807984782,
        4.41425423982,
        4.81967776282
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.50607715342,
      "stddev": 0.07900665901947429,
      "median": 4.47011736532,
      "user": 1.7865694400000003,
      "system": 1.4047926999999998,
      "min": 4.41961985082,
      "max": 4.61428724182,
      "times": [
        4.61428724182,
        4.58009600782,
        4.41961985082,
        4.46032533282,
        4.59809461582,
        4.43031659582,
        4.43044033982,
        4.47990939782,
        4.459893859819999,
        4.58778829182
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.54885195082,
      "stddev": 0.13879173732009165,
      "median": 3.4841522303200003,
      "user": 1.2943736399999999,
      "system": 1.2391832,
      "min": 3.4415049578200003,
      "max": 3.8615060418200002,
      "times": [
        3.47333113082,
        3.6182364428200002,
        3.50058934782,
        3.4415049578200003,
        3.49230366982,
        3.47600079082,
        3.46528057582,
        3.7099417588200003,
        3.4498247918200002,
        3.8615060418200002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.51124415022,
      "stddev": 0.12380848467670247,
      "median": 3.46634124482,
      "user": 1.24763664,
      "system": 1.2651543,
      "min": 3.44319125082,
      "max": 3.85122375782,
      "times": [
        3.4701145608200004,
        3.46927802282,
        3.4551467968200003,
        3.46340446682,
        3.85122375782,
        3.4464547648200003,
        3.5512765498200003,
        3.44319125082,
        3.4562487238200004,
        3.5061026078200004
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13137
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,666.31 ms
(-5.35%)Baseline: 2,817.05 ms
3,380.46 ms
(78.87%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,827.44 ms
(-7.12%)Baseline: 1,967.58 ms
2,361.10 ms
(77.40%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
532.72 ms
(-14.11%)Baseline: 620.21 ms
744.25 ms
(71.58%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
322.44 ms
(-15.29%)Baseline: 380.62 ms
456.75 ms
(70.60%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,344.58 ms
(-6.66%)Baseline: 2,511.91 ms
3,014.29 ms
(77.78%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,414.25 ms
(-3.21%)Baseline: 4,560.74 ms
5,472.89 ms
(80.66%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
239.98 ms
(-14.47%)Baseline: 280.60 ms
336.72 ms
(71.27%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13137
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,415.27 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
284.25 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
280.94 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
83.74 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,364.60 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,441.50 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
253.17 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 1166108 into main Jul 19, 2026
40 checks passed
@zkochan
zkochan deleted the login-fix branch July 19, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants