-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: consolidate
diagnostics
funcs into single file (#416)
* refactor: consolidate `diagnostics` funcs into single file - move `IDiagnostic` and `convertDiagnostic` from `tscache` to `print-diagnostics`, then rename it to `diagnostics.ts` - the diagnostic funcs being in `tscache` always felt like a strange place for them - especially when `parse-tsconfig` or `print-diagnostics` would import them from `tscache`, which sounded like an unrelated file - may want to move `diagnostics-format-host` into this file as well, as it is _only_ used in this file - leaving as is for now, limiting this change to a smaller one * test: add unit test for `convertDiagnostic` - this was previously only covered in integration tests - since unit tests don't currently touch `index` or `tscache`, and `convertDiagnostic` was previously in `tscache` - another reason why consolidating these functions into one file made sense * fix(diagnostics): use `formatHost.getNewLine()` instead of `\n` - since new lines are host OS specific - this fixes the `convertDiagnostic` test on Windows too, where it was failing
- Loading branch information
Showing
6 changed files
with
60 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters