From 3ac81b38d89d7592e28b995fa50699b098c9610c Mon Sep 17 00:00:00 2001 From: Ryan Yang Date: Thu, 5 Mar 2026 14:57:13 -0800 Subject: [PATCH] release v4.0.0 --- CHANGELOG.md | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b20daf..7613b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,19 @@ project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## [v4.0.0](https://github.com/stellar/js-xdr/compare/v3.1.2...v4.0.0) + +### Breaking Change +* Removed [the custom `Buffer.subarray` polyfill](https://github.com/stellar/js-xdr/pull/118) 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-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative. If needed, please review and consider manually adding it to your project ([#128](https://github.com/stellar/js-xdr/pull/128)). + ### Added * Added optional `maxDepth` decoding limits for nested recursive types to guard against stack overflows during decode. `Array`, `VarArray`, and `Option` constructors now accept a depth limit, and `Struct.create` / `Union.create` can configure per-type decode depth budgets. ### Fixed -* Removed [the custom `Buffer.subarray` polyfill](https://github.com/stellar/js-xdr/pull/118) 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-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative. If needed, please review and consider manually adding it to your project ([#128](https://github.com/stellar/js-xdr/pull/128)). - * Decoding Array and VarArray now fast fails when the array length exceeds remaining bytes to decode ([#132](https://github.com/stellar/js-xdr/pull/132)) * Fixed silent truncation of bigint values exceeding the range of sized integers (`Hyper`, `UnsignedHyper`, and other `LargeInt` subtypes). Construction, encoding, and multi-part assembly now throw on overflow/underflow instead of silently clamping. `isValid` also validates value range. `sliceBigInt` now returns signed slice values for consistency ([#133](https://github.com/stellar/js-xdr/pull/133)). - - - ## [v3.1.2](https://github.com/stellar/js-xdr/compare/v3.1.1...v3.1.2) ### Fixed diff --git a/package.json b/package.json index 27db59d..f310139 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stellar/js-xdr", - "version": "3.1.2", + "version": "4.0.0", "description": "Read/write XDR encoded data structures (RFC 4506)", "engines": { "node": ">=20.0.0",