Commit 25f4d73
authored
refactor: Unify Karma tsconfigs (#3296)
This pull request updates TypeScript configuration files related to
testing, mainly by centralizing the configuration of type definitions
for Karma tests. The main change is moving the specification of
test-related type definitions from individual package-level
`tsconfig.karma.json` files into the root `tsconfig.karma.json`,
simplifying and unifying the configuration across packages.
### Changes
**Centralization and simplification of test type definitions:**
* The root `tsconfig.karma.json` now includes all necessary test-related
type definitions (`jest`, `jest-extended`, and
`@streamr/test-utils/customMatcherTypes`) in its `types` array, ensuring
consistent type support for tests across all packages.
* The `display` field in the root `tsconfig.karma.json` was updated to
use a hyphen instead of an en dash for consistency.
**Cleanup of package-level configurations:**
* Removed the `types` arrays from the `tsconfig.karma.json` files in
`packages/dht`, `packages/proto-rpc`, `packages/trackerless-network`,
and `packages/utils`, as these are now inherited from the root config.
[[1]](diffhunk://#diff-ee756c159139fc121c7690550bbdedebbe93f791e29c68f80247e93b46a72287L4-R4)
[[2]](diffhunk://#diff-07b674f7bfb21f19369939a17a7a6ae2623d3b6de78fc89e1214d07764ef38c5L4-R4)
[[3]](diffhunk://#diff-5c2698258694c8934a41c50bf6374b3340732bfc80bd5eb9a407c89d8b46d0b7L4-R4)
**Other minor updates:**
* The root `tsconfig.karma.json` now only includes the latest ECMAScript
and DOM libraries in its `lib` array, removing older versions for
clarity and modernity[^1].
[^1]: `lib` field is cumulative – including `ESNext` (bleeding edge)
means we implicitly include all previous.1 parent 1b2eb13 commit 25f4d73
File tree
5 files changed
+10
-29
lines changed- packages
- dht
- proto-rpc
- trackerless-network
- utils
5 files changed
+10
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 10 | | |
19 | 11 | | |
20 | 12 | | |
| |||
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
26 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| |||
0 commit comments