Skip to content

Commit b92286b

Browse files
authored
refactor [NET-1643]: Clean-up autocertifier-client & autocertifier-server tsconfigs (#3267)
This pull request simplifies and standardizes the TypeScript configuration across several packages, particularly for `autocertifier-client` and related dependencies. It removes redundant or unnecessary configuration files, updates script commands, and streamlines references to improve maintainability and consistency. ### Changes **TypeScript configuration simplification and cleanup:** * Removed `tsconfig.node.json` and `tsconfig.jest.json` from `autocertifier-client`, consolidating configuration into a single `tsconfig.json` that now extends the root config and includes only necessary files and references. * Updated TypeScript references in other packages (`cdn-location`, `dht`) to point directly to the `autocertifier-client` directory instead of its removed config files. **Script and build process updates:** * Updated `build` and `check` scripts in `autocertifier-client` and `autocertifier-server` to use the new TypeScript config structure and to improve type checking (e.g., using `tsc --noEmit`). * Cleaned up the `clean` script in `autocertifier-client` to remove unnecessary Jest cache clearing, aligning it with the new configuration. **Reference and include adjustments:** * Updated references in `autocertifier-server` and its test configs to match the new structure and ensure correct dependency tracking.
1 parent 6bf0d7b commit b92286b

File tree

11 files changed

+19
-43
lines changed

11 files changed

+19
-43
lines changed

packages/autocertifier-client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"author": "Streamr Network AG <[email protected]>",
2020
"scripts": {
2121
"prebuild": "./proto.sh",
22-
"build": "tsc -b tsconfig.node.json",
23-
"check": "tsc -p ./tsconfig.jest.json",
24-
"clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true",
22+
"build": "tsc -b",
23+
"check": "tsc --noEmit",
24+
"clean": "rm -rf dist *.tsbuildinfo node_modules/.cache || true",
2525
"eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'"
2626
},
2727
"dependencies": {

packages/autocertifier-client/tsconfig.jest.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"files": [],
2+
"extends": "../../tsconfig.node.json",
33
"compilerOptions": {
4-
"composite": true
4+
"outDir": "dist",
5+
"noImplicitOverride": false
56
},
7+
"include": [
8+
"src",
9+
"generated"
10+
],
611
"references": [
7-
{ "path": "./tsconfig.jest.json" }
12+
{ "path": "../utils/tsconfig.node.json" }
813
]
914
}

packages/autocertifier-client/tsconfig.node.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/autocertifier-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"license": "STREAMR NETWORK OPEN SOURCE LICENSE",
2626
"author": "Streamr Network AG <[email protected]>",
2727
"scripts": {
28-
"build": "tsc -b tsconfig.node.json",
29-
"check": "tsc -p ./tsconfig.jest.json",
28+
"build": "tsc -b",
29+
"check": "tsc -p ./tsconfig.jest.json && tsc --noEmit -p tsconfig.node.json",
3030
"clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true",
3131
"eslint": "eslint --cache --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'",
3232
"test": "jest test/unit test/integration",
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
{
22
"extends": "../../tsconfig.jest.json",
33
"include": [
4-
"src",
5-
"bin",
64
"test"
75
],
86
"references": [
9-
{ "path": "../utils/tsconfig.node.json" },
10-
{ "path": "../test-utils/tsconfig.node.json" },
11-
{ "path": "../proto-rpc/tsconfig.node.json" },
12-
{ "path": "../autocertifier-client/tsconfig.node.json"}
7+
{ "path": "./tsconfig.node.json" }
138
]
149
}

packages/autocertifier-server/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"composite": true
55
},
66
"references": [
7+
{ "path": "./tsconfig.node.json" },
78
{ "path": "./tsconfig.jest.json" }
89
]
910
}

packages/autocertifier-server/tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
{ "path": "../utils/tsconfig.node.json" },
1313
{ "path": "../test-utils/tsconfig.node.json" },
1414
{ "path": "../proto-rpc/tsconfig.node.json" },
15-
{ "path": "../dht/tsconfig.node.json"}
15+
{ "path": "../dht/tsconfig.node.json" }
1616
]
1717
}

packages/cdn-location/tsconfig.jest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
{ "path": "../utils/tsconfig.node.json" },
1010
{ "path": "../test-utils/tsconfig.node.json" },
1111
{ "path": "../proto-rpc/tsconfig.node.json" },
12-
{ "path": "../autocertifier-client/tsconfig.node.json"}
12+
{ "path": "../autocertifier-client" }
1313
]
1414
}

packages/dht/tsconfig.jest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{ "path": "../utils/tsconfig.node.json" },
1616
{ "path": "../test-utils/tsconfig.node.json" },
1717
{ "path": "../proto-rpc/tsconfig.node.json" },
18-
{ "path": "../autocertifier-client/tsconfig.node.json" },
18+
{ "path": "../autocertifier-client" },
1919
{ "path": "../cdn-location/tsconfig.node.json" },
2020
{ "path": "../geoip-location/tsconfig.node.json" }
2121
]

0 commit comments

Comments
 (0)