Skip to content

Conversation

@mondoreale
Copy link
Contributor

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] [2] [3]

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 modernity1.

Footnotes

  1. lib field is cumulative – including ESNext (bleeding edge) means we implicitly include all previous.

Libs are cumulative – each previous is included in the next.
@mondoreale mondoreale requested a review from Copilot December 14, 2025 18:09
@github-actions github-actions bot added network Related to Network Package dht Related to DHT package utils proto-rpc labels Dec 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors TypeScript configuration for Karma browser tests by centralizing test-related type definitions in the root tsconfig.karma.json. Previously, each package maintained its own list of test type definitions, leading to inconsistency. Now all packages inherit a unified set of types (jest, jest-extended, and @streamr/test-utils/customMatcherTypes) from the root configuration.

Key changes:

  • Centralized test type definitions in root tsconfig.karma.json to ensure consistency across all packages
  • Simplified package-level configurations by removing redundant types arrays that now inherit from root
  • Cleaned up the root config by removing redundant ES library versions (ESNext implicitly includes all previous versions) and fixing the display field punctuation

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.karma.json Added centralized test type definitions, simplified lib array to only include ESNext and DOM, and corrected display field punctuation
packages/utils/tsconfig.karma.json Removed redundant types array to inherit from root configuration
packages/trackerless-network/tsconfig.karma.json Removed redundant types array to inherit from root configuration
packages/proto-rpc/tsconfig.karma.json Removed redundant types array to inherit from root configuration
packages/dht/tsconfig.karma.json Removed redundant types array to inherit from root configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mondoreale mondoreale merged commit 25f4d73 into main Dec 14, 2025
29 checks passed
@mondoreale mondoreale deleted the unify-karma-tsconfigs branch December 14, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dht Related to DHT package network Related to Network Package proto-rpc utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants