Skip to content

v.1.6.0

Choose a tag to compare

@abiwab abiwab released this 01 Dec 13:57
· 23 commits to main since this release

New features

  • CLI: gram check now matches editor diagnostics and adds automation options:
    • --fix applies safe fixes in place (~{15%min} → ~{15 min}, spaced composites, deprecated frontmatter keys, missing blank lines).
    • --format json outputs a versioned JSON report for CI and AI agents.
    • --strict now also flags ingredients missing from the database (use --skip-db to opt out).
  • Parser & Kitchen: Common writing mistakes now raise actionable warnings with editor quick fixes (REFERENCE_TO_INGREDIENT for &flour on raw ingredients, % in ~{15%min} / @flour{200%g}, and #oven{180°C} → ^oven{180°C}).
  • Docs & Playground: Redesigned dark theme with a softer charcoal palette and improved contrast.
  • Kitchen & Renderer: Unified frontmatter key registry (FRONTMATTER_KEYS, including language), cleaner lastUpdated display in HTML recipes, and new DEPRECATED_FRONTMATTER_KEY warning.
  • Language Server: Configurable linting and new writing checks:
    • Tune rules in .gram/config.yaml (lint.rules) or silence per step with // gram-ignore CODE.
    • Adds LOST_INGREDIENT, MERGED_STEP_LINE, SUSPECT_INGREDIENT_NAME, and UNREAD_FRONTMATTER, plus a quick fix to add unknown ingredients to ingredients.yaml.
    • Exposes the shared lint layer via the experimental @gram-lang/modules/lint entry point.
  • Language Server: New editing aids across all LSP editors — frontmatter completion and hover, completion for existing cookware/timers/tracks (#, ^, ~, ~_), Ctrl+Click and export completion on @use, and symbol occurrence highlighting.
  • Language Server & CLI: Standalone gram-language-server binary and gram lsp command for any LSP editor (Neovim, Helix, Emacs, Zed, Sublime Text), with initializationOptions: { views: false } to disable preview rendering in editors without side panels.
  • Parser & Kitchen: Component aliases must now immediately follow : (@dry white wine:wine{10ml}); : is now ordinary punctuation instead of swallowing text, and spaced aliases raise ALIAS_AFTER_BLANK (auto-fixable with --fix).
  • Parser: Also ships syntaxes/gram.tmLanguage (plist) so Sublime Text highlights .gram files out of the box.
  • CLI: New gram view <file> --serve command for live browser preview from any editor, reloading automatically on save (supports --port, --no-open, and --view).

Bug fixes and improvements

  • Analyzer: With mass standardization off, percentages and ratios targeting mass-based ingredients now resolve and merge cleanly in sections and shopping lists (fixing false RELATIVE_QUANTITY_UNKNOWN_MASS warnings).
  • CLI: Multi-file commands (check, format, build, shop, db sync, suggest --pattern) now accept folder paths, and gram suggest now includes recipes without ## sections.
  • Format: Multiple blank lines after the frontmatter now collapse to a single blank line.
  • Parser: Frontmatter values now support YAML quote escapes ('', \", \\) and commas inside quoted inline list items.
  • Kitchen: @&flour now matches @Flour{100 g} case-insensitively instead of raising UNDEFINED_REFERENCE.
  • Renderer: Baker's percentages in ingredient and shopping lists now render as subtle text with an explanatory tooltip.
  • Modules, CLI & Language Server: Hardened @use paths across platforms — rejects backslashes (MODULE_SPECIFIER_INVALID) and null bytes, allows folders starting with .. (e.g. ..notes/), and confines editor @use completion to the project.

Deprecated

  • @gram-lang/kitchen & @gram-lang/renderer: Frontmatter keys servings, yield, and yields will be removed in 2.0.0. Use portions instead of servings, and makes instead of yield or yields.
  • @gram-lang/language-server: Omitting initializationOptions.views to receive legacy gram/previewUpdated notifications will be removed in 2.0.0. Pass views: true or views: false explicitly.