Alpha releases
The release checklist for @rescript/webapi is tracked in
#382. ReScript
13.0.0-alpha.7 is the compiler baseline. A stable compiler is not a prerequisite;
library alpha releases may include breaking changes between versions.
Prepare a candidate
Section titled “Prepare a candidate”The release version is the synchronized version in package.json and package-lock.json.
Use the repository’s release validation before changing that version:
npm run format:checknpm run buildnpm run check:featuresnpm run test:negativenpm testnpm run test:browsernpm run build:docsnpm run check:docs-linksnpm run check:consumernpm run check:releaseThe browser suite runs Chromium only; it is not an exhaustive browser compatibility matrix. Its
fixture server and Playwright baseURL both use WEBAPI_TEST_PORT, and the runner refuses to
reuse an unrelated server. If the default port is occupied during local parallel work, select an
unused one:
WEBAPI_TEST_PORT=4192 npm run test:browserThe consumer check compiles the packed artifact in a fresh project. A successful source build alone is not evidence that package installation works.
npm run check:release validates metadata without checking whether the version has been
published. Ordinary pull requests can keep the current version after a release.
The initial candidate is 1.0.0-alpha.1, tagged v1.0.0-alpha.1. For each later alpha, update
package.json and package-lock.json together to the next 1.0.0-alpha.N version, add the
user-visible changes and migration guidance to CHANGELOG.md, and create the matching Git tag
v1.0.0-alpha.N from the validated release commit. After changing the version, run
npm run check:release -- --check-unpublished to validate the metadata and reject an
already-published version.
Validate and publish
Section titled “Validate and publish”The Release workflow’s unprivileged validate job checks and packs the candidate once. It runs
npm run check:consumer and a publish dry-run against that exact .tgz; the PR and a manual
workflow_dispatch with dry_run: true use this validation path. Manual release runs also check
that the version is unpublished; pull requests do not. The archive is not exposed for a later
local download on those paths; a real main-only publication transfers the same artifact internally
from validate to publish. If reproducing the artifact checks locally, pack once and pass the
same path to both commands:
mkdir -p .releasenpm pack --json --pack-destination .release > .release/metadata.jsonartifact=".release/$(node -e 'process.stdout.write(JSON.parse(require("node:fs").readFileSync(".release/metadata.json", "utf8"))[0].filename)')"npm run check:consumer -- "$artifact"npm publish "$artifact" --access public --tag alpha --dry-run --ignore-scriptsOnly an authorized maintainer should start a real publication with workflow_dispatch from
main and dry_run: false. The separate publish job is main-only; it verifies and publishes the
validated archive with the alpha dist-tag and --provenance, and must not advance latest.
After a real publish, verify the registry dist-tags:
npm view @rescript/webapi dist-tags --jsonThe workflow requests npm provenance through GitHub Actions OIDC. Before the first real publication, maintainers must configure and verify npm trusted publishing for this repository and workflow in npm’s publishing settings. The expected trusted-publisher tuple is:
- Package:
@rescript/webapi - Owner:
rescript-lang - Repository:
experimental-rescript-webapi - Workflow filename:
release.yml - GitHub environment: none
In npm’s package settings, Trusted publishing should show those exact owner, repository, and
workflow filename fields, no GitHub environment, and allow direct npm publish actions.
Provenance should be enabled. These external npm account settings have not been verified from the
repository. The workflow cannot confirm them by itself.