From c60280ff3e538b719e449df3c2771e2b009c5e44 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 31 Jul 2024 15:56:18 +0300 Subject: [PATCH] TW-1461: [EVM] Arch epic QA. Fix Covalent by Node.js v20 --- .env.dist | 1 + .github/workflows/code-quality.yml | 2 +- .github/workflows/repository-setup/action.yml | 13 +++++-------- .gitignore | 3 +++ Dockerfile | 2 +- src/utils/errors.ts | 2 +- tsconfig.json | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.env.dist b/.env.dist index 5f4b337..129eb32 100644 --- a/.env.dist +++ b/.env.dist @@ -10,3 +10,4 @@ THREE_ROUTE_API_AUTH_TOKEN= REDIS_URL= ADMIN_USERNAME= ADMIN_PASSWORD= +COVALENT_API_KEY= diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 3a43b45..216061d 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -12,7 +12,7 @@ jobs: runs-on: macos-latest steps: - name: Clone repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Repository setup uses: ./.github/workflows/repository-setup diff --git a/.github/workflows/repository-setup/action.yml b/.github/workflows/repository-setup/action.yml index 48c6347..9b410c6 100644 --- a/.github/workflows/repository-setup/action.yml +++ b/.github/workflows/repository-setup/action.yml @@ -1,24 +1,21 @@ name: Repository setup -description: Setups Node 16.x & installs dependencies +description: Setups Node.js & installs dependencies runs: using: 'composite' steps: - - name: Setup Node 16.x - uses: actions/setup-node@v2 + - name: Setup Node 20.x + uses: actions/setup-node@v4 with: - node-version: '16.x' - - - name: Get branch name - uses: EthanSK/git-branch-name-action@v1 + node-version: '20.x' - name: Get yarn cache directory path id: yarn-cache-dir-path shell: bash run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.gitignore b/.gitignore index 9fb2dbd..8e39db5 100644 --- a/.gitignore +++ b/.gitignore @@ -100,6 +100,9 @@ dist # DynamoDB Local files .dynamodb/ +# Redis +*.rdb + # TernJS port file .tern-port diff --git a/Dockerfile b/Dockerfile index e4444be..1702c72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14 +FROM node:20-alpine3.18 WORKDIR /usr/src/app COPY package.json yarn.lock ./ RUN yarn diff --git a/src/utils/errors.ts b/src/utils/errors.ts index 1acaa32..1877d31 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -8,7 +8,7 @@ interface CodedErrorForResponse { type StatusCodeNumber = (typeof StatusCodes)[keyof typeof StatusCodes]; export class CodedError extends Error { - constructor(public code: StatusCodeNumber | number, message: string, public errorCode?: string) { + constructor(public code: StatusCodeNumber, message: string, public errorCode?: string) { super(message); } diff --git a/tsconfig.json b/tsconfig.json index 87d512f..d8d5ac7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "target": "ES2019", "module": "commonjs", "lib": ["esnext"], - "allowJs": true, + "allowJs": false, "sourceMap": true, "outDir": "dist", "noEmit": false,