npm / entities
entities
What changed in entities 7 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
5 breaking1 deprecations12 performance1 tooling3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initentities 820 changes
Breaking changes 5
Default decoding preserves XML numeric code points such as
€, yielding U+0080 instead of€.XML numeric code points such as
€now yield U+0080 instead of€.Deprecated functions and polyfills have been removed, so code relying on them must be updated.
entities is now ESM-only, affecting how developers import and use the package.
The minimum supported Node.js version is now 20.19.0.
Deprecations 1
Use
String.prototype.codePointAtinstead ofgetCodePointfromentities/escape.
Performance 12
The full bundle is 19% smaller (18% gzipped), targeting ES2022.
Default decoding is 1.44× faster.
Decoding is 1.19× faster.
Decoding is 1.18× faster.
Decoding is 1.14× faster.
Decoding is 1.46× faster.
Default encoding is 2.46× faster for mostly ASCII 4 KiB prose, but takes about 6% longer on the short, dense benchmark input.
Encoding mostly ASCII 4 KiB prose is 2.46× faster; XML encoding takes about 6% longer on the short, dense benchmark input.
Encoding mostly ASCII 4 KiB prose is 2.46× faster.
Escaping is 1.23× faster.
Escaping is 1.33× faster.
Escaping is 1.49× faster.
Fixes and other changes 2
Preserves unterminated names such as
&Xi$, rather than incorrectly decoding them toÂ.Preserves interrupted references such as
¬in<, rather than incorrectly decoding them to¬in<.
entities 72 changes
Tooling 1
Test files are excluded from the published package.
Fixes and other changes 1
Fixes an issue that broke streaming for htmlparser2.