From 4466eb35c9dc959755a21f126016c5a197fe7d1d Mon Sep 17 00:00:00 2001 From: fewensa <37804932+fewensa@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:51:59 +0800 Subject: [PATCH] Upgrade deps and fix compile (#21) * Update deps * Bump deps * Fix * Update lerna and fix build * Fix CI * Fix version * Bump deps --------- Co-authored-by: nada <37610161+furoxr@users.noreply.github.com> --- .github/workflows/check.yml | 4 ++-- Dockerfile | 7 +++---- lerna.json | 3 +-- package.json | 5 ++--- plugins/conn-substrate/package.json | 3 +-- probes/bridge-e2e/src/substrate_index.ts | 2 +- probes/bridge-s2s/package.json | 1 - probes/chain-substrate/package.json | 1 - 8 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 12e8bb7..7be41c4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -16,5 +16,5 @@ jobs: - name: Check build run: | - npm run boot - npm run build:all + yarn install + yarn build:all diff --git a/Dockerfile b/Dockerfile index 677f425..f9aac80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ -FROM node:18-alpine3.15 +FROM node:20-alpine COPY . /opt/alarmmgr RUN cd /opt/alarmmgr && \ - npm install && \ - npm run boot && \ - npm run build:all + yarn install && \ + yarn build:all WORKDIR /opt/alarmmgr ENTRYPOINT ["/opt/alarmmgr/alarmmgr.sh"] diff --git a/lerna.json b/lerna.json index af2bee6..6ad0ad6 100644 --- a/lerna.json +++ b/lerna.json @@ -7,6 +7,5 @@ ], "version": "0.0.1", "npmClient": "yarn", - "useNx": true, - "useWorkspaces": true + "useNx": true } diff --git a/package.json b/package.json index 9ac5b72..434afd5 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,13 @@ "notifications/*" ], "scripts": { - "boot": "lerna bootstrap", "start": "lerna run start --scope alarmmgr-bin --", "package": "lerna run package --scope alarmmgr-bin", "build:all": "lerna run build", "test:all": "lerna run test" }, "devDependencies": { - "lerna": "^5.5.2", - "nx": "^14.4.3" + "lerna": "^7.1.4", + "nx": "^16.6.0" } } diff --git a/plugins/conn-substrate/package.json b/plugins/conn-substrate/package.json index af000dc..80e9e84 100644 --- a/plugins/conn-substrate/package.json +++ b/plugins/conn-substrate/package.json @@ -16,7 +16,6 @@ "dependencies": { "alarmmgr-logger": "0.0.1", "alarmmgr-types": "0.0.1", - "@darwinia/api-options": "^2.8.10", - "@polkadot/api": "^9.4.2" + "@polkadot/api": "^10" } } diff --git a/probes/bridge-e2e/src/substrate_index.ts b/probes/bridge-e2e/src/substrate_index.ts index 36bb129..a0d185e 100644 --- a/probes/bridge-e2e/src/substrate_index.ts +++ b/probes/bridge-e2e/src/substrate_index.ts @@ -52,7 +52,7 @@ export class SubstrateIndex { throw new Error(response.statusText); } logger.trace(`[IndexResponse] ${await response.clone().text()}`) - const data: R = await response.json(); + const data: R = (await response.json()) as any; return data; } } diff --git a/probes/bridge-s2s/package.json b/probes/bridge-s2s/package.json index f41bc6d..4af9cda 100644 --- a/probes/bridge-s2s/package.json +++ b/probes/bridge-s2s/package.json @@ -19,7 +19,6 @@ "alarmmgr-probe-traits": "0.0.1", "alarmmgr-subquery": "0.0.1", "alarmmgr-plugin-conn-substrate": "0.0.1", - "@darwinia/api-options": "^2.8.10", "@polkadot/api": "^10", "bignumber.js": "^9.1.0", "await-timeout": "^1.1.1" diff --git a/probes/chain-substrate/package.json b/probes/chain-substrate/package.json index c475993..a5c0080 100644 --- a/probes/chain-substrate/package.json +++ b/probes/chain-substrate/package.json @@ -18,7 +18,6 @@ "alarmmgr-types": "0.0.1", "alarmmgr-probe-traits": "0.0.1", "alarmmgr-plugin-conn-substrate": "0.0.1", - "@darwinia/api-options": "^2.8.10", "@polkadot/api": "^10", "await-timeout": "^1.1.1" }