Skip to content

Release v0.8.0 — Release Notes

Choose a tag to compare

@github-actions github-actions released this 23 Sep 23:19
· 974 commits to main since this release

TopMark v0.8.0

Release date: 2025-09-24
Breaking changes: None

🚀 Highlights

  • C-style block header support — New CBlockHeaderProcessor enables /* … */ headers (with per-line *) and tolerant directive detection.
  • Python stub files — .pyi now use the PoundHeaderProcessor (# style) with sensible defaults (no shebang).

✨ Added

  • Processors
    • CBlockHeaderProcessor (/* … */) with tolerant topmark: directive detection (accepts * topmark:… or bare topmark:…).
    • File type registrations: CSS, SCSS, Less, Stylus, SQL, Solidity.
  • File types
    • python-stub (.pyi) bound to PoundHeaderProcessor (shebang disabled; blank after header enforced).
  • Tests
    • Comprehensive test_cblock.py: insertion (top & offset), tolerant detection, idempotency, CRLF preservation, strip (auto/explicit span), and parametric checks across all registered extensions.

🔧 Changed

  • Typing hardening (non-functional):
    • Widespread strict typing across pipeline/, cli/, cli_shared/, remaining src/ modules, and tools/.
    • Adopt postponed annotations; move type-only imports under TYPE_CHECKING.
    • Introduce TopmarkLogger annotations; add precise return/locals typing and import hygiene for Pyright strict mode.

🐛 Fixed

  • CLI processors command:
    • Treat filetypes as dicts in --long + Markdown/default renderers to avoid AttributeError when running:
      topmark processors --format markdown --long
  • Typing:
    • Resolve a redefinition error caused by a misplaced annotation in types code.

📚 Docs

  • README.md — Mention block (/* … */) alongside line (#, //) comment styles; add CSS example.
  • docs/usage/filetypes.md — Expand processor table with modules and registered file types; document CBlockHeaderProcessor.

🧹 Chore

  • Add standard TopMark headers to files in typings/.
  • Keep pre-commit/dev tooling in sync (see commit history for exact bumps).

⚙️ Compatibility

  • No breaking changes. Existing configurations continue to work. New languages can opt-in to the block processor where applicable.

⬇️ Install / Upgrade

pip install -U topmark
# or
uv pip install --system -U topmark

If you run into issues or have ideas for additional languages to support, please open an issue or PR. Happy marking! ✨