-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix preserveSourceNewlines sibling node comparison (fixes extra newlines in organize imports) #42630
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix preserveSourceNewlines sibling node comparison (fixes extra newlines in organize imports) #42630
Conversation
@@ -3,4 +3,5 @@ var v = { a | |||
return; | |||
|
|||
//// [parserErrorRecovery_ObjectLiteral2.js] | |||
var v = { a: a, "return": }; | |||
var v = { a: a, | |||
"return": }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These JS baseline changes are reverting back to their original state pre-#36688. That PR was never really meant to change JS emit, but the couple changes that did occur seemed ok so we went with it. Since siblingNodePositionsAreComparable
might do a little more work than what’s currently happening in master, I reverted the codepath that non-codefix/refactor emit takes back to the way it originally was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
siblingNodePositionsAreComparable
is now quite cheap, but I think it still makes sense to keep it out of JS emit for now.
5d49a2a
to
76220f3
Compare
76220f3
to
de698f9
Compare
@typescript-bot perf test |
Looks like the bot trigger for perf tests didn't pick up my command due to a typo in the regexp. @typescript-bot perf test this |
Heya @rbuckton, I've started to run the perf test suite on this PR at 77b1902. You can monitor the build here. Update: The results are in! |
@rbuckton Here they are:Comparison Report - master..42630
System
Hosts
Scenarios
|
This is @armanio123’s #41927 with an extra two commits on top.
Fixes #41417.