Breaking Changes
- The module is now ESM only #2381
- CommonJS
require()is no longer supported. Useimportinstead. - The minimum Node.js version is now 20.19.0.
- CommonJS
- Dependencies have been bumped to their latest major versions:
domhandlerv6,domutilsv4,domelementtypev3,entitiesv8.
Features
- Added
WebWritableStreamfor the Web Streams API, enabling direct piping fromfetch()response bodies into the parser #2376
Bug Fixes
- Comments now accept
--!>as a closing sequence per the HTML spec, and<!-->is recognized as an empty comment in HTML mode #2382 - XML processing instructions (
<?xml ... ?>) now require the full?>closing sequence instead of just>#2382 - Fixed
reset()not clearingisSpecialandsequenceIndexstate, which could cause incorrect parsing after reuse #2382 - Fixed XML comment parsing:
<!-->is no longer treated as a complete comment inxmlMode#2383
Other Changes
- Expanded README with full API reference, parser options, events, and practical examples #2384
New Contributors
Full Changelog: v10.1.0...v11.0.0