Skip to content

Releases: ExodusOSS/bytes

v1.14.1

13 Feb 01:49
Immutable release. Only release title and notes can be modified.
d1a6192

Choose a tag to compare

fix: ensure TextEncoder never returns pooled arrays

Previous implementation always ensured 0-offset Uint8Array (ret.byteOffset === 0),
but not that there is no data past the returned view (ret.byteLength === ret.buffer.byteLength).

This is now fixed.

This only affected Node.js-like platforms, as only there native buffers are pooled.

Full Changelog: v1.14.0...v1.14.1

v1.14.0

12 Feb 03:41
Immutable release. Only release title and notes can be modified.
9cc2f20

Choose a tag to compare

  • Fix makeBase58check() Typescript types

  • Add sideEffects configuration

    Only @exodus/bytes/encoding.js export has side-effects, and those side-effects are internal:

    It is documented to load multi-byte codecs for both this import and future (and previous) /encoding-lite.js imports, even if the current import does not use the provided TextDecoder.

    Both /encoding.js and /encoding-lite.js are designed to return the exact same TextDecoder class and methods, and loading full implementation provides multi-byte encodings support everywhere.

    As /encoding-lite.js can be used as a global polyfill, the setup has to avoid polyfill conflicts if something loads /encoding.js and then something else replaces it with /encoding-lite.js (or vice versa)

    The same mechanism is reused to keep /whatwg.js minimal by default, and only support multi-byte encodings if /encoding.js was imported and loaded them at any point.

    This is not a new change, just documenting the existing behavior and exposing sideEffects configuration so that bundlers can optmize out other imports.

  • Further bundle size optimizations

Full Changelog: v1.13.0...v1.14.0

v1.13.0

11 Feb 09:59
Immutable release. Only release title and notes can be modified.
9a5da9b

Choose a tag to compare

What's Changed

  • Bundle size reductions, especially for browsers

    Under browser module resolution target, we rely on browsers to have a working UTF-8 / UTF-16 / windows-1252 (latin1 subset) TextDecoder implementation that doesn't have bugs when used without streaming and with ignoreBOM: true, and a TextEncoder

    While browsers have bugs even in UTF-8, those bugs are related to streams and/or BOM processing, and that specific combination we use seems to be always robust.

    In previous versions we already used native codepaths for those where possible and operated under the same assumption.

  • Disable hex/base64 performance optimization for Firefox >=133 <146

    We used a guarded useragent check for those versions to prefer js fallback instead of native base64 / hex implementations, as native was slow before FF 146 (ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1994067 and linked issues)

    As the usage of FF <146 diminished according to caniuse stats, this check is not worth it anymore.

    This version removes that useragent check.

    Those Firefox versions are still supported by the library, but now the native base64 / hex implementation is always used when available.

    See 8cab29a for implementation details.

Full Changelog: v1.12.0...v1.13.0

v1.12.0

08 Feb 21:57
Immutable release. Only release title and notes can be modified.
cfcfba7

Choose a tag to compare

  • Fix UTF-16 on platforms with present but broken native UTF-16 TextDecoder (e.g. workerd, see cloudflare/workerd#6028)
  • Test in CI on workerd, xs and graaljs

Full Changelog: v1.11.0...v1.12.0

v1.11.0

01 Feb 23:31
Immutable release. Only release title and notes can be modified.
ae6e08e

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.10.0...v1.11.0

v1.10.0

26 Jan 12:07
Immutable release. Only release title and notes can be modified.
d9e085c

Choose a tag to compare

What's Changed

  • Add TypeScript types for all entry points
  • Test and accept Uint8Array<SharedArrayBuffer> input
  • Add iso-2022-jp fatal encoder (in #36)
  • Improve documentation

Full Changelog: v1.9.0...v1.10.0

v1.9.0

18 Jan 13:42
Immutable release. Only release title and notes can be modified.
c5ff201

Choose a tag to compare

  • Implement strict multi-byte encoders, except for iso-2022-jp for now
  • Add /encoding-browser.js to load only native lightweight TextDecoder/TextEncoder in browser bundles
  • Add /index.js export with usage warning, mostly for IDEs
  • Switch /base58check.js peer dep (used on non-Node.js platforms) to @noble/hashes directly (previously @exodus/crypto)
  • Fix legacyHookDecode() behavior on non-even (incomplete) UTF-16 byte length
  • Fix utf16toString(uint16arr) on Big-Endian Node.js
  • Performance improvements in encoders and decoders

Full Changelog: v1.8.0...v1.9.0

v1.8.0

02 Jan 00:34
Immutable release. Only release title and notes can be modified.
f22e886

Choose a tag to compare

What's Changed

  • feat: support iso-8859-1, iso-8859-9, iso-8859-11 encodings in single-byte.js
  • feat: latin1fromString, latin1toString
  • feat: types for encoding.js by @ajaymathur in #12
  • feat: types for encoding-lite.js
  • perf improvements for encodings

New Contributors


Full Changelog: v1.7.0...v1.8.0

v1.7.0

28 Dec 20:21
Immutable release. Only release title and notes can be modified.
bfc362e

Choose a tag to compare

What's Changed

Features:

  • Implement TextDecoderStream / TextEncoderStream
    Requires Streams to be either supported by the platform or polyfilled
  • Implement createSinglebyteEncoder (only fatal mode for now)

Fixes:

  • Fix a missing check for non-Latin1 chars in fromBech32 / fromBech32m on non-Hermes barebone engines
    Node.js, browsers, other non-barebones and Hermes / React Native were not affected
  • Passing detached ArrayBuffer instances to TextDecoder should return empty strings, not throw

Full Changelog: v1.6.0...v1.7.0

v1.6.0

25 Dec 22:56
Immutable release. Only release title and notes can be modified.
a0fe9fb

Choose a tag to compare

TextDecoder performance improvements for non-Unicode encodings.

Full Changelog: v1.5.0...v1.6.0