Skip to content

Commit

Permalink
Merge the Soroban RPC client into this library (#860)
Browse files Browse the repository at this point in the history
This merges the `soroban-client` library
([stellar/js-soroban-client](https://github.com/stellar/js-soroban-client)) into
this package.

The namespaces have changed to move each server-dependent component into its own
module. There is a detailed migration guide [written
here](https://gist.github.com/Shaptic/5ce4f16d9cce7118f391fbde398c2f30) which
should outline both the literal (i.e. necessary code changes) and philosophical
(i.e. how to find certain functionality) changes needed to adapt to this merge.

The code changes themselves are:
 * moving js-soroban-client into src/soroban and its tests into test/unit/server/soroban
 * dropping duplicate files (like axios, etc.)
 * migrating imports to remove conflicts and make them sensible
 * moving namespaces around to separate Horizon and Soroban RPC in a sensible way
 * updating tests to work with both libs
  • Loading branch information
Shaptic committed Oct 23, 2023
1 parent 4b7a4f1 commit 978eda3
Show file tree
Hide file tree
Showing 90 changed files with 6,419 additions and 1,531 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
node-version: [16, 18, 20]
node-version: [16, 18]

steps:
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ A breaking change will get clearly marked in this log.

## Unreleased

### Breaking Changes
* The `soroban-client` library ([stellar/js-soroban-client](https://github.com/stellar/js-soroban-client)) has been merged into this package, causing significant breaking changes in the module structure ([#860](https://github.com/stellar/js-stellar-sdk/pull/860)):

- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g. `TransactionBuilder`) are still in the top level, Horizon-specific interactions are in the `Horizon` namespace (i.e. `Server` is now `Horizon.Server`), and new Soroban RPC interactions are in the `SorobanRpc` namespace.
- There is a [detailed migration guide](https://gist.github.com/Shaptic/5ce4f16d9cce7118f391fbde398c2f30) available to outline both the literal (i.e. necessary code changes) and philosophical (i.e. how to find certain functionality) changes needed to adapt to this merge.


## [v11.0.0-beta.4](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.3...v11.0.0-beta.4)

Expand Down
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@
"build:prod": "cross-env NODE_ENV=production yarn _build",
"build:node": "yarn _babel && yarn build:ts",
"build:ts": "tsc -p ./config/tsconfig.json",
"build:test": "tsc -p ./test/tsconfig.json",
"build:browser": "webpack -c config/webpack.config.browser.js",
"build:docs": "cross-env NODE_ENV=docs yarn _babel",
"clean": "rm -rf lib/ dist/ coverage/ .nyc_output/ jsdoc/",
"docs": "yarn build:docs && jsdoc -c ./config/.jsdoc.json --verbose",
"test": "yarn test:node && yarn test:integration && yarn test:browser",
"test": "yarn build:test && yarn test:node && yarn test:integration && yarn test:browser",
"test:node": "yarn _nyc mocha --recursive 'test/unit/**/*.js'",
"test:integration": "yarn _nyc mocha --recursive 'test/integration/**/*.js'",
"test:browser": "karma start config/karma.conf.js",
"fmt": "yarn eslint -c .eslintrc.js src/ --fix && yarn _prettier",
"preversion": "yarn clean && yarn fmt && yarn build:prod && yarn test",
"prepare": "yarn build:prod",
"_build": "yarn build:node && yarn build:browser",
"_build": "yarn build:node && yarn build:test && yarn build:browser",
"_babel": "babel --extensions '.ts' --out-dir lib/ src/",
"_nyc": "nyc --nycrc-path config/.nycrc",
"_prettier": "prettier --ignore-path config/.prettierignore --write './**/*.js'"
"_prettier": "prettier --ignore-path config/.prettierignore --write './test/**/*.js'"
},
"husky": {
"hooks": {
Expand All @@ -51,8 +52,7 @@
},
"lint-staged": {
"**/*.{js,json,ts}": [
"yarn fmt",
"yarn lint"
"yarn fmt"
]
},
"mocha": {
Expand All @@ -66,7 +66,7 @@
],
"sort": true,
"recursive": true,
"timeout": 60000
"timeout": 30000
},
"nyc": {
"instrument": false,
Expand All @@ -86,11 +86,14 @@
"@definitelytyped/dtslint": "^0.0.182",
"@istanbuljs/nyc-config-babel": "3.0.0",
"@stellar/tsconfig": "^1.0.2",
"@types/chai": "^4.3.6",
"@types/detect-node": "^2.0.0",
"@types/eventsource": "^1.1.12",
"@types/lodash": "^4.14.199",
"@types/mocha": "^10.0.2",
"@types/node": "^20.8.2",
"@types/randombytes": "^2.0.1",
"@types/sinon": "^10.0.19",
"@types/urijs": "^1.19.20",
"@typescript-eslint/parser": "^6.7.4",
"axios-mock-adapter": "^1.22.0",
Expand Down Expand Up @@ -143,7 +146,7 @@
"bignumber.js": "^9.1.2",
"eventsource": "^2.0.2",
"randombytes": "^2.1.0",
"stellar-base": "10.0.0-beta.2",
"stellar-base": "10.0.0-beta.3",
"toml": "^3.0.0",
"urijs": "^1.19.1"
}
Expand Down
Loading

0 comments on commit 978eda3

Please sign in to comment.