refactor: Scope the usage of disableSourceOfProjectReferenceRedirect to packages where it's really needed#3299
Conversation
…e only That's the only package that uses private fields from another of our packages – `Message#streamMessage` from `sdk`.
There was a problem hiding this comment.
Pull request overview
This PR refactors TypeScript project reference configuration by scoping the disableSourceOfProjectReferenceRedirect option to only the package that requires it, rather than applying it globally. The cli-tools package is currently the only one that accesses private resources from its referenced packages, making it the appropriate place for this setting.
Key Changes:
- Removed global
disableSourceOfProjectReferenceRedirectsetting from root TypeScript configuration - Added package-specific
disableSourceOfProjectReferenceRedirect: trueto cli-tools configuration for more granular control
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tsconfig.node.json | Removed the global disableSourceOfProjectReferenceRedirect option to avoid affecting all packages |
| packages/cli-tools/tsconfig.node.json | Added disableSourceOfProjectReferenceRedirect: true to compilerOptions to maintain the needed behavior for this specific package |
The changes are clean, syntactically correct, and align well with the stated purpose. The refactoring improves configuration accuracy by applying the setting only where needed rather than globally.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'mma merge this in order to proceed with other stuff. This does not cause any output/logic differences. |
This pull request updates TypeScript configuration to adjust how project reference redirects are handled. The main change is moving the
disableSourceOfProjectReferenceRedirectoption from the roottsconfig.node.jsonto the more specificpackages/cli-tools/tsconfig.node.jsonconfiguration.In essence, we don't want it enabled globally, and since the
cli-toolsis the only package that uses a private resource from another package (that it references) we can go with more accurate setup.Changes
TypeScript configuration changes:
disableSourceOfProjectReferenceRedirectfrom the roottsconfig.node.jsonto avoid globally disabling project reference redirects.disableSourceOfProjectReferenceRedirect: truetopackages/cli-tools/tsconfig.node.jsonso that this setting only applies to the CLI tools package, providing more granular control.