From 529fa92153a5cd56aaf3a21e1ee8d1b8b7cf6d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Wed, 11 Jan 2023 12:56:13 +0200 Subject: [PATCH 1/2] Rename package: sdk-core (instead of erdjs). --- .github/workflows/{erdjs.yml => build.yml} | 4 +- ...lish-not-main.yml => publish-not-main.yml} | 2 +- .../{erdjs-publish.yml => publish.yml} | 2 +- Makefile | 28 +- README.md | 10 +- browser-tests/index.html | 12 +- package-lock.json | 262 ++++++++++-------- package.json | 12 +- src/_docs/errors.ts | 2 +- src/_docs/typesystem.ts | 2 +- src/errors.ts | 4 +- src/gasEstimator.ts | 4 +- src/smartcontracts/codec/numerical.ts | 2 +- src/smartcontracts/interaction.spec.ts | 36 +-- src/smartcontracts/resultsParser.spec.ts | 2 +- src/smartcontracts/resultsParser.ts | 5 +- src/smartcontracts/smartContract.spec.ts | 10 +- src/smartcontracts/typesystem/types.spec.ts | 24 +- src/smartcontracts/typesystem/types.ts | 10 +- src/testutils/mockProvider.ts | 10 +- src/testutils/networkProviders.ts | 2 +- src/testutils/wallets.ts | 6 +- src/tokenPayment.spec.ts | 4 +- src/transactionWatcher.spec.ts | 6 +- 24 files changed, 237 insertions(+), 224 deletions(-) rename .github/workflows/{erdjs.yml => build.yml} (94%) rename .github/workflows/{erdjs-publish-not-main.yml => publish-not-main.yml} (96%) rename .github/workflows/{erdjs-publish.yml => publish.yml} (97%) diff --git a/.github/workflows/erdjs.yml b/.github/workflows/build.yml similarity index 94% rename from .github/workflows/erdjs.yml rename to .github/workflows/build.yml index 693a339a..a7cc1031 100644 --- a/.github/workflows/erdjs.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Build and Test erdjs +name: Build and Test on: pull_request: @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - build-erdjs: + build: runs-on: ubuntu-latest diff --git a/.github/workflows/erdjs-publish-not-main.yml b/.github/workflows/publish-not-main.yml similarity index 96% rename from .github/workflows/erdjs-publish-not-main.yml rename to .github/workflows/publish-not-main.yml index 2f580206..9bae589f 100644 --- a/.github/workflows/erdjs-publish-not-main.yml +++ b/.github/workflows/publish-not-main.yml @@ -1,4 +1,4 @@ -name: Publish erdjs (not main) +name: Publish (not main) on: workflow_dispatch: diff --git a/.github/workflows/erdjs-publish.yml b/.github/workflows/publish.yml similarity index 97% rename from .github/workflows/erdjs-publish.yml rename to .github/workflows/publish.yml index b525222d..331393c9 100644 --- a/.github/workflows/erdjs-publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish erdjs +name: Publish on: workflow_dispatch: diff --git a/Makefile b/Makefile index 5f5ed7ce..e1b7efc5 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,25 @@ .PHONY: clean browser-tests -browser-tests: out-browser-tests/erdjs-tests-unit.js out-browser-tests/erdjs-tests-unit-min.js out-browser-tests/erdjs-tests-localnet.js out-browser-tests/erdjs-tests-devnet.js out-browser-tests/erdjs-tests-testnet.js +browser-tests: out-browser-tests/tests-unit.js out-browser-tests/tests-unit-min.js out-browser-tests/tests-localnet.js out-browser-tests/tests-devnet.js out-browser-tests/tests-testnet.js -out-browser-tests/erdjs-tests-unit.js: out-tests - npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/erdjs-tests-unit.js --standalone erdjs-tests -p esmify +out-browser-tests/tests-unit.js: out-tests + npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/tests-unit.js --standalone tests -p esmify -out-browser-tests/erdjs-tests-unit-min.js: out-tests - npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/erdjs-tests-unit-min.js --standalone erdjs-tests -p esmify -p tinyify +out-browser-tests/tests-unit-min.js: out-tests + npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.net.spec.*') --require buffer/:buffer -o out-browser-tests/tests-unit-min.js --standalone tests -p esmify -p tinyify -out-browser-tests/erdjs-tests-localnet.js: out-tests - npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.local.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-localnet.js --standalone erdjs-tests -p esmify +out-browser-tests/tests-localnet.js: out-tests + npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.local.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-localnet.js --standalone tests -p esmify -out-browser-tests/erdjs-tests-devnet.js: out-tests - npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.dev.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-devnet.js --standalone erdjs-tests -p esmify +out-browser-tests/tests-devnet.js: out-tests + npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.dev.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-devnet.js --standalone tests -p esmify -out-browser-tests/erdjs-tests-testnet.js: out-tests - npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.test.net.spec.js') --require buffer/:buffer -o out-browser-tests/erdjs-tests-testnet.js --standalone erdjs-tests -p esmify +out-browser-tests/tests-testnet.js: out-tests + npx browserify $(shell find out-tests -type f -name '*.js' ! -name '*.spec.*') $(shell find out-tests -type f -name '*.test.net.spec.js') --require buffer/:buffer -o out-browser-tests/tests-testnet.js --standalone tests -p esmify out-tests: npx tsc -p tsconfig.tests.json -publish-erdjs-beta: - npm publish --tag=beta --access=public - -publish-erdjs: - npm publish --access=public - clean: rm -rf out-tests rm -rf out-browser-tests diff --git a/README.md b/README.md index 560352be..ee955dab 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ MultiversX SDK for JavaScript and TypeScript (written in TypeScript). ## Distribution -[npm](https://www.npmjs.com/package/@multiversx/erdjs) +[npm](https://www.npmjs.com/package/@multiversx/sdk-core) ## Installation -`erdjs` is delivered via **npm** and it can be installed as follows: +`sdk-core` is delivered via **npm** and it can be installed as follows: ``` -npm install @multiversx/erdjs +npm install @multiversx/sdk-core ``` ## Development @@ -24,7 +24,7 @@ Feel free to skip this section if you are not a contributor. ### Prerequisites -`browserify` is required to compile the browser-friendly versions of `erdjs`. It can be installed as follows: +`browserify` is required to compile the browser-friendly versions of `sdk-core`. It can be installed as follows: ``` npm install --global browserify @@ -32,7 +32,7 @@ npm install --global browserify ### Building the library -In order to compile `erdjs`, run the following: +In order to compile the library, run the following: ``` npm install diff --git a/browser-tests/index.html b/browser-tests/index.html index c54b09e9..36403b21 100644 --- a/browser-tests/index.html +++ b/browser-tests/index.html @@ -3,7 +3,7 @@ - Run erdjs Tests in the Browser + Run Tests in the Browser @@ -14,27 +14,27 @@