hast-util-to-html is a utility that serializes a HAST syntax tree into an HTML string using a `toHtml(tree[, options])` function. It is useful when you need serialized HTML output for tools or integrations that do not work with syntax trees, with options to control formatting and output size.
Project status
- The repo appears actively maintained, with updates including a recent push on 2025-02-19 (9.0.5) and additional updates in 2024 (9.0.4, 9.0.3).
- Apparent update cadence is roughly quarterly based on the visible sequence (2024-09-16, 2024-12-13, 2025-02-19), though this is only what the provided recent history shows.
AI summary generated Today
Recent updates
9.0.5
2/19/2025Release 9.0.5 updates the dependency property-information and refreshes project metadata/docs. The provided release notes only mention “Update property-information”, without detailing any behavioral or compatibility impact.
Breaking9.0.4
12/13/2024Release 9.0.4 contains a fix for how boolean attributes are serialized when the provided value is a string. It also includes general refactoring/code-style changes.
9.0.3
9/16/2024Release 9.0.3 makes a small change related to optional tag omission for the HTML `head` element. Specifically, it adjusts when the `head` opening tag can be omitted, and the test suite expectations were updated accordingly.
Breaking9.0.2
8/27/2024Release 9.0.2 primarily adds TypeScript declaration maps support and removes an unused dependency. The shipped code changes are largely documentation-level JSDoc import refactors and build metadata updates, with no obvious runtime logic changes in the provided diff.
9.0.1
4/3/2024Release 9.0.1 is a small performance-focused patch with no documented API or behavioral changes. The diff primarily hoists a comment-safety regex and introduces cached constants for entity-encoding subsets to reduce allocations during serialization.
9.0.0
8/6/2023hast-util-to-html 9.0.0 is a major release that modernizes the package for Node.js 16+, switches to ESM exports, and updates how character references are configured. The bulk of the diff is internal typing and dependency upgrades, but there are also real serialization behavior changes around HTML spec handling of certain elements.
Breaking8.0.4
1/8/2023Release 8.0.4 notes only mention documentation improvements and a code-style refactor. The actual diff shows a much larger internal refactor of the HTML serialization pipeline, plus dependency changes that can affect output and TypeScript types.
8.0.3
10/30/2021Release 8.0.3 makes a small type-related adjustment and bumps a couple of dependencies. The release notes only say “Fix types,” but the diff shows a specific change to the imported options type used for entity serialization, plus dependency updates.
8.0.2
8/31/2021Release 8.0.2 is described as a small fix for serialization of unquoted, tight, self-closing elements. The code diff shows an adjustment to how spaces are inserted before the `/>` close in certain tight/self-closing scenarios, along with dependency version bumps.
8.0.1
7/20/2021Release 8.0.1 contains a minimal note: it claims to fix an internal circular dependency. The actual diff shows a larger internal refactor, including moving the main node-dispatch/serialization logic into a renamed module, plus at least one behavior change in `text` serialization logic.
BreakingSecurity