htmlparser2 breaking changes
htmlparser2 12.0.0 (March 20, 2026) is its newest release with breaking changes, 11 of them. The first: Tag names inside svg are now case-adjusted in htmlparser2 12.0.0. Every breaking API change we have recorded in htmlparser2 on npm: 20 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 12.0.0, released March 20, 2026. Source repository
Its 11.0.0 release requires Node.js 20.19.0 or later. Node.js end of life dates.
- From 11.0.0 to 12.0.0: 11 breaking changes in 1 version.
- From 10.0.0 to 12.0.0: 18 breaking changes in 2 versions.
htmlparser2 12.0.0 breaking changes
- Behavior changed
Names such as foreignObject and clipPath are case-adjusted per spec, so tag name strings change. github.com - Behavior changed
These tags are now raw-text tags per the WHATWG spec, so code relying on parsed child content inside them will see different output. github.com - Behavior changed
Textarea entities are decoded like title already was, so text output of textarea content changes. github.com - Behavior changed
A second form inside an open form is now dropped, changing the parsed tree. github.com - Behavior changed
Opening h1 to h6 closes other headings and opening a closes a previous a, changing the resulting tree. github.com - Behavior changed
Code that expected </> to appear as text will no longer receive it. github.com - Behavior changed
Previously silently dropped <?...> and non-DOCTYPE <!...> now appear as comment nodes in HTML mode. github.com - Behavior changed
The slash is ignored per spec unless recognizeSelfClosing is enabled, so content after a self-closing script or style changes. github.com - Behavior changed
<image> is now reported as <img> in HTML mode, changing tag names users receive. github.com - Behavior changed
CDATA sections inside svg and math content are parsed as text instead of CDATA handling. github.com - Signature changed
Tokenizer.constructor
Was constructor({xmlMode, decodeEntities}: {xmlMode?: boolean; decodeEntities?: boolean;}, cbs: Callbacks); now constructor({xmlMode, decodeEntities, recognizeSelfClosing}: {xmlMode?: boolean; decodeEntities?: boolean... npmjs.com
htmlparser2 11.0.0 breaking changes
- Removed
The module is now ESM only, so CommonJS require() is not supported in legacy environments. Use import instead. github.com - Removed
createDomStream
Use createDocumentStream instead. npmjs.com - Removed
parseDOM
The deprecated parseDOM function was removed. Stop calling it. npmjs.com - Removed
Parser.done
Parser.done was removed in htmlparser2 11.0.0 npmjs.com - Removed
Parser.parseChunk
Parser.parseChunk was removed in htmlparser2 11.0.0 npmjs.com - Configuration changed
The minimum supported Node.js version is now 20.19.0. github.com - Configuration changed
Dependencies domhandler, domutils, domelementtype and entities moved to new major versions, which may affect code relying on their APIs. github.com
htmlparser2 10.0.0 breaking changes
- Removed
The writable stream import path was simplified, so code importing the old path must switch to the new one. The release notes do not name the new path. github.com - Renamed
lib/WritableStream:WritableStream
Use WritableStream instead. npmjs.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.