Monorepo for the @nats-kit/* library family — a toolkit for NATS
JetStream + KV built on the nats.js v3 modular packages (@nats-io/*), with a
framework-free core and a thin NestJS adapter.
| Package | Directory | Role |
|---|---|---|
@nats-kit/core |
packages/nats-kit-core |
Framework-free core: connection lifecycle runner, JetStream/KV services, resilient consume/subscribe/watch helpers. No NestJS. |
@nats-kit/nestjs |
packages/nats-kit-nestjs |
NestJS adapter: forRoot/forRootAsync dynamic module + injectable services. The only package allowed to import @nestjs/*. |
Both packages ship dual CJS + ESM builds via
tshy and version in lockstep (see
fixed in .changeset/config.json). Each package's README is its npm landing
page and documents its API.
- Package manager: pnpm (the
packageManagerfield is authoritative) - Node:
>=22.0.0(publishedenginesfloor; dev toolchain pinned to22.22.0via.nvmrc) - Monorepo runner: Turborepo
- Build: tshy (dual
dist/esm+dist/commonjs) - Language: TypeScript (
NodeNext, strict) - Tests: Vitest (unit + Testcontainers-based integration suites)
- Versioning/publish: Changesets (
fixedlockstep group)
pnpm install # wire the workspace
pnpm build # turbo run build
pnpm typecheck # turbo run typecheck (--force)
pnpm lint # turbo run lint
pnpm test # turbo run test (unit)
pnpm ci # lint + typecheck + test + build
# Integration tests (require Docker; spin up a NATS server via Testcontainers)
pnpm --filter @nats-kit/core test:integrationChangesets drive versioning:
pnpm changeset # describe the change + pick a semver bump
pnpm version-packages # consume changesets, bump versions, write CHANGELOGsPublishing is tag-triggered and lockstep — see
.github/workflows/npm-publish.yml.
MIT — see LICENSE.