The `entities` JavaScript library encodes and decodes HTML and XML entities, and provides configurable output options. It is useful for converting between raw text and entity-escaped forms when processing or rendering HTML/XML content.
Project status
- Actively maintained: The upstream GitHub source shows a very recent push on 2026-06-08, and the most recently documented package update (v8.0.0 on 2026-03-17) indicates ongoing work rather than dormancy.
- Update cadence: After v7.0.1 (2026-01-21), there were updates again in about 2 months (v8.0.0 on 2026-03-17). Earlier, updates appeared on a multi-month rhythm (for example, v7.0.0 on 2025-09-06 to v7.0.1 on 2026-01-21).
AI summary generated
Recent updates
v8.0.0
v8.0.0 makes `entities` ESM-only and raises the supported Node.js version to >= 20.19.0. In addition to the documented cleanup of deprecated APIs and polyfills, the diff shows multiple specific deprecated exports were removed and replaced patterns are required for existing consumers.
Breakingv7.0.1
v7.0.1 is a patch release focused on restoring streaming entity decoding behavior (notably for htmlparser2) and tightening the npm package contents to exclude test files. The diff also shows a broader set of refactors and repository build and tooling updates that are not mentioned in the release notes.
v7.0.0
v7.0.0 focuses on internal performance and size improvements for entity encoding and decoding. The release notes highlight a smaller decode trie (including semicolon and compact-run encoding changes), a smaller serialized encode trie (now shipped as a compact string and parsed on load), and faster encode paths using bitsets instead of regex.
v6.0.1
Release v6.0.1 primarily updates TypeScript type availability for legacy Node entry points. The code diff shows new top-level .d.ts shims (decode.d.ts and escape.d.ts) and corresponding packaging changes, plus some CI and dev tooling updates.
v6.0.0
v6.0.0 focuses on improving tree shaking and changing deep import paths for better compatibility with older Node.js versions. The release notes also mention automation for publishing to npm and JSR, plus enabling isolated declarations.
BreakingFeaturesv5.0.0
v5.0.0 mainly upgrades the project toolchain (tshy, vitest, tsx) and changes the distribution folder name from lib to dist. The runtime code diff also includes several functional edits in encoding and changes to what internal decoder helpers are exported.
Breakingv4.5.0
v4.5.0 introduces a new streaming-capable `EntityDecoder` and expands decoding support with an attribute-specific decoding mode, plus a dedicated `decodeHTMLAttribute` helper. The internal decoding implementation was refactored to route through the new decoder machinery, including improved handling of chunked entities.
Featuresv4.4.0
v4.4.0 focuses on reducing the size of the generated HTML/XML entity encode and decode data by storing it more compactly. The generated files change from large numeric literals and direct Maps/Uint16Array constructors to string/char-code reconstruction and delta-encoded Map keys, plus generator updates to support this encoding.
Featuresv4.3.1
v4.3.1 is a small patch release focused on fixing an off-by-one issue in the entity decoding logic. The diff also shows a new decoding test case and several development dependency and tooling updates.
v4.3.0
v4.3.0 introduces an `escape` module, making the escaping helpers available as a dedicated export and organizing the code so XML/HTML escaping logic lives outside `encode.ts`. It also tightens the TypeScript configuration and updates sourcemap generation by setting a `sourceRoot` during the build.
Features