FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix pnpm 11 publish errors handling by cyphercodes · Pull Request #2132 · changesets/changesets · GitHub

Repository navigation

Fix pnpm 11 publish errors handling - #2132

Merged
Andarist merged 5 commits into
changesets:mainfrom
cyphercodes:fix-publish-already-published-e403
Jul 2, 2026
Merged

Andarist merged 5 commits into
changesets:mainfrom
cyphercodes:fix-publish-already-published-e403

Conversation

Copy link
Copy Markdown
Contributor

Summary

  • Make already-published publish error detection tolerate missing JSON error.summary.
  • Check summary, detail, message, and raw stdout/stderr for the already-published message.
  • Add pnpm regression coverage for E403 JSON errors without a summary.

Fixes #2099

Test plan

  • pnpm install --frozen-lockfile
  • pnpm vitest run packages/cli/src/commands/publish/__tests__/index.test.ts packages/cli/src/commands/publish/__tests__/publishPackages.test.ts packages/cli/src/commands/publish/__tests__/npm-utils.test.ts
  • pnpm lint -- packages/cli/src/commands/publish/npm-utils.ts packages/cli/src/commands/publish/__tests__/npm-utils.test.ts
  • pnpm types:check
  • pnpm format
  • git diff --check

changeset-bot Bot commented Jun 29, 2026 •
edited
Loading

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f28bd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/cli Patch

Not sure what this means? Click here to learn what changesets are.

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

codecov Bot commented Jun 29, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.24%. Comparing base (4a0213f) to head (0f28bd6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2132      +/-   ##
==========================================
+ Coverage   87.67%   88.24%   +0.57%     
==========================================
  Files          72       72              
  Lines        2596     2604       +8     
  Branches      691      698       +7     
==========================================
+ Hits         2276     2298      +22     
+ Misses        296      283      -13     
+ Partials       24       23       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +402 to +407
isAlreadyPublishedError(
json.error.summary,
json.error.detail,
json.error.message,
stderr.toString(),
stdout.toString(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not a fan of this. We should use targeted logic. We should probably hoist the formatPublishError call and use the normalized error throughout the caller's logic

Andarist changed the title Handle already-published publish errors without summary Fix pnpm 11 publish errors handling Jul 2, 2026
Andarist enabled auto-merge July 2, 2026 11:06
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

changeset publish crashes on already-published packages under npm trusted publishing (OIDC)

2 participants


Back | FazBrowse Home | New Git URL