Skip to content

supdoc v0.4.0

Choose a tag to compare

@aidenzepp aidenzepp released this 05 Nov 20:07
· 88 commits to main since this release
3eabd1a

supdoc v0.4.0 adds trust, code-block checking for seven more languages, links to keys in JSON, YAML and TOML files, and supdoc upgrade. The lockfile format is unchanged. The JSON output gains fields and two new commands' schemas; nothing is removed. Everything shipped is in the v0.4.0 milestone.

Upgrading

  • Links into JSON, YAML and TOML files become tracked. They were left untracked before. Each one shows as link-new until it is recorded, so run supdoc update --yes once after upgrading, or check fails (#245).
  • A checkout's [limits] can't raise a ceiling unless you trust it. A raise or 0 in an untrusted checkout is held back, and supdoc config show says so. The flag and environment variable always win (#348).
  • from(...) or uses(...) starting with // is refused as climbing out of the project, like any path outside the root (#350).

Trust

  • supdoc trust records that a checkout may run tools that load its own code; --revoke removes it, and SUPDOC_TRUST=1 grants it for one run. No file in the checkout can grant it (#237).
  • In a trusted checkout, clippy lints Rust blocks against the project's build (#238). pylint (Python), prettier (TypeScript, JavaScript, JSON, YAML and Markdown) and eslint (TypeScript and JavaScript) can be selected in a language's table; they run only in a trusted checkout and are found in the project's .venv/bin or node_modules/.bin first (#239).
  • Custom formatter and linter commands: formatter = { command = [...] } and linter = { command = [...], diagnostics = "gnu" } run only in a trusted checkout (#240).

More code-block languages

  • TypeScript and JavaScript (biome), Go (gofmt, go vet in a module supdoc owns), Markdown (rumdl), JSON (biome), YAML (yamlfmt, yamllint) and TOML (tombi, offline) blocks are formatted and linted without trust (#242, #243, #244, #246).
  • Code blocks in Python docstrings, JSDoc and TSDoc comments (including a fenceless @example) and Go doc comments are checked (#247).
  • fragment(<kind>) marks a block that shows statements, an expression, object entries or JSX children, and its tools check it in a fixed frame instead of failing to parse (#281).

Links to data files

  • A link can name one key: [version](Cargo.toml#package.version), [test job](.github/workflows/ci.yml#jobs.test). Arrays use 0-based indices; a . or ~ in a key is written ~1 or ~0. [limits] max-key-segments bounds a hostile file (#245).

supdoc upgrade

  • supdoc upgrade [VERSION] reinstalls supdoc through cargo install --locked, showing the plan first and acting only with --yes. It works for cargo installs only (#241).

Hardening

  • Every path supdoc builds from file content (the lockfile, config, doc links, from(...)/uses(...), git metadata, tool configs and output) goes through a validated type, and every write, rename or delete is checked for containment just before it happens (#336).
  • [limits] max-file-size caps every file supdoc reads (#296).

Also

  • The README is rewritten as a front page; detail moved to each command's --help (#299).
  • Tests that depended on machine speed no longer fail under load (#322).

Full changelog: v0.3.1...v0.4.0

Binaries (added 2026-11-06). macOS and Linux archives built from this tag by the release workflow are attached, with SHA256SUMS and build-provenance attestations (gh attestation verify <archive> -R aidenzepp/supdoc). Windows binaries, and supdoc upgrade for a downloaded binary, start at v0.5.0, so a v0.4.0 binary is upgraded by downloading a newer one.