git.delta.rocks / unique-network / refs/commits / a478235c0b6e

difftreelog

Merge pull request #1047 from UniqueNetwork/fix/nodejs-error

Yaroslav Bolyukin2023-12-20parents: #430b020 #aaeef15.patch.diff
in: master
upgrade nodejs version & fix error

15 files changed

modified.github/workflows/codestyle.ymldiffbeforeafterboth
--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -40,7 +40,7 @@
           ref: ${{ github.head_ref }}            
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
       - name: Install modules
         run: cd js-packages && yarn
       - name: Run ESLint
modified.github/workflows/collator-selection.ymldiffbeforeafterboth
--- a/.github/workflows/collator-selection.yml
+++ b/.github/workflows/collator-selection.yml
@@ -146,7 +146,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
--- a/.github/workflows/forkless-update-data.yml
+++ b/.github/workflows/forkless-update-data.yml
@@ -122,7 +122,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
@@ -151,13 +151,14 @@
           yarn
           ../scripts/wait_for_first_block.sh
           echo "Executing upgrade"
-          yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
+          yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
         env:
           RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
 
       - name: Run Parallel tests after forkless upgrade
         working-directory: js-packages/tests
         run: |
+          yarn 
           yarn add mochawesome
           ../scripts/wait_for_first_block.sh
           echo "Ready to start tests"
@@ -168,7 +169,10 @@
       - name: Run Sequential tests after forkless upgrade
         if: success() || failure()
         working-directory: js-packages/tests
-        run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
+        run: |
+          yarn
+          yarn add mochawesome
+          NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
         env:
           RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
 
modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -137,7 +137,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
@@ -166,7 +166,7 @@
           yarn
           ../scripts/wait_for_first_block.sh
           echo "Executing upgrade"
-          yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
+          yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
         env:
           RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
 
