StreamMDX — Release Checklist
_Last updated: 2025-12-17_
Use this checklist when cutting releases from the stream-mdx/ repo. It assumes the current workspace scripts in package.json.
1. Preflight (local)
- Install deps (clean) ```bash npm ci ```
- Build packages
npm run buildruns all workspace builds (npm --workspaces --if-present run build). ```bash npm run build ```- Sourcemap policy sanity check
- Default: no sourcemaps are emitted by package builds.
- Optional: enable sourcemaps for local debugging by setting
SOURCEMAP=1. ```bash SOURCEMAP=1 npm run build ``` - Build the hosted worker + copy to examples ```bash npm run worker:build ```
- Run tests ```bash npm test ```
- Local regression baselines (local-only, recommended) ```bash npm run test:regression:html npm run test:regression:styles ```
- HTML snapshots capture streaming checkpoints (5/10/25/50/75/90/100%) and run both typical + extreme scenarios for stress fixtures.
- Format anticipation is enabled by default in the regression harness.
- To update baselines, re-run with
UPDATE_SNAPSHOTS=1. - CSS parity checks to confirm after styles update:
- Table row borders (dark mode)
- Blockquote + footnote color alignment
- Preview + code adjacency (no top gap/radius)
- Perf baseline capture (optional, local) ```bash NEXT_PUBLIC_STREAMING_DEMO_API=true npm run docs:dev npm run perf:demo -- --rate 12000 --tick 5 --runs 1 ```
- Output includes a
longTaskssummary (count, total duration, max, p95). - Baseline runs are tracked in
docs/perf/LOCAL_BENCHMARKS.md. - Perf compare + changelog update (recommended) ```bash npm run perf:compare -- --base tmp/perf-baselines/<baseline> --candidate tmp/perf-baselines/<candidate> ```
- Record the deltas in
docs/PERF_QUALITY_CHANGELOG.md. - Update
docs/perf/LOCAL_BENCHMARKS.mdwhen new baselines are captured. - Sanity-check hosted worker outputs
- Built worker artifact:
packages/markdown-v2-worker/dist/hosted/markdown-worker.js- Copied artifact (for the example app):
examples/streaming-markdown-starter/public/workers/markdown-worker.js
2. Pack + external install gate (high signal)
This is the most reliable “will npm users succeed?” gate.
2.1 CI-equivalent smoke test (recommended)
Runs a fully automated pack+install+next build using the included starter (no workspace links):
bash
npm run ci:pack-smoke2.2 Manual pack (optional)
- Pack tarballs locally ```bash mkdir -p tmp/release-packs (cd packages/markdown-v2-core && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-plugins && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-protocol && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-worker && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-react && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-mermaid && npm pack --pack-destination ../../tmp/release-packs) (cd packages/markdown-v2-tui && npm pack --pack-destination ../../tmp/release-packs) (cd packages/theme-tailwind && npm pack --pack-destination ../../tmp/release-packs) (cd packages/stream-mdx && npm pack --pack-destination ../../tmp/release-packs) ```
- In a clean scratch dir, install from tarballs and build
- Minimum expectation:
npm install ./tmp/release-packs/*.tgz(or explicit paths)next buildsucceeds for a simple Next app usingstream-mdx(or@stream-mdx/react)- If you use the included starter:
- point the starter deps at the tarballs (no workspace/file links)
- ensure it can
npm install,npm run worker:build, andnpm run build
3. Versioning & tagging (Changesets)
This repo is set up for Changesets.
- Add changesets for the release ```bash npm run changeset ```
- Version packages ```bash npm run changeset:version ```
- Commit
- Example:
chore(release): version packages- Tag (optional but recommended)
- Prefer a single repo tag per release:
v0.0.1/v0.1.0/v1.0.0
4. Publish
- Ensure you are logged into npm ```bash npm whoami ```
- Trusted Publishing (recommended)
- Configure npm “Trusted Publisher” for:
@stream-mdx/core@stream-mdx/plugins@stream-mdx/protocol@stream-mdx/worker@stream-mdx/react@stream-mdx/mermaid@stream-mdx/tui@stream-mdx/theme-tailwindstream-mdx- Required workflow permissions:
id-token: write- Workflows:
.github/workflows/release.yml(auto release PRs / publish).github/workflows/publish.yml(manual workflow_dispatch)- Publish via Changesets ```bash npm run changeset:publish ```
- Optional: local interactive publish helper ```bash scripts/publish-v0.4.0.sh ```
- Requires
npm login --auth-type=web. - Publishes in dependency order, verifies all local versions match, and skips packages already published at that version.
- Confirm all packages are published
@stream-mdx/core@stream-mdx/plugins@stream-mdx/protocol@stream-mdx/worker@stream-mdx/react@stream-mdx/mermaid@stream-mdx/tui@stream-mdx/theme-tailwindstream-mdx
5. CI gates (current repo)
This repo’s CI (.github/workflows/ci.yml) enforces:
npm cinpm run buildnpm testnpm -ws --if-present pack --dry-runnpm run ci:pack-smoke(pack+install+next build)
Before publishing, run the same commands locally (plus the external install gate in §2).
6. Post-publish checks
- Verify npm README renders
stream-mdxshould displaypackages/stream-mdx/README.mdon npmjs.com.- Verify docs + demo links
- Docs: https://kmccleary3301.github.io/stream-mdx/
- Demo: https://kmccleary3301.github.io/stream-mdx/demo
- Showcase: https://kmccleary3301.github.io/stream-mdx/showcase
- Verify hosted worker guidance
- The worker is expected at
/workers/markdown-worker.jsin most examples. - Confirm Trusted Publishing works
- Once configured on npm, use
.github/workflows/publish.yml(manual) or.github/workflows/release.yml(auto).
7. Docs & release notes
- Update
docs/STREAMING_MARKDOWN_V2_STATUS.mdas implementation details change. - Publish release notes via GitHub Releases (recommended), or add a
CHANGELOG.mdif you want a file-based changelog. - When publishing packages, ensure badges and docs links remain correct.
8. Rollback plan
- Tag every release; rollback is typically “revert and republish as
-patch” or “yank withnpm deprecate+ publish fix”. - Keep the hosted worker build deterministic so it can be regenerated from tags.