-
-
Notifications
You must be signed in to change notification settings - Fork 541
Make --script-mode
default behavior
#949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Great question, I can't think of any reason this wouldn't be a good idea right now. The default behavior uses |
Discovered this option from the 8.7.0 changelog and it's exactly what I wanted but didn't know existed. Makes working with a folder of TS utility scripts that need a separate tsconfig.json much easier, as #939 (comment) notes, as it allows you to run a TS script from any working directory with the same tsconfig.json. For backwards compatibility I think these would be the different scenarios:
So overall, should definitely be a major version bump, but probably the right choice. |
The language service supports multiple tsconfig files at once, if they're in multiple subdirectories, right? For example, given a monorepo like this:
I think my editor's language service will treat these 2 subdirectories as different projects with different tsconfigs and handle them correctly. I don't think I need to set up a root tsconfig with Should we be doing the same? So if I run |
I believe this is editor-specific behavior that is not actually reflected by Consider that an editor cannot actually know how you'd invoke In other words, if you were to use |
It sounds like you are saying we should support project references, but should not magically pick up other tsconfig files based on where a require()d script is located. Is that correct? Building on my example above, assuming each When I run
|
I'm not familiar with the project references or
Agree with this, as I believe |
Ok, thanks for clarifying. Interestingly, |
I don't feel qualified enough to judge the technical implications of such a change but from my personal experience as documented in #995 I vote in favor of this in order to better match user expectations. |
Relevant discussion starts here: #939 (comment)
TODO/note to self: copy the important bits into a summary, here
This ticket is to research whether or not
--script-mode
should be the default behavior ofts-node
.The text was updated successfully, but these errors were encountered: