Skip to content

fix(release): publish prereleases to latest for packages without a stable release - #648

Merged
chrispader merged 1 commit into
mainfrom
fix/prerelease-npm-readme
Dec 4, 2026
Merged

chrispader merged 1 commit into
mainfrom
fix/prerelease-npm-readme

Conversation

@chrispader

@chrispader chrispader commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

npm keeps one README per package and clears it whenever a version is published to a tag other than latest. The 11.0.0-alpha.1 release published every package under alpha, so nitro-sqlite has shown no README on npm since then, and the next alpha would blank the other NitroUI packages too, even though every published package contains a README.

Packages without a stable release now publish prereleases to latest, and the release script then points their channel tag, such as alpha, at the new version with npm dist-tag add. Packages with a stable release keep publishing prereleases to the channel tag only, so latest never moves back from a stable version. The dist-tag step also runs on retries for versions an earlier attempt published.

Trusted publishing moves dist-tags only from npm 11.21.0, which Node 24.23.0 bundles. The script stops before the first upload when the runner has an older npm. Each NitroUI package's trusted publisher for release.yml also needs Allow npm dist-tag enabled on npmjs.com.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved release publishing for packages without a stable version: they receive the appropriate release-channel tag after publication, while other packages retain their selected tag.
    • Publishing now stops before uploading packages when the installed npm version cannot support the required tagging behavior. Errors during tag updates are reported rather than silently ignored.
  • Tests
    • Added coverage for prerelease tagging, npm version requirements, and configurable package version metadata.

…able release

npm clears a package page README when a version is published to any tag
other than latest. Packages with only prereleases now publish to latest and
move their channel tag afterwards through trusted publishing, which needs
npm 11.21.0 or newer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-native-nitro-sqlite Ready Ready Preview Dec 4, 2026 1:59pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The release script detects packages without a stable release. For prerelease distributions, it publishes those packages to latest, verifies pending publications, and then adds the selected distribution tag. Tests cover the publication tags and the required npm version.

Changes: Prerelease publishing

Layer / File(s) Summary
Stable-release detection and preflight
scripts/release-registry.ts, scripts/publish-release.ts
hasStableRelease checks whether latest metadata contains a stable version. For non-latest distributions, the script checks the npm version if any release package lacks a stable release.
Publish and retag prerelease packages
scripts/publish-release.ts, scripts/publish-release.test.ts
Packages without a stable release publish to latest; after pending publications are verified, the script adds the selected distribution tag. Tests cover package tags, operation order, and failure on an unsupported npm version.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant publishRelease
  participant hasStableRelease
  participant npmRegistry
  participant npmCLI
  publishRelease->>hasStableRelease: check package stable-release status
  hasStableRelease->>npmRegistry: read latest version metadata
  npmRegistry-->>hasStableRelease: return version metadata
  hasStableRelease-->>publishRelease: return stable-release status
  publishRelease->>npmCLI: check version and publish pending packages
  npmCLI-->>publishRelease: return command results
  publishRelease->>npmCLI: add selected tag after publication verification
  npmCLI-->>publishRelease: return dist-tag command result
Loading

Possibly related PRs

  • margelo/nitro-sqlite#586: Changes the same pending-package publication and retry flow, including trusted-publisher checks.
  • margelo/nitro-sqlite#613: Adds the Nitro UI packages that this change targets for prerelease publication and channel tagging.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chrispader
chrispader merged commit 6dbaed7 into main Dec 4, 2026
11 of 12 checks passed

This branch was successfully deployed

1 active deployment
Preview — 861c4ffd Deployed Dec 4, 2026 by vercel[bot]
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