fix(publish): report generated manifest in publish summary#11371
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes recursive publish summaries so pnpm-publish-summary.json reports the manifest/version that was actually packed and (dry-)published when a package uses publishConfig.directory, rather than the workspace/root manifest.
Changes:
- Extend
publish()to also returnpublishedManifest(the manifest derived from the packed output), while keeping the existingmanifestreturn for current callers. - Update recursive publish summary generation to prefer
publishedManifestover the workspace manifest. - Add a regression test covering
publishConfig.directoryversion divergence and a changeset entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| releasing/commands/test/publish/recursivePublish.ts | Adds a regression test asserting summary uses the manifest from publishConfig.directory. |
| releasing/commands/src/publish/recursivePublish.ts | Uses publishedManifest ?? manifest when writing the publish summary entries. |
| releasing/commands/src/publish/publish.ts | Adds publishedManifest to PublishResult and populates it from pack.api() result. |
| .changeset/publish-summary-directory.md | Documents the patch change for pnpm and @pnpm/releasing.commands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zkochan
approved these changes
Apr 29, 2026
|
Congrats on merging your first pull request! 🎉🎉🎉 |
zkochan
pushed a commit
that referenced
this pull request
Apr 30, 2026
Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11239.
When recursive publish calls
publish()for a package withpublishConfig.directory, the packed package can use a different manifest from the workspace package manifest.pnpm-publish-summary.jsonwas using the workspace manifest returned frompublish(), so it could report the root version instead of the version that was actually packed from the generated directory.This keeps returning the workspace manifest for existing callers, also exposes the packed manifest, and uses that manifest for recursive publish summaries.
Validation:
pnpm --filter @pnpm/releasing.commands run compilepnpm --filter @pnpm/releasing.commands exec jest test/publish/recursivePublish.tspnpm --filter pnpm run compilepnpm run spellcheckgit diff --check