Skip to content
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

Allow undefined/null to override any compiler option #18058

Merged

Conversation

weswigham
Copy link
Member

In the resulting js object, the value for either null or undefined is always undefined (null is allowed in the json file, since undefined is not; however this avoids dealing with null within the compiler), and we no longer issue any errors on seeing either value while validating a config. Except "extends", since that's not really a compiler option and can't meaningfully be "overwritten".

Also fixes path handling in extended configs to be relative to the including file, as was in the original feature and implementation. This must have silently regressed at some point, as there were configs which should have tested this still present; but no tests using them. This is a bugfix, but may constitute a breaking change from the prior release, depending on how long the bug has been present. But hey, nobody complained when it changed the first time, so nobody's likely to complain when it changes back, right?

Fixes #14184

@mhegazy
Copy link
Contributor

mhegazy commented Sep 6, 2017

@weswigham does this also address #17617?

@weswigham
Copy link
Member Author

@mhegazy It should, since isFilePath is true for baseUrl.

@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Sep 6, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Sep 6, 2017
@weswigham weswigham merged commit 72cbc12 into microsoft:master Sep 7, 2017
@ghost
Copy link

ghost commented Sep 7, 2017

This PR breaks forceConsistentCasingInFileNames; I suspect this is due to "canonicalizing" (lowercasing) paths. You can reproduce this by running tsc in DefinitelyTyped/types/react-navigation (or most any other package there) on windows. Do you know why you normalized the paths in this PR?

@weswigham
Copy link
Member Author

@andy-ms toPath was mostly just being used to get a canonical joined path for the new base path. If the canonicalization is an issue, I can adjust it to not canonicalize, as I do not believe it to be critical.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Would introduce errors in existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tsconfig.json extends impossible to cancel / override previous settings
3 participants