Notes for coding agents working in this repository.
- This is a TypeScript/npm monorepo using npm workspaces.
- Prefer the Node version from
.nvmrc(nvm use; currently Node 24.6.0). Published packages support Node >= 20. - Install dependencies with
npm ci.
-
Build everything with:
npm run build
This runs
npm run clean, builds all workspaces that have abuildscript, then runs the roottsc. -
After building, the CLI entry point is
dist/index.js, for example:node dist/index.js --version node dist/index.js --help
-
For live rebuild/re-run while developing renderer output, use
npm start -- "<quicktype args>".
-
Vitest runs the standalone unit and regression tests:
npm run test:unit npm run test:unit:watch
-
The cross-language fixture runner remains
script/test, exposed as:npm run test:fixtures
-
npm testruns the Vitest suite followed by the fixture suite. -
The full suite runs all fixtures and needs external language toolchains for many targets (
dotnet, Java/Maven, Go, Rust, Python/mypy, PHP, Ruby, Kotlin, Scala, Elixir, etc.). On a machine without those tools, plainnpm testwill fail when it reaches the first missing toolchain. -
For local focused testing, use fixture filters. Fixture names are in
test/languages.tsandtest/fixtures.ts; comma-separated fixture groups are supported:QUICKTEST=true FIXTURE=javascript npm run test:fixtures QUICKTEST=true FIXTURE=typescript npm run test:fixtures -- test/inputs/json/samples/pokedex.json CPUs=2 QUICKTEST=true FIXTURE=javascript npm run test:fixtures
QUICKTEST=trueskips the large miscellaneous JSON input set. Extra arguments after--are sample files or directories to run. -
GitHub Actions uses the same pattern, e.g.
QUICKTEST=true FIXTURE=${{ matrix.fixture }} npm run test:fixtures, after installing toolchain dependencies for each fixture group in.github/workflows/test-pr.yaml.
The following commands were run successfully in this workspace:
npm ci
npm run build
node dist/index.js --version
CPUs=2 QUICKTEST=true FIXTURE=javascript npm run test:fixtures
QUICKTEST=true FIXTURE=typescript npm run test:fixtures -- test/inputs/json/samples/pokedex.jsonAlso observed: npm test without fixture filters started the full 70-fixture suite and failed on this machine because dotnet is not installed. npm run lint currently fails because ESLint cannot find a configuration file.