git.delta.rocks / unique-network / refs/commits / 1f925f1cca7b

difftreelog

fix nodejs error with esm module

Konstantin Astakhov2023-12-18parent: #2b9417a.patch.diff
in: master

14 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:  20
+          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:  20
+          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:  20
+          node-version: 20
 
       - name: Install baedeker
         uses: UniqueNetwork/baedeker-action/setup@built
@@ -151,7 +151,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/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:  20
+          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
--- a/.github/workflows/governance.yml
+++ b/.github/workflows/governance.yml
@@ -79,7 +79,7 @@
 
       - uses: actions/setup-node@v3.5.1
         with:
-          node-version:  20
+          node-version: 20
 
       - name: Run tests
         working-directory: js-packages/tests
modified.github/workflows/make-bench.ymldiffbeforeafterboth
before · .github/workflows/make-bench.yml
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing2# Nested workflow for checks related to formatting Rust code 34name: make-bench56# Triger: only call from main workflow(re-usable workflows)7on:8  push:9    branches:10      - "feature/ci-make-bench"11  workflow_dispatch:1213jobs:14  make-bench:15    runs-on: [ bench ]16    steps:17      - name: Clean Workspace18        uses: AutoModality/action-clean@v1.1.01920      - uses: actions/checkout@v3.3.021        with:22          ref: develop 2324      - name: Read .env file25        uses: xom9ikk/dotenv@v2.1.1        2627      - name: Install substrate dependencies28        run: sudo apt install -y curl cmake make libssl-dev pkg-config libclang-dev clang protobuf-compiler2930      - name: Install actual toolchain31        uses: actions-rs/toolchain@v1.0.732        with:33            toolchain: ${{ env.RUST_TOOLCHAIN }}34            default: true35            target: wasm32-unknown-unknown3637      - uses: actions/setup-node@v338        with:39          node-version:  204041      - name: RUN benchmarking42        run: |43          time make bench4445      - name: Run node dev mode in background46        run: |47          ./target/release/unique-collator --dev &4849      - name: RUN Calibrate50        working-directory: js-packages/scripts51        run: |52          yarn53          yarn ts-node --esm calibrate.ts54          yarn ts-node --esm calibrateApply.ts55          56      - name: show git diff57        run: |58          git diff5960      - name: Create Pull Request61        uses: peter-evans/create-pull-request@v4.2.362        with:63          base: develop64          branch: ci/make-bench65          commit-message: commit benchmarking66          committer: Unique <noreply@github.com>67          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>68          signoff: false69          delete-branch: true70          title: 'CI Make Benchmarking'71          assignees: CertainLach72          reviewers: CertainLach
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:  20
+          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:  20
+          node-version: 20
 
       - 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:  20
+          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:  20
+          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:  20
+          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:  20
+          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:  20
+          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": {