Publishing packages
pnpm run release does not bump versions. It publishes whatever is already in package.json. Bump + commit + git tag first, then release.
Phase A: low-level packages are published alongside the product tarball. The monolith still bundles kernel/sdk/view/mermaid/hunspell — consumers of on-codemerge do not need the scoped packages for normal editor use.
One command
From the repo root (pnpm login for @codemerge + on-codemerge):
pnpm run release
Runs prepublishOnly then publishes with pnpm in order. prepublishOnly is the release gate:
- package builds,
pnpm run check(format, lint, typecheck, locales, collab tests); - product builds plus dist hygiene (
check:public-bundle,check:dist-package,check:surfaces); publint --strictfor every package;check:pack— packs every package aspnpm publishwould and checks the tarball: allexports/main/typestargets present, noworkspace:/catalog:left, no test files, types resolve for ESM and CJS consumers undernode16andbundler(attw), and a consumer project importing every typed entrypoint of the unpacked tarballs passestscwithskipLibCheck: false.
After npm shows the new versions, verify them in demo/ (published packages only): bump the versions in demo/package.json, then pnpm install, pnpm typecheck, pnpm build, pnpm test:e2e.
Publish order:
@codemerge/kernel@codemerge/view@codemerge/mermaid@codemerge/sdk@codemerge/hunspell@codemerge/collaboration-server@codemerge/integrateon-codemerge
Workspace deps
- Internal packages:
workspace:^(notworkspace:*) - Shared third-party versions: pnpm
catalog:inpnpm-workspace.yaml - Package builds: each publishable package has its own
vite.config.tsand"build": "vite build"; collaboration-server also runsvite.cli.config.tsfor the bin
Consumer guidance
| Need | Install |
|---|---|
| Editor app | on-codemerge only |
| Headless doc/ops | @codemerge/kernel |
| ViewSpec DOM only | @codemerge/view |
| Mermaid-subset SVG only | @codemerge/mermaid |
| Plugin authoring without monolith | @codemerge/sdk (+ kernel/view) |
| Spell without editor | @codemerge/hunspell |
| Demo / self-hosted collab WS | @codemerge/collaboration-server |
Host adapters / <ocm-editor> | @codemerge/integrate (+ peer on-codemerge) |
Warning: do not install on-codemerge and @codemerge/sdk into the same application bundle (duplicate SDK/kernel instances).
See also Mermaid and View runtime.