diff --git a/CHANGELOG.md b/CHANGELOG.md index 11e68f75..72068e3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,16 @@ ## Unreleased +## [`v15.0.0`](https://github.com/stellar/js-stellar-base/compare/v14.1.0...v15.0.0): Protocol 26 + ### Breaking Changes * `TransactionBase.networkPassphrase` setter now throws an error to enforce immutability ([#891](https://github.com/stellar/js-stellar-base/pull/891)). +* React Native apps using the Hermes engine must polyfill broken typed array methods such as `subarray`; this compatibility is no longer provided by `@stellar/js-xdr`. One option is [`@exodus/patch-broken-hermes-typed-arrays`](https://www.npmjs.com/package/@exodus/patch-broken-hermes-typed-arrays). If needed, please review and consider manually adding it to your project. +* Construction and encoding of sized XDR integer values now throw on overflow and underflow instead of silently clamping, via `@stellar/js-xdr` ([#133](https://github.com/stellar/js-xdr/pull/133)). This may affect code that previously relied on permissive bigint coercion. + +### Added +* XDR definitions have been updated to align with Protocol 26 ([#944](https://github.com/stellar/js-stellar-base/pull/944)). ### Fixed @@ -18,6 +25,7 @@ * `Auth.bytesToInt64` now correctly handles bytes with upper-32-bit values set by processing each 32-bit half independently ([#891](https://github.com/stellar/js-stellar-base/pull/891)). * `ScInt` constructor now correctly handles string input ([#891](https://github.com/stellar/js-stellar-base/pull/891)). * `Soroban.parseTokenAmount` now throws when the input value has more decimal places than the specified `decimals` argument ([#891](https://github.com/stellar/js-stellar-base/pull/891)). +* XDR `Array` and `VarArray` decoding now fails fast when the declared array length exceeds the remaining bytes, via `@stellar/js-xdr` ([#132](https://github.com/stellar/js-xdr/pull/132)). ## [`v14.1.0`](https://github.com/stellar/js-stellar-base/compare/v14.0.4...v14.1.0): diff --git a/package.json b/package.json index 6452b033..1bc55fbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stellar/stellar-base", - "version": "14.1.0", + "version": "15.0.0", "description": "Low-level support library for the Stellar network.", "main": "./lib/index.js", "browser": { @@ -122,8 +122,8 @@ "webpack-cli": "^5.1.1" }, "dependencies": { - "@noble/curves": "^1.9.6", - "@stellar/js-xdr": "^3.1.2", + "@noble/curves": "^1.9.7", + "@stellar/js-xdr": "^4.0.0", "base32.js": "^0.1.0", "bignumber.js": "^9.3.1", "buffer": "^6.0.3", diff --git a/yarn.lock b/yarn.lock index 3a668793..50f97544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1065,7 +1065,7 @@ dependencies: eslint-scope "5.1.1" -"@noble/curves@^1.9.6": +"@noble/curves@^1.9.7": version "1.9.7" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.7.tgz#79d04b4758a43e4bca2cbdc62e7771352fa6b951" integrity sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw== @@ -1171,10 +1171,10 @@ resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== -"@stellar/js-xdr@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@stellar/js-xdr/-/js-xdr-3.1.2.tgz#db7611135cf21e989602fd72f513c3bed621bc74" - integrity sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ== +"@stellar/js-xdr@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@stellar/js-xdr/-/js-xdr-4.0.0.tgz#5c4bd396a71ea3aef7a91dee885cf8dd2e10c5cf" + integrity sha512-+NmNa7Tk5BI5XFdy/6xGTqAN4J9a9KgCrCGhj2uEUTCBhLkch0M+QbKzNH8zEnejWe0p8w+0q5hUVX6L3OzoVA== "@tsconfig/node10@^1.0.7": version "1.0.12"