-
-
Notifications
You must be signed in to change notification settings - Fork 664
refactor(useSortedKeys): transfer trailing separator upon sorting #6587
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
Conversation
🦋 Changeset detectedLatest commit: eb541de The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #6587 will improve performances by 9.08%Comparing Summary
Benchmarks breakdown
|
|
||
# Diagnostics | ||
``` | ||
issue-5710.js:2:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
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.
This is a little improvement over the previous implementation :)
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.
If there's an improvement, we should add a changeset for it. It's always good to tell users stuff
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.
This is really edgy: you have to have buggy nodes like here where specifiers are duplicated.
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.
I think we did this in the past, where we fixed (and emitted diagnostics) from broken nodes, rather than panicking. It's still a good improvement for the DX, even when it's an edge case. But I won't block the PR for it, it's your call :)
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.
Done :)
7db0ed5
to
9a9b2fd
Compare
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.
Great improvements!
Summary
Fix #6491
I moved
ComparableToken
tobiome_string_case
and utilities related to separated list sorting tobiome_analyze
.I am quite satisfied of these utilities that will allow us to easily implement rules for sorting separated list.
I didn't take a look at
useSortedAttributes
. I left it for a future PR.We now avoid allocation on the happy path (when everything is already sorted).
Also, I improved the diagnostics, and we now emit a single diagnostic for a given object.
Test Plan
I added tests.