refactor: Remove "browser" tsconfig jsons#3286
Conversation
Consistent tab size of 2.
teogeb
left a comment
There was a problem hiding this comment.
The root level tsconfig.browser.json could be renamed to tsconfig.karma.json as it is only referenced from tsconfig.karma.json files?
| @@ -1,24 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
Currently there is no tsconfig.karma.json in sdk. That file is there for all other packages which run browser tests (dht, trackerless-network, proto-rpc, utils). Is it ok that the file is missing in sdk? If the file is not needed there, why it needed in these other packages?
(Maybe sdk is a special case, but asking for clarification as I don't remember the reason at the moment).
Not strictly related to this PR.
There was a problem hiding this comment.
The SDK does not use createWebpackConfig from browser-test-runner – that's what points to the tsconfig. The SDK has its very own custom webpack config setup (also for karma).
Karma is the only thing that uses it, and package-level karma tsconfigs extend it.
This pull request removes several
tsconfig.browser.jsonfiles from multiple packages and updates the correspondingtsconfig.karma.jsonfiles to extend from the shared root configuration instead. This streamlines TypeScript configuration across packages, reducing redundancy and potential inconsistencies.TypeScript configuration cleanup:
tsconfig.browser.jsonfiles from the following packages to consolidate configuration into the shared root config:autocertifier-server,cdn-location,geoip-location,proto-rpc,sdk,trackerless-network, andutils.Test configuration updates:
tsconfig.karma.jsonfiles indht,proto-rpc,trackerless-network, andutilsto extend from the shared root config (../../tsconfig.browser.json) instead of the deleted package-local config, and added necessary compiler options and includes directly.tsconfig.karma.jsonfiles explicitly specifyoutDir,noImplicitOverride, and the appropriateincludepaths.