Commit Graph

567 Commits

Author SHA1 Message Date
Chenna Keshava B S
3bc3c2029b feat: Upgrade to Node 18 and remove cross-fetch (#2678) (#2737)
* feat: Upgrade to Node 18 and remove cross-fetch (#2678)

BREAKING CHANGE: fetch now relies on the native javascript environment in browsers and node.js

Co-authored-by: justinr1234 <justinr1234@gmail.com>
2024-07-16 11:04:47 -07:00
Caleb Kniffen
38b385969b feat: remove Buffer support and bundle polyfill (#2526)
- Removes need for bundlers to polyfill the `Buffer` class. `UInt8Array` are used instead which are native to the browser and node.
- Reduces bundle size 7.1kb gzipped and eliminates 4 runtime dependencies: `base-x`, `base64-js`, `buffer`, and `ieee754`.

BREAKING CHANGE: All methods that previously took a `Buffer` now accept a `UInt8Array`.

---------

Co-authored-by: Jackson Mills <jmills@ripple.com>
2024-02-01 13:53:41 -06:00
Caleb Kniffen
134924c395 feat: remove assert library as a testing dep (#2563)
Right now we have 5 testing library dependencies. This eliminates
`assert`. `jest`, `jasmine`, `chai` and `karma` are the remaining ones.
2024-02-01 13:53:40 -06:00
Caleb Kniffen
294509cf79 feat: isomorphic sockets and use eventemitter3 (#2514)
Reduces filesize by 3kb minified and gzipped or 2.8% and reduces bundler
config steps.

- Move `WSWrapper` to `@xrpl/isomorphic` to remove the need to add
mapping of `ws` to `WSWrapper` file in bundler configs
- Switch to `eventemitter3` which is smaller than `events` by almost
1kb and will not require a mapping to node's `events` in `vite`
bundling. `webpack` always automatically maps it.
    - max listeners is not a thing for `eventemitter3` so we do not
need to set it to `Infinity`. `ws` uses the native event emitter which
does still need that to be set.
- Remove `eventemitter2` which was only used in tests and was replaced
with `eventemitter3`

BREAKING CHANGE: Config for frontend bundlers has changed for `ws`.
2024-02-01 13:52:15 -06:00
Nicholas Dudfield
217b111ef2 feat: use @noble and @scure libraries for cryptography (#2273)
Switch to using `@noble/hashes`, `@noble/curves`, `@scure/base`,
`@scure/bip32`, and `@scure/bip39`. This replaces `crypto` polyfills
(such as `crypto-browserify`), `create-hash`, `elliptic`, `hash.js`,
`bn.js` (both versions), and their many dependencies.  This also means
there are 33 less dependencies downloaded when running a fresh
`npm install` and will make the project much easier to maintain.

This reduces the bundle size by 44% (82kb minified and gzipped) over
the current 3.0 branch as well as reducing the amount of configuration
required to bundle.

Closes #1814, #1817, #2272, and #2306

Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
2024-02-01 13:50:19 -06:00
Caleb Kniffen
1a83997e49 feat: add xrpl-secret-numbers to the monorepo (#2445)
- Add `xrpl-secret-numbers` by @WietseWind  to the mono repo.
- `unpkg` and `jsdelivr` support was simplified by adding fields to package.json.
- Unit tests run in a browser and node.

BREAKING CHANGES:
- `xrpl-secret-numbers` is now `@xrplf/secret-numbers`.
- Changed the bundled file produced changed from  `dist/browerified.js` to `build/xrplf-secret-numbers-latest.js`.
- Bundle variable is `xrplf_secret_numbers` instead of using browserify's loader.
- If using CDN instructions in README will need to update to `https://cdn.jsdelivr.net/npm/@xrplf/secret-numbers`

Making this library part of the monorepo was discussed in #1788.  This solves several problems with the upcoming `xrpl.js@3.0`.

`xrpl-secret-numbers` has a dependency of `ripple-keypairs` and `xrpl` has a depenendecy on `xrpl-secret-numbers`.  This means that any change would require a separate release of `ripple-keypairs`, then a release of `xrpl-secret-numbers`, followed by `xrpl`.  Now they can be released all at once

In 3.0 we eliminated the need for many polyfills like `util`, `assert`, and soon to be `buffer` (after noble libs PR is merged).  `xrpl-secret-numbers` still needs those.  This will also eliminate them and anytime similar changes in the future will be much easier.  This further reduces the bundle size of 3.0 branch by over 10% as well as reducing bundler setup.
2024-02-01 13:45:11 -06:00
Caleb Kniffen
21c2423bac test: remove extra polyfills only for testing (#2428)
Removes the testing polyfills by using jasmine and not jest in the
browser. We were already using jasmine but where overriding those
methods with jest versions which was not needed.

The previous karma setup also used a single entrypoint which meant that
not all integration tests were running because all files were not
imported in integrations/index.ts.

This also eliminates 79 dev dependencies.
2024-02-01 13:43:55 -06:00
Caleb Kniffen
0050b2f75e feat: remove 3 http related polyfills (#2375)
Switch to using fetch for browser and `node-fetch` for node for the faucet calls.  This reduces the webpack bundle by 3.2% or 16.5kb gzipped.

The fundWallet code has been refactored to be much more straight forward due to not having to do such low level operations.

This improves the frontend setup process by no longer requiring several polyfills such as `url`, `stream-http`, and `https-browserify`.
2024-02-01 13:43:55 -06:00
Caleb Kniffen
8caf2e45bb feat: remove decimal.js and big-integer (#2379)
Reduces the bundle size by 8% (41kb)

BigInteger is now well supported so the library is no longer needed.

BigNumber was already being used by xrpl and they had almost identical
interfaces as they are both based on Java.
2024-02-01 13:43:55 -06:00
Caleb Kniffen
cfb64c3f88 feat: remove lodash as a dependency (#2378)
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
2024-02-01 13:43:52 -06:00
Caleb Kniffen
30bbc3f837 feat: remove node 14 support (#2386) 2024-02-01 13:41:52 -06:00
Caleb Kniffen
9f8502d522 feat: bump typescript to 5.x (#2387) 2024-02-01 13:41:51 -06:00
dependabot[bot]
e1f651d8c7 build(deps-dev): bump source-map-loader from 4.0.2 to 5.0.0 (#2622)
Bumps [source-map-loader](https://github.com/webpack-contrib/source-map-loader) from 4.0.2 to 5.0.0.
- [Release notes](https://github.com/webpack-contrib/source-map-loader/releases)
- [Changelog](https://github.com/webpack-contrib/source-map-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/source-map-loader/compare/v4.0.2...v5.0.0)

---
updated-dependencies:
- dependency-name: source-map-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 13:05:42 -06:00
Daniel
aa75806f2f [Feature] Generate Wallet from secret numbers (#1799)
* add the possibility to create a wallet from Secret Numbers

* Move it off the Wallet class
2023-08-14 17:39:35 -07:00
Caleb Kniffen
f760b2e56f chore: remove extra lock files and nyc (#2403)
nyc is not a direct dependency any more and nested lock files are unused
2023-07-20 15:03:17 -05:00
dependabot[bot]
104afa4b71 build(deps-dev): bump source-map-loader from 3.0.2 to 4.0.1 (#2399) 2023-07-20 18:02:20 +00:00
Caleb Kniffen
19792d4fbb feat: remove more puppeteer code (#2373)
Forgot to remove the types in #2331

Closes #2364
2023-07-11 08:37:00 -05:00
Mayukha Vadari
848e5bbe78 fix: downgrade lerna (#2341)
* downgrade lerna

* remove npx
2023-06-12 18:04:29 -04:00
Caleb Kniffen
6fbfab4fa4 chore(dev-deps): remove puppeteer (#2331)
`puppeteer` was removed in #2170 and dependabot won't stop being
annoying about it.

Closes #2234
2023-06-02 20:39:46 -05:00
Mayukha Vadari
82c5b3598a feat: support npm v9 (#2318)
* add support for npm v9

* Update package-lock.json

* Update nodejs.yml

* update changelogs

* update PR template
2023-05-25 16:01:42 -04:00
dependabot[bot]
add72a175d build(deps): bump parse-url and lerna (#2114) 2023-05-17 21:43:15 +00:00
Caleb Kniffen
9dd5f6def6 build(deps-dev): bump webpack from 5.76.0 to 5.81.0 (#2312)
Replaces #2299
2023-05-17 14:59:44 -05:00
dependabot[bot]
e6c7c88209 build(deps-dev): bump webpack-cli from 4.9.2 to 5.0.1 (#2165)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.9.2 to 5.0.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.9.2...webpack-cli@5.0.1)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 16:12:33 -08:00
Mayukha Vadari
8fe87c0e86 fix: add npm v8 support to lerna setup (#2204)
* add support for npm 8
2023-02-08 12:00:50 -05:00
Jackson Mills
bef2f79fee Update linter peer dependencies (#2168) 2023-02-07 15:00:55 -08:00
justinr1234
5fe480ece4 feat: Jest Test Runner (#2170) 2023-02-03 17:03:07 -06:00
justinr1234
5a63f18faf feat: GTM tracking on docs website (#2197) 2023-02-03 16:37:24 -06:00
dependabot[bot]
f6b810e7ba build(deps-dev): bump eslint-plugin-consistent-default-export-name from 0.0.14 to 0.0.15 (#2063)
build(deps-dev): bump eslint-plugin-consistent-default-export-name

Bumps [eslint-plugin-consistent-default-export-name](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name) from 0.0.14 to 0.0.15.
- [Release notes](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/releases)
- [Commits](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/commits)

---
updated-dependencies:
- dependency-name: eslint-plugin-consistent-default-export-name
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-15 16:32:53 -07:00
Caleb Kniffen
9df848fcc6 fix(build): Allow m1 macs to build binary-codec (#2109)
Switch from `run-script-os` to `copyfiles`. Using `copyfiles` is a more
ideal way to copy files in an os agnostic way.

Fixes #2092.
2022-10-12 12:35:33 -05:00
justinr1234
76b73e16a9 chore: Change package.json engines to match nvmrc (#2089) 2022-09-09 15:16:04 -05:00
dependabot[bot]
7e0b6849b0 build(deps-dev): bump typedoc from 0.22.15 to 0.23.9 (#2055)
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.22.15 to 0.23.9.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.22.15...v0.23.9)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-25 14:19:32 -07:00
Caleb Kniffen
f5b2d71cd7 feat(source-maps): Generate source-maps for browser build (#2010)
Improve debugging for users loading in library via unpkg or jsdelivr
2022-06-01 11:50:23 -05:00
Jackson Mills
7c75e5b489 Run npm audit fix --force (#1997)
* Run npm audit --force and check tests
2022-05-10 16:00:16 -07:00
dependabot[bot]
05930c0991 build(deps-dev): bump mocha from 9.1.3 to 10.0.0 (#1985)
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.3 to 10.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.3...v10.0.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2022-05-06 09:29:44 -07:00
dependabot[bot]
4ae116b10c build(deps-dev): bump @types/puppeteer from 5.4.4 to 5.4.6
Bumps [@types/puppeteer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/puppeteer) from 5.4.4 to 5.4.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/puppeteer)

---
updated-dependencies:
- dependency-name: "@types/puppeteer"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 20:23:32 +00:00
dependabot[bot]
5ca7cf8d20 build(deps-dev): bump @types/node from 16.11.11 to 17.0.14 (#1913)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.11 to 17.0.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-01 13:27:47 -08:00
dependabot[bot]
381d043206 build(deps-dev): bump eslint-plugin-mocha from 9.0.0 to 10.0.3 (#1912)
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 9.0.0 to 10.0.3.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/9.0.0...10.0.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-01 12:58:45 -08:00
dependabot[bot]
5e24929f93 build(deps-dev): bump puppeteer from 10.4.0 to 13.0.1 (#1884)
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 10.4.0 to 13.0.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v10.4.0...v13.0.1)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2022-01-18 08:00:47 -08:00
dependabot[bot]
f027236b55 build(deps-dev): bump eslint-plugin-consistent-default-export-name (#1836)
Bumps [eslint-plugin-consistent-default-export-name](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/releases)
- [Commits](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/commits)

---
updated-dependencies:
- dependency-name: eslint-plugin-consistent-default-export-name
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-01 12:29:14 -08:00
dependabot[bot]
e4d70b53d5 build(deps-dev): bump eslint-plugin-jsdoc from 36.1.1 to 37.1.0 (#1838)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 36.1.1 to 37.1.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v36.1.1...v37.1.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-01 11:10:41 -08:00
ledhed2222
ff9bdbdc4c initial pass at linting ripple-address-codec (#1798)
* initial pass at linting ripple-address-codec

* refix doc changes autofixed by eslint
2021-11-30 04:18:35 -05:00
Jackson Mills
89b8833610 Fix Windows contributors being unable to build and test the xrpl mono repo (#1822)
* Let ripple-binary-codec to build on windows & nix

Co-authored-by: Justintime <justinthenicholasoftime@protonmail.com>
2021-11-23 12:29:06 -08:00
Greg Weisbrod
b90710ffa5 clean up docs 2021-11-08 18:19:45 -05:00
Greg Weisbrod
0d6e723a7e fix inter-repo dependencies and remove now-redundant package-locks within packages
fix linter again
2021-11-08 18:19:45 -05:00
Greg Weisbrod
b5beeb6668 migrate ripple-address-codec tests back to javascript for now - jest and mocha cannot be used in the same typescript project due to type name conflicts 2021-11-08 18:19:45 -05:00
Greg Weisbrod
9f19d771d2 fix linting and devdeps issues by using eslint for ripple-address-codec and removing the misc plugins used by ripple-keypairs
run 'npx lerna link convert' to hoist common devDependencies to top
2021-11-08 18:19:45 -05:00
Greg Weisbrod
43b55ab598 run 'npx lerna link convert' to hoist common devDependencies to top 2021-11-08 18:19:45 -05:00
Greg Weisbrod
99c817ca8a fix all errors resulting from running 'npx lerna bootstrap', hoist github actions to top, hoist vscode config to top 2021-11-08 18:19:44 -05:00
Greg Weisbrod
2b42427634 convert existing xrpl library into a lerna monorepo 2021-11-04 23:18:23 -04:00
Jackson Mills
9647145150 Build: Prepare for 2.0.1 (#1779)
* Build: Prepare for 2.0.1
2021-11-01 10:53:44 -07:00