Release Notes
Full list of changes
Changed
• #1032 Replaced the topiary-core test and benchmark dependencies on the tree-sitter-json and tree-sitter-nickel grammar crates with dynamic loading via topiary-config.
• #1277 Small internal refactoring of the core formatting logic.
• #1172 Split out mdbook-manmunge into its own repository.
• #1174 Split out the Topiary Playground into its own repository.
• #1191 Split out the Topiary website into its own repository.
• #1226 Query files moved from queries/<lang>.scm to queries/<lang>/formatting.scm in preparation for language injection support. The old flat layout is still supported as a fallback.
• #1232 Rework topiary_core::ErrorSpan to handle QueryErrors as well as Node errors by introducing rootcause::Report
• #1249 Remove async calls and setup from format_nickel benchmark
• #1254 Topiary now gracefully skips formatting for unknown or unsupported injected languages instead of returning a fatal error, allowing files with unconfigured code blocks (like Markdown) to format successfully.
• #1267 Add initial injection support (JSON) for Rust
• #1270 Add initial languages.ncl Nickel contracts
• #1139 Added rootcause::Report handling in topiary-cli.
• #1283 Render Nickel parsing error diagnostics
• #1298 Update WIT formatter for tree-sitter-wit to v1.4
• #1303 Add bin/verify-documented-usage.sh --no-nix-shell flag
• #1306 Move topiary-cli configuration logic into its own module
• #1311 Use #set! directive for injection.language property
• #1328 #1335 Breaking: A relative grammar.source.path or queries.<name>.source.path in a configuration is now resolved against the directory of the languages.ncl that defined it, rather than against the working directory. A path accompanied by a git source is unaffected:it remains relative to the checkout root.
• #1335 Nickel's evaluation warnings, previously discarded, are now reported through Topiary's logger.
Fixed
• #1176 Increase the stack size to 4MiB in Windows builds.
• #1253 Handle linebreak preservation in OpenSCAD let chains
• #1255 Unpinned outdated wasm-bindgen dependency
• #1287 #1296 Various OCaml issues and improvements
• #1291 Improve warning for injection queries without content captures
• #1322 Improve error message when Topiary cannot find a query file
• #1325 Fix regression with --query value parsing in topiary format
• #1339 Handle edge cases in path resolution and cache query fetching
Added
• #1200 Build and deploy Topiary Docker images to ghcr.io.
• #1217 Add --check flag to topiary fmt for CI formatting verification.
• #1227 Add @append_empty_input_softline and @prepend_empty_input_softline captures, thanks to @BirdeeHub
• #1244 Add language injection support for injection languages known at query writing.
• #1254 Add Markdown formatting support with dynamic language injections for fenced code blocks (via the @injection.language capture).
• #1279 Added experimental formatting support for the Menhir language.
• #1299 Add QuerySource config fetching to topiary-config.
• #1312 Added bin/changelog.nu to automatically add entry to CHANGELOG.md
• #1315 Add rootcause-backtrace to cli
• #1314 Allow skipping of formatting stages
• #1266 Add @multi_line_string capture to format multi line strings in languages like Nix and Nickel that ignore indentation common to all lines of a multi line string. And use @multi_line_string to add multi line string formatting to the Nickel formatter.
• #1330 Add a new feature flag on the topiary-core crate to enable the log dependency; this feature flag is enabled by default. Thanks to @GrandChaman.
Removed
• #1217 The check alias for the check-grammar subcommand, to avoid confusion with topiary fmt --check.
Install topiary-cli 0.8.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/topiary/topiary/releases/download/v0.8.0/topiary-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/topiary/topiary/releases/download/v0.8.0/topiary-cli-installer.ps1 | iex"
Download topiary-cli 0.8.0