chore: version packages#9
Merged
Merged
Conversation
c1bbb79 to
9cf8a1b
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
9cf8a1b to
c3b9b3a
Compare
c3b9b3a to
4d69397
Compare
4d69397 to
9bc947d
Compare
9bc947d to
170c2dc
Compare
170c2dc to
dd796db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@vellum-docs/cli@0.3.0
Minor Changes
2a9986c: Add
vellum build --watchwith per-template invalidationEdit a template or a source file and Vellum re-renders only the output files affected by the change. A docs project that wires
vellum build --watchalongside the host's dev server (Next.js, Mintlify, etc.) no longer needs a restart loop to see TSDoc edits.How invalidation works
Templates are instrumented while rendering. The
symbol(),symbols(), andmodule()globals record what each.velfile actually read:symbol(id)- the looked-upSymbolId,module(path)- the module path,symbols(query)- the verbatim query and the resulting ids.On a source-file change, Vellum diffs the file's old vs new symbols (source-position-insensitive content hash) and re-renders templates whose recorded reads intersect the diff. Added symbols are re-matched against each template's prior queries so a new
symbols({ tag: 'foo' })result triggers the right renders.Template edits re-render only that template. Config changes tear down the watcher and re-prime. Render and extract errors log and keep the previous output on disk - the watcher stays alive.
API changes (minor - pre-1.0)
TemplateEngine.renderreturnsRenderResult, notstring. Custom engines update the return shape:SymbolIndexgainssymbolsByFileandremoveByFile. Custom index implementations need both.InMemorySymbolIndexnow tracks per-file provenance viaSymbol.source.file.matchesQuery(sym, query)is exported from@vellum-docs/core- the exact predicateInMemorySymbolIndex.symbols()uses, reusable by tooling that needs to test a single symbol against a query.New exports (
@vellum-docs/core)TemplateReads,createTemplateReads()SymbolDiff,diffSymbols,hashSymbol,mergeDiffs,emptyDiff,isEmptyDiffDependencyGraphVellum.extractLanguage,Vellum.renderTemplate,Vellum.listTemplatesNew exports (
@vellum-docs/cli)runWatch,WatchCommandOptionsWatcher details
File watching uses chokidar v4 with Nuxt-style granular filtering:
node_modules,.git,.turbo,dist,build,coverage, and the resolvedoutDirare ignored anywhere in the tree, even if a user'ssources[lang].includewould otherwise cover them. Events are debounced 100ms;awaitWriteFinishhandles editor save races.Known tradeoff
Per-file TS extraction isn't meaningful in isolation (cross-file type graph), so
extractLanguagere-runs the extractor over the whole program on each batch. Invalidation still narrows the render set - which is what dominates latency for a typical docs project - but we don't yet skip extraction for unchanged files beyond the existing content-hash cache.Patch Changes
3840674: Refactor CLI to citty + consola
Replaced hand-rolled argv parsing and
console.logwith two unjs libraries:vellum --helpandvellum build --helpnow produce consistent typed output instead of a static string.success,info,warn,error) with a uniform[vellum]prefix.No breaking CLI surface changes —
vellum build,--watch,--config,--cwd,--no-strictall behave identically.--no-strictnow comes from citty's boolean-negation convention instead of being parsed by hand.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
@vellum-docs/core@0.3.0
Minor Changes
2a9986c: Add
vellum build --watchwith per-template invalidationEdit a template or a source file and Vellum re-renders only the output files affected by the change. A docs project that wires
vellum build --watchalongside the host's dev server (Next.js, Mintlify, etc.) no longer needs a restart loop to see TSDoc edits.How invalidation works
Templates are instrumented while rendering. The
symbol(),symbols(), andmodule()globals record what each.velfile actually read:symbol(id)- the looked-upSymbolId,module(path)- the module path,symbols(query)- the verbatim query and the resulting ids.On a source-file change, Vellum diffs the file's old vs new symbols (source-position-insensitive content hash) and re-renders templates whose recorded reads intersect the diff. Added symbols are re-matched against each template's prior queries so a new
symbols({ tag: 'foo' })result triggers the right renders.Template edits re-render only that template. Config changes tear down the watcher and re-prime. Render and extract errors log and keep the previous output on disk - the watcher stays alive.
API changes (minor - pre-1.0)
TemplateEngine.renderreturnsRenderResult, notstring. Custom engines update the return shape:SymbolIndexgainssymbolsByFileandremoveByFile. Custom index implementations need both.InMemorySymbolIndexnow tracks per-file provenance viaSymbol.source.file.matchesQuery(sym, query)is exported from@vellum-docs/core- the exact predicateInMemorySymbolIndex.symbols()uses, reusable by tooling that needs to test a single symbol against a query.New exports (
@vellum-docs/core)TemplateReads,createTemplateReads()SymbolDiff,diffSymbols,hashSymbol,mergeDiffs,emptyDiff,isEmptyDiffDependencyGraphVellum.extractLanguage,Vellum.renderTemplate,Vellum.listTemplatesNew exports (
@vellum-docs/cli)runWatch,WatchCommandOptionsWatcher details
File watching uses chokidar v4 with Nuxt-style granular filtering:
node_modules,.git,.turbo,dist,build,coverage, and the resolvedoutDirare ignored anywhere in the tree, even if a user'ssources[lang].includewould otherwise cover them. Events are debounced 100ms;awaitWriteFinishhandles editor save races.Known tradeoff
Per-file TS extraction isn't meaningful in isolation (cross-file type graph), so
extractLanguagere-runs the extractor over the whole program on each batch. Invalidation still narrows the render set - which is what dominates latency for a typical docs project - but we don't yet skip extraction for unchanged files beyond the existing content-hash cache.Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.@vellum-docs/engine-nunjucks@0.3.0
Minor Changes
2a9986c: Add
vellum build --watchwith per-template invalidationEdit a template or a source file and Vellum re-renders only the output files affected by the change. A docs project that wires
vellum build --watchalongside the host's dev server (Next.js, Mintlify, etc.) no longer needs a restart loop to see TSDoc edits.How invalidation works
Templates are instrumented while rendering. The
symbol(),symbols(), andmodule()globals record what each.velfile actually read:symbol(id)- the looked-upSymbolId,module(path)- the module path,symbols(query)- the verbatim query and the resulting ids.On a source-file change, Vellum diffs the file's old vs new symbols (source-position-insensitive content hash) and re-renders templates whose recorded reads intersect the diff. Added symbols are re-matched against each template's prior queries so a new
symbols({ tag: 'foo' })result triggers the right renders.Template edits re-render only that template. Config changes tear down the watcher and re-prime. Render and extract errors log and keep the previous output on disk - the watcher stays alive.
API changes (minor - pre-1.0)
TemplateEngine.renderreturnsRenderResult, notstring. Custom engines update the return shape:SymbolIndexgainssymbolsByFileandremoveByFile. Custom index implementations need both.InMemorySymbolIndexnow tracks per-file provenance viaSymbol.source.file.matchesQuery(sym, query)is exported from@vellum-docs/core- the exact predicateInMemorySymbolIndex.symbols()uses, reusable by tooling that needs to test a single symbol against a query.New exports (
@vellum-docs/core)TemplateReads,createTemplateReads()SymbolDiff,diffSymbols,hashSymbol,mergeDiffs,emptyDiff,isEmptyDiffDependencyGraphVellum.extractLanguage,Vellum.renderTemplate,Vellum.listTemplatesNew exports (
@vellum-docs/cli)runWatch,WatchCommandOptionsWatcher details
File watching uses chokidar v4 with Nuxt-style granular filtering:
node_modules,.git,.turbo,dist,build,coverage, and the resolvedoutDirare ignored anywhere in the tree, even if a user'ssources[lang].includewould otherwise cover them. Events are debounced 100ms;awaitWriteFinishhandles editor save races.Known tradeoff
Per-file TS extraction isn't meaningful in isolation (cross-file type graph), so
extractLanguagere-runs the extractor over the whole program on each batch. Invalidation still narrows the render set - which is what dominates latency for a typical docs project - but we don't yet skip extraction for unchanged files beyond the existing content-hash cache.Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
@vellum-docs/extractor-typescript@0.3.0
Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
@vellum-docs/language-server@0.3.0
Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
@vellum-docs/profile-markdown@0.3.0
Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
@vellum-docs/profile-mintlify@0.3.0
Patch Changes
ad1aa14: Add
cellfilter +TypeString.onelinefor cell-safe renderingEvery adopter was hand-rolling the same 5-filter escape chain when dropping types or summaries into markdown table cells:
Two additions collapse that:
TypeString.oneline?: string- populated at extraction time with the whitespace-collapsed form oftext. Omitted when equal totext(single-line case). Fixes the\n+ indentation problem at source, before any template filter runs.cellfilter (profile-routed) - accepts aTypeString, plain string, or null. Collapses whitespace as defence-in-depth, routes through the profile's newcell(value, ctx)method, which wraps in a code span and escapes|. Works for anything cell-bound, not just types.Before:
After:
Schema additions (additive)
TypeString.oneline?: stringRendererProfile.cell(value: string, ctx: RenderContext): stringExisting extractors keep working - when
onelineis absent the filter falls back to.text. Existing profiles get the new method implemented inMarkdownProfileandMintlifyProfile; third-party profiles must add acellimplementation.Out of scope
jsx-propandfencedcontexts from the original request. Neither has recurring template pain today; defer until they do.6503a35: Philosophy audit fixes - strict-by-default, dead schema cleanup
An audit against the newly-written PHILOSOPHY.md surfaced four gaps. This changeset closes them.
Strict template rendering is now on by default. Principle 11 ("fail loudly at build time") was being violated by
throwOnUndefined: false- a template with a typo ({{ fn.doc.summaryy }}instead offn.doc.summary) silently rendered as empty string, and the docs shipped with a blank section. TheNunjucksEnginenow defaults to strict rendering: any output of an undefined value throws, which bubbles to a non-zero build exit.Opt-out paths, for the rare cases where silent fallback is wanted during migration:
new NunjucksEngine({ strict: false }).vellum build --no-strict.This is a behavior change. Templates that relied on silent-empty for undefined values will now fail. Typical patterns that are still safe:
{% if sym.members %},{{ sym.doc.summary }}(empty string is defined),{% for m in sym.members or [] %}. The patterns that will now break are the ones you wanted to know about anyway.Schema cleanup. Three dead schema fields removed - they were defined but never populated by any extractor, violating principle 7 ("80% case defines the schema"):
Symbol.signatureResolved?: string- removed.Member.kindvalues'index'and'call'- removed from the union. Can be added back with implementation when a TS call/index-signature extractor lands or a language that needs them ships.Docs drift fixes. ARCHITECTURE.md referenced a
{{ str | tsdoc }}filter that never existed; replaced with{{ sym | summary }}(which does). Principle 2 in PHILOSOPHY.md now explicitly distinguishes "pattern-aware" (OK) from "language-idiosyncratic" (not OK), soSymbol.discriminator?is consistent with the stated rule.Updated dependencies [2a9986c]
Updated dependencies [ad1aa14]
Updated dependencies [6503a35]
vellum-example-basic@0.0.8
Patch Changes
vellum-example-nextjs@0.0.8
Patch Changes