build(deps): Bump entities from 8.1.0 to 9.0.0
Bumps entities from 8.1.0 to 9.0.0.
Release notes
Sourced from entities's releases.
v9.0.0
Full speed unlocked: This release features a faster approach to decoding entities based on cuckoo hashing, replacing the previous trie-based approach. Instead of walking a trie character by character, we now do a few lookups in a hash table.
I first looked into cuckoo hashing around 2015, and again when I adopted the trie approach that
@inikulinhad pioneered for parse5, but could never make it work. This was a fun problem to throw AI models at for some time, but now Fable solved it quite well.This feels like the last big speed boost for entities decoding in JS.
Breaking changes
- Streaming decoders no longer take a decode table:
new EntityDecoder(htmlDecodeTree, emit, errors)becomesnew HtmlEntityDecoder(emit, errors), andXmlEntityDecoderreplaces the XML variant. ThehtmlDecodeTree,xmlDecodeTreeanddetermineBranchexports are removed. Synchronous decoding APIs are unchanged. #2336- Encoding emits decimal numeric references and the shortest named aliases:
encodeXML("ü")yields&[#252](https://github.com/fb55/entities/issues/252);instead ofü, andencodeHTML("ℵ")yieldsℵinstead ofℵ. #2355escapeAttributeandEncodingMode.Attributealso escape<and>, matching the latest HTML spec. By@ybai08in #2398- The deprecated
getCodePointexport ofentities/escapeis removed; useString.prototype.codePointAtinstead. #2355Improvements
- HTML decoding: common named references 1.15–1.23×, a dense sweep of all 2,125 names 1.24–1.33×, attribute-heavy HTML 1.06–1.18× as fast. XML decoding with mixed named and numeric references is 1.06–1.09× as fast. #2336
- Smaller decoders: the HTML bundle shrinks from 15.54 to 13.42 kB gzipped, the XML-only bundle from 0.92 to 0.84 kB gzipped, and 29–32 kB less memory is retained after import. #2336
- The readme now compares
entitieswith popular alternatives across a range of inputs. #2407Compared with v8.1.0; ranges span Node 26.8 and Node 24.19 on a Ryzen 7 5800X3D. Results vary with input.
Full Changelog: https://github.com/fb55/entities/compare/v8.1.0...v9.0.0
Commits
a007e729.0.03e8e364build(benchmark): compare popular libraries across inputs, update readme (#2407)d1158bffeat(decode)!: hash-table decoder replacing the binary trie (#2336)914e397fix(escape): escape\<and>in attribute values (#2398)12d4f06build: bump the codeql group with 2 updates (#2405)0a6de5cbuild: bump markdown-it from 14.3.2 to 14.3.3 (#2402)9659d80build: bump the codeql group with 2 updates (#2401)858a16bbuild: bump vitest from 5.0.4 to 5.0.5 (#2400)52cbad3build: bump eslint from 10.12.0 to 10.13.0 (#2399)ff0bad1build: bump typescript-eslint from 8.71.1 to 8.71.2 (#2396)- Additional commits viewable in compare view
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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)