Skip to content

Releases: fb55/entities

v6.0.0: fix(workflow): Fix git interactions

24 Jul 14:03
Compare
Choose a tag to compare

Features

  • Improved bundler tree shaking by adding pure annotations by @Gravitonic in #1501
  • BREAKING: Simplified deep import paths, to make entities work in old NodeJS versions by @fb55 in #1531
    • If you are using deep imports, you will have to update them. Instead of importing entities/dist/decode.js, import entities/decode. The same applies to escape.
  • Automated publishes by @fb55 in #1532
    • entities is now available on both npm and JSR
  • Enabled isolated declarations by @fb55 in #1522

Full Changelog: v5.0.0...v6.0.0

v5.0.0

26 Jun 13:34
Compare
Choose a tag to compare

What's Changed

  • Improved code style (based on eslint-plugin-unicorn) #1496
  • Upgraded toolchain (to tshy, vitest, and tsx) #1497

Breaking Changes

  • ⚠️ BREAKING: The lib directory was renamed to dist in #1497. Deep imports will have to be updated.

Full Changelog: v4.5.0...v5.0.0

v4.5.0

13 Apr 18:09
Compare
Choose a tag to compare

New Features

entities now features an EntityDecoder class that can be used to decode entities across multiple chunks. This is needed to parse streams, and will be the foundation for entity decoding in htmlparser2 and parse5.

For users of this library, the most welcome addition will be a new attribute decoding mode, which will ignore some entities that were previously parsed (eg. `foo=bar&amp=boo' will be left unchanged).

entities' decode functions all use the new decoder under the hood. There is a new decodeHTMLAttribute function for attribute parsing, and some rare edge-cases where entities diverged from the HTML spec have been eliminated.

Relevant PRs

  • feat(decode): Add EntityDecoder class by @fb55 in #1136
  • fix(decode): Handle chunks for numeric entities by @fb55 in #1146

Small Changes

Full Changelog: v4.4.0...v4.5.0

v4.4.0

01 Sep 09:23
Compare
Choose a tag to compare
  • Smaller encode/decode maps by @sapphi-red in #909
    • The encode and decode maps are now stored more space-efficiently, saving 44% in minified bundles, and cutting the size of the installed module by 52%.

Please note that some JavaScript minifiers, such as terser, will now produce non-ASCII output. If you use entities in the browser, please make sure you are set up to ship UTF-8 to clients, or set eg. terser's ascii_only option to false.

Full Changelog: v4.3.1...v4.4.0

v4.3.1

01 Jul 18:45
Compare
Choose a tag to compare
  • Fixed an off-by-one error that caused some entities to be decoded to different values (#858) 3b0d48b

v4.3.0...v4.3.1

v4.3.0

10 Apr 13:33
Compare
Choose a tag to compare

Features

  • Added an escape file, which is available as an export #786
  • Set the sourceRoot property in source maps #788
    • This tells tools where to get the original sources when reading source maps.

Other

  • Configure TS to be stricter #787

Full Changelog: v4.2.0...v4.3.0

v4.2.0

07 Apr 11:25
Compare
Choose a tag to compare

Fixes:

  • Handle edge-case with surrogate pairs in encode 413c48b

Features:

  • Export replaceCodePoint from entities/lib/decode 2247ebe

Other:

  • refactor: Enable strict-boolean-expressions (#779) ce2b30b
  • refactor(encode): Skip isHighSurrogate check 03a8f4a
  • chore(ci): Test on its/* instead of Node 10 1a69212
  • chore(scripts): Add tests for decoding of binary trie, fix logic 6cb56f3
  • chore(scripts): Add .eslintrc.json bf89c65

v4.1.1...v4.2.0

v4.1.1

02 Apr 22:14
Compare
Choose a tag to compare

v4.1.0...v4.1.1

v4.1.0

02 Apr 13:04
Compare
Choose a tag to compare
  • We now pre-generate the encode trie (#776) 3ef75e1
    • This increases the code size a bit, while reducing memory consumption and improving tooling support.
  • Improved the README 8a194ce b7b24d6

v4.0.0...v4.1.0

v4.0.0

01 Apr 21:29
Compare
Choose a tag to compare

New Features:

  • entities is now both an ESM and a CommonJS module (#775)
  • entities now has a new documentation website! (Added in 720a36d.)
  • Added escapeAttribute and escapeText functions, implementing the escaping required by the HTML serializer algorithm (#770)

Breaking:

Docs:

  • docs(readme): Add FAQ about strict decoding c2e2c93
  • docs(readme): Add Features section, plus small improvements 3f66dd6
  • docs(readme): Add FAQ section 14f1732

Refactors:

  • refactor(encode): Inline replacers, xml code map (#765) c7b81ad
  • refactor: Share escaping logic between escape fns 2a2bc5f
  • refactor(decode): Defer creating string to the end of the trie 0fa1149