Publishing is a maintainer-run npm workflow. You need publish access to the
@convex-dev/static-hosting package and an authenticated npm session.
-
Start from the exact commit you intend to publish and make sure its checks are green.
-
Confirm npm access:
npm whoami
-
Recreate dependencies and generated output from the lockfile:
npm ci npm run build:clean
-
Run the release checks and inspect the package contents:
npm test npm run lint npm run typecheck npm pack --dry-run --jsonThe package preview must include
dist/cli/index.js, the public type declarations,INTEGRATION.md, andCHANGELOG.md. -
For a major migration, install the preview package in a real app before publishing. Verify backend codegen/deploy, the first asset upload, a second upload, root HTTP routes, SPA fallback, and hashed assets.
Do not try to publish a version that already exists on npm. Always create the
version commit and tag first with npm version or one of the scripts below.
prepareforce-buildsdist/. It runs for package previews, npm publishing, and Git-based installs.preversioninstalls from the lockfile, regenerates component code, builds, and runs tests, lint, and typechecking.versionopensCHANGELOG.mdin Vim, formats it, and stages it before npm creates the version commit and tag. This step is interactive.
npm run alphaThis increments the current prerelease (for example, 0.2.0-alpha.0 to
0.2.0-alpha.1), publishes it with the alpha dist-tag, and pushes the version
commit and tag. Users can install it with:
npm install @convex-dev/static-hosting@alphaWhen the current version is a prerelease, npm run release removes the
prerelease suffix, publishes the resulting version as latest, and pushes the
version commit and tag:
npm run releaseFor an explicit version or a minor/major bump, run the steps manually:
npm version 0.2.0 # or: npm version minor / major
npm publish --access public
git push --follow-tagsBefore confirming the publish, inspect the version produced by npm version and
make sure it is the release you intend to expose as latest.
npm ci
npm run build:clean
npm packInstall the resulting tarball in another project with
npm install ./path/to/convex-dev-static-hosting-<version>.tgz.