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:
generate- pre-build hooks and generated artifactstranspile- JavaScript package output inoutput/libtypes- declaration output inoutput/types
compile is opt-in and creates standalone executable output.
putnami build .
putnami build . --compile
putnami build . --compile --compile-target bun-linux-x64Common options:
--generate,--transpile,--types,--compileto select phases--target <bun|browser|node>--bundle <standalone|local|none>--sourcemap <inline|external|none>--minify <boolean>--fastto skip type generation--clearto wipe the output folder first
Test
Tests run through Bun's test runner.
putnami test .
putnami test . --coverageBehavior:
- discovers
**/*.{test,spec}.{ts,tsx,js,jsx} - returns
SKIPwhen 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 falseConfig resolution:
- project
biome.json - workspace root
biome.json - built-in config from
@putnami/typescript
Lint also refuses a test that hides a failure: .only( (and fit(), a
.skip( outside a guard (and xit(), and a .skipIf(, .if(, if,
case, && or ternary whose condition names flakiness or CI. A string key,
test['only'](, counts as .only(. Any other condition, in
skipIf(<condition>), an if, an && or a ternary, counts as a guard. A skip that stays on purpose carries
// putnami:allow-skip <reason> on its line or on a comment line just above,
and lint reports it as a warning. Set
"@putnami/typescript:lint": { "skip-guard": false } under options in
putnami.workspace.json to turn the guard off.
Lint also checks every relative link and anchor in the project's README.md
files and doc/ trees, and fails on one that does not resolve. Set
"lint": { "docs-links": false } under options in a project's
putnami.json to turn the check off for that project.