Skip to content

fix(pacquet): align license report metadata - #13461

Merged
zkochan merged 2 commits into
mainfrom
fix-13457-1
Jul 28, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix-13457-1

Conversation

@zkochan

@zkochan zkochan commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Normalize pacquet license-report authors like the TypeScript CLI.
  • Derive missing homepages from hosted Git repository metadata.
  • Preserve license groups in package-first order instead of sorting license names.
  • Add unit and end-to-end coverage and a pacquet patch changeset.

This addresses item 1 of #13457. The TypeScript CLI already defines the expected behavior, so no TypeScript implementation change is required.

Squash Commit Body

Normalize author strings and derive repository-based homepages when pacquet
builds license reports. Preserve the license-group insertion order produced by
the TypeScript CLI's package-first traversal.

Addresses item 1 of pnpm/pnpm#13457.

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.
  • Updated the documentation if needed.

Written by an agent (Codex, GPT-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Improvements
    • Made licenses list --json output more consistent by deterministically ordering license groups and package entries.
    • Improved license metadata normalization, including author name and homepage link derivation.
    • Added/extended generation of package documentation links for GitHub, GitLab, and Bitbucket, including proper #readme handling for branches and subdirectories.
  • Bug Fixes
    • Corrected inconsistencies between the license report output and the TypeScript CLI output.

Normalize license-report authors and repository-derived homepages like the TypeScript CLI.

Preserve license groups in package-first order.

Addresses item 1 of #13457.
Copilot AI review requested due to automatic review settings July 28, 2026 08:29

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 28, 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: 6f04679a-436b-4216-850f-988d99d22450

📥 Commits

Reviewing files that changed from the base of the PR and between 2061319 and b2787ee.

📒 Files selected for processing (3)
  • pnpm/crates/cli/src/cli_args/licenses.rs
  • pnpm/crates/resolving-git-resolver/src/hosted_git.rs
  • pnpm/crates/resolving-git-resolver/src/hosted_git/tests.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpm/crates/resolving-git-resolver/src/hosted_git/tests.rs
  • pnpm/crates/resolving-git-resolver/src/hosted_git.rs
  • pnpm/crates/cli/src/cli_args/licenses.rs

📝 Walkthrough

Walkthrough

pnpm licenses list --json now produces deterministic license ordering and normalized author/homepage metadata, including repository-derived documentation URLs. Hosted Git URL rendering and license behavior receive unit and integration tests, with a patch changeset for pacquet.

Changes

License report normalization

Layer / File(s) Summary
Hosted documentation URL generation
pnpm/crates/resolving-git-resolver/src/hosted_git.rs, pnpm/crates/resolving-git-resolver/src/hosted_git/tests.rs
Adds hosted Git README URL generation with host-specific paths, branch encoding, and coverage for GitHub and GitLab inputs.
License aggregation and metadata normalization
pnpm/crates/cli/src/cli_args/licenses.rs, pnpm/crates/cli/src/cli_args/licenses/tests.rs, pnpm/crates/cli/tests/licenses.rs, .changeset/calm-cats-report.md
Sorts license candidates, preserves JSON insertion order, normalizes author and homepage fields, refactors version comparison, and adds unit, integration, and patch-release coverage.

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

Possibly related PRs

  • pnpm/pnpm#13090: Introduces and wires the related pnpm licenses implementation.
  • pnpm/pnpm#13441: Also updates license output normalization and ordering.
  • pnpm/pnpm#13454: Also changes license aggregation and newer-version metadata selection.

Suggested labels: 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 fix-13457-1

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

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

Copy link
Copy Markdown

PR Summary by Qodo

Fix pacquet license report metadata and preserve license-group ordering

🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Normalize license-report author and homepage fields to match TypeScript CLI output.
• Preserve license-group ordering based on package traversal (not sorted by license name).
• Add unit + end-to-end coverage and a pacquet patch changeset.
Diagram

graph TD
  A["pacquet CLI: licenses list"] --> B["Collect deps + order"] --> C["Read package.json"] --> D["Normalize author/homepage"] --> E["Group by license (IndexMap)"] --> F["JSON output"]
  D --> G["HostedGit: docs URL"]
  C --> H[("Virtual store")]
  B --> I[("pnpm-lock.yaml")]
  H --> C
  I --> B
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Track license order separately (Vec) while keeping BTreeMap groups
  • ➕ Keeps deterministic sorting by license name available for other outputs
  • ➕ Avoids introducing insertion-order maps into the main grouping structure
  • ➖ More bookkeeping and easier to get out of sync (Vec vs map keys)
  • ➖ More complex code paths for JSON vs table output formatting
2. Move normalization into shared manifest utilities
  • ➕ Reduces duplication; other consumers can reuse the same author/homepage normalization
  • ➕ Central place to align with JS/TypeScript normalize-package-data behavior
  • ➖ Broader API surface change and higher coordination cost across crates
  • ➖ May unintentionally change semantics for non-license-report callers
3. Use a normalize-package-data compatible implementation/crate
  • ➕ Highest fidelity with the reference behavior
  • ➕ Potentially covers more edge cases over time
  • ➖ May not exist / may be heavy; adds dependency and maintenance risk
  • ➖ Harder to constrain behavior to just license-report needs

Recommendation: The current approach (local extraction helpers + IndexMap-based grouping) is a good fit for matching the TypeScript CLI with minimal blast radius. IndexMap directly expresses the required “preserve insertion order” behavior, and the HostedGit helper keeps repository-based homepage derivation consistent and testable. If similar normalization is needed elsewhere later, consider extracting these helpers into a shared module then.

Files changed (6) +239 / -24

Enhancement (1) +36 / -3
hosted_git.rsAdd HostedGit documentation URL derivation for package homepages +36/-3

Add HostedGit documentation URL derivation for package homepages

• Introduces 'package_docs_url' to compute a readme/docs URL consistent with normalize-package-data, including special handling for GitHub '/tree/<committish>' URLs and proper URI encoding for committish values.

pnpm/crates/resolving-git-resolver/src/hosted_git.rs

Bug fix (1) +68 / -20
licenses.rsPreserve license-group insertion order and normalize metadata +68/-20

Preserve license-group insertion order and normalize metadata

• Switches license grouping for JSON output from BTreeMap to IndexMap to preserve package-first group order. Adds author/homepage normalization (author name extraction, homepage scheme normalization, and repository-derived docs URLs) and introduces deterministic dependency ordering via a shared version comparator.

pnpm/crates/cli/src/cli_args/licenses.rs

Tests (3) +130 / -1
tests.rsUnit tests for author/homepage normalization helpers +32/-1

Unit tests for author/homepage normalization helpers

• Adds unit coverage for author string parsing (name-only normalization) and homepage normalization including repository-derived HostedGit docs URLs.

pnpm/crates/cli/src/cli_args/licenses/tests.rs

licenses.rsEnd-to-end test for licenses JSON metadata and group ordering +82/-0

End-to-end test for licenses JSON metadata and group ordering

• Adds an integration test that builds a minimal virtual store and lockfile, then asserts JSON group key order and normalized author/homepage fields in the report output.

pnpm/crates/cli/tests/licenses.rs

tests.rsTests for HostedGit docs/readme URL rendering +16/-0

Tests for HostedGit docs/readme URL rendering

• Adds coverage for docs URL generation across GitLab and GitHub inputs, including branch names containing slashes that require encoding.

pnpm/crates/resolving-git-resolver/src/hosted_git/tests.rs

Other (1) +5 / -0
calm-cats-report.mdAdd pacquet patch changeset for licenses metadata alignment +5/-0

Add pacquet patch changeset for licenses metadata alignment

• Adds a patch changeset documenting that 'pnpm licenses list --json' metadata and license-group ordering now match the TypeScript CLI.

.changeset/calm-cats-report.md

@greptile-apps

greptile-apps Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fix(pacquet): stabilize license metadata..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm/crates/cli/src/cli_args/licenses.rs`:
- Around line 213-215: Update the dependency sorting comparator near the
existing dependencies.sort_by call to add a final comparison using the full
package key, including belongs_to, after name and version comparisons. Preserve
the current ordering by package name and compare_versions, while ensuring
candidates with identical names and versions have deterministic ordering for
licenses list --json.

In `@pnpm/crates/resolving-git-resolver/src/hosted_git.rs`:
- Around line 270-274: Update the `/tree/` committish extraction in the hosted
GitHub parsing logic to percent-decode the extracted ref before assigning
`hosted.committish`, so later rendering does not double-encode it. Add a
regression case covering `/tree/feature%2Ffoo` and verify the generated README
URL retains `feature%2Ffoo` rather than producing `%252F`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 389c2d88-900f-4b3f-9afb-96e524ae1fa2

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1442a and 2061319.

📒 Files selected for processing (6)
  • .changeset/calm-cats-report.md
  • pnpm/crates/cli/src/cli_args/licenses.rs
  • pnpm/crates/cli/src/cli_args/licenses/tests.rs
  • pnpm/crates/cli/tests/licenses.rs
  • pnpm/crates/resolving-git-resolver/src/hosted_git.rs
  • pnpm/crates/resolving-git-resolver/src/hosted_git/tests.rs

@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     11.6±0.24ms    32.4 MB/sec    1.10     12.7±0.36ms    29.5 MB/sec
packument/parse                                  1.00     39.3±0.37µs  1686.0 MB/sec    1.00     39.4±0.53µs  1682.2 MB/sec
tarball/download_dependency                      1.10      2.5±0.23ms  1703.3 KB/sec    1.00      2.3±0.13ms  1877.6 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.06   196.9±11.31ms 81.3 KElem/sec    1.00    185.9±6.91ms 86.1 KElem/sec

@codecov-commenter

codecov-commenter commented Jul 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.67089% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.68%. Comparing base (43e6a4a) to head (b2787ee).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/licenses.rs 92.98% 4 Missing ⚠️
...pm/crates/resolving-git-resolver/src/hosted_git.rs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13461      +/-   ##
==========================================
+ Coverage   87.66%   87.68%   +0.02%     
==========================================
  Files         546      546              
  Lines       94260    94373     +113     
==========================================
+ Hits        82630    82750     +120     
+ Misses      11630    11623       -7     

☔ 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.

Tie equal package versions by their full dependency key.

Avoid double-encoding hosted Git branch names.
Copilot AI review requested due to automatic review settings July 28, 2026 08:43

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.

@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.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 28, 2026
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Context used
✅ Compliance rules (platform): 24 rules

Grey Divider


Remediation recommended

1. Comparator does extra work 🐞 Bug ➹ Performance
Description
licenses list now sorts all dependencies with a comparator that repeatedly parses semver strings
and (on name+version ties) allocates temporary Strings via PackageKey::to_string(), adding
avoidable CPU/alloc overhead on large lockfiles.
This work happens inside the sort_by comparator and is paid repeatedly across the sort’s many
comparisons, even though the sort keys are stable per element.
Code

pnpm/crates/cli/src/cli_args/licenses.rs[R213-218]

+        dependencies.sort_by(|left, right| {
+            left.2
+                .cmp(&right.2)
+                .then_with(|| compare_versions(&left.3, &right.3))
+                .then_with(|| left.0.to_string().cmp(&right.0.to_string()))
+                .then_with(|| left.1.cmp(&right.1))
Relevance

⭐⭐ Medium

Perf/alloc-in-hot-path suggestions are mixed: some accepted (#13375), others rejected in
licenses/outdated areas (#13454, #13337).

PR-#13375
PR-#13454
PR-#13337

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new code builds a Vec of all dependency entries and sorts it. The comparator calls
compare_versions(...) (which parses semver on each call) and uses
left.0.to_string()/right.0.to_string() for tie-breaking, which allocates when reached. Both
costs are inside the comparator and therefore repeated across sort comparisons.

pnpm/crates/cli/src/cli_args/licenses.rs[202-219]
pnpm/crates/cli/src/cli_args/licenses.rs[457-466]

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

### Issue description
`licenses list` performs a `dependencies.sort_by(...)` where the comparator reparses versions (`node_semver::Version::parse`) and, on tie-break paths, calls `PackageKey::to_string()` inside the comparator. Comparator work is multiplied by the sort’s comparison count.

### Issue Context
This PR introduced deterministic ordering by collecting dependencies into a `Vec` and sorting them before generating license groups.

### Fix
Precompute/copy the expensive sort keys once per dependency entry before sorting (e.g. cache `key.to_string()` and a parsed `node_semver::Version` when possible), then compare cached fields in the comparator.

### Fix Focus Areas
- pnpm/crates/cli/src/cli_args/licenses.rs[202-219]
- pnpm/crates/cli/src/cli_args/licenses.rs[457-466]

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



Informational

2. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The new changeset declares a bump only for pacquet and does not include a pnpm package entry.
This violates the changeset requirement and may prevent the intended release metadata from being
applied consistently.
Code

.changeset/calm-cats-report.md[R1-3]

+---
+"pacquet": patch
+---
Relevance

⭐ Low

Similar “missing pnpm in changeset front-matter” suggestions repeatedly rejected (e.g., PRs #13417,
#13347, #13459).

PR-#13417
PR-#13347
PR-#13459

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires each changeset to include an explicit pnpm entry with a valid
bump type. The added changeset front-matter includes only "pacquet": patch, so pnpm is missing.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/calm-cats-report.md[1-3]

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

## Issue description
The changeset front-matter is missing a `pnpm` entry (with a valid bump type `patch`/`minor`/`major`).

## Issue Context
Compliance requires that changesets explicitly declare the `pnpm` package and bump type.

## Fix Focus Areas
- .changeset/calm-cats-report.md[1-3]

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


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@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.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: b2787eeb1157

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.545 ± 0.173 2.373 2.823 1.70 ± 0.20
pacquet@main 2.510 ± 0.167 2.348 2.816 1.68 ± 0.20
pnpr@HEAD 1.526 ± 0.158 1.346 1.797 1.02 ± 0.15
pnpr@main 1.493 ± 0.148 1.353 1.785 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5453352909199998,
      "stddev": 0.17323721178147714,
      "median": 2.5109796745199997,
      "user": 1.9613795999999997,
      "system": 1.5628325200000002,
      "min": 2.37268694702,
      "max": 2.82317781002,
      "times": [
        2.38489524402,
        2.42481699902,
        2.50665023402,
        2.51530911502,
        2.8083029800199997,
        2.82317781002,
        2.55009172102,
        2.37268694702,
        2.69337873302,
        2.37404312602
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5099781242199994,
      "stddev": 0.16705350699937435,
      "median": 2.42386116852,
      "user": 1.8653442999999998,
      "system": 1.4569283199999998,
      "min": 2.34752631402,
      "max": 2.81649104502,
      "times": [
        2.40090882202,
        2.6023061730199997,
        2.42742866102,
        2.81649104502,
        2.42029367602,
        2.34752631402,
        2.6059238680199996,
        2.3641472000199997,
        2.73141382902,
        2.38334165402
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5257695447200001,
      "stddev": 0.15831494913938005,
      "median": 1.5283643395200002,
      "user": 1.2802186,
      "system": 1.24253292,
      "min": 1.3461932420200002,
      "max": 1.7973495790200003,
      "times": [
        1.4754839640200001,
        1.7973495790200003,
        1.37172400202,
        1.5812447150200002,
        1.3461932420200002,
        1.5893163580200003,
        1.3624048290200002,
        1.6481741170200002,
        1.3946847270200002,
        1.6911199140200002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4931952711200003,
      "stddev": 0.14798105271445788,
      "median": 1.42064627252,
      "user": 1.2624429,
      "system": 1.16800022,
      "min": 1.3529472750200002,
      "max": 1.7854332650200002,
      "times": [
        1.50568390102,
        1.39849084302,
        1.42927228702,
        1.5856895270200002,
        1.3529472750200002,
        1.41202025802,
        1.39030277402,
        1.69321285202,
        1.3788997290200002,
        1.7854332650200002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 255.4 ± 7.3 245.9 265.2 1.00
pacquet@main 258.4 ± 12.6 246.2 284.8 1.01 ± 0.06
pnpr@HEAD 281.9 ± 4.8 275.1 289.2 1.10 ± 0.04
pnpr@main 282.2 ± 15.7 261.6 302.3 1.10 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25537158422,
      "stddev": 0.0073135835450127955,
      "median": 0.25367111852,
      "user": 0.20789569999999996,
      "system": 0.5051140999999999,
      "min": 0.24593625752,
      "max": 0.26519409152,
      "times": [
        0.25983965852,
        0.24791205652,
        0.26519409152,
        0.26343194152,
        0.25377729452000003,
        0.26447934252,
        0.24593625752,
        0.25356494252,
        0.25124780252,
        0.24833245452000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25836663782,
      "stddev": 0.012551358298203889,
      "median": 0.25443529752000005,
      "user": 0.21095379999999997,
      "system": 0.5091965,
      "min": 0.24619236852,
      "max": 0.28477069252000003,
      "times": [
        0.25654207752,
        0.26773457452,
        0.25232851752,
        0.24877129452000002,
        0.25075064552000004,
        0.28477069252000003,
        0.27135175152,
        0.24713579352,
        0.25808866252,
        0.24619236852
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28186117442,
      "stddev": 0.004847247662236544,
      "median": 0.28214649302000006,
      "user": 0.21703679999999995,
      "system": 0.5598477,
      "min": 0.27507606252,
      "max": 0.28923420252000004,
      "times": [
        0.27507606252,
        0.27556539752000003,
        0.28549239452,
        0.28923420252000004,
        0.28225667652,
        0.27953398452,
        0.28203630952000003,
        0.28661728552,
        0.27755322052000003,
        0.28524621052
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28216909432000004,
      "stddev": 0.015732676833011012,
      "median": 0.27811272302,
      "user": 0.22273370000000003,
      "system": 0.5455723,
      "min": 0.26158900152000003,
      "max": 0.30229182452000003,
      "times": [
        0.30211796852,
        0.29509536352,
        0.26158900152000003,
        0.26422868752,
        0.27888308552,
        0.27734236052,
        0.27694005752,
        0.29660467252,
        0.26659792152,
        0.30229182452000003
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.803 ± 0.048 2.754 2.896 1.71 ± 0.16
pacquet@main 2.768 ± 0.021 2.743 2.806 1.69 ± 0.15
pnpr@HEAD 1.639 ± 0.148 1.476 1.928 1.00
pnpr@main 1.745 ± 0.123 1.599 1.934 1.06 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8033070966,
      "stddev": 0.048113718769930466,
      "median": 2.7842617725,
      "user": 2.0556898400000003,
      "system": 1.44240658,
      "min": 2.7537466420000003,
      "max": 2.896453261,
      "times": [
        2.787670872,
        2.896453261,
        2.869675855,
        2.7631724440000003,
        2.780852673,
        2.7537466420000003,
        2.7743453820000004,
        2.839158394,
        2.789821266,
        2.778174177
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.7677070349,
      "stddev": 0.020936131460148225,
      "median": 2.7642342105,
      "user": 1.9814291400000001,
      "system": 1.4111703800000002,
      "min": 2.7426889770000002,
      "max": 2.805885518,
      "times": [
        2.772336997,
        2.746768303,
        2.7426889770000002,
        2.759276003,
        2.749223846,
        2.805885518,
        2.797199882,
        2.7686152610000003,
        2.7752224020000003,
        2.75985316
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6393733255999998,
      "stddev": 0.14819346273838158,
      "median": 1.6160657485,
      "user": 1.34203874,
      "system": 1.3545130799999998,
      "min": 1.4761712770000002,
      "max": 1.928266389,
      "times": [
        1.587954882,
        1.728443506,
        1.5610993210000002,
        1.928266389,
        1.8168119530000002,
        1.486902426,
        1.6441766150000001,
        1.650889786,
        1.513017101,
        1.4761712770000002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7453269114999999,
      "stddev": 0.12329579823309145,
      "median": 1.7209849785000002,
      "user": 1.5852526400000002,
      "system": 1.5051320799999999,
      "min": 1.5985976280000003,
      "max": 1.934106764,
      "times": [
        1.934106764,
        1.7358861110000001,
        1.654766752,
        1.7060838460000003,
        1.5985976280000003,
        1.7985491480000002,
        1.6008985260000002,
        1.657285597,
        1.8926537110000001,
        1.874441032
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 704.1 ± 40.4 631.4 751.5 2.09 ± 0.14
pacquet@main 748.9 ± 32.7 698.6 810.8 2.22 ± 0.12
pnpr@HEAD 337.5 ± 11.8 322.9 357.9 1.00
pnpr@main 351.3 ± 24.2 319.5 382.5 1.04 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.70407457322,
      "stddev": 0.04042471917102561,
      "median": 0.71513492682,
      "user": 0.9019822599999999,
      "system": 0.8129869799999998,
      "min": 0.6314150618200001,
      "max": 0.75151363282,
      "times": [
        0.7055781698200001,
        0.63429408982,
        0.6314150618200001,
        0.72252476682,
        0.72449945782,
        0.75151363282,
        0.73373637682,
        0.7000828788200001,
        0.72935621082,
        0.70774508682
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.74889365432,
      "stddev": 0.032731172384131396,
      "median": 0.74761667882,
      "user": 0.9557078599999999,
      "system": 0.8701311800000001,
      "min": 0.6986065088200001,
      "max": 0.81075140282,
      "times": [
        0.74669201982,
        0.7822513078200001,
        0.7656177808200001,
        0.7358932438200001,
        0.81075140282,
        0.6986065088200001,
        0.7485413378200001,
        0.7137764668200001,
        0.75801267082,
        0.72879380382
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33748097172,
      "stddev": 0.011812512401497749,
      "median": 0.33701150882,
      "user": 0.23825365999999998,
      "system": 0.5843345799999999,
      "min": 0.32290952282,
      "max": 0.35793631482000005,
      "times": [
        0.34523106182,
        0.35793631482000005,
        0.32583981582000004,
        0.34283089882,
        0.33747826282000004,
        0.33266547182,
        0.35038975882,
        0.33654475482,
        0.32298385482,
        0.32290952282
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.35132254502000004,
      "stddev": 0.024232597704261397,
      "median": 0.34356795232000004,
      "user": 0.23355555999999997,
      "system": 0.60645898,
      "min": 0.31950713382,
      "max": 0.38249572382,
      "times": [
        0.31950713382,
        0.33283673282000004,
        0.33690667582,
        0.34356126382,
        0.32489551482,
        0.34357464082000005,
        0.37871467682000004,
        0.38249572382,
        0.37174528382000005,
        0.37898780382
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.092 ± 0.036 2.020 2.138 5.62 ± 0.36
pacquet@main 2.185 ± 0.101 2.053 2.359 5.87 ± 0.45
pnpr@HEAD 0.373 ± 0.023 0.337 0.422 1.00
pnpr@main 0.377 ± 0.023 0.348 0.430 1.01 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.09234290432,
      "stddev": 0.036311698988395744,
      "median": 2.1021083661200004,
      "user": 1.3918211399999998,
      "system": 1.0212192999999998,
      "min": 2.02043375162,
      "max": 2.13791602062,
      "times": [
        2.11060779262,
        2.13791602062,
        2.07480316062,
        2.0754008446200003,
        2.12836452762,
        2.09360893962,
        2.1160921906200003,
        2.1118821536200003,
        2.05431966162,
        2.02043375162
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.18537917242,
      "stddev": 0.10109431971710495,
      "median": 2.1919761821200003,
      "user": 1.4870648400000004,
      "system": 1.1335346999999998,
      "min": 2.05272682762,
      "max": 2.3588830246200003,
      "times": [
        2.05272682762,
        2.20570181262,
        2.05587181262,
        2.17825055162,
        2.3588830246200003,
        2.29812932362,
        2.2123423306200003,
        2.15815562362,
        2.24489749362,
        2.08883292362
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3726037799200001,
      "stddev": 0.022936537551919833,
      "median": 0.36991818162,
      "user": 0.24288233999999997,
      "system": 0.6691467999999998,
      "min": 0.33736705862,
      "max": 0.42231913962,
      "times": [
        0.42231913962,
        0.33736705862,
        0.36382326862000003,
        0.38448176762,
        0.35037213362,
        0.37312693862,
        0.36394803862,
        0.38545449462000003,
        0.37843553462,
        0.36670942462
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.37675987592000004,
      "stddev": 0.02282908753631855,
      "median": 0.36967853812,
      "user": 0.27349303999999997,
      "system": 0.6400991,
      "min": 0.34842126862,
      "max": 0.42971117762,
      "times": [
        0.40257449562000003,
        0.42971117762,
        0.37032181662,
        0.36869608862000003,
        0.37413165762,
        0.36498299462,
        0.36759410262000003,
        0.37212989762,
        0.36903525962,
        0.34842126862
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 446.8 ± 14.2 423.1 466.5 4.51 ± 0.25
pacquet@main 441.6 ± 14.8 418.2 462.7 4.46 ± 0.25
pnpr@HEAD 99.1 ± 4.4 93.1 115.9 1.00
pnpr@main 112.4 ± 6.9 94.6 128.1 1.14 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.44683354370000006,
      "stddev": 0.014229591910001591,
      "median": 0.44440079180000003,
      "user": 0.4314343599999999,
      "system": 0.10370572,
      "min": 0.4231146183,
      "max": 0.4665402403,
      "times": [
        0.4599222653,
        0.4582173483,
        0.4231146183,
        0.4395054493,
        0.46147386830000003,
        0.4421521793,
        0.4665402403,
        0.4383908123,
        0.43236925130000003,
        0.4466494043
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.44156995779999997,
      "stddev": 0.01482945924018225,
      "median": 0.43884156480000003,
      "user": 0.4242071599999999,
      "system": 0.10755701999999998,
      "min": 0.4181635843,
      "max": 0.4627141313,
      "times": [
        0.4540956043,
        0.4314827203,
        0.4627141313,
        0.4375224863,
        0.44952046830000003,
        0.4278116243,
        0.4181635843,
        0.4330911353,
        0.4401606433,
        0.4611371803
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09906502588620689,
      "stddev": 0.004440735299753871,
      "median": 0.0984327223,
      "user": 0.02717338068965517,
      "system": 0.013827681379310343,
      "min": 0.0931139643,
      "max": 0.1159406033,
      "times": [
        0.0951746963,
        0.0931139643,
        0.0981960763,
        0.09865620630000001,
        0.1064924213,
        0.0985991573,
        0.0972024243,
        0.0984327223,
        0.1011287123,
        0.0987617663,
        0.0974193903,
        0.09499262530000001,
        0.1003393363,
        0.0997729153,
        0.1159406033,
        0.0987498403,
        0.0976731993,
        0.09964033530000001,
        0.0947572613,
        0.0963526903,
        0.0984093103,
        0.0937965213,
        0.0937834813,
        0.1014794883,
        0.10224962030000001,
        0.1039068653,
        0.0981487003,
        0.0982746843,
        0.1014407353
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.11244785652222224,
      "stddev": 0.006929620275722865,
      "median": 0.11254646730000001,
      "user": 0.03418553777777778,
      "system": 0.019388512592592593,
      "min": 0.0946199103,
      "max": 0.12812077830000002,
      "times": [
        0.1029047953,
        0.1018644063,
        0.0946199103,
        0.1049264933,
        0.11334028430000001,
        0.11011034430000001,
        0.11943210530000001,
        0.1079481333,
        0.10882643930000001,
        0.11749590530000001,
        0.1105547543,
        0.1198701793,
        0.1124259403,
        0.11121040730000001,
        0.1102069703,
        0.1211958793,
        0.1130646113,
        0.1073772083,
        0.11254646730000001,
        0.1149209483,
        0.1080925063,
        0.1183223213,
        0.11721705630000001,
        0.1187505813,
        0.11387999130000001,
        0.12812077830000002,
        0.11686670830000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.754 ± 0.172 4.582 5.009 1.32 ± 0.06
pacquet@main 4.623 ± 0.083 4.535 4.824 1.29 ± 0.04
pnpr@HEAD 3.660 ± 0.146 3.529 3.883 1.02 ± 0.05
pnpr@main 3.596 ± 0.081 3.471 3.747 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.75383143478,
      "stddev": 0.17219243526557332,
      "median": 4.67456122958,
      "user": 2.4803964400000007,
      "system": 1.83541974,
      "min": 4.58171419108,
      "max": 5.00903117808,
      "times": [
        4.594015887079999,
        4.675996556079999,
        4.58171419108,
        4.64907051608,
        4.89799452908,
        4.8820496990799995,
        4.58332737708,
        5.00903117808,
        4.99198851108,
        4.67312590308
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.623062436080001,
      "stddev": 0.08286911358398168,
      "median": 4.61551554108,
      "user": 2.5455357399999996,
      "system": 1.97007144,
      "min": 4.53527160008,
      "max": 4.823695188079999,
      "times": [
        4.55438911908,
        4.63065176608,
        4.65052682308,
        4.53527160008,
        4.823695188079999,
        4.54892720608,
        4.59103206008,
        4.60037931608,
        4.64292229208,
        4.65282899008
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.659809444780001,
      "stddev": 0.14615787257639595,
      "median": 3.6041599410800003,
      "user": 1.8184059399999999,
      "system": 1.6137919399999998,
      "min": 3.52929483608,
      "max": 3.88348763208,
      "times": [
        3.6499278520800003,
        3.8797307180800003,
        3.52929483608,
        3.8113507760800003,
        3.53656903908,
        3.88348763208,
        3.54631960708,
        3.6671397690800003,
        3.5583920300800003,
        3.53588218808
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.59646559228,
      "stddev": 0.08092882971517908,
      "median": 3.5715873680800003,
      "user": 1.7689505399999998,
      "system": 1.6171633399999998,
      "min": 3.4706833230800003,
      "max": 3.7472641570800005,
      "times": [
        3.57939566208,
        3.62784043108,
        3.54517165908,
        3.53785999208,
        3.55655230908,
        3.7472641570800005,
        3.56377907408,
        3.4706833230800003,
        3.67614720808,
        3.65996210708
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13461
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,753.75 ms
(-2.14%)Baseline: 2,813.89 ms
3,376.67 ms
(81.55%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,020.43 ms
(+1.92%)Baseline: 1,982.35 ms
2,378.82 ms
(84.93%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
631.42 ms
(-2.72%)Baseline: 649.05 ms
778.87 ms
(81.07%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
423.11 ms
(+5.50%)Baseline: 401.06 ms
481.28 ms
(87.92%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,372.69 ms
(-1.99%)Baseline: 2,420.78 ms
2,904.93 ms
(81.68%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,581.71 ms
(+1.55%)Baseline: 4,511.73 ms
5,414.07 ms
(84.63%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
245.94 ms
(-11.85%)Baseline: 278.99 ms
334.79 ms
(73.46%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13461
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,476.17 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
337.37 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
322.91 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
93.11 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,346.19 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,529.29 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
275.08 ms
🐰 View full continuous benchmarking report in Bencher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants