feat(kitchen): add a frontmatter key registry and deprecate servings, yield and yields #268
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!268
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/frontmatter-key-registry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR 2a of the DX plan (
.notes/backlog/plan-dx-et-aides-ecriture.md, § 1A). Builds on #267 (merge ofmainintodev/1.6): merge #267 first, the diff then reduces to this PR's own commit.What changes
FRONTMATTER_KEYS(src/frontmatter.ts), the one registry of the frontmatter keys Gram gives a meaning to ({ key, role, value, example, deprecated? }), withfrontmatterKey()andcanonicalFrontmatterKeys().DEPRECATED_FRONTMATTER_KEY(warning, so it failsgram check --strict; noloc,data: { key, suggestion }), raised forservings,yieldandyields, even next to their canonical key (which still wins).enandfr(frontmatter.keys.*,frontmatter.values.*), plusrenderer.lastUpdated.lastUpdatedshows as "Updated …" / "Mis à jour le …"; theservings/yield/yieldsfallbacks are tagged@remove-in: 2.0.0.deprecations.yaml:frontmatter-servings-yield, the firstsyntax-layer deprecation (warningCode,migration: manual).@useline that imports it (data.specifiernames the module; a transitive import is anchored in the file that writes it), likeDENSITY_OVERRIDE_SHADOWED.warn-025-deprecated-frontmatter-keyandmod-034-deprecated-frontmatter-key-in-module(no other golden changes).document-structure.mdx, alanguage(BCP 47) section, the deprecation caution, an entry inhow-to/deprecations.mdx;warnings.mdxpicks the code up from its generated table.Checks
bun test(4027 pass),bun run conformance(144/144, 24/24),bun run fuzz --iterations 50000(0 signature),deprecations:check,check-changesets, typecheck, biome.Known limits