- packages/compiler/surface-manifest.json is generated (pnpm manifest), committed, and shipped in @scriptc/compiler; entries project mechanically from the diagnostics registry, the unsupported-syntax dispatch tables, the stdlib/builtin lowering tables, and the supported-builtin-module list - every non-static entry carries the SC code the compiler raises for it, and the version spine is the exact published release version - FENCE_CODES joins the diagnostics registry so factory-minted construct fences are enumerable - the sampling harness compiles listed-static probes and asserts each sampled non-static entry refuses with exactly its listed code, beside a byte-identical staleness guard - the release workflow regenerates the manifest, fails on drift, and attaches it to the GitHub release
3.1 KiB
Releasing
Releases are manual, single-commit affairs. The maintainer controls the changelog voice and format. The three npm packages — @scriptc/runtime, @scriptc/compiler, scriptc — always publish together at the same version.
To prepare a release:
- Bump the version in
packages/cli/package.json - Run
node scripts/sync-versions.mjsto stamp the same version intopackages/runtimeandpackages/compiler, thenpnpm manifestto restamppackages/compiler/surface-manifest.jsonwith the new version, and commit both (the test suite's staleness guard fails on a version drift) - Fold the
## Unreleasedsection ofCHANGELOG.mdinto a new## <version>entry (newest first, below## Unreleased), and leave## Unreleasedempty for the next cycle - Wrap the new entry in
<!-- release:start -->and<!-- release:end -->markers; this marked block is also the GitHub release body - Remove the
<!-- release:start -->and<!-- release:end -->markers from the previous release entry; only the latest release should have markers - Commit to
main
CI (.github/workflows/release.yml) compares the version in packages/cli/package.json to what scriptc has on npm. If it differs, it builds the workspace, verifies all three package versions match (a mismatch fails with a hint to run scripts/sync-versions.mjs), and publishes to npm in dependency order — @scriptc/runtime, then @scriptc/compiler, then scriptc — so each package's dependencies are resolvable the moment it lands. After the publish succeeds, a separate job creates the git tag v<version> and the GitHub release with the marked changelog entry as its body, and attaches surface-manifest.json — the machine-readable listing of the surface the static tier compiles at that version (stable per-entry ids, so two releases diff mechanically; see packages/compiler/src/coverage/surface-manifest.ts for the schema). The job regenerates the manifest from the tree and fails on any byte difference from the committed file before attaching, so the asset is always the manifest of the code being released. The same file ships inside the @scriptc/compiler package as @scriptc/compiler/surface-manifest.json.
Two deliberate differences from repositories that ship prebuilt binaries: there are no platform binary assets to build or stage — scriptc compiles programs on the user's machine with the local clang — so the GitHub release is a tag, release notes, and the manifest asset only, and the npm publish never waits on the GitHub release (the release job runs after the publish, not before it).
Publishing uses npm trusted publishing (OIDC) — there is no npm token secret. The one-time setup is already done: each of the three packages is configured on npmjs.com with a GitHub Actions trusted publisher pointing at repository vercel-labs/scriptc, workflow release.yml, environment Release. A package missing that configuration fails with an OIDC authentication error before anything is uploaded. Re-runs are safe: any package already on the registry at the target version is skipped, so a partially published release can be resumed by re-running the workflow.