Skip to content

fix getExtendedConfig in commandLineParser - #27139

Merged
Ryan Cavanaugh (RyanCavanaugh) merged 2 commits into
microsoft:masterfrom
ajafff:config-extends
Sep 17, 2018
Merged

Ryan Cavanaugh (RyanCavanaugh) merged 2 commits into
microsoft:masterfrom
ajafff:config-extends

Conversation

@ajafff

Copy link
Copy Markdown
Contributor
  • 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
Ryan Cavanaugh (RyanCavanaugh) merged commit 577ee49 into microsoft:master Sep 17, 2018
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants