Skip to content

refactor [NET-1654]: Clean-up tsconfigs for the utils package#3278

Closed
mondoreale wants to merge 2 commits into
mainfrom
net-1654-clean-up-utils-package-tsconfigs
Closed

refactor [NET-1654]: Clean-up tsconfigs for the utils package#3278
mondoreale wants to merge 2 commits into
mainfrom
net-1654-clean-up-utils-package-tsconfigs

Conversation

@mondoreale

@mondoreale mondoreale commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

This pull request updates TypeScript configuration files across multiple packages to improve project references and build consistency. The main change is standardizing how the utils package is referenced in various tsconfig files, switching from referencing its config file directly to referencing the package directory. Additionally, the utils package receives several updates to its own config files and scripts to streamline builds and checks.

Changes

Project reference updates:

  • Updated all references to the utils package in tsconfig.jest.json and tsconfig.node.json files across packages (such as autocertifier-client, autocertifier-server, cdn-location, dht, geoip-location, node, proto-rpc, test-utils, and cli-tools) to use { "path": "../utils" } instead of { "path": "../utils/tsconfig.node.json" } for better compatibility with TypeScript project references.

utils package configuration improvements:

  • Added a root tsconfig.json to the utils package, enabling composite builds and referencing all relevant config files (tsconfig.jest.json, tsconfig.node.json, tsconfig.karma.json).
  • Updated tsconfig.jest.json in utils to only include the test directory and added a reference to its own tsconfig.node.json for improved separation of test and source code.

Build and check script enhancements:

  • Modified the build script in utils/package.json to use tsc -b for composite builds, and updated the check script to run both Jest and Node TypeScript checks for stricter type safety.

Cleanup:

  • Removed the unused tsconfig.browser.json file from the utils package, reducing clutter.

@linear

linear Bot commented Dec 8, 2025

Copy link
Copy Markdown

@github-actions github-actions Bot added test-utils Related to Test Utils Package cli-tools Related to CLI Tools Package dht Related to DHT package utils proto-rpc node labels Dec 8, 2025
@mondoreale mondoreale marked this pull request as ready for review December 8, 2025 22:42
@mondoreale mondoreale requested a review from teogeb December 8, 2025 22:42
@mondoreale

Copy link
Copy Markdown
Contributor Author

Closing in favour or #3301.

@mondoreale mondoreale closed this Dec 15, 2025
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 node proto-rpc test-utils Related to Test Utils Package utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant