Releases: acrazing/html5parser
Releases · acrazing/html5parser
v3.0.0
Highlights
- Modernized the package build and release setup: migrated to
tsup, switched the package to ESM withtype: "module", added explicitexports, and renamed generated output files toindex.*. - Added AST-to-HTML serialization via
stringify(ast). - Added
setAttribute(tag, name, value)andremoveAttribute(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
safeHtmlAPI 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 ofhtml5parser.*.
Added
stringify(ast)for serializing parsed AST nodes back to HTML. (#13)setAttribute(tag, name, value)andremoveAttribute(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,
noscriptwithscriptingEnabled, andplaintextuntil EOF. (#33) - Completed void element handling, including legacy void-like tags and parser-specific doctype/comment node names. (#31)
- Removed unsafe
stylehandling together with the oldsafeHtmlAPI. (#32)
Verification
yarn typecheckyarn testyarn build
Full Changelog: 2.0.2...v3.0.0
v3.0.0-beta.1
Full Changelog: v3.0.0-beta.0...v3.0.0-beta.1
v3.0.0-beta.0
Full Changelog: 2.0.2...v3.0.0-beta.0
Update dependencies
2.0.2 fix(npm): upgrade deps to latest version