v4.0.0
Breaking Change
- Removed the custom
Buffer.subarraypolyfill introduced in v3.1.1 to address the issue of it not being usable in the React Native Hermes engine. We recommend using@exodus/patch-broken-hermes-typed-arraysas an alternative. If needed, please review and consider manually adding it to your project (#128).
Added
- Added optional
maxDepthdecoding limits for nested recursive types to guard against stack overflows during decode.Array,VarArray, andOptionconstructors now accept a depth limit, andStruct.create/Union.createcan configure per-type decode depth budgets (#131).
Fixed
-
Decoding Array and VarArray now fast fails when the array length exceeds remaining bytes to decode (#132)
-
Fixed silent truncation of bigint values exceeding the range of sized integers (
Hyper,UnsignedHyper, and otherLargeIntsubtypes). Construction, encoding, and multi-part assembly now throw on overflow/underflow instead of silently clamping.isValidalso validates value range.sliceBigIntnow returns signed slice values for consistency (#133).
Contributors
Full Changelog: v3.1.2...v4.0.0