Last 12 weeks · 14 commits
1 of 6 standards met
Why In package mode (), each target kind's generated module replicates every consumer kind's + interface inline (so its dependent-hook context/hook are concretely typed). A change to a widely-consumed spec — , — therefore regenerates every kind that accepts it as a consumer: a one-field change (e.g. adding to the subscriber spec) produces a ~12-file diff. The shared module already established the fix: emit an import instead of replicating. What (package mode) no longer inlines the consumer /. instead emits, per consumer kind: import — local use in this module's / . re-export — the consumer's generated dependent hooks import / from this (target) module, so they must stay exported (an un-re-exported aliased import is TS2459). Inline (single-file) mode is untouched — still replicates. The consumer's own module already exports its spec as and FS as ; veil's per-file tsc () resolves the relative cross-module import, same as . Validation New unit tests (): package mode imports + re-exports and does not replicate; inline mode still replicates; no-consumer kinds emit nothing. Full green. Regenerated the entire vercel/api kind-type set with this build: shrinks ~1,575 lines (12 files), the hook typecheck stays green, and every rendered is byte-identical**. 🤖 Generated with Claude Code
Why In package mode (), each target kind's generated module replicates every consumer kind's + interface inline (so its dependent-hook context/hook are concretely typed). That means a change to a widely-consumed spec — , — regenerates every kind that accepts it as a consumer. A one-field change (e.g. adding to the subscriber spec) produces a ~12-file diff. The module already proved the fix: emit a shared import instead of replicating. What (package mode) no longer inlines the consumer /. Instead emits, per consumer kind: import — for local use in this module's / . re-export — so the consumer's generated dependent hooks keep importing / from this (target) kind's module, unchanged. Inline mode (single-file output) is untouched — it still replicates. The consumer's own module already exports its spec as and its FS as ; veil's per-file tsc () resolves the relative cross-module import, same as . Validation New unit tests (): package mode imports + re-exports and does not replicate; inline mode still replicates; no-consumer kinds emit nothing. Full green. Regenerated the entire vercel/api kind-type set with this build: shrinks ~1,575 lines (12 files), the hook typecheck stays green, and every rendered is byte-identical** (a spec-field change now touches only the consumer's own module). Stacks on the package-mode branch (needs it to exist). 🤖 Generated with Claude Code
Why inlines the kind-independent type declarations (the host APIs //, , , , /) into every generated . So a change to a shared type — or adding a kind (which grows the union on consumer kinds) — re-emits many/all of them. In the api repo this turned a single-field change into a 100-file PR. What Opt-in * (a path). When set, : writes the kind-independent declarations once to that module, and generates each per-kind / per-resource to import those symbols (relative specifier) instead of inlining them. The per-kind types (, , the union, , , , dependent-hook blocks) stay local. Hook files are unchanged — they still import // from . scaffolds the import too. When is unset, output is byte-identical to before (the shared consts were split but are concatenated in the same positions). Notes veil's per-file (, no tsconfig) resolves the relative cross-directory import, so no tsconfig/package wiring is needed. Validation Existing build suite passes (inline path unchanged); adds . Proven end-to-end against the api repo's kinds: veil-types 374 → 218 lines*, the shared module is emitted once, and 's typecheck passes. Rollout (separate, in vercel/api) Breaking for generated output, so: cut a veil release, bump + set in the api , and regenerate () in one PR — the per-kind shrink + import, and the shared module lands once.
Repository: vercel/veil. Description: A generic configuration management CLI tool. No more templates, just transforms Stars: 7, Forks: 4. Primary language: Go. Languages: Go (99.5%), Shell (0.4%), Makefile (0.1%). Latest release: v0.0.5 (1mo ago). Open PRs: 1, open issues: 0. Last activity: 1mo ago. Community health: 50%. Top contributors: vercel-eddie.