modified.github/workflows/governance.ymldiffbeforeafterboth
before · .github/workflows/governance.yml
1# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings2name: governance tests34# Triger: only call from main workflow(re-usable workflows)5on:6  workflow_call:78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:10  prepare-execution-marix:11    name: Prepare execution matrix1213    runs-on: self-hosted-ci14    outputs:15      matrix: ${{ steps.create_matrix.outputs.matrix }}1617    steps:18      - name: Clean Workspace19        uses: AutoModality/action-clean@v1.1.02021      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it22      - uses: actions/checkout@v3.1.023        with:24          ref: ${{ github.head_ref }} #Checking out head commit2526      - name: Read .env file27        uses: xom9ikk/dotenv@v22829      - name: Create Execution matrix30        uses: CertainLach/create-matrix-action@v431        id: create_matrix32        with:33          matrix: |34            network {unique}, wasm_name {unique}35            network {quartz}, wasm_name {quartz}36            network {opal}, wasm_name {opal}37            network {sapphire}, wasm_name {quartz}3839  dev_build_int_tests:40    needs: prepare-execution-marix41    # The type of runner that the job will run on42    runs-on: [self-hosted-ci, medium]43    timeout-minutes: 13804445    name: ${{ matrix.network }}46    strategy:47      matrix:48        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}4950    continue-on-error: true #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.5152    steps:53      - name: Clean Workspace54        uses: AutoModality/action-clean@v1.1.05556      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it57      - uses: actions/checkout@v3.1.058        with:59          ref: ${{ github.head_ref }} #Checking out head commit6061      - name: Read .env file62        uses: xom9ikk/dotenv@v26364      - name: Generate ENV related extend file for docker-compose65        uses: cuchi/jinja2-action@v1.2.066        with:67          template: .docker/docker-compose.gov.j268          output_file: .docker/docker-compose.${{ matrix.network }}.yml69          variables: |70            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}71            NETWORK=${{ matrix.network }}72            WASM_NAME=${{ matrix.wasm_name }}7374      - name: Show build configuration75        run: cat .docker/docker-compose.${{ matrix.network }}.yml7677      - name: Build the stack78        run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans7980      - uses: actions/setup-node@v3.5.181        with:82          node-version: 188384      - name: Run tests85        working-directory: js-packages/tests86        run: |87          yarn install88          yarn add mochawesome89          ../scripts/wait_for_first_block.sh90          echo "Ready to start tests"91          NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}92        env:93          RPC_URL: http://127.0.0.1:9944/9495      - name: Test Report96        uses: phoenix-actions/test-reporting@v1097        id: test-report98        if: success() || failure() # run this step even if previous step failed99        with:100          name: int test results - ${{ matrix.network }} # Name of the check run which will be created101          path: js-packages/tests/mochawesome-report/test-*.json # Path to test results102          reporter: mochawesome-json103          fail-on-error: 'false'104105      - name: Read output variables106        run: |107          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"108109      - name: Stop running containers110        if: always() # run this step always111        run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down112113      - name: Remove builder cache114        if: always() # run this step always115        run: |116          docker builder prune -f -a117          docker system prune -f118          docker image prune -f -a
after · .github/workflows/governance.yml
1# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings2name: governance tests34# Triger: only call from main workflow(re-usable workflows)5on:6  workflow_call:78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:10  prepare-execution-marix:11    name: Prepare execution matrix1213    runs-on: self-hosted-ci14    outputs:15      matrix: ${{ steps.create_matrix.outputs.matrix }}1617    steps:18      - name: Clean Workspace19        uses: AutoModality/action-clean@v1.1.02021      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it22      - uses: actions/checkout@v3.1.023        with:24          ref: ${{ github.head_ref }} #Checking out head commit2526      - name: Read .env file27        uses: xom9ikk/dotenv@v22829      - name: Create Execution matrix30        uses: CertainLach/create-matrix-action@v431        id: create_matrix32        with:33          matrix: |34            network {unique}, wasm_name {unique}35            network {quartz}, wasm_name {quartz}36            network {opal}, wasm_name {opal}37            network {sapphire}, wasm_name {quartz}3839  dev_build_int_tests:40    needs: prepare-execution-marix41    # The type of runner that the job will run on42    runs-on: [self-hosted-ci, medium]43    timeout-minutes: 13804445    name: ${{ matrix.network }}46    strategy:47      matrix:48        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}4950    continue-on-error: true #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.5152    steps:53      - name: Clean Workspace54        uses: AutoModality/action-clean@v1.1.05556      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it57      - uses: actions/checkout@v3.1.058        with:59          ref: ${{ github.head_ref }} #Checking out head commit6061      - name: Read .env file62        uses: xom9ikk/dotenv@v26364      - name: Generate ENV related extend file for docker-compose65        uses: cuchi/jinja2-action@v1.2.066        with:67          template: .docker/docker-compose.gov.j268          output_file: .docker/docker-compose.${{ matrix.network }}.yml69          variables: |70            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}71            NETWORK=${{ matrix.network }}72            WASM_NAME=${{ matrix.wasm_name }}7374      - name: Show build configuration75        run: cat .docker/docker-compose.${{ matrix.network }}.yml7677      - name: Build the stack78        run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans7980      - uses: actions/setup-node@v3.5.181        with:82          node-version: 208384      - name: Run tests85        working-directory: js-packages/tests86        run: |87          yarn install88          yarn add mochawesome89          ../scripts/wait_for_first_block.sh90          echo "Ready to start tests"91          NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}92        env:93          RPC_URL: http://127.0.0.1:9944/9495      - name: Test Report96        uses: phoenix-actions/test-reporting@v1097        id: test-report98        if: success() || failure() # run this step even if previous step failed99        with:100          name: int test results - ${{ matrix.network }} # Name of the check run which will be created101          path: js-packages/tests/mochawesome-report/test-*.json # Path to test results102          reporter: mochawesome-json103          fail-on-error: 'false'104105      - name: Read output variables106        run: |107          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"108109      - name: Stop running containers110        if: always() # run this step always111        run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down112113      - name: Remove builder cache114        if: always() # run this step always115        run: |116          docker builder prune -f -a117          docker system prune -f118          docker image prune -f -a
modified.github/workflows/make-bench.ymldiffbeforeafterboth
--- a/.github/workflows/make-bench.yml
+++ b/.github/workflows/make-bench.yml
@@ -36,7 +36,7 @@
 
       - uses: actions/setup-node@v3
         with:
-          node-version: 18
+          node-version: 20
 
       - name: RUN benchmarking
         run: |
@@ -50,8 +50,8 @@
         working-directory: js-packages/scripts
         run: |
           yarn
-          yarn ts-node --esm calibrate.ts
-          yarn ts-node --esm calibrateApply.ts
+          yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm calibrate.ts
+          yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm calibrateApply.ts
           
       - name: show git diff
         run: |
