Skip to content

Releases: acrazing/html5parser

v3.0.0

15 May 22:53

Choose a tag to compare

Highlights

  • Modernized the package build and release setup: migrated to tsup, switched the package to ESM with type: "module", added explicit exports, and renamed generated output files to index.*.
  • Added AST-to-HTML serialization via stringify(ast).
  • Added setAttribute(tag, name, value) and removeAttribute(tag, name) helpers for updating tag attributes before serializing.
  • Tightened parser behavior around HTML5 text-element modes and void elements.

Breaking Changes

  • Removed the unsafe safeHtml API from core. HTML/CSS sanitization should be handled by a dedicated sanitizer.
  • The package is now ESM-first and uses explicit package exports; CommonJS/deep-import consumers may need to update their imports.
  • Distribution filenames now use index.* instead of html5parser.*.

Added

  • stringify(ast) for serializing parsed AST nodes back to HTML. (#13)
  • setAttribute(tag, name, value) and removeAttribute(tag, name) helpers. (#13)
  • Public API documentation/comments for exported interfaces.
  • GitHub Actions workflows for CI and npm releases.

Fixed

  • Implemented HTML5 text-element parsing modes for RCDATA, RAWTEXT, script data, noscript with scriptingEnabled, and plaintext until EOF. (#33)
  • Completed void element handling, including legacy void-like tags and parser-specific doctype/comment node names. (#31)
  • Removed unsafe style handling together with the old safeHtml API. (#32)

Verification

  • yarn typecheck
  • yarn test
  • yarn build

Full Changelog: 2.0.2...v3.0.0

v3.0.0-beta.1

15 May 22:49

Choose a tag to compare

v3.0.0-beta.1 Pre-release
Pre-release

v3.0.0-beta.0

15 May 21:13

Choose a tag to compare

v3.0.0-beta.0 Pre-release
Pre-release

Full Changelog: 2.0.2...v3.0.0-beta.0

Update dependencies

11 May 06:47

Choose a tag to compare

2.0.2

fix(npm): upgrade deps to latest version