Commit 6bf0d7b
authored
refactor: Define proper package-level
This pull request updates TypeScript configuration files across multiple
packages to use project references instead of extending from
`tsconfig.jest.json`. Additionally, it includes minor improvements to
the SDK's Karma Webpack configuration and a script invocation in the DHT
package. These changes improve TypeScript project structure, build
efficiency, and code consistency.
### Changes
**TypeScript project configuration updates:**
* Replaced `"extends": "./tsconfig.jest.json"` with explicit `files`,
`compilerOptions.composite: true`, and `references` to
`tsconfig.jest.json` in the `tsconfig.json` files for the following
packages: `autocertifier-client`, `autocertifier-server`,
`cdn-location`, `cli-tools`, `dht`, `geoip-location`, `node`,
`proto-rpc`, `sdk`, `test-utils`, `trackerless-network`, and `utils`.
This enables TypeScript project references for better build performance
and modularity.
**Build and script improvements:**
* Updated the DHT postbuild script to run `ts-node` with the `-P
tsconfig.node.json` option for package.json rewriting, ensuring the
correct TypeScript configuration is used for node scripts.
**SDK webpack karma configuration improvements:**
* Changed import of `webpack.config` in `webpack-karma.config.ts` to use
`import * as defaultConfig` for compatibility.
* Replaced usage of `path.resolve` with direct import of `resolve` from
`path` – also for compatibility.
### Future
* This here is just a rearrangement; prep for future steps. Eventually
all key files will become references in package-level `tsconfig.json`.
We need to clean them up first.tsconfig.json files (#3288)1 parent c31dbcd commit 6bf0d7b
File tree
14 files changed
+88
-16
lines changed- packages
- autocertifier-client
- autocertifier-server
- cdn-location
- cli-tools
- dht
- scripts
- geoip-location
- node
- proto-rpc
- sdk
- test-utils
- trackerless-network
- utils
14 files changed
+88
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
0 commit comments