Skip to content

Conversation

@mondoreale
Copy link
Contributor

@mondoreale mondoreale commented Dec 11, 2025

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.

Ones that reference jest tsconfig rather than include it.
@github-actions github-actions bot added network Related to Network Package test-utils Related to Test Utils Package cli-tools Related to CLI Tools Package dht Related to DHT package utils proto-rpc sdk node labels Dec 11, 2025
We need proper adjustments for karma's own ts-node run – it loads `tsconfig` which doesn't define `esModuleInterop` (or any compilerOptions, really).
@mondoreale mondoreale merged commit 6bf0d7b into main Dec 12, 2025
23 checks passed
@mondoreale mondoreale deleted the proper-package-level-tsconfigs branch December 12, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli-tools Related to CLI Tools Package dht Related to DHT package network Related to Network Package node proto-rpc sdk test-utils Related to Test Utils Package utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants