Repository navigation
Conversation
The Rust CLI is a workspace project named `pacquet` that publishes as `pnpm`, because the TypeScript CLI already owns that name in the workspace. The rename happened in a CI shell step that rewrote the manifest just before publish, so nothing in the repo could see it — and the release tooling, which keys parked changelog sections, the ledger, and intents by the manifest name, looked the renamed package up under a name the registry does not have. Two consequences: the composed changelog was never found, so the published tarballs carry none at all, and the publication check could never confirm a section, so sections and their consumed intents accumulated instead of being collected. Let the manifest state the rename instead. `name` joins the publishConfig whitelist in both stacks, so a project can declare the name it publishes under while keeping its workspace identity. Pack reads the name back off the publish manifest so the tarball filename, the packed manifest, and the registry metadata name one artifact, and the changelog paths now separate the two identities: the parked section is still keyed by the manifest name, which the ledger joins on, while the registry probe, the previous-changelog lookup, and the composed changelog's title all use the published one. The pacquet wrapper declares `publishConfig.name` and the generator no longer rewrites the name. `@pnpm/exe`, generated by copying that manifest, strips the inherited rename so it does not publish itself as `pnpm`. Only the artifact is renamed: dependents, `pnpm-lock.yaml`, and release tooling keep addressing the project by its manifest name. Refs pnpm/pnpm#13345.
📝 WalkthroughWalkthroughAdds ChangesPublished package naming
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant WorkspaceManifest
participant ExportableManifest
participant PackCommand
participant Registry
participant ReleaseVerifier
WorkspaceManifest->>ExportableManifest: read publishConfig.name
ExportableManifest->>PackCommand: produce published manifest
PackCommand->>PackCommand: derive tarball name from published manifest
PackCommand->>Registry: publish renamed artifact and changelog
ReleaseVerifier->>Registry: fetch changelog by published name
Registry-->>ReleaseVerifier: return published changelog
ReleaseVerifier-->>ReleaseVerifier: verify expected release section
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
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 |
PR Summary by QodoSupport publishConfig.name to publish under a different package name
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Micro-Benchmark ResultsLinux |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported cross-scope registry-routing problem is fixed in both implementations because registry selection now receives the published package name. Reviews (2): Last reviewed commit: "style(cli): link published_names as an i..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.changeset/pacquet-publish-config-name.md (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep both changesets concise and user-facing. The notes include internal implementation rationale rather than the observable feature.
.changeset/pacquet-publish-config-name.md#L5-L5: reduce this to the user-visiblepublishConfig.namebehavior and its outcome..changeset/publish-config-name.md#L8-L8: remove the sibling-package/build-step background and describe the feature directly.As per path instructions, changesets must be “concise/for users” with “no implementation rationale.”
🤖 Prompt for 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. In @.changeset/pacquet-publish-config-name.md at line 5, Shorten the changeset descriptions to concise, user-facing notes: in .changeset/pacquet-publish-config-name.md at line 5, describe only that publishConfig.name publishes the package under a different name and updates the published artifact; in .changeset/publish-config-name.md at line 8, describe the feature directly without sibling-package, build-step, or implementation rationale.Source: Path instructions
🤖 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/version.rs`:
- Line 363: Thread the published_names rename map from release_from_intents into
unpublished_release_dirs, and use the mapped published name only for that
function’s registry probe. Match the lookup behavior used by
changelog::confirmed_published_versions while preserving release.name for other
release-plan logic.
In `@pnpm/crates/pack/src/lib.rs`:
- Around line 316-321: The effective published name must be validated before
artifact naming and changelog lookup in both pack implementations. In
pnpm/crates/pack/src/lib.rs, update the published_name handling around
normalize_tarball_name to reject explicitly provided empty or invalid
publishConfig.name values using is_valid_old_npm_package_name rather than
falling back to name. In pnpm11/releasing/commands/src/publish/pack.ts, validate
publishedName with validateNpmPackageName before normalization and make
empty-name handling match the Rust implementation.
---
Nitpick comments:
In @.changeset/pacquet-publish-config-name.md:
- Line 5: Shorten the changeset descriptions to concise, user-facing notes: in
.changeset/pacquet-publish-config-name.md at line 5, describe only that
publishConfig.name publishes the package under a different name and updates the
published artifact; in .changeset/publish-config-name.md at line 8, describe the
feature directly without sibling-package, build-step, or implementation
rationale.
🪄 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: 981b3fd4-393c-4428-8e3b-add93f5b2e66
📒 Files selected for processing (15)
.changeset/pacquet-publish-config-name.md.changeset/publish-config-name.mdpnpm/crates/cli/src/cli_args/changelog.rspnpm/crates/cli/src/cli_args/version.rspnpm/crates/exportable-manifest/src/create.rspnpm/crates/exportable-manifest/src/create/tests.rspnpm/crates/pack/src/lib.rspnpm/crates/pack/src/tests.rspnpm/npm/pnpm/package.jsonpnpm/npm/pnpm/scripts/generate-packages.mjspnpm11/core/types/src/package.tspnpm11/releasing/commands/src/publish/pack.tspnpm11/releasing/commands/src/version/index.tspnpm11/releasing/exportable-manifest/src/overridePublishConfig.tspnpm11/releasing/exportable-manifest/test/overridePublishConfig.test.ts
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main pnpm/pnpm#13353 +/- ##
==========================================
+ Coverage 87.04% 87.05% +0.01%
==========================================
Files 535 535
Lines 91824 91953 +129
==========================================
+ Hits 79929 80051 +122
- Misses 11895 11902 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Integrated-Benchmark Report (Linux)Commit: 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.52347832576,
"stddev": 0.17293227541325457,
"median": 2.4547020376599997,
"user": 1.4908631599999995,
"system": 1.3368474,
"min": 2.35924870316,
"max": 2.80307469416,
"times": [
2.45662643416,
2.80307469416,
2.35924870316,
2.68850078716,
2.45277764116,
2.63549843316,
2.35949640616,
2.38907772816,
2.35969454716,
2.73078788316
]
},
{
"command": "pacquet@main",
"mean": 2.4529865333600003,
"stddev": 0.10746005388843234,
"median": 2.4210379146600003,
"user": 1.4992930599999998,
"system": 1.2529431,
"min": 2.35424079716,
"max": 2.6911690681600002,
"times": [
2.41077875016,
2.35424079716,
2.38524419916,
2.43129707916,
2.37450418416,
2.36518116916,
2.6911690681600002,
2.46237710316,
2.47493640316,
2.58013658016
]
},
{
"command": "pnpr@HEAD",
"mean": 1.53344119606,
"stddev": 0.1069040940051446,
"median": 1.5315732876600001,
"user": 1.02495686,
"system": 1.1570959,
"min": 1.35329671316,
"max": 1.72556435616,
"times": [
1.5653077511600002,
1.62879482916,
1.6058299261600002,
1.5062932831600002,
1.5000058041600002,
1.35329671316,
1.4299310901600002,
1.46253491516,
1.55685329216,
1.72556435616
]
},
{
"command": "pnpr@main",
"mean": 1.57515610836,
"stddev": 0.12302407157526331,
"median": 1.61108536916,
"user": 1.02663926,
"system": 1.1559501,
"min": 1.3806804801600001,
"max": 1.73893858916,
"times": [
1.5065254991600001,
1.61702235816,
1.68573549116,
1.6051483801600002,
1.61977739616,
1.3806804801600001,
1.3898814641600001,
1.73893858916,
1.52024352916,
1.68760789616
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.25729390786,
"stddev": 0.005759690031583657,
"median": 0.25552381476,
"user": 0.2127893,
"system": 0.54347302,
"min": 0.24733222076000003,
"max": 0.26543165076,
"times": [
0.26543165076,
0.26265505276,
0.24733222076000003,
0.26318476976000005,
0.25536725076,
0.25564911076,
0.25162160676,
0.25454283676,
0.26175606076,
0.25539851876
]
},
{
"command": "pacquet@main",
"mean": 0.25021216066,
"stddev": 0.0065394834229173405,
"median": 0.25068171276,
"user": 0.1953195,
"system": 0.52446452,
"min": 0.23959644576000003,
"max": 0.26119247876,
"times": [
0.23959644576000003,
0.24637110076000002,
0.26119247876,
0.25284079376,
0.24852263176000003,
0.25405212376,
0.25669767676,
0.24349093676000003,
0.24617488176000002,
0.25318253676
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26769189186,
"stddev": 0.0053783407206836635,
"median": 0.26777910126000004,
"user": 0.22387839999999998,
"system": 0.5175380199999999,
"min": 0.25722870476000004,
"max": 0.27552622776,
"times": [
0.26529433176,
0.26712550076,
0.27552622776,
0.27407756076,
0.26843270176,
0.26608914976000003,
0.27015851076,
0.26258401976,
0.25722870476000004,
0.27040221076000004
]
},
{
"command": "pnpr@main",
"mean": 0.28276006756000005,
"stddev": 0.008158676223779672,
"median": 0.28068835876000003,
"user": 0.21731609999999998,
"system": 0.5536162199999999,
"min": 0.27467066676,
"max": 0.30043968976,
"times": [
0.28063205276000003,
0.29193712976,
0.27633654476,
0.30043968976,
0.28160039576,
0.27472658276,
0.27467066676,
0.28074466476000004,
0.28646767076,
0.28004527776000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7817618618200006,
"stddev": 0.01752254652004815,
"median": 2.77606641852,
"user": 1.6926256599999998,
"system": 1.3397938999999996,
"min": 2.7576197050199998,
"max": 2.81151963502,
"times": [
2.7576197050199998,
2.77183932102,
2.81151963502,
2.76774194902,
2.79833089002,
2.77588908502,
2.77624375202,
2.79292336002,
2.79909479802,
2.76641612302
]
},
{
"command": "pacquet@main",
"mean": 2.78584173262,
"stddev": 0.025562986391766417,
"median": 2.78072071202,
"user": 1.7039925599999997,
"system": 1.3002327999999999,
"min": 2.75559512102,
"max": 2.81828018102,
"times": [
2.77188280402,
2.81155221702,
2.81713372302,
2.75926250702,
2.7860789860199997,
2.77536243802,
2.81828018102,
2.80640654202,
2.75686280702,
2.75559512102
]
},
{
"command": "pnpr@HEAD",
"mean": 1.63816325122,
"stddev": 0.16235314646742377,
"median": 1.68723054302,
"user": 1.0126762599999999,
"system": 1.1432011999999998,
"min": 1.4346867200200002,
"max": 1.85027421002,
"times": [
1.8126160450200002,
1.45971534602,
1.4841110110200002,
1.7388791530200003,
1.6515331610200001,
1.85027421002,
1.4346867200200002,
1.46163195202,
1.7229279250200003,
1.7652569890200003
]
},
{
"command": "pnpr@main",
"mean": 1.5849700675199998,
"stddev": 0.11201423656140895,
"median": 1.58446324802,
"user": 1.0055917600000002,
"system": 1.1740363,
"min": 1.43220833702,
"max": 1.8271494860200002,
"times": [
1.53450351402,
1.4439972060200001,
1.58366952902,
1.43220833702,
1.6238204660200002,
1.5970680970200002,
1.8271494860200002,
1.58525696702,
1.5585566450200001,
1.6634704280200001
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.59754452842,
"stddev": 0.014065399202090151,
"median": 0.59430415652,
"user": 0.7088169599999999,
"system": 0.6904958400000001,
"min": 0.58375329802,
"max": 0.6254646150200001,
"times": [
0.58375329802,
0.5970315700200001,
0.59491606202,
0.61238126802,
0.6102070000200001,
0.6254646150200001,
0.58640097802,
0.59369225102,
0.58377145202,
0.58782679002
]
},
{
"command": "pacquet@main",
"mean": 0.59738398652,
"stddev": 0.01216861002718243,
"median": 0.59473141502,
"user": 0.71240766,
"system": 0.6853440400000002,
"min": 0.57707907502,
"max": 0.61560223702,
"times": [
0.58763984802,
0.59319606702,
0.57707907502,
0.60716265402,
0.59047397702,
0.61464367402,
0.61560223702,
0.59969579202,
0.59626676302,
0.59207977802
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30434634822,
"stddev": 0.005931080598336594,
"median": 0.30342436702,
"user": 0.20135646000000001,
"system": 0.52423164,
"min": 0.29627946502,
"max": 0.31502462802,
"times": [
0.29627946502,
0.29730677702,
0.30201458102,
0.31000829402,
0.30046675102,
0.30243742602,
0.31502462802,
0.30569768802,
0.30981656402,
0.30441130802
]
},
{
"command": "pnpr@main",
"mean": 0.30291293282000004,
"stddev": 0.00603601375843011,
"median": 0.30277725052000004,
"user": 0.20331126,
"system": 0.5256302399999999,
"min": 0.29351985602,
"max": 0.31406335202,
"times": [
0.30418745902,
0.30638312602,
0.30192812802,
0.31406335202,
0.30875175102,
0.30268424102,
0.29897082702,
0.29351985602,
0.30287026002,
0.29577032802
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.92443755286,
"stddev": 0.012736743103402429,
"median": 1.92018119436,
"user": 0.9823805599999998,
"system": 0.7458912999999999,
"min": 1.90841078286,
"max": 1.9434352328600002,
"times": [
1.9390010828600002,
1.9120819058600003,
1.94290989486,
1.91845250786,
1.9434352328600002,
1.9219098808600001,
1.9176528538600002,
1.9228231378600003,
1.90841078286,
1.91769824886
]
},
{
"command": "pacquet@main",
"mean": 1.91059753776,
"stddev": 0.017763942943574886,
"median": 1.9115781393600002,
"user": 0.93010146,
"system": 0.7668706,
"min": 1.88916328386,
"max": 1.9455033818600003,
"times": [
1.90983694486,
1.9455033818600003,
1.92497671686,
1.89000896286,
1.91903988186,
1.9133193338600003,
1.9196502908600002,
1.8946525168600001,
1.88916328386,
1.8998240638600001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31071264266000004,
"stddev": 0.007019746714233681,
"median": 0.30958051436,
"user": 0.20657785999999997,
"system": 0.5252327999999999,
"min": 0.30162454186000004,
"max": 0.3250315528600001,
"times": [
0.3250315528600001,
0.30278983386,
0.31533951586000003,
0.30936848586000004,
0.30839725886,
0.30583286586,
0.30162454186000004,
0.30979254286,
0.31207157986000006,
0.31687824886000004
]
},
{
"command": "pnpr@main",
"mean": 0.30884932306,
"stddev": 0.009441101065120803,
"median": 0.30666839836000004,
"user": 0.19340766,
"system": 0.559245,
"min": 0.29770023086,
"max": 0.32425157586000003,
"times": [
0.31849020986000004,
0.30399602186,
0.29770023086,
0.29962922886000004,
0.32425157586000003,
0.30444168086000006,
0.30043839986000004,
0.30889511586000007,
0.32103128986000007,
0.30961947686
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3671641104,
"stddev": 0.005430146067986742,
"median": 0.3669162094,
"user": 0.36321896000000004,
"system": 0.04950182,
"min": 0.3600418859,
"max": 0.37479249690000005,
"times": [
0.3716722999,
0.36436785790000004,
0.36137254690000004,
0.3600418859,
0.3694645609,
0.3625115689,
0.3634131029,
0.37386636590000005,
0.3701384179,
0.37479249690000005
]
},
{
"command": "pacquet@main",
"mean": 0.35701824600000004,
"stddev": 0.008663555186724315,
"median": 0.35401261540000006,
"user": 0.34307846000000003,
"system": 0.06250282,
"min": 0.3471598669,
"max": 0.36844893190000005,
"times": [
0.35074965490000004,
0.36706798490000003,
0.36844893190000005,
0.34832349490000003,
0.3497262519,
0.35699763290000003,
0.36678849890000004,
0.35102759790000004,
0.3471598669,
0.3638925449
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08696917283750003,
"stddev": 0.0019164435620534867,
"median": 0.08718925240000001,
"user": 0.021511041249999998,
"system": 0.00752426125,
"min": 0.08283629890000001,
"max": 0.09028906990000002,
"times": [
0.08855443890000002,
0.08437359890000001,
0.08329320690000001,
0.0876989999,
0.08964449890000001,
0.08461605490000002,
0.08942727990000002,
0.08495290890000001,
0.08283629890000001,
0.0877353299,
0.08858236190000002,
0.08622819490000001,
0.08320314890000001,
0.08614591190000001,
0.08858559690000001,
0.09028906990000002,
0.08582075990000002,
0.08885781990000001,
0.0851378769,
0.08724544890000001,
0.08685693690000001,
0.08717829190000001,
0.08889177290000001,
0.08698506890000002,
0.08655992990000001,
0.08843266990000001,
0.08817096890000001,
0.0871178179,
0.08750220090000001,
0.08649316290000002,
0.08720021290000002,
0.08839569090000002
]
},
{
"command": "pnpr@main",
"mean": 0.08575748286969698,
"stddev": 0.002110340196173512,
"median": 0.0862058229,
"user": 0.021035714545454543,
"system": 0.007953927272727274,
"min": 0.08178942990000002,
"max": 0.08924441490000001,
"times": [
0.0845775529,
0.08792480490000001,
0.08689448790000001,
0.08705610190000002,
0.08401958290000001,
0.08752587390000001,
0.08924441490000001,
0.08557213290000001,
0.08919881090000001,
0.08466381490000001,
0.08769760790000002,
0.08759212990000001,
0.0862058229,
0.08261014290000002,
0.08232553890000001,
0.08425021590000001,
0.08632263290000002,
0.08846694390000001,
0.08750216090000001,
0.08679152490000001,
0.08742327190000002,
0.08648176190000001,
0.08208844290000002,
0.0844873829,
0.08683486590000002,
0.08603305890000001,
0.08178942990000002,
0.08242566690000001,
0.08600081790000001,
0.08761956090000002,
0.08491313290000001,
0.08392205990000001,
0.0835351829
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.51520537744,
"stddev": 0.11778002732739501,
"median": 4.47402758694,
"user": 1.7038915799999999,
"system": 1.3460223400000002,
"min": 4.42577125044,
"max": 4.81509137744,
"times": [
4.81509137744,
4.600099885440001,
4.44367349844,
4.42577125044,
4.47597089844,
4.4776167324400005,
4.46123752944,
4.4372168394400004,
4.47208427544,
4.54329148744
]
},
{
"command": "pacquet@main",
"mean": 4.54540689734,
"stddev": 0.11783122152623586,
"median": 4.516926933940001,
"user": 1.75154608,
"system": 1.29647094,
"min": 4.42236203744,
"max": 4.7905101634400005,
"times": [
4.515456615440001,
4.44143910244,
4.57421800844,
4.46775653144,
4.56712533844,
4.46050883044,
4.696295093440001,
4.518397252440001,
4.7905101634400005,
4.42236203744
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5342901196400005,
"stddev": 0.10010413547987283,
"median": 3.4861780059400003,
"user": 1.1690400799999998,
"system": 1.2487715400000003,
"min": 3.44380022144,
"max": 3.75055434844,
"times": [
3.4795948254400004,
3.4723263664400004,
3.66007596644,
3.4720939794400003,
3.4586482924400004,
3.75055434844,
3.5681943674400003,
3.5448516424400003,
3.49276118644,
3.44380022144
]
},
{
"command": "pnpr@main",
"mean": 3.59073748024,
"stddev": 0.10863135977891478,
"median": 3.56721222744,
"user": 1.21553998,
"system": 1.21761124,
"min": 3.4755763334400003,
"max": 3.80918534744,
"times": [
3.4755763334400003,
3.52653500244,
3.50805912144,
3.59066896244,
3.47886833644,
3.80918534744,
3.5437554924400003,
3.6985768024400003,
3.5966334204400003,
3.6795159834400004
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13353 |
| Testbed | pnpr |
⚠️ 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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,434.69 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 301.62 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 296.28 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 82.84 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,353.30 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,443.80 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 257.23 ms |
`publishConfig.name` renames the artifact, so the registry only ever knows the published name — but three probes still addressed the project by its manifest name. The unpublished-dirs probe decides whether a release is a *first* release, which keeps the manifest version instead of bumping it. `pacquet` is an unrelated 0.x package on npm with none of the Rust CLI's alpha versions, so that probe reads the Rust CLI as never published on every release. It now translates through the same rename map the changelog check uses. Recursive publish probed the already-published check and picked the target registry by the workspace name: a renamed package always looked absent, and a rename that crosses scopes routed to the registry configured for the old scope whenever the new one has no entry of its own. Pack derived the tarball filename from the publish manifest's name, which never passed the validation the manifest name goes through. An invalid rename could put a path separator in the filename and write the tarball outside the destination; both stacks now reject it with ERR_PNPM_INVALID_PACKAGE_NAME, and TypeScript reuses `normalizePackageName` rather than repeating the normalization inline. Refs pnpm/pnpm#13345.
|
Code review by qodo was updated up to the latest commit 66a851a |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pnpm/crates/cli/src/cli_args/publish/recursive.rs (1)
142-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse an implementation comment, not rustdoc, for this private helper.
publish_eligibleis private, and most of this rustdoc repeats its branches. Keep only the non-obvious registry-name invariant as a regular//comment.Proposed change
-/// A package's `(published name, version)` when it is eligible to be published, -/// or `None` when it should be skipped before any registry lookup: an unnamed, -/// unversioned, or private package is never published recursively. The name is -/// the one the registry knows — the `publishConfig.name` rename, when the -/// project has one — since it is only used to address the registry. +// Registry probes use `publishConfig.name`, while release planning retains +// manifest names elsewhere.🤖 Prompt for 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. In `@pnpm/crates/cli/src/cli_args/publish/recursive.rs` around lines 142 - 146, Replace the rustdoc immediately above the private `publish_eligible` helper with a concise regular `//` implementation comment. Retain only the non-obvious invariant that the returned name uses the registry-facing `publishConfig.name` rename, and remove the redundant branch-by-branch behavior description.Sources: Coding guidelines, Path instructions
.changeset/pacquet-publish-config-name.md (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake the changeset user-facing.
This lists internal implementation details (
pnpm-lock.yaml, release ledger, probes, registry selection). Reduce it to the observable publishing behavior and changelog fix.Proposed change
-Added support for `publishConfig.name`, which publishes a package under a different name than the one its manifest carries in the workspace. Only the published artifact is renamed — dependents, `pnpm-lock.yaml`, and release tooling keep addressing the project by its manifest name — and the new name reaches the packed manifest, the tarball filename, and everything that addresses the package at the registry: the already-published check of `pnpm publish -r`, its registry selection, and the release-planning probes of `pnpm change status` and `pnpm version -r`. This also fixes the changelog of the Rust CLI itself, which is published as `pnpm` from a workspace project named `pacquet`: its release notes were composed under the workspace name and so never made it into the published package [`#13345`](https://github.com/pnpm/pnpm/issues/13345). +Packages can use `publishConfig.name` to publish under a different package name. This also fixes release notes for the Rust CLI package published as `pnpm`.🤖 Prompt for 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. In @.changeset/pacquet-publish-config-name.md at line 5, Rewrite the changeset entry to describe only user-visible behavior: packages can publish under a different name via publishConfig.name, including the published manifest and tarball, and the Rust CLI changelog is correctly included when publishing as pnpm. Remove internal implementation details such as lockfiles, release tooling, probes, and registry selection.Source: Path instructions
🤖 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.
Nitpick comments:
In @.changeset/pacquet-publish-config-name.md:
- Line 5: Rewrite the changeset entry to describe only user-visible behavior:
packages can publish under a different name via publishConfig.name, including
the published manifest and tarball, and the Rust CLI changelog is correctly
included when publishing as pnpm. Remove internal implementation details such as
lockfiles, release tooling, probes, and registry selection.
In `@pnpm/crates/cli/src/cli_args/publish/recursive.rs`:
- Around line 142-146: Replace the rustdoc immediately above the private
`publish_eligible` helper with a concise regular `//` implementation comment.
Retain only the non-obvious invariant that the returned name uses the
registry-facing `publishConfig.name` rename, and remove the redundant
branch-by-branch behavior description.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7b67678b-5eba-41a2-b6f1-c35b6f93b860
📒 Files selected for processing (19)
.changeset/pacquet-publish-config-name.md.changeset/publish-config-name.mdpnpm/crates/cli/src/cli_args/change.rspnpm/crates/cli/src/cli_args/changelog.rspnpm/crates/cli/src/cli_args/publish/recursive.rspnpm/crates/cli/src/cli_args/version.rspnpm/crates/cli/tests/change.rspnpm/crates/cli/tests/publish_recursive.rspnpm/crates/pack/src/lib.rspnpm/crates/pack/src/tests.rspnpm11/releasing/commands/src/change/index.tspnpm11/releasing/commands/src/publish/pack.tspnpm11/releasing/commands/src/publish/recursivePublish.tspnpm11/releasing/commands/src/publishedNames.tspnpm11/releasing/commands/src/resolveUnpublishedDirs.tspnpm11/releasing/commands/src/version/index.tspnpm11/releasing/commands/test/change/index.test.tspnpm11/releasing/commands/test/publish/pack.tspnpm11/releasing/commands/test/publish/recursivePublish.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- .changeset/publish-config-name.md
- pnpm/crates/pack/src/lib.rs
- pnpm/crates/cli/src/cli_args/changelog.rs
…npm#13353) The Rust CLI is a workspace project named `pacquet` that publishes as `pnpm`, because the TypeScript CLI already owns that name in the workspace. The rename happened in a CI shell step that rewrote the manifest just before publish, so nothing in the repo could see it — and the release tooling, which keys parked changelog sections, the ledger, and intents by the manifest name, looked the renamed package up under a name the registry does not have. Two consequences: the composed changelog was never found, so the published tarballs carry none at all, and the publication check could never confirm a section, so sections and their consumed intents accumulated instead of being collected. Let the manifest state the rename instead. `name` joins the publishConfig whitelist in both stacks, so a project can declare the name it publishes under while keeping its workspace identity. Pack reads the name back off the publish manifest so the tarball filename, the packed manifest, and the registry metadata name one artifact, and the changelog paths now separate the two identities: the parked section is still keyed by the manifest name, which the ledger joins on, while the registry probe, the previous-changelog lookup, and the composed changelog's title all use the published one. The pacquet wrapper declares `publishConfig.name` and the generator no longer rewrites the name. `@pnpm/exe`, generated by copying that manifest, strips the inherited rename so it does not publish itself as `pnpm`. Everything else that addresses the registry follows the same rule: the unpublished-dirs probe behind `pnpm change status` and `pnpm version -r`, and both the already-published check and the registry selection of `pnpm publish -r`. Pack validates the rename before it reaches the tarball filename, which the manifest-name check never covered. Refs pnpm/pnpm#13345.
Summary
The Rust CLI is a workspace project named
pacquetthat publishes aspnpm, because the TypeScript CLI already ownspnpmin the workspace. That rename happened in a CI shell step (generate-packages.mjs) that rewrote the manifest immediately before publish, so nothing in the repo could see it. The release tooling keys parked changelog sections, the ledger, and intents by the manifest name, and then looked the package up on the registry under that same name — a name npm has never had this artifact under.Two consequences, both verified against the live registry:
[email protected]and@pnpm/[email protected]contain noCHANGELOG.md;[email protected]and@pnpm/[email protected]both do.compose_registry_changelogread the name back off the rewritten manifest and looked for.changeset/changelogs/pnpm@<version>.mdwhile the section was parked aspacquet@<version>.md, found nothing, and packed nothing. Eleven alphas of release notes never reached users.confirmed_published_versionsprobedpacqueton npm — an unrelated 0.x package — so a section could never be confirmed and never collected.pacquet-edge-aware-engine-strict.mdis ledgered as consumed by[email protected], published several alphas ago, and is still sitting in.changeset/.Approach
Let the manifest state the rename, instead of a build step performing it invisibly.
namejoins the publishConfig whitelist in both stacks, so a project can declare the name it publishes under while keeping its workspace identity. Only the artifact is renamed: dependents,pnpm-lock.yaml, and release tooling keep addressing the project by its manifest name.pnpm change statusandpnpm version -r, and both the already-published check and the registry selection ofpnpm publish -r, resolve the published name too. The first of those decides whether a release is a first release, which keeps the manifest version instead of bumping it — so probingpacquet, an unrelated 0.x package on npm, read the Rust CLI as never published on every release.ERR_PNPM_INVALID_PACKAGE_NAME, and an empty rename means "no rename" in both.publishConfig.nameand the generator no longer rewrites the name.@pnpm/exe, generated by copying that manifest, strips the inherited rename so it does not publish itself aspnpm.Verification
generate-packages.mjsend to end with stubbed native binaries: the wrapper comes outname: pacquet/publishConfig.name: pnpm/ noprivate, and@pnpm/execomes out named@pnpm/exewith no inheritedpublishConfig.publish_config_name_renames_the_published_package(pacquet-exportable-manifest),publish_config_name_renames_the_tarball_and_the_packed_manifest(pacquet-pack, asserts both the.tgzfilename and the packed manifest), andpublishConfig.name renames the published package(@pnpm/releasing.exportable-manifest).first_release_probe_uses_the_published_name_of_a_renamed_projectandrecursive_publish_probes_a_renamed_project_under_its_published_name(pacquet-cli),a package renamed by publishConfig.name is probed under the name the registry knows(@pnpm/releasing.commands, one inchange, one inrecursivePublish).invalid_publish_config_name_is_rejected(pacquet-pack, covering..\..\eviland@a/b/c),pack a package with an invalid publishConfig.nameandpack a package renamed by publishConfig.name(@pnpm/releasing.commands).pacquet-cli(989 unit + 10changee2e),pacquet-pack+pacquet-exportable-manifest(68),@pnpm/releasing.commands/.versioning/@pnpm/types(65),@pnpm/releasing.exportable-manifest(30).pnpm run compile,pnpm run lint(0 errors),cargo clippy --deny warnings,cargo fmt --check.Not in scope
pd,@pnpm/scripts,@pnpm-private/updater,@pnpm/get-release-text,@pnpm/jest-config,@pnpm/testing.*are404on npm, so the confirmation gate can never pass for them (20 of the 36 parked sections).private: truedoes not identify them —@pnpm/napiis private and publishes fine — so this needs its own decision about whether such projects should park sections at all.pacquetsections describe alphas that were published without a changelog, so they will still never confirm. Whether to fold that prose into the next release or drop it is a call for a maintainer; deleting release notes did not feel like something to do unilaterally.Refs pnpm/tasks#38.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.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-opus-5[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
publishConfig.name.