eosnetworkfoundation / mandel-eosjs

Official Javascript Library for Working with EOS Blockchain
Other
22 stars 6 forks source link

rm semver package dep not avalible in nodejs #71

Closed ericpassmore closed 1 year ago

ericpassmore commented 1 year ago

Change

Fixes #70 The semver package is no longer shipped with nodeJS or shipped with browsers. This made using eosjs more difficult as developers would need to supply yet another package. The semver package was removed and replace by customer version parsing logic. See design considerations for additional info.

Listing of Commits

5d9b3bc rm semver package dep not available in nodejs

Listing of Files Changed

package-lock.json package.json src/ChainSemanticVersion.ts src/eosjs-api.ts src/tests/eosjs-util.test.ts src/tests/node.js

API Changes

After this change ReadOnly calls throw an error if the server version is not 4.0.0 or better

Design Considerations

The logic is a quirky. The 3.x features like send_transaction2 and transaction_status were officially supported in version 3.1.0. Pre-release candidates for 3.1.0 and versions 3.0.0 did not support the new endpoints. In version 4 the logic is cleaner. Starting from version 4.0.0 send_read_only_transaction is supported