Skip to content

fix: [#2184] Handle pnpm publish already-published errors - #2197

Closed
mixelburg wants to merge 1 commit into
changesets:mainfrom
mixelburg:fix/pnpm-publish-error-message
Closed

mixelburg wants to merge 1 commit into
changesets:mainfrom
mixelburg:fix/pnpm-publish-error-message

Conversation

@mixelburg

Copy link
Copy Markdown
Contributor

Fixes #2184. pnpm publish --json returns errors as {code, message} whereas npm uses {summary, detail}. isAlreadyPublishedError was only reading summary, causing a TypeError for pnpm publishes. Use json.error.summary ?? json.error.message to handle both formats.

… when json.error.summary is undefined (pnpm)
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: badb80b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mixelburg

Copy link
Copy Markdown
Contributor Author

Closing: the pnpm publish error handling has been refactored upstream (PR #2155). The npm-utils.ts file this PR modifies was deleted, and the pnpm already-published check is now handled at packages/cli/src/lib/pnpm.ts:208 via isAlreadyPublishedError(json.error.message). The fix is no longer needed in the new codebase.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isAlreadyPublishedError reads only summary, masking every pnpm publish error

1 participant