Repository navigation
fix(fs-packlist): exclude npm-packlist's default ignore patterns from pack - #16971
Conversation
|
💖 Thanks for opening this pull request! 💖 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16971 +/- ##
==========================================
- Coverage 92.59% 92.59% -0.01%
==========================================
Files 1750 1751 +1
Lines 225564 225643 +79
==========================================
+ Hits 208859 208928 +69
- Misses 16705 16715 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked and injected workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.56428028578,
"stddev": 0.1748284095499036,
"median": 2.4638881807799997,
"user": 1.85624754,
"system": 1.7734144,
"min": 2.37697289978,
"max": 2.83146530478
},
{
"command": "pacquet@main",
"mean": 2.4865578864800004,
"stddev": 0.10053475296672706,
"median": 2.50221472728,
"user": 1.74810014,
"system": 1.6533505000000002,
"min": 2.30839790878,
"max": 2.64394307878
},
{
"command": "pnpr@HEAD",
"mean": 1.49690356968,
"stddev": 0.10631262135524928,
"median": 1.4719977552799999,
"user": 1.6363287399999997,
"system": 1.5531013999999996,
"min": 1.3637776987799999,
"max": 1.7312101337799999
},
{
"command": "pnpr@main",
"mean": 1.5556787089800002,
"stddev": 0.13792097655424002,
"median": 1.5752692587800001,
"user": 1.9068002399999997,
"system": 1.8386242999999998,
"min": 1.39104438178,
"max": 1.83227937278
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.28304928024,
"stddev": 0.031340707671996273,
"median": 0.27445377864,
"user": 0.3246773399999999,
"system": 0.6545385400000001,
"min": 0.25018740514,
"max": 0.33438003214
},
{
"command": "pacquet@main",
"mean": 0.28274398414,
"stddev": 0.02352961710677177,
"median": 0.27793915664,
"user": 0.32442544,
"system": 0.6602748399999999,
"min": 0.25217709714,
"max": 0.32597144114
},
{
"command": "pnpr@HEAD",
"mean": 0.27237411074,
"stddev": 0.029687633267985805,
"median": 0.26284396014,
"user": 0.30246344000000003,
"system": 0.59226634,
"min": 0.23984070214000003,
"max": 0.33709272814
},
{
"command": "pnpr@main",
"mean": 0.31086095933999996,
"stddev": 0.04732306087485022,
"median": 0.28711671413999995,
"user": 0.33594613999999995,
"system": 0.70970254,
"min": 0.27112924114,
"max": 0.40085372514
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01111080187442623,
"stddev": 0.0011737315063824801,
"median": 0.010816441440000001,
"user": 0.006313161967213111,
"system": 0.0057431778688524626,
"min": 0.00870099394,
"max": 0.015498970940000002
},
{
"command": "pacquet@main",
"mean": 0.01090910095418439,
"stddev": 0.000942867323383472,
"median": 0.01072349644,
"user": 0.00617271829787234,
"system": 0.005691001843971631,
"min": 0.00914122594,
"max": 0.01655358194
},
{
"command": "pnpr@HEAD",
"mean": 0.011106557604974619,
"stddev": 0.0012101795404571047,
"median": 0.010896346940000001,
"user": 0.006512250050761417,
"system": 0.0056949396954314715,
"min": 0.00846525794,
"max": 0.01529384994
},
{
"command": "pnpr@main",
"mean": 0.012044528559718307,
"stddev": 0.0015391297515261323,
"median": 0.011920884940000001,
"user": 0.006988812394366198,
"system": 0.006233115915492959,
"min": 0.008511557940000001,
"max": 0.01625116194
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011868869593654623,
"stddev": 0.0017229214958563448,
"median": 0.01131760018,
"user": 0.0069417391164658705,
"system": 0.005906569397590361,
"min": 0.00871915618,
"max": 0.01826722918
},
{
"command": "pacquet@main",
"mean": 0.011979020901698115,
"stddev": 0.0014332979014890993,
"median": 0.011623695180000001,
"user": 0.007113502452830188,
"system": 0.005832839339622643,
"min": 0.00994037218,
"max": 0.01721373818
},
{
"command": "pnpr@HEAD",
"mean": 0.01125690634062176,
"stddev": 0.0013357676307959516,
"median": 0.01123353218,
"user": 0.006462732020725389,
"system": 0.005737309844559585,
"min": 0.00814206318,
"max": 0.01702329118
},
{
"command": "pnpr@main",
"mean": 0.011426487514821435,
"stddev": 0.0019183634645081851,
"median": 0.01117009818,
"user": 0.006828531428571428,
"system": 0.005476789910714285,
"min": 0.00814040018,
"max": 0.02566741518
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7364927322599994,
"stddev": 0.11387857634152251,
"median": 2.7540156504600004,
"user": 2.6333430199999994,
"system": 2.0984966199999997,
"min": 2.59343504296,
"max": 2.84933043696
},
{
"command": "pacquet@main",
"mean": 2.8008348559600003,
"stddev": 0.05766223037105309,
"median": 2.79493845796,
"user": 2.80652382,
"system": 2.24866282,
"min": 2.70883375196,
"max": 2.90946752696
},
{
"command": "pnpr@HEAD",
"mean": 1.6750681831599998,
"stddev": 0.09053359958309413,
"median": 1.67355335246,
"user": 1.87239912,
"system": 1.8599051199999999,
"min": 1.55406621396,
"max": 1.78506272596
},
{
"command": "pnpr@main",
"mean": 1.5351114957600003,
"stddev": 0.05930312735886433,
"median": 1.51874125646,
"user": 1.4828247199999995,
"system": 1.5575265200000001,
"min": 1.45834342096,
"max": 1.6349967109599999
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5025805041,
"stddev": 0.02721669824477283,
"median": 0.49753299910000004,
"user": 0.7204983599999999,
"system": 0.8131444999999999,
"min": 0.4655394601,
"max": 0.5463000741
},
{
"command": "pacquet@main",
"mean": 0.5018976106,
"stddev": 0.02921523564269536,
"median": 0.5032891656,
"user": 0.7574554599999999,
"system": 0.7791994000000001,
"min": 0.45669062610000005,
"max": 0.5633369171
},
{
"command": "pnpr@HEAD",
"mean": 0.33777712060000004,
"stddev": 0.01809587831621522,
"median": 0.34024639310000004,
"user": 0.29479215999999997,
"system": 0.6448301999999999,
"min": 0.31525458710000004,
"max": 0.36876406310000004
},
{
"command": "pnpr@main",
"mean": 0.41577070149999995,
"stddev": 0.06970817041273902,
"median": 0.4031045811,
"user": 0.37840055999999994,
"system": 0.7521442999999999,
"min": 0.3338045041,
"max": 0.5274071621
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.78436125694,
"stddev": 0.04524444352785388,
"median": 1.7798310398400001,
"user": 1.3388032200000002,
"system": 1.2392203599999998,
"min": 1.68491028584,
"max": 1.84024628884
},
{
"command": "pacquet@main",
"mean": 1.91070049454,
"stddev": 0.08574891695759282,
"median": 1.92822581134,
"user": 1.5326705200000001,
"system": 1.4763266599999998,
"min": 1.7701264138400001,
"max": 2.0662941858400004
},
{
"command": "pnpr@HEAD",
"mean": 0.32243610924,
"stddev": 0.013862631979784826,
"median": 0.32484848484000006,
"user": 0.29002162,
"system": 0.6041200600000001,
"min": 0.30191877384,
"max": 0.34966185884
},
{
"command": "pnpr@main",
"mean": 0.35148421084,
"stddev": 0.038867626564562864,
"median": 0.34718313334,
"user": 0.32858632,
"system": 0.66255266,
"min": 0.29675522984,
"max": 0.42128199884
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.29799843826,
"stddev": 0.011900385516051408,
"median": 0.29959324536000004,
"user": 0.28858278,
"system": 0.10805321999999999,
"min": 0.27274366086,
"max": 0.31557144086
},
{
"command": "pacquet@main",
"mean": 0.28480815026000006,
"stddev": 0.028925295015926934,
"median": 0.29349983486000003,
"user": 0.25347658,
"system": 0.11622692000000001,
"min": 0.23325326486000003,
"max": 0.31789254286
},
{
"command": "pnpr@HEAD",
"mean": 0.10880550752666668,
"stddev": 0.007927226496362886,
"median": 0.10786225686,
"user": 0.04675914666666666,
"system": 0.01751517,
"min": 0.09406260386000001,
"max": 0.12516605386000001
},
{
"command": "pnpr@main",
"mean": 0.10119584221714285,
"stddev": 0.005688125456688575,
"median": 0.10068657986000001,
"user": 0.04365519428571428,
"system": 0.016302955714285715,
"min": 0.09170057186000001,
"max": 0.11405096286000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.30016305565333334,
"stddev": 0.02277120300076472,
"median": 0.29812667732000003,
"user": 0.3079817577777778,
"system": 0.07242596444444445,
"min": 0.27403388032000003,
"max": 0.33786542732
},
{
"command": "pacquet@main",
"mean": 0.3128269178755555,
"stddev": 0.024756954569793807,
"median": 0.31084940732,
"user": 0.3281140911111111,
"system": 0.06481563111111112,
"min": 0.26681580632,
"max": 0.34891345932
},
{
"command": "pnpm@HEAD",
"mean": 4.405351501542222,
"stddev": 0.272609089178395,
"median": 4.4192207343200005,
"user": 6.764697424444445,
"system": 0.4686665199999999,
"min": 4.06791904732,
"max": 4.849083831320001
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.28173685691333333,
"stddev": 0.03390776107964116,
"median": 0.27259265058000004,
"user": 0.21188434666666664,
"system": 0.12434413666666666,
"min": 0.24103208808,
"max": 0.37102764608000005
},
{
"command": "pacquet@main",
"mean": 0.2584767853527273,
"stddev": 0.016009373950197456,
"median": 0.25575232608000004,
"user": 0.19646708909090907,
"system": 0.10999481090909091,
"min": 0.23370092308,
"max": 0.28550102108000003
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.09923612068375,
"stddev": 0.008067861980909662,
"median": 0.09537511834000001,
"user": 0.03756566625,
"system": 0.06879861625,
"min": 0.08992766784,
"max": 0.11859031484
},
{
"command": "pacquet@main",
"mean": 0.10785181450666667,
"stddev": 0.007475541968135345,
"median": 0.10811265584,
"user": 0.039375834074074086,
"system": 0.07649712666666666,
"min": 0.09534002284000001,
"max": 0.12364780984000001
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.533132008840001,
"stddev": 0.12681956963862606,
"median": 4.48357397414,
"user": 1.8706686000000001,
"system": 1.7461693999999999,
"min": 4.41550207614,
"max": 4.80093970614
},
{
"command": "pacquet@main",
"mean": 4.56768155614,
"stddev": 0.19492011774413734,
"median": 4.54848244764,
"user": 1.6942990999999998,
"system": 1.6112007,
"min": 4.34599773114,
"max": 4.9720105301399995
},
{
"command": "pnpr@HEAD",
"mean": 3.4967394385399997,
"stddev": 0.05717971640734765,
"median": 3.49916426764,
"user": 1.5317428999999998,
"system": 1.4919631,
"min": 3.4020340561399998,
"max": 3.59642809114
},
{
"command": "pnpr@main",
"mean": 3.57303684744,
"stddev": 0.1220845092192331,
"median": 3.56765561014,
"user": 1.5288268999999999,
"system": 1.4873615,
"min": 3.43585276114,
"max": 3.85313981014
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.12981463114,
"stddev": 0.0073014970429405865,
"median": 0.12890242794,
"user": 0.16130028999999996,
"system": 0.13509422,
"min": 0.11888236944000001,
"max": 0.15082459644
},
{
"command": "pacquet@main",
"mean": 0.12940185617684213,
"stddev": 0.00786779729790263,
"median": 0.12939339744,
"user": 0.16248090315789476,
"system": 0.12043946736842104,
"min": 0.11356602044000001,
"max": 0.14715140444
},
{
"command": "pnpr@HEAD",
"mean": 0.13967051486105264,
"stddev": 0.011063478173764933,
"median": 0.13749461744,
"user": 0.1690919557894737,
"system": 0.1176948357894737,
"min": 0.12537395044,
"max": 0.17066332044
},
{
"command": "pnpr@main",
"mean": 0.13671725214000002,
"stddev": 0.01059677568390294,
"median": 0.13664921794,
"user": 0.16229474,
"system": 0.12192927,
"min": 0.12204767244000002,
"max": 0.17550132144
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.1862785912800002,
"stddev": 0.06945161843625713,
"median": 1.17378667408,
"user": 0.6102168600000001,
"system": 0.24891684,
"min": 1.11602386508,
"max": 1.37009381708
},
{
"command": "pacquet@main",
"mean": 1.1682479992800001,
"stddev": 0.01583579075981472,
"median": 1.1698801120800002,
"user": 0.5960221600000001,
"system": 0.21327393999999997,
"min": 1.1498310020800002,
"max": 1.1920262780800002
}
]
} |
|
The failing
Every fork PR opened after that commit should hit the same failure until the workflow or its ignore config is updated. Written by an agent (Claude Code, claude-opus-5-5). |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
… pack
npm-packlist applies a set of default ignore rules in every directory it
walks, before that directory's own ignore files. pnpm 12's port of the
ignore walk never injected them, so `pnpm pack` and `pnpm publish` shipped
editor swap files, AppleDouble files, node-waf/node-gyp build leftovers and
archived-packages/.
The missing defaults from npm-packlist 10.0.4 are now soft ignore rules in
fs-packlist's walker (ignore_walk/default_rules.rs):
/.lock-wscript /.wafpickle-* /build/config.gypi .*.swp
._* **/._*/** **/.DS_Store/** /archived-packages/**
They are parsed once and evaluated before each directory's own rules, at
every ancestor level, as ignore-walk's filterEntry does. Every child
directory gets them. The package root gets them only without a `files`
field, because npm's root `files` rules ('*' plus re-includes) override root
defaults entirely. They are not added to should_always_exclude or
is_pruned, so a `files` entry, main/bin/browser, or a negation can still
re-include a file, as in npm.
Evaluating eight rules at every ancestor for every entry made
`pnpm pack --dry-run` 3-6x slower on a 46k-file tree. The same walk serves
git and directory dependency imports. A per-segment gate now skips the
defaults for paths with no segment a default rule can match, so the
no-user-rules shortcut is kept. The gate compares in ASCII only. npm's
matcher does not fold U+212A (Kelvin) to `k`, so a name that matches only
through Unicode folding keeps shipping, as it does with npm. A test fails
if a pattern is added to DEFAULT_PATTERNS without a matching sample.
Closes pnpm#16955
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The changeset for pnpm#16955 names .lock-wscript and .wafpickle-*, which cspell flags. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Keeps includes under the cognitive complexity limit. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
84d9aa1 to
d1d8e73
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
minimatch compiles the npm-packlist default patterns to `nocase` regexes without the `u` flag, so U+212A (Kelvin sign) does not match `k`. The segment gate already skipped such names, but a directory with a gate candidate in its path, such as `config.gypi/`, enabled the default rules for its entries, and the Unicode-folding literal matcher then dropped `config.gypi/.locK-wscript`, which npm ships. The default rules now parse with ASCII-only literal matching. User ignore rules keep their existing case folding. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Qodo review follow-up:
Written by an agent (Claude Code, claude-opus-5-5). |
Thanks for the follow-up. The status is consistent with the current review:
No dismissal action was requested, so I left finding 2 unchanged. |
|
Code review by qodo was updated up to the latest commit 187a8a5 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Status on 187a8a5:
Nothing else remains within this PR's scope. Written by an agent (Claude Code, claude-opus-5-5). |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Summary
pnpm packandpnpm publishnow leave out the files npm-packlist excludes by default. Before this change, pnpm 12 shipped them, while npm and pnpm 11 drop them:.*.swp(editor swap files, which can hold secrets)._*(macOS AppleDouble files and folders).lock-wscript.wafpickle-*build/config.gypiarchived-packages/.DS_StorefolderCloses #16955.
pnpm 11 is not affected: it delegates to npm-packlist 10.0.4, so this is a v12-only fix.
The rules match npm's semantics:
sub/build/config.gypiandlib/.lock-wscriptare excluded too.filesentry naming the file,main/bin/browser, or a root.npmignorenegation brings the file back;files: ["lib"]still leaves outlib/._a.js, as npm does.Real tarballs from the fixed binary match npm 11.19.1 in every scenario tested, including the issue's reproduction, nested anchored paths,
filesglobs, named files,main/bin, workspace-inherited ignore files, and Unicode look-alike names.Known differences that predate this change (not changed here, tracked as a follow-up):
filesentry or a nestedmain/binnaming a file inside a default-excluded directory two or more levels deep: v12 ships it, npm drops it.bun.lockbat the root is not excluded. Nestedpackage-lock.json/yarn.lock/pnpm-lock.yamlare over-excluded..DS_Store,npm-debug.log,*.origand.npmrcstay hard, case-sensitive exclusions.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-sonnet-5-5).
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit
.lock-wscript, Waf pickle files,build/config.gypi, andarchived-packages/by default. These exclusions also apply to matching paths in nested directories and use ASCII case-insensitive matching.filescan still be included.