The libraries live in this Bun workspaces monorepo and are published to npm independently. Each package is built with tsdown into a dual ESM + CommonJS bundle (.mjs/.cjs + .d.mts/.d.cts). dist/ is git-ignored and rebuilt automatically at publish time by each package's prepack script, so there is nothing built to commit.
Update the version everywhere and keep the values in sync:
- the package versions in
packages/js-client/package.json,packages/js-server/package.json(and the rootpackage.json, which tracks the spec version) - the spec
versionliteral the libraries emit —common/@types/CommonResponse.tsand its mirrored copies under eachpackages/*/src/common, theversionvalue in eachpackages/*/src/index.ts, and the examples + Latest jarspec version at the bottom of the README
bun install
bun run workspace:build # builds both packages with tsdown
bun run lint:pkg # publint - validates the published package shapeEach command runs the package's prepack first (which rebuilds dist/); the files field then ships only dist/ in the tarball:
npm login # one-time; needs publish rights to the @devleaf-labs scope
bun publish --cwd packages/js-client
bun publish --cwd packages/js-serverBoth packages set publishConfig.access: "public", so the scoped packages are published publicly.
git tag v2.0.0
git push --tags