NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #233 most downloaded on npm
HTML parser and serializer.
Last release 5 months ago
19 Apr 2026
Release timing varies
gaps range from 2 weeks to 1.9 years
Most releases are documented
notes for 48 of 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
61 releases · first in 2013
chore(deps-dev): bump @eslint/js from 9.30.1 to 9.31.0 by @dependabot [bot] in #1546
Note truncated.
One column per quarter.
chore(deps): bump github/codeql-action from 3.28.15 to 3.28.16 by @dependabot [bot] in #1479
Full Changelog: v7.3.0...v8.0.0
Upgrade entities by @cardoso in #1410
Full Changelog: v7.2.1...v7.3.0
fix: export tree adapter types as namespace to support TS4.x by @43081j in #1313
Full Changelog: v7.2.0...v7.2.1
docs(readme): Fix CI badge by @fb55 in #765
<noframes> parsing by @nolanlawson in #1277Full Changelog: v7.1.2...v7.2.0
This release includes parse5 and parse5-parser-stream .
Nothing published for this version
This release is only for the parse5 module.
This release is only for the parse5 module.
</button> close <p> by @fb55 in #534Full Changelog: v7.0.0...v7.1.0
Welcome to parse5@7.0.0! ✨ This is a huge release with many changes, features and fixes.
Welcome to parse5@7.0.0! ✨ This is a huge release with many changes, features and fixes.
From an organisational perspective, the most important change is that parse5 is now maintained by a team, consisting of James (@43081j), Titus (@wooorm) and me (@fb55). We come from three projects that rely on parse5 — namely Cheerio, rehype, and Lit.
We need your support to continue the project! If you care about parse5, please support us financially on OpenCollective.
Headlining features of this release are ES Modules, TypeScript, and performance improvements: 7.0.0 is 45% faster than 6.0.1 with default options, and 167% faster with location information enabled (for the bench/perf benchmark, on an M1 Mac). Version 7.0.0 is a revamp of every part of the library. There are too many changes to list them all here, so here is a high-level overview:
All of parse5’s packages are now ECMAScript Modules. We are providing dual packages for parse5 and parse5-htmlparser2-tree-adapter for now (see #418 and #496).
To migrate, please read this Gist on how to update. Note that private internals are no longer available; instead, everything that you need should be imported from the main package.
Implemented by @43081j in #351
The codebase has been ported to TypeScript. This helped uncover a number of subtle logic bugs, such as dc4e269, b4b5d4a, or a0aff95. TypeScript also helps us refactor with confidence and a lot of the changes in this release would have been much harder to do without it.
To migrate, please remove @types/parse5* as we now ship our own types.
parse5-serializer-stream package was removed #481
serialize function exported by parse5.domhandler’s node interface (#327 by @TrySound)
If you are using deep imports for any parts of the codebase, you will likely encounter some breakages:
Show internal changes5d7a780 (#362)OpenElementStack now uses callbacks #429getNextToken was removed #461_bootstrap method was removed #384entities module for encoding and decoding entities, sharing maintenance & optimisation work with projects such as htmlparser2 (2b92054 (#362), #486)
entities adopted a variant of parse5’s approach of decoding entities. As a result, decoding performance is equivalent, while memory consumption is slightly lower.parse5-parser-stream #487serializeOuter (like .outerHTML), scriptingEnabled option #383<< in comments parsed wrongly as <! (#326)endTag for mixed-case foreign elements (#353)html, body (#436)parse5.js.org #443Thanks @anko, @TrySound, @samouri, @alan-agius4, and @pmdartus!
Full Changelog: v6.0.1...v7.0.0
Fixed: Handling of self-closing <hr> tags (by @43081j ).
<hr> tags (by @43081j).Added ( breaking ): Tree adapter interface now has updateNodeSourceCodeLocation method which enables usage of custom location info formats (GH #314 )
Fixed: Serialization of attributes in non-standard namespaces (by @Zirro).
Fixed: Location info for text events in SAXParser and RewritingStream now contains correct endCol and endLine covering all concatenated raw tokens (GH
text events in SAXParser and RewritingStream now contains
correct endCol and endLine covering all concatenated raw tokens (GH #266).SAXParser and RewritingStream now flush last buffered chunk when calling .end() with
no parameters (GH #271).ParserStream, SAXParser and RewritingStream no longer assume that
each binary chunk is a valid finished UTF-8 chunk, and instead accept only decoded strings (GH #269).Starting from this release parse5 functionality will be shipped in separate packages. With parse5 package contatining only basic functionality. Please
Starting from this release parse5 functionality will be shipped in separate packages. With parse5 package contatining only basic functionality. Please, refer to the list of packages for more info.
Updated (breaking): source code location now inserted by tree adapter, so tree adapter developers have control over location info property name. Tree adapters should implement setNodeSourceCodeLocation and getNodeSourceCodeLocation methods. Location info property name added by currently implemented tree adapters has been renamed from __location to sourceCodeLocation (GH #189).
Updated (breaking): Location info line and col properties have been renamed to startLine and
startCol
respectively.
Updated (breaking): SAXParser now passes token objects to event handlers instead of separate arguments. See SAXParser documentation for more info.
(GH #247).
Added: scriptingEnabled flag to the ParserOptions which controls how <noscript> tags are handled by the parser. (GH #192).
Added: HTML rewriting stream. (GH #222).
Removed (breaking): parse5 no longer ship TypeScript definitions. Existing TypeScript definitions have been moved to DefinitelyTyped repo. Please, track the PR in the DefinitelyTyped repo for the updates.
This is a major release that delivers few minor (but breaking) changes to workaround recently appeared issues with TypeScript Node.js typings versioni
This is a major release that delivers few minor (but breaking) changes to workaround recently appeared issues with TypeScript Node.js typings versioning and usage of parse5 in environments that are distinct from Node.js (see https://github.com/inikulin/parse5/issues/235 for the details).
ParserStream, PlainTextConversionStream, SerializerStream, SAXParser) is now lazily loaded. That enables bundling of the basic functionality for other platforms (e.g. for browsers via webpack).Nothing published for this version
Fixed: Loosen the dependency version of @types/node (by @gfx).
@types/node (by @gfx).ParserStream (GH #195) (by @stevenvachon).Fixed: location.startTag is not available if end tag is missing (GH #181).
location.startTag is not available if end tag is missing (GH #181).Fixed: MarkupData.Location.col description in TypeScript definition file (GH #170).
MarkupData.Location.col description in TypeScript definition file (GH #170).Added: parse5 now ships with TypeScript definitions from which new documentation website is generated (GH #125).
document.quirksMode property was replaced with document.mode property which can have
'no-quirks', 'quirks' and 'limited-quirks' values. Tree adapter setQuirksMode and isQuirksMode methods were replaced with setDocumentMode and getDocumentMode methods (GH #83).<!DOCTYPE html> as per spec (GH #137).__location.endTag when the start tag contains newlines (GH #166) (by @webdesus).Fixed: Fixed incorrect LocationInfo.endOffset for non-implicitly closed elements (refix for GH #109) (by @wooorm).
Fixed: Incorrect location info for text in SAXParser (GH #153).
LocationInfo.endOffset for implicitly closed <p> element (GH #109).Fixed: SAXParser HTML integration point handling for adjustable SVG tags.
Fixed: Handling of \n in , and .
SAXParser (by @RReverser)
\n in <pre>, <textarea> and <listing>.<image>.Latest spec changes
Fixed: Element nesting corrections now take namespaces into consideration.
Fixed: ParserStream accidentally hangs up on scripts (GH #101).
Fixed: Keep ParserStream sync for the inline scripts (GH #98 follow up).
Fixed: Synchronously calling resume() leads to crash (GH #98).
Fixed: SAX parser silently exits on big files (GH #97).
Fixed: location info not attached for empty attributes (GH #96) (by @yyx990803).
Added: location info for attributes (GH #43) (by @sakagg and @yyx990803).
Fixed: yet another case of incorrect parseFragment arguments fallback (GH #84).
parseFragment arguments fallback (GH #84).Fixed: parseFragment arguments processing (GH #82).
parseFragment arguments processing (GH #82).Added: ParserStream with the scripting support. (GH #26).
start and end were renamed to startOffset and endOffset respectively.SimpleApiParser was renamed to SAXParser.Parser class.Serializer class.decodeHtmlEntities and encodeHtmlEntities options. (GH #75).default tree adapter now stores <template> content in template.content property instead of template.childNodes[0].Fixed: Qualified tag name emission in Serializer (GH #79).
Added: Location info for the element start and end tags (by @sakagg).
Fixed: htmlparser2 tree adapter DocumentType.data property rendering (GH #45).
DocumentType.data property rendering (GH #45).Fixed: Location info handling for the implicitly generated and elements (GH #44).
<html> and <body> elements (GH #44).Added: Parser decodeHtmlEntities option.
* Fixed: processing in (GH #40).
<form> processing in <template> (GH #40).Fixed: text node in serialization problem with custom tree adapter (GH #38).
<template> serialization problem with custom tree adapter (GH #38).Added: Serializer encodeHtmlEntities option.
encodeHtmlEntities option.From 1.2.0:
<template> supportparseFragment now uses <template> as default contextElement. This leads to the more "forgiving" parsing manner.TreeSerializer was renamed to Serializer. However, serializer is accessible as parse5.TreeSerializer for backward compatibility .Nothing published for this version
Fixed: apply latest changes to the htmlparser2 tree format (DOM Level1 node emulation).
htmlparser2 tree format (DOM Level1 node emulation).Added: jsdom-specific parser with scripting support. Undocumented for jsdom internal use only.
jsdom internal use only.Fixed: use fake document element for fragment parsing (required by jsdom).
document element for fragment parsing (required by jsdom).Development files (e.g. .travis.yml, .editorconfig) are removed from NPM package.
.travis.yml, .editorconfig) are removed from NPM package.Fixed: crash on Linux due to upper-case leading character in module name used in require().
require().Fixed: new line serialization in .
<pre>.SYSTEM-only DOCTYPE serialization.DOCTYPE IDs.Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed: siblings calculation bug in appendChild in htmlparser2 tree adapter.
appendChild in htmlparser2 tree adapter.Nothing published for this version
Added: htmlparser2 tree adapter.
* Fixed: incorrect handling in .
<menuitem> handling in <body>.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →