Repository navigation
fix(deploy): preserve links to deployed dependencies - #17296
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Rust symlink target policy pnpm/crates/deps-restorer/src/import_indexed_dir.rs, pnpm/crates/deps-restorer/src/import_indexed_dir/placement.rs, pnpm/crates/deps-restorer/src/import_indexed_dir/placement/symlinks.rs, pnpm/crates/deps-restorer/src/import_indexed_dir/placement/tests.rs |
The Rust importer adds SymlinkTargets::Imported and SymlinkTargets::Internal. Internal also recreates links to omitted directories. Both policies refuse links that escape the package root. |
Rust import and deploy integration pnpm/crates/deps-restorer/src/..., pnpm/crates/cli/src/cli_args/deploy/target.rs, pnpm/crates/cli/tests/suite/deploy/target.rs |
Shared, staged, and repair imports pass the target policy. Deploy selects Internal. Tests cover omitted targets, import modes, and default and legacy deploys. |
TypeScript importer policy pnpm11/store/controller-types/src/index.ts, pnpm11/fs/indexed-pkg-importer/src/..., pnpm11/fs/indexed-pkg-importer/test/importIndexedDir.test.ts |
The importer accepts imported or internal as the symlink target mode. Tests cover links to targets excluded from the import map. |
TypeScript deploy integration pnpm11/releasing/commands/src/deploy/deploy.ts, pnpm11/releasing/commands/test/deploy/deploy.test.ts, pnpm11/docs/cli/deploy.md, pnpm/docs/cli/deploy.md, .changeset/deploy-dependency-symlinks.md |
The pnpm 11 deploy path selects internal. Tests cover native and legacy modes. The documentation and changeset describe retained in-project symlinks. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant Deploy as copyProject
participant Importer as indexed package importer
participant Output as deploy output
Deploy->>Importer: select Internal symlink targets
Importer->>Output: preserve internal directory links
Importer->>Output: copy omitted file-link targets as files
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
Preserve selected project symlinks to dependencies in default and legacy deploy, retain their relative targets, and resolve the dependency within the output [#17288] |
✅ |
Possibly related issues
- pnpm/pnpm#17288: The PR changes deploy symlink handling and tests preservation in default and legacy deploy modes.
Suggested labels: product: pnpm@11, product: pacquet
Merge Risk: 
Minimal · up to 7af14
-
No actionable merge-blocking risk was identified in the deploy symlink changes.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
🔧 ESLint
-
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.
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.
Comment @coderabbitai help to get the list of available commands.
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, injected, and Cargo 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.7357646130799997,
"stddev": 0.1866386698122825,
"median": 2.76772235618,
"user": 2.7477809,
"system": 2.28227306,
"min": 2.49001809518,
"max": 2.94100662118
},
{
"command": "pacquet@main",
"mean": 2.63149654528,
"stddev": 0.11564414200662851,
"median": 2.65713387918,
"user": 2.8314417,
"system": 2.3107853599999997,
"min": 2.45727159918,
"max": 2.84283386818
},
{
"command": "pnpr@HEAD",
"mean": 1.59012129648,
"stddev": 0.07814394828926334,
"median": 1.58761713718,
"user": 2.4896063999999996,
"system": 2.1083105599999996,
"min": 1.48731809318,
"max": 1.72170538518
},
{
"command": "pnpr@main",
"mean": 1.5703433981800003,
"stddev": 0.1304460835271147,
"median": 1.52169198968,
"user": 2.1888497,
"system": 1.79822546,
"min": 1.43998710118,
"max": 1.76927717318
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3135121701800001,
"stddev": 0.020950609258579604,
"median": 0.31271142308,
"user": 0.36413150000000005,
"system": 0.7027849799999999,
"min": 0.28811166358,
"max": 0.36328964358000004
},
{
"command": "pacquet@main",
"mean": 0.31517144408000003,
"stddev": 0.026817567528279528,
"median": 0.32735646258,
"user": 0.38319439999999994,
"system": 0.6938630799999999,
"min": 0.27156760358000004,
"max": 0.34615043458
},
{
"command": "pnpr@HEAD",
"mean": 0.33351082388000003,
"stddev": 0.031441403626097125,
"median": 0.32885004908000004,
"user": 0.34854799999999997,
"system": 0.72927658,
"min": 0.29540073058,
"max": 0.40830997758000004
},
{
"command": "pnpr@main",
"mean": 0.32616745728,
"stddev": 0.014542799058038075,
"median": 0.32826247808,
"user": 0.35778770000000004,
"system": 0.70634778,
"min": 0.30211628458,
"max": 0.34859628658
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01198781703788462,
"stddev": 0.0011579432665204169,
"median": 0.01194912486,
"user": 0.007309387115384615,
"system": 0.005731684615384617,
"min": 0.009275401859999999,
"max": 0.01655557086
},
{
"command": "pacquet@main",
"mean": 0.011716795183529421,
"stddev": 0.0011714207682511477,
"median": 0.01170910336,
"user": 0.007071419243697479,
"system": 0.0057698774789916,
"min": 0.008574744859999999,
"max": 0.01560212886
},
{
"command": "pnpr@HEAD",
"mean": 0.011206752758617515,
"stddev": 0.0012158161212384823,
"median": 0.01120130286,
"user": 0.006016658894009216,
"system": 0.006206167004608295,
"min": 0.00839235186,
"max": 0.01566918486
},
{
"command": "pnpr@main",
"mean": 0.012033348581991699,
"stddev": 0.0015916848025905549,
"median": 0.01169208586,
"user": 0.006647632946058094,
"system": 0.0065155845643153545,
"min": 0.00919969786,
"max": 0.017161259860000003
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.013069042714945054,
"stddev": 0.0015003919954791585,
"median": 0.01291650266,
"user": 0.007314945494505491,
"system": 0.006940908571428573,
"min": 0.01005291466,
"max": 0.018667884660000002
},
{
"command": "pacquet@main",
"mean": 0.013475348696458321,
"stddev": 0.0012811189472530073,
"median": 0.013351217660000001,
"user": 0.007486476458333336,
"system": 0.007198105833333333,
"min": 0.01094706066,
"max": 0.019229617660000003
},
{
"command": "pnpr@HEAD",
"mean": 0.0134717641102924,
"stddev": 0.0015996359530258103,
"median": 0.01342344266,
"user": 0.007257691461988305,
"system": 0.007320233216374264,
"min": 0.01020085166,
"max": 0.017559787660000003
},
{
"command": "pnpr@main",
"mean": 0.012313226063846161,
"stddev": 0.0014859728998293026,
"median": 0.012235061160000001,
"user": 0.006900010512820512,
"system": 0.006396520512820515,
"min": 0.00945581566,
"max": 0.015948817660000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4947205310800005,
"stddev": 0.025537189798270514,
"median": 2.50514938808,
"user": 2.12774094,
"system": 1.4508647800000003,
"min": 2.44306293108,
"max": 2.51975544008
},
{
"command": "pacquet@main",
"mean": 2.49216597658,
"stddev": 0.014853087103543963,
"median": 2.49329749458,
"user": 2.0983278400000005,
"system": 1.4536605799999998,
"min": 2.46694178908,
"max": 2.51372232608
},
{
"command": "pnpr@HEAD",
"mean": 1.58884025128,
"stddev": 0.08344709030108764,
"median": 1.61207189008,
"user": 1.5855259399999997,
"system": 1.25430708,
"min": 1.43077632308,
"max": 1.69895059308
},
{
"command": "pnpr@main",
"mean": 1.4794120939800002,
"stddev": 0.088618056777703,
"median": 1.46190610808,
"user": 1.5841778399999997,
"system": 1.22843358,
"min": 1.37855677408,
"max": 1.63133206008
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8257303473600001,
"stddev": 0.14118338367156194,
"median": 0.7671496476600002,
"user": 1.1261932199999998,
"system": 1.26724174,
"min": 0.66429155366,
"max": 1.1096164496599998
},
{
"command": "pacquet@main",
"mean": 0.88928095856,
"stddev": 0.06872578620021655,
"median": 0.8980921886600002,
"user": 1.2563318200000002,
"system": 1.2886716399999998,
"min": 0.7702262406600001,
"max": 0.9970414006600001
},
{
"command": "pnpr@HEAD",
"mean": 0.5260911176600002,
"stddev": 0.028026793732115717,
"median": 0.53356715166,
"user": 0.47363121999999996,
"system": 0.9213759399999999,
"min": 0.46940429266,
"max": 0.5555140096600001
},
{
"command": "pnpr@main",
"mean": 0.52157421226,
"stddev": 0.023172603842480443,
"median": 0.51420909766,
"user": 0.4690681199999999,
"system": 0.9352678399999999,
"min": 0.49724265166000003,
"max": 0.5633367276600001
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7281573736400002,
"stddev": 0.01666237721767187,
"median": 1.7299264711400002,
"user": 1.13725082,
"system": 1.2285821399999999,
"min": 1.70389589414,
"max": 1.7643433221400002
},
{
"command": "pacquet@main",
"mean": 1.7246685675399998,
"stddev": 0.015765000263077467,
"median": 1.72907651464,
"user": 1.12111552,
"system": 1.2199628399999998,
"min": 1.69910360614,
"max": 1.74952052614
},
{
"command": "pnpr@HEAD",
"mean": 0.35560700184,
"stddev": 0.0066191959267383,
"median": 0.35571989614,
"user": 0.34108362,
"system": 0.7778527399999999,
"min": 0.34426433714000004,
"max": 0.36573892114000006
},
{
"command": "pnpr@main",
"mean": 0.35702222184000004,
"stddev": 0.007084721381546555,
"median": 0.35680924664,
"user": 0.3149744199999999,
"system": 0.8136472400000001,
"min": 0.34783159214000003,
"max": 0.36965797714000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5619066588600001,
"stddev": 0.1109667357153562,
"median": 0.52339224306,
"user": 0.5700619999999998,
"system": 0.22065761999999997,
"min": 0.45210915856000006,
"max": 0.8396097965600001
},
{
"command": "pacquet@main",
"mean": 0.43722656016000006,
"stddev": 0.1447048944221369,
"median": 0.36102819256000007,
"user": 0.44790660000000004,
"system": 0.18185621999999999,
"min": 0.33351991956000004,
"max": 0.7202151655600001
},
{
"command": "pnpr@HEAD",
"mean": 0.12099008117904762,
"stddev": 0.014994788940826464,
"median": 0.11746043356000001,
"user": 0.0576351619047619,
"system": 0.022661447619047616,
"min": 0.10135120956,
"max": 0.15745635856
},
{
"command": "pnpr@main",
"mean": 0.10667150413142859,
"stddev": 0.006354634481219401,
"median": 0.10476495506,
"user": 0.0423244,
"system": 0.021726791428571434,
"min": 0.09843283056,
"max": 0.12460785556000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26227403328666665,
"stddev": 0.013464139251590554,
"median": 0.26109426762,
"user": 0.28162688444444445,
"system": 0.06148560888888889,
"min": 0.24505673962000002,
"max": 0.27875860762000004
},
{
"command": "pacquet@main",
"mean": 0.2579212608422223,
"stddev": 0.012672322605391835,
"median": 0.26041390762,
"user": 0.2657461066666667,
"system": 0.07552516444444443,
"min": 0.23876398362,
"max": 0.27203834162
},
{
"command": "pnpm@HEAD",
"mean": 4.3097743385088885,
"stddev": 0.09598066724418419,
"median": 4.28482928962,
"user": 7.002303995555555,
"system": 0.3541386088888888,
"min": 4.15125476462,
"max": 4.48990316062
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.09256825933058822,
"stddev": 0.0033460377117006165,
"median": 0.09265940085999999,
"user": 0.07938951058823529,
"system": 0.049141464705882376,
"min": 0.08260481736,
"max": 0.09924734336
},
{
"command": "pacquet@main",
"mean": 0.08773247973500001,
"stddev": 0.0026769671417831223,
"median": 0.08771735586,
"user": 0.07422741500000002,
"system": 0.047784543750000005,
"min": 0.08336905036,
"max": 0.09310579236
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.07128960019500002,
"stddev": 0.0018755499935564528,
"median": 0.07071944652,
"user": 0.027293884999999997,
"system": 0.04914716999999998,
"min": 0.06968477952,
"max": 0.07929536552000001
},
{
"command": "pacquet@main",
"mean": 0.07052351554380953,
"stddev": 0.0020890441292403415,
"median": 0.06993454802000001,
"user": 0.029038702857142856,
"system": 0.046708791428571414,
"min": 0.06822219452,
"max": 0.07791557552
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.4942665126,
"stddev": 0.19563528410052533,
"median": 4.3982386384000005,
"user": 1.8750470799999999,
"system": 1.46348752,
"min": 4.3271880949,
"max": 4.8027852819
},
{
"command": "pacquet@main",
"mean": 4.4189976745,
"stddev": 0.11410623536699353,
"median": 4.358363607399999,
"user": 1.8495496799999998,
"system": 1.45529202,
"min": 4.3314904329,
"max": 4.6437650509
},
{
"command": "pnpr@HEAD",
"mean": 3.6242506336,
"stddev": 0.14899287074737178,
"median": 3.5823423339,
"user": 1.83749548,
"system": 1.3565855199999999,
"min": 3.4004244989,
"max": 3.8353872249
},
{
"command": "pnpr@main",
"mean": 3.5320807169,
"stddev": 0.12766894308331947,
"median": 3.4828274003999997,
"user": 1.7899942800000002,
"system": 1.39704432,
"min": 3.4226907979,
"max": 3.8486871849
}
]
}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.14795497303750002,
"stddev": 0.009530890115086893,
"median": 0.14625427810000002,
"user": 0.17779135999999998,
"system": 0.14673558000000006,
"min": 0.13375917360000003,
"max": 0.16181651960000001
},
{
"command": "pacquet@main",
"mean": 0.1695681996714286,
"stddev": 0.015732095142271436,
"median": 0.17009510560000002,
"user": 0.19930785999999998,
"system": 0.16112679428571428,
"min": 0.13995299060000002,
"max": 0.20103969160000001
},
{
"command": "pnpr@HEAD",
"mean": 0.23274857706153848,
"stddev": 0.037700665215420794,
"median": 0.22407592560000003,
"user": 0.27700882153846157,
"system": 0.17666931076923076,
"min": 0.19054501860000003,
"max": 0.2998128526
},
{
"command": "pnpr@main",
"mean": 0.19344294246666668,
"stddev": 0.015227908763645529,
"median": 0.18773152760000003,
"user": 0.22197782666666666,
"system": 0.16938614666666668,
"min": 0.16842972460000002,
"max": 0.21680840060000003
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.31662080632,
"stddev": 0.02342112977522791,
"median": 1.31766471022,
"user": 0.73347006,
"system": 0.27589469999999994,
"min": 1.27313555222,
"max": 1.34578964922
},
{
"command": "pacquet@main",
"mean": 1.34292291822,
"stddev": 0.0389351715765296,
"median": 1.3467204002200002,
"user": 0.78294126,
"system": 0.28396150000000003,
"min": 1.28922824522,
"max": 1.41695785122
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.02713765197714285,
"stddev": 0.000789977757824388,
"median": 0.02695358192,
"user": 0.019227647619047623,
"system": 0.013779459619047613,
"min": 0.02580460192,
"max": 0.030621006920000002
},
{
"command": "pacquet@main",
"mean": 0.02665294417454546,
"stddev": 0.0009234286074352409,
"median": 0.026415218920000004,
"user": 0.020243809090909087,
"system": 0.012201881272727267,
"min": 0.02575358492,
"max": 0.03145438392
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17296 +/- ##
========================================
Coverage 92.56% 92.56%
========================================
Files 1875 1877 +2
Lines 242682 242780 +98
========================================
+ Hits 224630 224739 +109
+ Misses 18052 18041 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Execution Profiles recorded for 1 job, triggered by
+2 ·
|
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.
10782ee to
2e1b63e
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Code Review by Qodo
1. Deploy can preserve links outside the project
|
| if roots.policy == SymlinkTargets::Imported && !imports_link_target(target, &link_target, roots) | ||
| { | ||
| return Ok(is_dir); |
There was a problem hiding this comment.
1. Deploy can preserve links outside the project 📜 Skill insight ⛨ Security
The Internal policy recreates links to unselected targets after validate_symlink_target performs only lexical containment checks. When an in-root link target traverses an intermediate symlink that points outside the package, deploy can recreate a link that resolves outside the output root, and the TypeScript path has the same weakness.
Agent Prompt
## Issue description
The new `Internal` policy preserves links whose target is not imported, but the containment check is lexical and does not account for intermediate symlinks. A link such as `link -> omitted/secret`, where `omitted` points outside the package, can therefore be recreated as an output link that escapes the package root.
## Fix Focus Areas
- pnpm/crates/deps-restorer/src/import_indexed_dir/placement/symlinks.rs[91-104]
- pnpm11/fs/indexed-pkg-importer/src/copyInternalSymlink.ts[24-29]
## Recommended Fix
Before recreating a symlink under either policy, resolve existing path components of its target and verify the resulting path remains inside the package root, while retaining support for targets that do not yet exist. Apply the equivalent check in the TypeScript importer, and add regression tests for an omitted intermediate symlink that points outside the package.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Rebased onto main and pushed 2e1b63e:
Status on 2e1b63e:
The PR was already ready for review and stays that way. Nothing else is left within this PR's scope. Written by an agent (Claude Code, claude-opus-5-5). |
Restore doc lines the branch deleted in unrelated crates, and drop the tokio security changeset: main already carries that Cargo.lock bump, so this branch no longer changes it. Document `SymlinkTargets` and the symlink parameters whose docs the branch removed, and reword the changeset and deploy docs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2e1b63e to
3368928
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
The internal symlink policy recreated every link inside the project, so a file link to a project file outside the deployed set became a dangling symlink in the output. Before the policy existed, deploy copied such a file's content, which works wherever the output is moved. The policy now applies only to directory links: a directory link to a left-out target is kept, so links into `node_modules` resolve to the dependencies deploy installs, and a file link to a left-out target is imported as a file again. 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.
|
Code review by qodo was updated up to the latest commit 7af1495 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Pushed 7af1495: the On the two Qodo findings in the review summary, neither needs a change:
Written by an agent (Claude Code, claude-opus-5-5). |
…list corpus - Route every package file selector (`pack`, `DirectoryFetcher`, `GitFetcher`, `patch-commit`, `deploy`, and the injected-copy importer and syncers) through `pnpm-fs-packlist::select_package_files` and `pnpm-fs`'s internal symlink admission and placement API (pnpm/tasks#223). - Resolve symlinked files to their canonical target before importing as regular files in `import_indexed_dir` so `Hardlink` mode materializes a regular file rather than a broken symlink. - Skip internal directory symlinks when importing git-fetched packages into the CAS. - Normalize string `bin` fields in `@pnpm/fs.packlist` when passed an unnormalized manifest. - Add `generated_trees_match_npm_packlist` (`proptest` corpus checked against `npm-packlist` and `@pnpm/fs.packlist` with `DELIBERATE_DIVERGENCES` allowlist), `pack_matches_npm_pack_dry_run` (checked against `npm pack --dry-run --json` and wired into nightly CI), and `every_file_selector_agrees_with_pack` (#17033, #17088, #17296). Closes pnpm/tasks#223
…list corpus - Route every package file selector (`pack`, `DirectoryFetcher`, `GitFetcher`, `patch-commit`, `deploy`, and the injected-copy importer and syncers) through `pnpm-fs-packlist::select_package_files` and `pnpm-fs`'s internal symlink admission and placement API (pnpm/tasks#223). - Resolve symlinked files to their canonical target before importing as regular files in `import_indexed_dir` so `Hardlink` mode materializes a regular file rather than a broken symlink. - Skip internal directory symlinks when importing git-fetched packages into the CAS. - Normalize string `bin` fields in `@pnpm/fs.packlist` when passed an unnormalized manifest. - Add `generated_trees_match_npm_packlist` (`proptest` corpus checked against `npm-packlist` and `@pnpm/fs.packlist` with `DELIBERATE_DIVERGENCES` allowlist), `pack_matches_npm_pack_dry_run` (checked against `npm pack --dry-run --json` and wired into nightly CI), and `every_file_selector_agrees_with_pack` (#17033, #17088, #17296). Closes pnpm/tasks#223
Summary
pnpm deploydropped a project symlink to a directory that was not among the deployed files, even when the directory was inside the project. A link intonode_moduleswas therefore lost, though deploy installs that dependency in the output. File links to files that are not deployed are still copied as files. Both the default and the legacy deploy are fixed, in pnpm v11 and v12.Closes #17288.
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.
Description updated by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit