Skip to content

fix(release): make publish path recoverable and its verification real - #8

Merged
martin-fleck-at merged 1 commit into
mainfrom
issues/7
Sep 8, 2026
Merged

fix(release): make publish path recoverable and its verification real#8
martin-fleck-at merged 1 commit into
mainfrom
issues/7

Conversation

@martin-fleck-at

Copy link
Copy Markdown
Contributor
  • Stop --dry-run writing the stamped version to disk: only the publish honoured the flag, so a dry run desynchronised every manifest from the lockfile and the next install asked the registry for a version that had never been published
  • Skip a package whose dist-tag already points at the version, so a PARTIAL publish can be re-run: the packages that succeeded otherwise reject the retry, and the version cannot be advanced without a commit because it is derived from the commit count rather than stored
  • Verify against the dist-tag endpoint rather than the package document, with backoff; npm view reads a CDN that caches NEGATIVE responses, and the bootstrap queries every name while it does not exist, so the check failed on precisely the first publish it exists to guard
  • Read dist-tag output as TEXT: the subcommand accepts --json and ignores it, so JSON.parse threw and every caller failed open
  • Keep stdio fully inherited; capturing stderr to read npm's rejection prevents the interactive one-time-password prompt

Verified against the live registry with all ten versions already published: ten skips, then the verification passed.

Fixes #7

…real

- Stop --dry-run writing the stamped version to disk: only the publish
  honoured the flag, so a dry run desynchronised every manifest from the
  lockfile and the next install asked the registry for a version that
  had never been published
- Skip a package whose dist-tag already points at the version, so a
  PARTIAL publish can be re-run: the packages that succeeded otherwise
  reject the retry, and the version cannot be advanced without a commit
  because it is derived from the commit count rather than stored
- Verify against the dist-tag endpoint rather than the package document,
  with backoff; npm view reads a CDN that caches NEGATIVE responses, and
  the bootstrap queries every name while it does not exist, so the check
  failed on precisely the first publish it exists to guard
- Read dist-tag output as TEXT: the subcommand accepts --json and
  ignores it, so JSON.parse threw and every caller failed open
- Keep stdio fully inherited; capturing stderr to read npm's rejection
  prevents the interactive one-time-password prompt

Verified against the live registry with all ten versions already
published: ten skips, then the verification passed.

Fixes #7
@martin-fleck-at
martin-fleck-at merged commit f5015cd into main Sep 8, 2026
5 of 7 checks passed
@martin-fleck-at
martin-fleck-at deleted the issues/7 branch September 8, 2026 23:41
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.

Release script cannot recover from a partial publish, and its verification cannot pass

1 participant