Ensure formatter can always get a newline character - #38579
Merged
Andrew Branch (andrewbranch) merged 3 commits intoMay 19, 2020
Conversation
Andrew Branch (andrewbranch)
requested review from
Andrew Casey (amcasey) and
Sheetal Nandi (sheetalkamat)
May 14, 2020 19:36
Sheetal Nandi (sheetalkamat)
requested changes
May 14, 2020
Sheetal Nandi (sheetalkamat)
approved these changes
May 14, 2020
Andrew Casey (amcasey)
approved these changes
May 14, 2020
Andrew Casey (amcasey)
left a comment
Member
There was a problem hiding this comment.
LGTM. Impact is low, but risk is also low, so I'd be fine with including this in a servicing release.
Member
|
FYI Jesse Trinity (@jessetrinity) who is also working in this area |
Member
Author
|
TypeScript Bot (@typescript-bot) cherry-pick this to release-3.9 |
Contributor
|
Heya Andrew Branch (@andrewbranch), I've started to run the task to cherry-pick this into |
Contributor
|
Hey Andrew Branch (@andrewbranch), I've opened #38666 for you. |
TypeScript Bot (typescript-bot)
pushed a commit
to typescript-bot/TypeScript
that referenced
this pull request
May 19, 2020
AllenLee (cangSDARM)
added a commit
to cangSDARM/TypeScript
that referenced
this pull request
May 20, 2020
* upstream/master: Support naming tuple members (microsoft#38234) LEGO: check in for master to temporary branch. fix: extract const in jsx (microsoft#37912) No contextual types from circular mapped type properties (microsoft#38653) Ensure formatter can always get a newline character (microsoft#38579) Fix debug command for Node debugging Remove mentions of runtests-browser in CONTRIBUTING.md fix(33233): add outlining for comments before property access expression regression(38485): allow using rawText property in processing a tagged template
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38548
It looks like this was always a problem, but didn’t surface itself (at least not where anyone noticed) until we started preserving source newlines in refactors and codefixes. Also, I don’t think this bug was ever observable from VS or VS Code because AFAIK they always populate
formattingSettings.newLineCharacter. The bug report stemmed from programmatic language service usage.