Releases: inikulin/parse5
v7.2.1
What's Changed
- chore(deps-dev): bump typescript from 5.6.2 to 5.6.3 by @dependabot in #1292
- chore(deps-dev): bump globals from 15.10.0 to 15.11.0 by @dependabot in #1293
- chore(deps): bump coverallsapp/github-action from 2.3.0 to 2.3.1 by @dependabot in #1294
- chore(deps-dev): bump typedoc from 0.26.8 to 0.26.9 by @dependabot in #1295
- chore(deps): bump github/codeql-action from 3.26.11 to 3.26.13 by @dependabot in #1297
- chore(deps-dev): bump typescript-eslint from 8.8.1 to 8.9.0 by @dependabot in #1298
- chore(deps): bump coverallsapp/github-action from 2.3.1 to 2.3.2 by @dependabot in #1300
- chore(deps-dev): bump typedoc from 0.26.9 to 0.26.10 by @dependabot in #1301
- chore(deps): bump coverallsapp/github-action from 2.3.2 to 2.3.3 by @dependabot in #1302
- chore(deps-dev): bump typescript-eslint from 8.9.0 to 8.10.0 by @dependabot in #1304
- chore(deps-dev): bump eslint from 9.12.0 to 9.13.0 by @dependabot in #1305
- chore(deps-dev): bump @eslint/js from 9.12.0 to 9.13.0 by @dependabot in #1306
- chore(deps-dev): bump typescript-eslint from 8.10.0 to 8.11.0 by @dependabot in #1307
- chore(deps): bump github/codeql-action from 3.26.13 to 3.27.0 by @dependabot in #1308
- chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 by @dependabot in #1309
- chore(deps-dev): bump @types/jest from 29.5.13 to 29.5.14 by @dependabot in #1310
- chore(deps): bump actions/setup-node from 4.0.4 to 4.1.0 by @dependabot in #1311
- fix: export tree adapter types as namespace to support TS4.x by @43081j in #1313
- chore: bump parse5 to 7.2.1 by @43081j in #1314
Full Changelog: v7.2.0...v7.2.1
v7.2.0
What's Changed
- chore(deps-dev): bump eslint from 8.27.0 to 8.28.0 by @dependabot in #737
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.43.0 to 5.44.0 by @dependabot in #738
- chore(deps-dev): bump @typescript-eslint/parser from 5.43.0 to 5.44.0 by @dependabot in #739
- chore(deps-dev): bump prettier from 2.7.1 to 2.8.0 by @dependabot in #740
- chore(deps-dev): bump lint-staged from 13.0.3 to 13.0.4 by @dependabot in #741
- chore(deps): bump github/codeql-action from 2.1.33 to 2.1.34 by @dependabot in #742
- chore(deps-dev): bump eslint-plugin-unicorn from 44.0.2 to 45.0.0 by @dependabot in #736
- chore(deps-dev): bump eslint-plugin-unicorn from 45.0.0 to 45.0.1 by @dependabot in #744
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.44.0 to 5.45.0 by @dependabot in #745
- chore(deps-dev): bump @typescript-eslint/parser from 5.44.0 to 5.45.0 by @dependabot in #746
- chore(deps): bump github/codeql-action from 2.1.34 to 2.1.35 by @dependabot in #747
- chore(deps-dev): bump lint-staged from 13.0.4 to 13.1.0 by @dependabot in #748
- chore(deps-dev): bump eslint from 8.28.0 to 8.29.0 by @dependabot in #749
- chore(deps-dev): bump @types/jest from 29.2.3 to 29.2.4 by @dependabot in #750
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.45.0 to 5.45.1 by @dependabot in #751
- chore(deps-dev): bump @typescript-eslint/parser from 5.45.0 to 5.45.1 by @dependabot in #752
- chore(deps-dev): bump prettier from 2.8.0 to 2.8.1 by @dependabot in #754
- chore(deps-dev): bump typescript from 4.9.3 to 4.9.4 by @dependabot in #753
- chore(deps-dev): bump @typescript-eslint/parser from 5.45.1 to 5.46.0 by @dependabot in #756
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.45.1 to 5.46.0 by @dependabot in #755
- chore(deps): bump github/codeql-action from 2.1.35 to 2.1.36 by @dependabot in #757
- chore(deps-dev): bump typedoc from 0.23.21 to 0.23.22 by @dependabot in #758
- chore(deps-dev): bump eslint-plugin-unicorn from 45.0.1 to 45.0.2 by @dependabot in #759
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.46.0 to 5.46.1 by @dependabot in #760
- chore(deps-dev): bump @typescript-eslint/parser from 5.46.0 to 5.46.1 by @dependabot in #761
- chore(deps): bump actions/checkout from 3.1.0 to 3.2.0 by @dependabot in #762
- chore(deps): bump github/codeql-action from 2.1.36 to 2.1.37 by @dependabot in #764
- docs(readme): Fix CI badge by @fb55 in #765
- chore(deps-dev): bump typedoc from 0.23.22 to 0.23.23 by @dependabot in #766
- chore(deps-dev): bump eslint from 8.29.0 to 8.30.0 by @dependabot in #767
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.46.1 to 5.47.0 by @dependabot in #768
- chore(deps-dev): bump @typescript-eslint/parser from 5.46.1 to 5.47.0 by @dependabot in #769
- chore(deps-dev): bump @typescript-eslint/parser from 5.47.0 to 5.47.1 by @dependabot in #772
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.47.0 to 5.47.1 by @dependabot in #771
- chore(deps-dev): bump @types/jest from 29.2.4 to 29.2.5 by @dependabot in #774
- chore(deps-dev): bump eslint from 8.30.0 to 8.31.0 by @dependabot in #775
- chore(deps): bump json5 from 2.2.1 to 2.2.3 by @dependabot in #776
- chore(deps-dev): bump eslint-config-prettier from 8.5.0 to 8.6.0 by @dependabot in #778
- chore(deps-dev): bump @typescript-eslint/parser from 5.47.1 to 5.48.0 by @dependabot in #777
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.47.1 to 5.48.0 by @dependabot in #779
- chore(deps-dev): bump husky from 8.0.2 to 8.0.3 by @dependabot in #780
- chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0 by @dependabot in #781
- chore(deps): bump actions/checkout from 3.2.0 to 3.3.0 by @dependabot in #782
- chore(deps): bump peaceiris/actions-gh-pages from 3.9.0 to 3.9.1 by @dependabot in #783
- chore(deps-dev): bump typedoc from 0.23.23 to 0.23.24 by @dependabot in #784
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.48.0 to 5.48.1 by @dependabot in #786
- chore(deps-dev): bump @typescript-eslint/parser from 5.48.0 to 5.48.1 by @dependabot in #787
- chore(deps-dev): bump ts-jest from 29.0.3 to 29.0.4 by @dependabot in #788
- chore(deps): bump github/codeql-action from 2.1.37 to 2.1.38 by @dependabot in #789
- chore(deps-dev): bump eslint from 8.31.0 to 8.32.0 by @dependabot in #790
- chore(deps-dev): bump ts-jest from 29.0.4 to 29.0.5 by @dependabot in #792
- chore(deps-dev): bump @typescript-eslint/parser from 5.48.1 to 5.48.2 by @dependabot in #794
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.48.1 to 5.48.2 by @dependabot in #793
- chore(deps): bump peaceiris/actions-gh-pages from 3.9.1 to 3.9.2 by @dependabot in #795
- chore(deps-dev): bump @types/jest from 29.2.5 to 29.2.6 by @dependabot in #796
- chore(deps): bump github/codeql-action from 2.1.38 to 2.1.39 by @dependabot in #797
- chore(deps-dev): bump prettier from 2.8.1 to 2.8.3 by @dependabot in #791
- chore(deps-dev): bump @typescript-eslint/parser from 5.48.2 to 5.49.0 by @dependabot in #798
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.48.2 to 5.49.0 by @dependabot in #799
- chore(deps): bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in #800
- chore(deps-dev): bump jest from 29.3.1 to 29.4.0 by @dependabot in #801
- chore(deps-dev): bump @types/jest from 29.2.6 to 29.4.0 by @dependabot in #802
- chore(deps-dev): bump jest from 29.4.0 to 29.4.1 by @dependabot in #803
- chore(deps): bump github/codeql-action from 2.1.39 to 2.2.0 by @dependabot in #804
- chore(deps-dev): bump eslint from 8.32.0 to 8.33.0 by @dependabot in #805
- chore(deps): bump github/codeql-action from 2.2.0 to 2.2.1 by @dependabot in #806
- chore(deps-dev): bump typescript from 4.9.4 to 4.9.5 by @dependabot in #807
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.49.0 to 5.50.0 by @dependabot in #809
- chore(deps-dev): bump @typescript-eslint/parser from 5.49.0 to 5.50.0 by @dependabot in #808
- chore(deps-dev): bump @typescript-eslint/parser from 5.50.0 to 5.51.0 by @dependabot in #811
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.50.0 to 5.51.0 by @dependabot in #810
- chore(deps): bump github/codeql-action from 2.2.1 to 2.2.2 by @dependabot in #812
- chore(deps-dev): bump jest from 29.4.1 to 29.4.2 by @dependabot in #813
- chore(deps-dev): bump lint-staged from 13.1.0 to 13.1.1 by @dependabot in #814
- chore(deps-dev): bump prettier from 2.8.3 to 2.8.4 by @dependabot in #815
- chore(deps): bump github/codeql-action from 2.2.2 to 2.2.3 by @dependabot in #816
- chore(deps-dev): bump typedoc from 0.23.24 to 0.23.25 by @dependabot in #817
- chore(deps-dev): bump eslint from 8.33.0 to 8.34.0 by @dependabot in #818
- chore(deps): bump github/codeql-action from 2.2.3 to 2.2.4 by @dependabot in #819
- chore...
v7.1.2
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 #631
- fix(parser): Have
</button>
close<p>
by @fb55 in #534 - docs: Fix small typo in code example by @cheeaun in #518
- Added coverage reporting by @fb55 in #515
- Improved code coverage by @fb55 in #517 and #547
New Contributors
Full Changelog: v7.0.0...v7.1.0
v7.0.0
Welcome to [email protected]! ✨ 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:
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 #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
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.
Potentially breaking changes
- parse5 was caught up with the HTML spec, and parsing results might differ in edge-cases (#442, #451)
- The
parse5-serializer-stream
package was removed #481- To migrate, use the
serialize
function exported byparse5
.
- To migrate, use the
- The rewriting stream now splits very long text sections (#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 (#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 (#404, #405, #419)
- The
OpenElementStack
now uses callbacks #429 - Mixins were removed (as part of #362)
- Location tracking now has a substantially lower overhead #402
getNextToken
was removed #461- The parser’s
_bootstrap
method was removed #384 - We now drop chunks from the tokenizer right after they are emitted #432
- The serializer is no longer a class; instead, different serializer functions call on each other #383
- parse5 now uses the
entities
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.
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: v6.0.1...v7.0.0
v6.0.1
v6.0.0
v5.1.1
v5.1.0
- Fixed: Location info for
text
events inSAXParser
andRewritingStream
now contains
correctendCol
andendLine
covering all concatenated raw tokens (GH #266). - Fixed:
SAXParser
andRewritingStream
now flush last buffered chunk when calling.end()
with
no parameters (GH #271). - Updated (breaking):
ParserStream
,SAXParser
andRewritingStream
no longer assume that
each binary chunk is a valid finished UTF-8 chunk, and instead accept only decoded strings (GH #269).
v5.0.0
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
tosourceCodeLocation
(GH #189). -
Updated (breaking): Location info
line
andcol
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.