Build, Test & Lint

The fast feedback loop for TypeScript projects is build, test, and lint. All three commands run inside the Putnami project graph, so dependency order and cache reuse stay consistent across the workspace.

Build

Build compiles TypeScript packages for distribution with Bun and TypeScript declaration output.

Default build phases:

  1. generate - pre-build hooks and generated artifacts
  2. transpile - JavaScript package output in output/lib
  3. types - declaration output in output/types

compile is opt-in and creates standalone executable output.

putnami build .
putnami build . --compile
putnami build . --compile --compile-target bun-linux-x64

Common options:

  • --generate, --transpile, --types, --compile to select phases
  • --target <bun|browser|node>
  • --bundle <standalone|local|none>
  • --sourcemap <inline|external|none>
  • --minify <boolean>
  • --fast to skip type generation
  • --clear to wipe the output folder first

Test

Tests run through Bun's test runner.

putnami test .
putnami test . --coverage

Behavior:

  • discovers **/*.{test,spec}.{ts,tsx,js,jsx}
  • returns SKIP when no tests are found
  • produces JUnit output
  • can produce LCOV coverage

Useful options:

  • --timeout <ms>
  • --coverage
  • --coverage-threshold <pct>
  • --test-name-pattern <regex>
  • --update-snapshots
  • --pass-with-no-tests <boolean>

Lint

Lint uses Biome for format and static checks.

putnami lint .
putnami lint . --fix false

Config resolution:

  1. project biome.json
  2. workspace root biome.json
  3. built-in config from @putnami/typescript