Skip to content

fix getExtendedConfig in commandLineParser #27139

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

Merged
merged 2 commits into from
Sep 17, 2018

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Sep 17, 2018

  • remove invalid assertion
  • fix invalid array spread on possibly undefined value
  • only add unique files to extendedSourceFiles, preventing the array from growing infinitely

Pushing to extendedSourceFiles unconditionally causes it to grow larger accumulating duplicates on each call to parseJsonSourceFileConfigFileContent. This happens if you call ts.createProgram a lot with projectReferences (where one of them extends another config) and a host that caches TsConfigSourceFiles.

* remove invalid assertion
* fix invalid array spread on possibly undefined value
* only add unique files to extendedSourceFiles, preventing the array from growing infinitely
@RyanCavanaugh RyanCavanaugh merged commit 577ee49 into microsoft:master Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants