From 3dd03d1e0ca983bd8ac38d11b154eeff7c285819 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 29 Jan 2025 11:28:16 +0100 Subject: [PATCH 1/2] chore: fix tests type checks in vscode --- package.json | 4 ++-- tsconfig.eslint.json | 2 +- tsconfig.json | 37 ++++++------------------------------- tsconfig.src.json | 35 +++++++++++++++++++++++++++++++++++ tsconfig.tests.json | 10 ---------- 5 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 tsconfig.src.json delete mode 100644 tsconfig.tests.json diff --git a/package.json b/package.json index 8553671bbb..3b5903cb3f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "sideEffects": false, "scripts": { "build:assets": "node tooling/fetch-aesophia-cli.js", - "build:types": "tsc", + "build:types": "tsc -p tsconfig.src.json", "build:dist": "webpack", "build:es": "babel src --config-file ./babel.esm.config.js --out-dir es --extensions .ts --source-maps true", "build:api:node": "autorest tooling/autorest/node.yaml && node tooling/autorest/postprocessing.js node", @@ -38,7 +38,7 @@ "lint": "run-p lint:*", "lint:prettier": "prettier . --check", "lint:eslint": "eslint . --ext .ts,.js", - "lint:types": "tsc -p tsconfig.tests.json", + "lint:types": "tsc", "format": "prettier . --write", "test": "mocha './test/unit/' './test/integration/'", "test:assets": "node tooling/fetch-metamask.js", diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index e281a07592..58a9c8e6b2 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,4 +1,4 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.src.json", "include": ["src/**/*", "test/**/*", "tooling/**/*"] } diff --git a/tsconfig.json b/tsconfig.json index 4d2a6a5acc..fe58f8cd0c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,35 +1,10 @@ { + "extends": "./tsconfig.src.json", "compilerOptions": { - "esModuleInterop": true, - "emitDeclarationOnly": true, - "isolatedModules": true, - "outDir": "./es", - "noImplicitOverride": true, - "module": "es2022", - "target": "es2022", - "lib": ["es2022", "dom"], - "moduleResolution": "node", - "preserveConstEnums": true, - "declaration": true, - "downlevelIteration": true, - "allowSyntheticDefaultImports": true, - "typeRoots": ["./node_modules/@types", "./src/typings"], - "strict": true, - "strictFunctionTypes": false // see https://github.com/aeternity/aepp-sdk-js/issues/1793 + "emitDeclarationOnly": false, + "resolveJsonModule": true, + "noEmit": true }, - "include": ["src/**/*"], - "typedocOptions": { - "entryPoints": ["src/index.ts"], - "out": "./docs/api", - "excludePrivate": true, - "githubPages": false, - "excludeExternals": true, - "treatWarningsAsErrors": true, - "validation": { - "invalidLink": true - }, - "plugin": ["typedoc-plugin-missing-exports"], - "highlightLanguages": ["vue"], - "readme": "none" - } + "include": ["src/**/*", "test/**/*"], + "exclude": ["test/environment/**/*"] } diff --git a/tsconfig.src.json b/tsconfig.src.json new file mode 100644 index 0000000000..4d2a6a5acc --- /dev/null +++ b/tsconfig.src.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "emitDeclarationOnly": true, + "isolatedModules": true, + "outDir": "./es", + "noImplicitOverride": true, + "module": "es2022", + "target": "es2022", + "lib": ["es2022", "dom"], + "moduleResolution": "node", + "preserveConstEnums": true, + "declaration": true, + "downlevelIteration": true, + "allowSyntheticDefaultImports": true, + "typeRoots": ["./node_modules/@types", "./src/typings"], + "strict": true, + "strictFunctionTypes": false // see https://github.com/aeternity/aepp-sdk-js/issues/1793 + }, + "include": ["src/**/*"], + "typedocOptions": { + "entryPoints": ["src/index.ts"], + "out": "./docs/api", + "excludePrivate": true, + "githubPages": false, + "excludeExternals": true, + "treatWarningsAsErrors": true, + "validation": { + "invalidLink": true + }, + "plugin": ["typedoc-plugin-missing-exports"], + "highlightLanguages": ["vue"], + "readme": "none" + } +} diff --git a/tsconfig.tests.json b/tsconfig.tests.json deleted file mode 100644 index 1cb5e508e0..0000000000 --- a/tsconfig.tests.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "emitDeclarationOnly": false, - "resolveJsonModule": true, - "noEmit": true - }, - "include": ["src/**/*", "test/**/*"], - "exclude": ["test/environment/**/*"] -} From 96f3c08044aeac889506d77d23ed34c0bd35832e Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Wed, 29 Jan 2025 11:37:36 +0100 Subject: [PATCH 2/2] ci: enable docker quiet-pull --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ca1af1ca8..af253d0257 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - run: npm run lint - run: npm run docs:examples && npm run docs:api && ./docs/build-assets.sh if: contains(github.event.pull_request.title, 'Release') - - run: docker compose up -d --wait + - run: docker compose up -d --wait --quiet-pull - run: npx nyc npm test - run: npx nyc report --reporter=text-lcov > coverage.lcov - uses: codecov/codecov-action@v4