Skip to content

fix: stop changesets from republishing existing versions - #921

Merged
patroza merged 1 commit into
mainfrom
t3code/changesets-npm12
Oct 22, 2026
Merged

patroza merged 1 commit into
mainfrom
t3code/changesets-npm12

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Changesets job on main tried to republish versions that are already on npm, then failed.

  • npm info <pkg> --json from npm 12.2.0 (what npm@latest installs in the release workflow) is a one-element array. Changesets reads .versions on that value, gets nothing, and treats the current package.json version as unpublished.
  • The publish then hits pnpm 12, which returns ERR_PNPM_FAILED_TO_PUBLISH and You cannot publish over the previously published versions. The existing skip only matched npm's E403.

normalizeNpmInfo unwraps that array before the versions check. The skip also accepts pnpm's error code. The phrase check already matches the plural wording, because version is a prefix of versions.

No changeset. This patch does not change a published package, and a changeset would open a version PR instead of exercising the "nothing new to publish" path.

Test plan

  • Patch applies with pnpm install --frozen-lockfile, and a second frozen install leaves the lockfile unchanged
  • npm 12's effect-app info document unwraps to a versions list that includes 4.0.2
  • A pnpm ERR_PNPM_FAILED_TO_PUBLISH body with previously published versions is treated as already published
  • Changesets on main reports no unpublished packages and does not call pnpm publish for the current versions

opened by patroza in chat thread Discord · Discord · T3


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

npm 12 returns `npm info --json` as a one-element array, so changesets
never sees the versions list and tries to publish the current
package.json versions again. pnpm 12 reports that 403 as
ERR_PNPM_FAILED_TO_PUBLISH, which the existing skip did not recognize.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@omegent-app
omegent-app Bot marked this pull request as ready for review October 21, 2026 10:24
@pkg-pr-new

pkg-pr-new Bot commented Oct 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/@effect-app/cli@921

effect-app

npm i https://pkg.pr.new/effect-app@921

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/@effect-app/eslint-codegen-model@921

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/@effect-app/eslint-shared-config@921

@effect-app/infra

npm i https://pkg.pr.new/@effect-app/infra@921

@effect-app/vue

npm i https://pkg.pr.new/@effect-app/vue@921

@effect-app/vue-components

npm i https://pkg.pr.new/@effect-app/vue-components@921

commit: 7e268a2

@patroza
patroza merged commit 6daf4b3 into main Oct 22, 2026
5 checks passed
@patroza
patroza deleted the t3code/changesets-npm12 branch October 22, 2026 05:52
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.

1 participant