modified.github/workflows/market-test.ymldiffbeforeafterboth
--- a/.github/workflows/market-test.yml
+++ b/.github/workflows/market-test.yml
@@ -103,7 +103,7 @@
      
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Setup TypeScript
         working-directory: qa-tests
modified.github/workflows/node-only-update.ymldiffbeforeafterboth
--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -143,7 +143,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 18.17.1 # Update node version to 20 after mainnet will have changes for it
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
modified.github/workflows/polkadot-types.ymldiffbeforeafterboth
--- a/.github/workflows/polkadot-types.yml
+++ b/.github/workflows/polkadot-types.yml
@@ -68,7 +68,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       # - name: Install jq
       #   run: sudo apt install jq -y
modified.github/workflows/try-runtime.ymldiffbeforeafterboth
--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -175,7 +175,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Log in to Docker Hub
         uses: docker/login-action@v2.1.0
modified.github/workflows/xcm.ymldiffbeforeafterboth
--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -327,7 +327,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
@@ -370,7 +370,7 @@
       - name: Call HRMP initialization
         working-directory: js-packages/tests
         run: |
-          yarn ts-node --esm util/createHrmp.ts ${{matrix.network}}
+          yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm util/createHrmp.ts ${{matrix.network}}
 
       - name: Run XCM tests
         working-directory: js-packages/tests
modified.github/workflows/xnft.ymldiffbeforeafterboth
--- a/.github/workflows/xnft.yml
+++ b/.github/workflows/xnft.yml
@@ -159,7 +159,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Clone xnft-tests
         run: git clone https://github.com/UniqueNetwork/xnft-tests.git
modified.github/workflows/yarn-dev.ymldiffbeforeafterboth
--- a/.github/workflows/yarn-dev.yml
+++ b/.github/workflows/yarn-dev.yml
@@ -59,7 +59,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version: 18
+          node-version: 20
 
       - name: Run tests
         working-directory: js-packages/tests
@@ -90,13 +90,13 @@
         working-directory: js-packages/scripts
         run: |
           yarn install
-          npx ts-node --esm ./benchmarks/mintFee/index.ts
+          node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/mintFee/index.ts
 
       - name: Run benchmark opsFee tests
         working-directory: js-packages/scripts
         run: |
           yarn install
-          npx ts-node --esm ./benchmarks/opsFee/index.ts
+          node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/opsFee/index.ts
 
       - name: Stop running containers
         if: always()                   # run this step always
modifiedjs-packages/package.jsondiffbeforeafterboth
--- a/js-packages/package.json
+++ b/js-packages/package.json
@@ -45,9 +45,9 @@
     "prepublish": "yarn tsc",
     "lint": "eslint --ext .ts .",
     "fix": "yarn lint --fix",
-    "polkadot-types-fetch-metadata": "yarn ts-node --esm scripts/fetchMetadata.ts",
-    "polkadot-types-from-defs": "ts-node --esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .",
-    "polkadot-types-from-chain": "ts-node --esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .",
+    "polkadot-types-fetch-metadata": "yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm scripts/fetchMetadata.ts",
+    "polkadot-types-from-defs": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .",
+    "polkadot-types-from-chain": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .",
     "polkadot-types": "echo \"export default {}\" > types/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain && rm types/registry.ts"
   },
   "resolutions": {
modifiedjs-packages/tests/package.jsondiffbeforeafterboth
--- a/js-packages/tests/package.json
+++ b/js-packages/tests/package.json
@@ -13,9 +13,9 @@
         "mocha": "^10.1.0"
     },
     "scripts": {
-        "setup": "yarn ts-node --esm ./util/globalSetup.ts",
-        "setIdentities": "yarn ts-node --esm ./util/identitySetter.ts",
-        "checkRelayIdentities": "yarn ts-node --esm ./util/relayIdentitiesChecker.ts",
+        "setup": "yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ./util/globalSetup.ts",
+        "setIdentities": "yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ./util/identitySetter.ts",
+        "checkRelayIdentities": "yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ./util/relayIdentitiesChecker.ts",
         "_test": "yarn setup && yarn mocha --timeout 9999999 --loader=ts-node/esm.mjs",
         "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader=ts-node/esm.mjs",
         "test": "yarn _test './**/*.*test.ts'",