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:
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 inikulin/parse5#418 and inikulin/parse5#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.
The codebase has been ported to TypeScript. This helped uncover a number of subtle logic bugs, such as dc4e269022ebbae0767d8f790a29d6be1835fe1e, b4b5d4ad6f90b3c9fd03a90e2ed5267929979a11, or a0aff9578bb44511bc169c1d7f9e2f2780f7f8a0. 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.
To migrate, use the serialize function exported by parse5.
The rewriting stream now splits very long text sections (inikulin/parse5#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.
We now drop chunks from the tokenizer right after they are emitted inikulin/parse5#432
The serializer is no longer a class; instead, different serializer functions call on each other inikulin/parse5#383
parse5 now uses the entities module for encoding and decoding entities, sharing maintenance & optimisation work with projects such as htmlparser2 ([2b92054 (#362)](inikulin/parse5#362), inikulin/parse5#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.
... (truncated)
Commits
abec4c2 chore(package): Bump versions to 7.0.0 (#509)
This version was pushed to npm by feedic, a new releaser for parse5 since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps parse5 from 6.0.1 to 7.0.0.
Release notes
Sourced from parse5's releases.
... (truncated)
Commits
abec4c2
chore(package): Bump versions to 7.0.0 (#509)8168960
fix(package): Don't publish source maps (#508)041b8f3
chore(deps-dev): bump@typescript-eslint/eslint-plugin
(#507)eed0304
chore(deps-dev): bump@typescript-eslint/parser
from 5.19.0 to 5.20.0 (#506)497ece0
Bump domhandler to 5.0.2 (#494)99b16a7
chore(deps-dev): bump lint-staged from 12.3.7 to 12.3.8 (#505)f243ef5
docs: Update projects in README (#504)159ef28
refactor: Narrowentities
import, enabled isolated modules (#495)7b1401a
feat(htmlparser2-adapter): Add CJS build (#496)f854f04
chore(deps-dev): bump@typescript-eslint/eslint-plugin
(#502)Maintainer changes
This version was pushed to npm by feedic, a new releaser for parse5 since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)