fix(deps): update dependency parse5 to v7
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
parse5 | 6.0.1 -> 7.1.2 |
Release Notes
inikulin/parse5
v7.1.2
This release includes parse5
and parse5-parser-stream
.
- Export
ERR
asErrorCodes
by @milahu in https://github.com/inikulin/parse5/pull/704 - Properly handle CR when peeking by @fb55 in https://github.com/inikulin/parse5/pull/715
- Add CJS build of
parser-stream
by @fb55 in https://github.com/inikulin/parse5/pull/716
Full Changelog: https://github.com/inikulin/parse5/compare/v7.1.0...v7.1.2
v7.1.1
v7.1.0
This release is only for the parse5 module.
What's Changed
- feat(parse5): use string types for node names by @43081j in https://github.com/inikulin/parse5/pull/631
- fix(parser): Have
</button>
close<p>
by @fb55 in https://github.com/inikulin/parse5/pull/534 - docs: Fix small typo in code example by @cheeaun in https://github.com/inikulin/parse5/pull/518
- Added coverage reporting by @fb55 in https://github.com/inikulin/parse5/pull/515
- Improved code coverage by @fb55 in https://github.com/inikulin/parse5/pull/517 and https://github.com/inikulin/parse5/pull/547
New Contributors
- @cheeaun made their first contribution in https://github.com/inikulin/parse5/pull/518
Full Changelog: https://github.com/inikulin/parse5/compare/v7.0.0...v7.1.0
v7.0.0
Welcome to parse5@7.0.0!
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:
Breaking: ESM
All of parse5’s packages are now ECMAScript Modules. We are providing dual packages for parse5
and parse5-htmlparser2-tree-adapter
for now (see https://github.com/inikulin/parse5/pull/418 and https://github.com/inikulin/parse5/pull/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
Breaking: TypeScript
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.
Implemented by @fb55 in #362
Potentially breaking changes
- parse5 was caught up with the HTML spec, and parsing results might differ in edge-cases (https://github.com/inikulin/parse5/pull/442, https://github.com/inikulin/parse5/pull/451)
- The
parse5-serializer-stream
package was removed https://github.com/inikulin/parse5/pull/481- To migrate, use the
serialize
function exported byparse5
.
- To migrate, use the
- The rewriting stream now splits very long text sections (https://github.com/inikulin/parse5/pull/434) and doesn’t escape text in special tags anymore (#434). If you worked around these issues before, you might have to update your code.
- The htmlparser2 adapter now uses
domhandler
’s node interface (https://github.com/inikulin/parse5/pull/327 by @TrySound)- The format of the tree nodes has changed slightly; eg. some previous properties are now getters and setters, and vice versa.
If you are using deep imports for any parts of the codebase, you will likely encounter some breakages:
Show internal changes
- The tokenizer now uses the state machine pattern from htmlparser2
5d7a780
(#362) - The token queue was replaced with callbacks (https://github.com/inikulin/parse5/pull/404, https://github.com/inikulin/parse5/pull/405, https://github.com/inikulin/parse5/pull/419)
- The
OpenElementStack
now uses callbacks https://github.com/inikulin/parse5/pull/429 - Mixins were removed (as part of #362)
- Location tracking now has a substantially lower overhead https://github.com/inikulin/parse5/pull/402
-
getNextToken
was removed https://github.com/inikulin/parse5/pull/461 - The parser’s
_bootstrap
method was removed https://github.com/inikulin/parse5/pull/384 - We now drop chunks from the tokenizer right after they are emitted https://github.com/inikulin/parse5/pull/432
- The serializer is no longer a class; instead, different serializer functions call on each other https://github.com/inikulin/parse5/pull/383
- parse5 now uses the
entities
module for encoding and decoding entities, sharing maintenance & optimisation work with projects such as htmlparser2 (2b92054
(#362), https://github.com/inikulin/parse5/pull/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.
-
Other changes
- minor add hooks for stack events to tree adapter interface #385
-
minor add support for fragments in
parse5-parser-stream
#487 -
minor add
serializeOuter
(like.outerHTML
),scriptingEnabled
option #383 -
patch fix parsing of
<<
in comments parsed wrongly as<!
(#326) -
patch fix position of
endTag
for mixed-case foreign elements (#353) -
patch fix end position of
html
,body
(#436) - docs: parse5 has a new documentation website at
parse5.js.org
#443
New Contributors
Thanks @anko, @TrySound, @samouri, @alan-agius4, and @pmdartus!
Full Changelog: https://github.com/inikulin/parse5/compare/v6.0.1...v7.0.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.