unstale

npm / entities

entities

What changed in entities 3 to 9, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

11 breaking1 deprecations4 new APIs and options19 performance1 tooling4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

entities 96 changes

Breaking changes 4

  • Encoding emits decimal numeric references and the shortest named aliases, changing outputs such as ü to ü and ℵ to ℵ.

    9.0.0release notes

  • escapeAttribute and EncodingMode.Attribute now also escape < and >, matching the latest HTML spec.

    9.0.0release notes

  • The deprecated export from entities/escape is removed; use String.prototype.codePointAt instead.

    9.0.0release notes

  • Streaming decoders now use HtmlEntityDecoder and XmlEntityDecoder without a decode table; htmlDecodeTree, xmlDecodeTree, and determineBranch exports are removed. Synchronous decoding APIs are unchanged.

    9.0.0release notes

Performance 2

  • 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 import retains 29–32 kB less memory.

    9.0.0release notes

  • HTML decoding is 1.15–1.33× as fast across reported inputs, and mixed-reference XML decoding is 1.06–1.09× as fast, using cuckoo hashing instead of a trie.

    9.0.0release notes

entities 820 changes

Breaking changes 5

  • Default decoding preserves XML numeric code points such as &#x80;, yielding U+0080 instead of €.

    8.1.0release notes

  • XML numeric code points such as &#x80; now yield U+0080 instead of €.

    8.1.0release notes

  • Deprecated functions and polyfills have been removed, so code relying on them must be updated.

    8.0.0release notes

  • entities is now ESM-only, affecting how developers import and use the package.

    8.0.0release notes

  • The minimum supported Node.js version is now 20.19.0.

    8.0.0release notes

Deprecations 1

  • Use String.prototype.codePointAt instead of getCodePoint from entities/escape.

    8.1.0release notes

Performance 12

  • The full bundle is 19% smaller (18% gzipped), targeting ES2022.

    8.1.0release notes

  • Default decoding is 1.44× faster.

    8.1.0release notes

  • Decoding is 1.19× faster.

    8.1.0release notes

  • Decoding is 1.18× faster.

    8.1.0release notes

  • Decoding is 1.14× faster.

    8.1.0release notes

  • Decoding is 1.46× faster.

    8.1.0release notes

  • Default encoding is 2.46× faster for mostly ASCII 4 KiB prose, but takes about 6% longer on the short, dense benchmark input.

    8.1.0release notes

  • Encoding mostly ASCII 4 KiB prose is 2.46× faster; XML encoding takes about 6% longer on the short, dense benchmark input.

    8.1.0release notes

  • Encoding mostly ASCII 4 KiB prose is 2.46× faster.

    8.1.0release notes

  • Escaping is 1.23× faster.

    8.1.0release notes

  • Escaping is 1.33× faster.

    8.1.0release notes

  • Escaping is 1.49× faster.

    8.1.0release notes

Fixes and other changes 2

  • Preserves unterminated names such as &Xi$, rather than incorrectly decoding them to Â.

    8.1.0release notes

  • Preserves interrupted references such as &notin<, rather than incorrectly decoding them to ¬in<.

    8.1.0release notes

entities 75 changes

Performance 3

  • The encoded HTML decode trie is 21% smaller, and the encoded table is 32% smaller, reducing internal data size.

    7.0.0release notes

  • The encode trie is stored as a string and parsed on load, decreasing its file size by 44%.

    7.0.0release notes

  • Bitmaps replace regex when identifying ASCII code points to encode, speeding up encodeHTML by about 1.6x.

    7.0.0release notes

Tooling 1

  • Test files are excluded from the published package.

    7.0.1release notes

Fixes and other changes 1

  • Fixes an issue that broke streaming for htmlparser2.

    7.0.1release notes

entities 63 changes

Breaking changes 1

  • Deep imports changed from entities/dist/decode.js to entities/decode; update existing imports. The same applies to escape.

    6.0.0release notes

Performance 1

  • Pure annotations were added to improve bundler tree shaking.

    6.0.0release notes

Fixes and other changes 1

  • entities is now available on JSR as well as npm.

    6.0.0release notes

entities 51 changes

Breaking changes 1

  • The lib directory was renamed to dist, so deep imports must be updated.

    5.0.0release notes

entities 42 changes

New APIs and options 2

  • The package is now available as both an ESM and a CommonJS module, allowing developers to use either module system.

    4.0.0release notes

  • Added a function implementing the escaping required by the HTML serializer algorithm.

    4.0.0release notes

entities 33 changes

New APIs and options 2

  • The exported function accepts an object with additional configuration options, making it easier to configure decoding.

    3.0.0release notes

  • The exported function accepts an object with additional configuration options, making it easier to configure encoding.

    3.0.0release notes

Performance 1

  • Encoding and decoding are faster; the notes report speedups of 2.1x and 2.9x, respectively.

    3.0.0release notes