- Node.js >= 24
- pnpm >= 9
# Clone the repository
git clone git@github.com:newstack-cloud/celerity-node-sdk.git
cd celerity-node-sdk
# Install dependencies
pnpm install
# Set up git hooks for conventional commits
git config core.hooksPath .githooks
# Build all packages
pnpm run build
# Run unit tests
pnpm run test:unit:no-cov# Type checking across all packages
pnpm run typecheck
# Run tests in watch mode
pnpm test
# Lint
pnpm run lint
# Format
pnpm run format
# Clean build artifacts
pnpm run cleanUse --filter to target a specific package:
# Add a runtime dependency to a package
pnpm --filter @celerity-sdk/core add reflect-metadata
# Add a dev dependency to a package
pnpm --filter @celerity-sdk/core add -D @swc/core
# Remove a dependency from a package
pnpm --filter @celerity-sdk/core remove @swc/core
# Add a workspace dependency (reference another package in the monorepo)
pnpm --filter @celerity-sdk/core add @celerity-sdk/types@workspace:*
# Run a script in a specific package
pnpm --filter @celerity-sdk/core run build
pnpm --filter @celerity-sdk/core run testAll tests run globally across all packages via the root Vitest workspace. Coverage is included by default; use :no-cov variants to skip it.
# Unit tests with coverage (no Docker needed)
pnpm run test:unit
# Unit tests without coverage
pnpm run test:unit:no-cov
# Integration tests only with coverage (manages Docker lifecycle)
pnpm run test:integration
# Integration tests only without coverage (manages Docker lifecycle)
pnpm run test:integration:no-cov
# All tests with coverage (manages Docker lifecycle)
pnpm run test:all
# All tests without coverage (manages Docker lifecycle)
pnpm run test:all:no-cov
# Watch mode (unit tests only, no coverage)
pnpm testAll Docker-dependent commands (test:integration, test:all and their :no-cov variants) handle the full Docker Compose lifecycle automatically — starting services, running tests, and tearing down — so you never need to manage Docker manually.
You can pass filename patterns to target specific tests:
# Run only config package tests
pnpm run test:unit:no-cov config
# Run a specific test file
pnpm run test:unit:no-cov local-backend
# Run integration tests for a specific package
pnpm run test:integration:no-cov configTo manage Docker services manually for iterative development:
# Start services in the background
docker compose up -d --wait
# Run integration tests directly (services already running)
VITEST_INCLUDE_INTEGRATION=true vitest run tests/integration
# Stop services
docker compose down -v- Create
tests/integration/with test files and aglobal-setup.tsthat seeds/tears down test data - Update the package's
vitest.config.tsto conditionally include integration tests based onVITEST_INCLUDE_INTEGRATIONenv var:- When
true: addglobalSetup,testTimeout,hookTimeout, and serviceenvvars - When
false(default): addexclude: ["tests/integration/**", "node_modules/**"] - See
packages/config/vitest.config.tsfor the reference implementation
- When
This project uses conventional commits enforced by commitlint.
Format: type(scope): description
Types: feat, fix, build, revert, wip, chore, ci, docs, style, refactor, perf, test, instr, deps
Scopes: a package (types, common, config, core, bucket, queue, topic, datastore, sql-database, cache, serverless-aws, telemetry, cli, testing), or ci, repo or deps. commitlint.config.js holds the list.
Examples:
feat(core): add HTTP handler decorator support
fix(bucket): resolve S3 client configuration issue
chore: update TypeScript to 5.8