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
- Maintenance status: Not clearly actively maintained as of today. The latest upstream update is from 2025-02-19, about 16 months ago, and there are no newer updates shown since then.
- Update cadence: Earlier updates were more frequent (for example, 2024-04-03, 2024-08-27, 2024-09-16, 2024-12-13, then 2025-02-19). After 9.0.5 (2025-02-19), the update stream appears quiet.
AI summary generated
Recent updates
9.0.5
Release 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
Release 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
Release 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
Release 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
Release 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
hast-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
Release 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
Release 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
Release 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
Release 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