mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05:48 +00:00
feat: remove util polyfill and fix HISTORY.md (#2432)
- Remove `util` from bundle by switching `inspect` to `JSON.stringify` - Update `HISTORY.md` with latest 3.0 changes
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
# ripple-address-codec
|
# ripple-address-codec
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
### Breaking Changes
|
||||||
|
* Bump typescript to 5.x
|
||||||
|
* Remove Node 14 support
|
||||||
|
* Remove `assert` dependency. If you were catching `AssertionError` you need to change to `Error`.
|
||||||
|
|
||||||
## 4.3.1 (2023-09-27)
|
## 4.3.1 (2023-09-27)
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
# ripple-binary-codec Release History
|
# ripple-binary-codec Release History
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
### Breaking Changes
|
||||||
|
* Bump typescript to 5.x
|
||||||
|
* Remove Node 14 support
|
||||||
|
* Remove decimal.js and big-integer. Use `BigNumber` from `bignumber.js` instead of `Decimal` and the native `BigInt` instead of `bigInt`.
|
||||||
|
* Remove `assert` dependency. If you were catching `AssertionError` you need to change to `Error`.
|
||||||
|
|
||||||
|
|
||||||
## 1.11.0 (2023-11-30)
|
## 1.11.0 (2023-11-30)
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
# ripple-keypairs Release History
|
# ripple-keypairs Release History
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
### Breaking Changes
|
||||||
|
* Bump typescript to 5.x
|
||||||
|
* Remove Node 14 support
|
||||||
|
* Remove `assert` dependency. If you were catching `AssertionError` you need to change to `Error`.
|
||||||
* Fix `deriveKeypair` ignoring manual decoding algorithm. (Specifying algorithm=`ed25519` in `opts` now works on secrets like `sNa1...`)
|
* Fix `deriveKeypair` ignoring manual decoding algorithm. (Specifying algorithm=`ed25519` in `opts` now works on secrets like `sNa1...`)
|
||||||
|
|
||||||
## 1.3.1 (2023-09-27)
|
## 1.3.1 (2023-09-27)
|
||||||
|
|||||||
@@ -4,6 +4,39 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
* Bump typescript to 5.x
|
||||||
|
* Remove Node 14 support
|
||||||
|
* Remove `assert` dependency. If you were catching `AssertionError` you need to change to `Error`
|
||||||
|
* Configuring a proxy:
|
||||||
|
* Instead of passing various parameters on the `ConnectionsOptions` you know specify the `agent` parameter. This object can use be created by libraries such as `https-proxy-agent` or any that implements the `http.Agent`.
|
||||||
|
* This was changed to both support the latest `https-proxy-agent` and to remove the need to include the package in bundlers. Tests will still be done using `https-proxy-agent` and only tested in a node environment which was the only way it was previously supported anyway
|
||||||
|
* Remove `BroadcastClient` which was deprecated
|
||||||
|
|
||||||
|
### Bundling Changes
|
||||||
|
* Bundler configurations are much more simplified.
|
||||||
|
* removed the following polyfills:
|
||||||
|
* `assert`
|
||||||
|
* `buffer`
|
||||||
|
* `https-browserify`
|
||||||
|
* `os-browserify`
|
||||||
|
* `stream-browserify`
|
||||||
|
* `stream-http`
|
||||||
|
* `url`
|
||||||
|
* `util` - previously added automatically by `webpack`
|
||||||
|
* Removed mappings for:
|
||||||
|
* `ws` to `WsWrapper`
|
||||||
|
* Excluding `https-proxy-agent`
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Remove `lodash` as a dependency
|
||||||
|
* Remove many polyfills that were only used for testing in the browser
|
||||||
|
* Remove `util` from bundle by switching `inspect` to `JSON.stringify`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Fixed Wallet.generate() ignoring the `algorithm` parameter (Only a problem once binary-codec fix for `derive_keypair` is added)
|
||||||
|
* Fixed Wallet.fromSeed() ignoring the `algorithm` parameter
|
||||||
|
|
||||||
## 2.14.1 (2024-02-01)
|
## 2.14.1 (2024-02-01)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/* eslint-disable max-classes-per-file -- Errors can be defined in the same file */
|
/* eslint-disable max-classes-per-file -- Errors can be defined in the same file */
|
||||||
import { inspect } from 'util'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base Error class for xrpl.js. All Errors thrown by xrpl.js should throw
|
* Base Error class for xrpl.js. All Errors thrown by xrpl.js should throw
|
||||||
* XrplErrors.
|
* XrplErrors.
|
||||||
@@ -38,7 +36,7 @@ class XrplError extends Error {
|
|||||||
public toString(): string {
|
public toString(): string {
|
||||||
let result = `[${this.name}(${this.message}`
|
let result = `[${this.name}(${this.message}`
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
result += `, ${inspect(this.data)}`
|
result += `, ${JSON.stringify(this.data)}`
|
||||||
}
|
}
|
||||||
result += ')]'
|
result += ')]'
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { XrplError, NotFoundError } from '../../src'
|
|||||||
describe('client errors', function () {
|
describe('client errors', function () {
|
||||||
it('XrplError with data', async function () {
|
it('XrplError with data', async function () {
|
||||||
const error = new XrplError('_message_', '_data_')
|
const error = new XrplError('_message_', '_data_')
|
||||||
assert.strictEqual(error.toString(), "[XrplError(_message_, '_data_')]")
|
assert.strictEqual(error.toString(), '[XrplError(_message_, "_data_")]')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('NotFoundError default message', async function () {
|
it('NotFoundError default message', async function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user