diff --git a/packages/autocertifier-client/tsconfig.json b/packages/autocertifier-client/tsconfig.json index 8a784bac80..ce0f5b1ea2 100644 --- a/packages/autocertifier-client/tsconfig.json +++ b/packages/autocertifier-client/tsconfig.json @@ -9,6 +9,6 @@ "generated" ], "references": [ - { "path": "../utils/tsconfig.node.json" } + { "path": "../utils" } ] } diff --git a/packages/autocertifier-server/package.json b/packages/autocertifier-server/package.json index 1bdac15524..7a99aeebd2 100644 --- a/packages/autocertifier-server/package.json +++ b/packages/autocertifier-server/package.json @@ -25,7 +25,7 @@ "author": "Streamr Network AG ", "scripts": { "build": "tsc -b", - "check": "tsc -p ./tsconfig.jest.json && tsc --noEmit -p tsconfig.node.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit test/integration", diff --git a/packages/autocertifier-server/test/tsconfig.json b/packages/autocertifier-server/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/autocertifier-server/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/autocertifier-server/tsconfig.jest.json b/packages/autocertifier-server/tsconfig.jest.json index 1355cd6d49..7f31c03d04 100644 --- a/packages/autocertifier-server/tsconfig.jest.json +++ b/packages/autocertifier-server/tsconfig.jest.json @@ -1,9 +1,8 @@ { "extends": "../../tsconfig.jest.json", "include": [ + "bin", + "src", "test" - ], - "references": [ - { "path": "./tsconfig.node.json" } ] } diff --git a/packages/autocertifier-server/tsconfig.json b/packages/autocertifier-server/tsconfig.json index 86445ab0b2..50a2bf5878 100644 --- a/packages/autocertifier-server/tsconfig.json +++ b/packages/autocertifier-server/tsconfig.json @@ -1,10 +1,16 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist" }, + "include": [ + "src", + "bin" + ], "references": [ - { "path": "./tsconfig.node.json" }, - { "path": "./tsconfig.jest.json" } + { "path": "../autocertifier-client" }, + { "path": "../dht" }, + { "path": "../proto-rpc" }, + { "path": "../utils" } ] } diff --git a/packages/autocertifier-server/tsconfig.node.json b/packages/autocertifier-server/tsconfig.node.json deleted file mode 100644 index c9784a0cd8..0000000000 --- a/packages/autocertifier-server/tsconfig.node.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src", - "bin" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../proto-rpc/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" } - ] -} diff --git a/packages/cdn-location/data-generation/tsconfig.json b/packages/cdn-location/data-generation/tsconfig.json new file mode 100644 index 0000000000..5a03dbdeb8 --- /dev/null +++ b/packages/cdn-location/data-generation/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "..", + "include": [ + "**/*" + ] +} diff --git a/packages/cdn-location/package.json b/packages/cdn-location/package.json index a09307e383..d43ee87b1b 100644 --- a/packages/cdn-location/package.json +++ b/packages/cdn-location/package.json @@ -19,7 +19,7 @@ "author": "Streamr Network AG ", "scripts": { "build": "tsc -b", - "check": "tsc -p ./tsconfig.jest.json && tsc --noEmit -p ./tsconfig.node.json && tsc --noEmit -p ./tsconfig.data-generation.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/integration", diff --git a/packages/cdn-location/test/tsconfig.json b/packages/cdn-location/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/cdn-location/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/cdn-location/tsconfig.data-generation.json b/packages/cdn-location/tsconfig.data-generation.json deleted file mode 100644 index a5e9b203c5..0000000000 --- a/packages/cdn-location/tsconfig.data-generation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.node.json", - "compilerOptions": { - "noEmit": true - }, - "include": [ - "data-generation" - ] -} diff --git a/packages/cdn-location/tsconfig.jest.json b/packages/cdn-location/tsconfig.jest.json index 757f99e3ac..ab3046c41d 100644 --- a/packages/cdn-location/tsconfig.jest.json +++ b/packages/cdn-location/tsconfig.jest.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.jest.json", "include": [ + "src", + "data-generation", "test" - ], - "references": [ - { "path": "./tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" } ] } diff --git a/packages/cdn-location/tsconfig.json b/packages/cdn-location/tsconfig.json index adad6f6b2d..5621ed82fc 100644 --- a/packages/cdn-location/tsconfig.json +++ b/packages/cdn-location/tsconfig.json @@ -1,11 +1,12 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist" }, + "include": [ + "src" + ], "references": [ - { "path": "./tsconfig.node.json" }, - { "path": "./tsconfig.data-generation.json" }, - { "path": "./tsconfig.jest.json" } + { "path": "../utils" } ] } diff --git a/packages/cdn-location/tsconfig.node.json b/packages/cdn-location/tsconfig.node.json deleted file mode 100644 index ea94b981f6..0000000000 --- a/packages/cdn-location/tsconfig.node.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" } - ] -} diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index 73f4d4e5fd..d2cfaf97eb 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -18,7 +18,7 @@ }, "scripts": { "build": "tsc -b", - "check": "tsc -p ./tsconfig.jest.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run build && jest --bail --forceExit" diff --git a/packages/cli-tools/test/tsconfig.json b/packages/cli-tools/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/cli-tools/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/cli-tools/tsconfig.jest.json b/packages/cli-tools/tsconfig.jest.json index 52395397ac..f6164db415 100644 --- a/packages/cli-tools/tsconfig.jest.json +++ b/packages/cli-tools/tsconfig.jest.json @@ -5,12 +5,5 @@ "src", "bin", "test" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../sdk/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" }, - { "path": "../trackerless-network/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" } ] } diff --git a/packages/cli-tools/tsconfig.json b/packages/cli-tools/tsconfig.json index 86445ab0b2..b929f67a94 100644 --- a/packages/cli-tools/tsconfig.json +++ b/packages/cli-tools/tsconfig.json @@ -1,10 +1,18 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "disableSourceOfProjectReferenceRedirect": true }, + "include": [ + "package.json", + "src", + "bin" + ], "references": [ - { "path": "./tsconfig.node.json" }, - { "path": "./tsconfig.jest.json" } + { "path": "../dht" }, + { "path": "../sdk" }, + { "path": "../trackerless-network" }, + { "path": "../utils" } ] } diff --git a/packages/cli-tools/tsconfig.node.json b/packages/cli-tools/tsconfig.node.json deleted file mode 100644 index 0457151365..0000000000 --- a/packages/cli-tools/tsconfig.node.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "disableSourceOfProjectReferenceRedirect": true - }, - "include": [ - "package.json", - "src", - "bin" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../sdk/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" }, - { "path": "../trackerless-network/tsconfig.node.json" } - ] -} diff --git a/packages/dht/package.json b/packages/dht/package.json index 6fdd9f8f38..9ce5f467e5 100644 --- a/packages/dht/package.json +++ b/packages/dht/package.json @@ -24,9 +24,9 @@ "scripts": { "prebuild": "./proto.sh", "postbuild": "./scripts/postbuild.sh", - "build": "tsc -b tsconfig.node.json", + "build": "tsc -b", "build-browser": "webpack --mode=development --progress", - "check": "tsc -p ./tsconfig.jest.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-end-to-end", diff --git a/packages/dht/scripts/postbuild.sh b/packages/dht/scripts/postbuild.sh index ddf18bc201..70efe8acad 100755 --- a/packages/dht/scripts/postbuild.sh +++ b/packages/dht/scripts/postbuild.sh @@ -7,4 +7,4 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd "${SCRIPT_DIR}/.." # Sanitize the final package.json -npx ts-node -P tsconfig.node.json scripts/rewrite-package.ts +npx ts-node scripts/rewrite-package.ts diff --git a/packages/dht/scripts/tsconfig.json b/packages/dht/scripts/tsconfig.json new file mode 100644 index 0000000000..5a03dbdeb8 --- /dev/null +++ b/packages/dht/scripts/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "..", + "include": [ + "**/*" + ] +} diff --git a/packages/dht/test/tsconfig.json b/packages/dht/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/dht/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/dht/tsconfig.jest.json b/packages/dht/tsconfig.jest.json index a227c3edba..12d9bf6074 100644 --- a/packages/dht/tsconfig.jest.json +++ b/packages/dht/tsconfig.jest.json @@ -9,13 +9,5 @@ "test", "package.json", "scripts" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../proto-rpc/tsconfig.node.json" }, - { "path": "../autocertifier-client" }, - { "path": "../cdn-location" }, - { "path": "../geoip-location/tsconfig.node.json" } ] } diff --git a/packages/dht/tsconfig.json b/packages/dht/tsconfig.json index 8f24c2e23c..ce6ed8db32 100644 --- a/packages/dht/tsconfig.json +++ b/packages/dht/tsconfig.json @@ -1,9 +1,19 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "noImplicitOverride": false }, + "include": [ + "src", + "generated", + "package.json" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../autocertifier-client" }, + { "path": "../cdn-location" }, + { "path": "../geoip-location" }, + { "path": "../proto-rpc" }, + { "path": "../utils" } ] } diff --git a/packages/dht/tsconfig.node.json b/packages/dht/tsconfig.node.json deleted file mode 100644 index 9adaea3779..0000000000 --- a/packages/dht/tsconfig.node.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "noImplicitOverride": false - }, - "include": [ - "src", - "generated", - "package.json" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../proto-rpc/tsconfig.node.json" }, - { "path": "../autocertifier-client" }, - { "path": "../cdn-location" }, - { "path": "../geoip-location/tsconfig.node.json" } - ] -} diff --git a/packages/geoip-location/package.json b/packages/geoip-location/package.json index f0586756ff..2e57d4f2b0 100644 --- a/packages/geoip-location/package.json +++ b/packages/geoip-location/package.json @@ -23,8 +23,8 @@ "license": "Apache-2.0", "author": "Streamr Network AG ", "scripts": { - "build": "tsc -b tsconfig.node.json", - "check": "tsc -p ./tsconfig.jest.json", + "build": "tsc -b", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest test/unit", diff --git a/packages/geoip-location/test/tsconfig.json b/packages/geoip-location/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/geoip-location/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/geoip-location/tsconfig.jest.json b/packages/geoip-location/tsconfig.jest.json index 9769078146..a826798cda 100644 --- a/packages/geoip-location/tsconfig.jest.json +++ b/packages/geoip-location/tsconfig.jest.json @@ -3,8 +3,5 @@ "include": [ "src", "test" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" } ] } diff --git a/packages/geoip-location/tsconfig.json b/packages/geoip-location/tsconfig.json index 8f24c2e23c..5621ed82fc 100644 --- a/packages/geoip-location/tsconfig.json +++ b/packages/geoip-location/tsconfig.json @@ -1,9 +1,12 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist" }, + "include": [ + "src" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../utils" } ] } diff --git a/packages/geoip-location/tsconfig.node.json b/packages/geoip-location/tsconfig.node.json deleted file mode 100644 index 32f84b97fa..0000000000 --- a/packages/geoip-location/tsconfig.node.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - ] -} diff --git a/packages/node/package.json b/packages/node/package.json index fb2ee8d330..80b01ede7b 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -25,8 +25,8 @@ "configuration.md" ], "scripts": { - "build": "tsc -b tsconfig.node.json", - "check": "tsc -p ./tsconfig.jest.json", + "build": "tsc -b", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "npm run test-unit && npm run test-integration && npm run test-sequential", diff --git a/packages/node/test/tsconfig.json b/packages/node/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/node/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/node/tsconfig.jest.json b/packages/node/tsconfig.jest.json index f375e48d6c..fa02c793ab 100644 --- a/packages/node/tsconfig.jest.json +++ b/packages/node/tsconfig.jest.json @@ -6,10 +6,5 @@ "bin", "package.json", "test" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../sdk/tsconfig.node.json" } ] } diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json index 8f24c2e23c..42a728888f 100644 --- a/packages/node/tsconfig.json +++ b/packages/node/tsconfig.json @@ -1,9 +1,16 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist" }, + "include": [ + "src", + "src/**/*.json", + "bin", + "package.json" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../utils" }, + { "path": "../sdk" } ] } diff --git a/packages/node/tsconfig.node.json b/packages/node/tsconfig.node.json deleted file mode 100644 index 2cab25941e..0000000000 --- a/packages/node/tsconfig.node.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src", - "src/**/*.json", - "bin", - "package.json" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../sdk/tsconfig.node.json" } - ] -} diff --git a/packages/proto-rpc/package.json b/packages/proto-rpc/package.json index 59ff0f64a3..bbfec6220a 100644 --- a/packages/proto-rpc/package.json +++ b/packages/proto-rpc/package.json @@ -19,9 +19,9 @@ "author": "Streamr Network AG ", "scripts": { "prebuild": "./proto.sh", - "build": "tsc -b tsconfig.node.json", + "build": "tsc -b", "build-browser": "webpack --mode=development --progress", - "check": "./test-proto.sh && tsc -p ./tsconfig.jest.json", + "check": "./test-proto.sh && tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "./test-proto.sh && eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "./test-proto.sh && npm run test-unit && npm run test-integration", diff --git a/packages/proto-rpc/test/tsconfig.json b/packages/proto-rpc/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/proto-rpc/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/proto-rpc/tsconfig.jest.json b/packages/proto-rpc/tsconfig.jest.json index c1b2113112..94ae917a95 100644 --- a/packages/proto-rpc/tsconfig.jest.json +++ b/packages/proto-rpc/tsconfig.jest.json @@ -7,9 +7,5 @@ "src", "generated", "test" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" }, - { "path": "../test-utils/tsconfig.node.json" } ] } diff --git a/packages/proto-rpc/tsconfig.json b/packages/proto-rpc/tsconfig.json index 8f24c2e23c..ce0f5b1ea2 100644 --- a/packages/proto-rpc/tsconfig.json +++ b/packages/proto-rpc/tsconfig.json @@ -1,9 +1,14 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "noImplicitOverride": false }, + "include": [ + "src", + "generated" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../utils" } ] } diff --git a/packages/proto-rpc/tsconfig.node.json b/packages/proto-rpc/tsconfig.node.json deleted file mode 100644 index 8a784bac80..0000000000 --- a/packages/proto-rpc/tsconfig.node.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "noImplicitOverride": false - }, - "include": [ - "src", - "generated" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" } - ] -} diff --git a/packages/sdk/bin/tsconfig.json b/packages/sdk/bin/tsconfig.json new file mode 100644 index 0000000000..5a03dbdeb8 --- /dev/null +++ b/packages/sdk/bin/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "..", + "include": [ + "**/*" + ] +} diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f597a916d2..5b0a9c3d18 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -32,11 +32,11 @@ "scripts": { "prebuild": "node bin/generate-config-validator.js && ./proto.sh", "postbuild": "./scripts/postbuild.sh && bash fix-esm.sh", - "build": "tsc --build ./tsconfig.node.json", + "build": "tsc -b", "build-browser": "npm run build-browser-development && npm run build-browser-production", "build-browser-development": "NODE_ENV=development webpack --mode=development --progress", "build-browser-production": "NODE_ENV=production webpack --mode=production --progress", - "check": "tsc -p ./tsconfig.jest.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts,mts}'", "generate-protoc-code": "./proto.sh", diff --git a/packages/sdk/test/tsconfig.json b/packages/sdk/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/sdk/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/sdk/tsconfig.jest.json b/packages/sdk/tsconfig.jest.json index 59c7631e2f..fd6c3ce89a 100644 --- a/packages/sdk/tsconfig.jest.json +++ b/packages/sdk/tsconfig.jest.json @@ -16,12 +16,6 @@ "scripts" ], "exclude": [ - "test/exports", - "src/exports-esm.mjs" - ], - "references": [ - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" }, - { "path": "../trackerless-network/tsconfig.node.json" } + "test/exports" ] } diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json index 8f24c2e23c..52d07bdad9 100644 --- a/packages/sdk/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -1,9 +1,24 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "declarationDir": "dist/types", + "lib": ["es2021", "dom"], + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitOverride": false }, + "include": [ + "src", + "src/**/*.json" + ], + "exclude": [ + "src/exports-esm.mjs" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../dht" }, + { "path": "../proto-rpc" }, + { "path": "../trackerless-network" }, + { "path": "../utils" } ] } diff --git a/packages/sdk/tsconfig.node.json b/packages/sdk/tsconfig.node.json deleted file mode 100644 index 0e9591b2cf..0000000000 --- a/packages/sdk/tsconfig.node.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "declarationDir": "dist/types", - "lib": ["es2021", "dom"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "noImplicitOverride": false - }, - "include": [ - "src", - "src/**/*.json" - ], - "exclude": [ - "src/exports-esm.mjs" - ], - "references": [ - { "path": "../test-utils/tsconfig.node.json" }, - { "path": "../trackerless-network/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" } - - ] -} diff --git a/packages/sdk/webpack-karma.config.ts b/packages/sdk/webpack-karma.config.ts index 9819e0193c..16856745cf 100644 --- a/packages/sdk/webpack-karma.config.ts +++ b/packages/sdk/webpack-karma.config.ts @@ -1,5 +1,5 @@ import type { Configuration } from 'webpack' -import * as defaultConfig from './webpack.config' +import defaultConfig from './webpack.config' import { resolve } from 'path' const karmaWebpackConfig: (env?: Record, argv?: Record) => Configuration = (env = {}, argv = {}) => { diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 05d5741bb1..6d013868eb 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -16,8 +16,8 @@ "customMatcherTypes.d.ts" ], "scripts": { - "build": "tsc --build tsconfig.node.json", - "check": "tsc -p ./tsconfig.jest.json", + "build": "tsc -b", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "test": "jest", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'" diff --git a/packages/test-utils/test/tsconfig.json b/packages/test-utils/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/test-utils/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/test-utils/tsconfig.jest.json b/packages/test-utils/tsconfig.jest.json index 9769078146..a826798cda 100644 --- a/packages/test-utils/tsconfig.jest.json +++ b/packages/test-utils/tsconfig.jest.json @@ -3,8 +3,5 @@ "include": [ "src", "test" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" } ] } diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json index 8f24c2e23c..33cb004949 100644 --- a/packages/test-utils/tsconfig.json +++ b/packages/test-utils/tsconfig.json @@ -1,9 +1,16 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "types": [ + "node", + "jest" + ] }, + "include": [ + "src" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../utils" } ] } diff --git a/packages/test-utils/tsconfig.node.json b/packages/test-utils/tsconfig.node.json deleted file mode 100644 index 263fd96c05..0000000000 --- a/packages/test-utils/tsconfig.node.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "types": [ - "node", - "jest" - ] - }, - "include": [ - "src" - ], - "references": [ - { "path": "../utils/tsconfig.node.json" } - ] -} diff --git a/packages/trackerless-network/package.json b/packages/trackerless-network/package.json index da7a4082d0..96c3b9c5f2 100644 --- a/packages/trackerless-network/package.json +++ b/packages/trackerless-network/package.json @@ -17,10 +17,10 @@ "license": "STREAMR NETWORK OPEN SOURCE LICENSE", "author": "Streamr Network AG ", "scripts": { - "build": "tsc -b tsconfig.node.json", + "build": "tsc -b", "build-browser": "webpack --mode=development --progress", "prebuild": "./proto.sh", - "check": "tsc -p ./tsconfig.jest.json", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "coverage": "jest --coverage", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", diff --git a/packages/trackerless-network/test/tsconfig.json b/packages/trackerless-network/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/trackerless-network/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/trackerless-network/tsconfig.jest.json b/packages/trackerless-network/tsconfig.jest.json index 46f0d34938..d9593d2105 100644 --- a/packages/trackerless-network/tsconfig.jest.json +++ b/packages/trackerless-network/tsconfig.jest.json @@ -6,11 +6,7 @@ "include": [ "src", "generated", - "test", - "package.json" - ], - "references": [ - { "path": "../proto-rpc/tsconfig.node.json" }, - { "path": "../dht/tsconfig.node.json" } + "package.json", + "test" ] } diff --git a/packages/trackerless-network/tsconfig.json b/packages/trackerless-network/tsconfig.json index 8f24c2e23c..481b69e8de 100644 --- a/packages/trackerless-network/tsconfig.json +++ b/packages/trackerless-network/tsconfig.json @@ -1,9 +1,17 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist", + "noImplicitOverride": false }, + "include": [ + "src", + "generated", + "package.json" + ], "references": [ - { "path": "./tsconfig.jest.json" } + { "path": "../dht" }, + { "path": "../proto-rpc" }, + { "path": "../utils" } ] } diff --git a/packages/trackerless-network/tsconfig.karma.json b/packages/trackerless-network/tsconfig.karma.json index b6fd106096..46624fd322 100644 --- a/packages/trackerless-network/tsconfig.karma.json +++ b/packages/trackerless-network/tsconfig.karma.json @@ -4,7 +4,6 @@ "outDir": "dist" }, "include": [ - "src", - "generated" + "src" ] } diff --git a/packages/trackerless-network/tsconfig.node.json b/packages/trackerless-network/tsconfig.node.json deleted file mode 100644 index 91ca0871c5..0000000000 --- a/packages/trackerless-network/tsconfig.node.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist", - "noImplicitOverride": false - }, - "include": [ - "src", - "generated", - "test/benchmark/first-message.ts", - "test/utils/utils.ts", - "package.json" - ], - "references": [ - { "path": "../dht/tsconfig.node.json" } - ] -} diff --git a/packages/utils/package.json b/packages/utils/package.json index 965dfc54d3..cd646e40d5 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -16,8 +16,8 @@ "LICENSE" ], "scripts": { - "build": "tsc --build tsconfig.node.json", - "check": "tsc -p ./tsconfig.jest.json", + "build": "tsc -b", + "check": "tsc -p tsconfig.jest.json", "clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true", "eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'", "test": "jest", diff --git a/packages/utils/test/tsconfig.json b/packages/utils/test/tsconfig.json new file mode 100644 index 0000000000..51cca98902 --- /dev/null +++ b/packages/utils/test/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.jest.json", + "include": [ + "**/*" + ] +} diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 8f24c2e23c..126cae2a06 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,9 +1,9 @@ { - "files": [], + "extends": "../../tsconfig.node.json", "compilerOptions": { - "composite": true + "outDir": "dist" }, - "references": [ - { "path": "./tsconfig.jest.json" } + "include": [ + "src" ] } diff --git a/packages/utils/tsconfig.node.json b/packages/utils/tsconfig.node.json deleted file mode 100644 index 126cae2a06..0000000000 --- a/packages/utils/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "src" - ] -} diff --git a/tsconfig.jest.json b/tsconfig.jest.json index 34380e3c1d..819ffe9c34 100644 --- a/tsconfig.jest.json +++ b/tsconfig.jest.json @@ -2,12 +2,16 @@ "extends": "./tsconfig.node.json", "compilerOptions": { "noEmit": true, + "declaration": false, + "composite": false, + "incremental": false, "isolatedModules": true, "types": [ "node", "jest", "jest-extended", "@streamr/test-utils/customMatcherTypes" - ] + ], + "sourceMap": false } }