Skip to content

Add JS spec generator for codama-nodes link nodes#92

Merged
lorisleiva merged 1 commit into
mainfrom
loris/spec-generators-link-nodes
Jun 10, 2026
Merged

Add JS spec generator for codama-nodes link nodes#92
lorisleiva merged 1 commit into
mainfrom
loris/spec-generators-link-nodes

Conversation

@lorisleiva

Copy link
Copy Markdown
Member

This PR introduces a JS-driven spec generator under spec-generators/ that regenerates parts of codama-nodes from @codama/spec, mirroring the JS monorepo's @codama/fragments/RenderMap architecture. It covers the link-node category: each leaf node is emitted to codama-nodes/src/generated/link_nodes/, and the LinkNode union enum (plus its HasName dispatch) is generated from the flattened spec union. Hand-written link-node files shrink to test-only modules. The generator is a standalone pnpm project (tsup build, vitest, oxlint/oxfmt) wired into CI via a new job that runs lint, tests, and a generate + git diff --exit-code round-trip check.

This PR introduces a JS-driven spec generator under `spec-generators/` that regenerates parts of `codama-nodes` from `@codama/spec`, mirroring the JS monorepo's `@codama/fragments`/RenderMap architecture. It covers the link-node category: each leaf node is emitted to `codama-nodes/src/generated/link_nodes/`, and the `LinkNode` union enum (plus its `HasName` dispatch) is generated from the flattened spec union. Hand-written link-node files shrink to test-only modules. The generator is a standalone pnpm project (tsup build, vitest, oxlint/oxfmt) wired into CI via a new job that runs lint, tests, and a `generate` + `git diff --exit-code` round-trip check.

lorisleiva commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Merge activity

  • Jun 10, 2:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 10, 2:13 PM UTC: @lorisleiva merged this pull request with Graphite.

@lorisleiva lorisleiva merged commit 08d87f2 into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant