-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Completely ignore tsconfig.json if project === false. #523
Conversation
Simpler/more obvious behavior would be to just read tsconfig if project is explicitly passed. But that would be a breaking change, hence this somewhat roundabout change. |
Fixes TypeStrong#456 process env variables are always strings, see https://nodejs.org/api/process.html#process_process_env, so I added TS_NODE_NO_PROJECT to set project === false
@blakeembrey Any comment? Do you need help maintaining this repository? |
When will this one get merged? |
This change wouldn't work, you're returning an empty configuration object without merging any provided configuration options and without merging the overriding which are required for |
@blakeembrey I don't follow. The behavior of loadSync is as follows: function loadSync(cwd, filename) {
var path = resolveSync(cwd, filename);
if (path == null) {
return {
config: {
files: [],
compilerOptions: {}
}
};
}
var config = readFileSync(path);
return { path: path, config: config };
} I.e. it returns |
What about all of Lines 457 to 476 in d5a941c
|
@@ -95,7 +95,7 @@ const DEFAULTS = { | |||
cacheDirectory: process.env['TS_NODE_CACHE_DIRECTORY'], | |||
compiler: process.env['TS_NODE_COMPILER'], | |||
compilerOptions: parse(process.env['TS_NODE_COMPILER_OPTIONS']), | |||
project: process.env['TS_NODE_PROJECT'], | |||
project: process.env['TS_NODE_NO_PROJECT'] ? false : process.env['TS_NODE_PROJECT'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yn
like the rest of the options.
I'm rewriting this module now too, so don't worry too much about this - I'm trying to simplify much of the things that are broken today. |
Closing with #536, but feel free to reopen if it's still an issue after release. |
Fixes #456
process env variables are always strings, see https://nodejs.org/api/process.html#process_process_env,
so I added TS_NODE_NO_PROJECT to set project === false
Added corresponding test.