Skip to content
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

Feature: drop javascript-natural-sort dep #28

Merged
merged 3 commits into from Apr 24, 2023
Merged

Conversation

fbartho
Copy link
Collaborator

@fbartho fbartho commented May 29, 2022

This PR removes our reliance on natural-sort, an npm package last updated 9 years ago!

Instead this uses String.localeCompare(…) which is a built-in method supported on all Node versions we target. Further this is a standard String api, so some shim implementation will be present even if the user isn't running on Node! (eg. deno or other runtimes)

Original PR Description Below Minor problem: localeCompare appears to always interleave capital & lowercase letters.

I don't know how to do both numeric-sort AND case-sensitive (classic Array.sort() mode) at the same time using pure locale-compare.
This is how I was forced to replicate the original case-sensitive sort:

if (!importOrderCaseInsensitive) {
return left < b ? -1 : left > b ? 1 : 0;
}

Relates to: #23 (comment)

Minor problem: localeCompare appears to always interleave capital & lowercase letters.

I don't know how to do both numeric-sort AND case-sensitive at the same time using pure locale-compare.
@fbartho

This comment was marked as outdated.

Copy link
Owner

@IanVS IanVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I'm in favor of relying on native JS apis when possible, but I have some concern that the behavior here could be different from javascript-natural-sort, and we could introduce some unintentional breaking changes.

I think we can use the relevant test cases from https://github.com/Bill4Time/javascript-natural-sort/blob/master/unit-tests.html to minimize that chance, but since I don't think this fixes #23, and is really just a dependency cleanup, let's hold off on merging it until we're ready to release v4, which I think will be relatively soon. What do you think?

caseFirst: 'lower',
};

return left.localeCompare(b, 'en', sortOptions);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking out loud. Are we certain we always want to sort by english locale? I think so, because otherwise users working together on a shared project in different locales could cause formatting churn.

Copy link
Collaborator Author

@fbartho fbartho Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time when I wrote this, I thought that we could hardcode ‘en’ because I was only considering detecting locale relevant here for currency, dates, and numeric separators. Of those, I only cared about the numeric separators: 1,000.00 vs 1.000,00 — and I arbitrarily assumed that those (separators) were irrelevant for js module names, and irrelevant for file names. (Implying we only really care about sorting short integers at the beginning or end of file names)

Further research shows that the locale actually affects how accented characters sort related to lower/uppercase letters.

I think it’d be fair to argue one of the following

  • that our opinionated library could assume that those are unsupported, because file names / to limit complexity
  • that our opinionated library only looks at your node’s default locale (risks “doesn’t work the same on my machine”)
  • must have an additional locale parameter in config. :(

@fbartho
Copy link
Collaborator Author

fbartho commented Jun 9, 2022

In general I'm in favor of relying on native JS apis when possible, but I have some concern that the behavior here could be different from javascript-natural-sort, and we could introduce some unintentional breaking changes.

@IanVS Yes, I’m suggesting we target this for the breaking release. In that case, we don’t even need to add a large test suite. If we can decide how to resolve this topic: #28 (comment) then we can add a few targeted tests, and say deeper testing belongs to Intl.Collator.

(Principle: Don’t write exhaustive tests verifying your OS or framework is doing what its contract offers — unless its mission critical).

@fbartho
Copy link
Collaborator Author

fbartho commented Jun 9, 2022

@IanVS — note: either #23 was already fine, because modern NodeJS uses modern V8 which has Stable Sort now, or JavaScript-natural-sort wasn’t stable, in which case this ticket does fix #23.

Within any chunk, tie breaking should have a deterministic outcome once when you use a stable sorting algorithm with a defined comparator (edge cases exist, but don’t apply here).

So… either this ticket fixes #23, or #23 is moot, but either way, I support shipping this with no-options in the breaking release. (Caveat locale decision).

@IanVS
Copy link
Owner

IanVS commented Jun 9, 2022

I don't think that stable sorting fixes issue #23. For example, if you add this test case to this branch's natural-sort.spec.ts, it will fail:

it('should sort deterministically if case-insensitive', () => {
    expect(
        ['./something', './Something'].sort((a, b) =>
            naturalSort(a, b, { importOrderCaseInsensitive: true }),
        ),
    ).toEqual(['./something', './Something']);

    expect(
        ['./Something', './something'].sort((a, b) =>
            naturalSort(a, b, { importOrderCaseInsensitive: true }),
        ),
    ).toEqual(['./something', './Something']);
});

The order in which the imports were originally defined determines what order they are placed in (which is what it means to have a stable sort). This is not what we want, however. We want a deterministic sort. Given two imports, in any order, they should always have the same final order.

Maybe we are not agreeing on what it means to be case insensitive. To me, it means, don't worry about whether capitals come before lowercase, or vise versa. So, Z-dep shouldn't come before a-dep. But, given A-dep and a-dep, we need an answer for which should come first, since in a case-insensitive sort, they're exactly the same.

@fbartho
Copy link
Collaborator Author

fbartho commented Jun 9, 2022

Maybe we are not agreeing on what it means to be case insensitive. To me, it means, don't worry about whether capitals come before lowercase, or vise versa. So, Z-dep shouldn't come before a-dep. But, given A-dep and a-dep, we need an answer for which should come first, since in a case-insensitive sort, they're exactly the same.

Ah! That indeed is our difference. localeCompare in insensitive mode says (a-dep, A-dep) = 0, (A-dep, a-dep) = 0 so either order is identical. To me that's internally consistent with "insensitive", so that's what I've been visualizing.

@IanVS
Copy link
Owner

IanVS commented Jul 25, 2022

Given that we've cleared up the confusion over #23, I think we can close out this PR. But, let me know if you disagree and we can discuss further. Thanks for your work on this, and sorry for the miscommunication.

@IanVS IanVS closed this Jul 25, 2022
@IanVS IanVS reopened this Oct 27, 2022
@IanVS
Copy link
Owner

IanVS commented Oct 27, 2022

Given that you and @blutorange believe the best option is to avoid dictating the order of imports differing only by case sensitivity, I think it's worth re-visiting this.

@fbartho
Copy link
Collaborator Author

fbartho commented Apr 24, 2023

@IanVS I pushed an update to this that made it compatible with next as of 9am, but lol, I see there's already more conflicts. I'll wait to hear if you want more from me on this or if you want to take it over!

@fbartho fbartho requested review from IanVS and removed request for blutorange April 24, 2023 17:14
@IanVS
Copy link
Owner

IanVS commented Apr 24, 2023

Whoops, sorry I hadn't seen that you pushed that. Let's finish the option cleanup and then come back to this afterwards, if that's cool with you?

@fbartho
Copy link
Collaborator Author

fbartho commented Apr 24, 2023

However you prefer works for me. Was just trying to be helpful :P

For what it's worth, I think it's just a trivial conflict if you want to fold this PR in and forget about it!

@IanVS
Copy link
Owner

IanVS commented Apr 24, 2023

Alright, in that case I'll check it out now, thanks.

# Conflicts:
#	src/utils/get-sorted-nodes-group.ts
Copy link
Owner

@IanVS IanVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bearing with me on this one. Glad we can finally get this cleanup in.

@fbartho fbartho merged commit 27f4663 into next Apr 24, 2023
6 checks passed
@fbartho fbartho deleted the fb/drop-natural-sort-dep branch April 24, 2023 18:23
kodiakhq bot pushed a commit to timelessco/browser-js-library-template that referenced this pull request May 26, 2023
…#156)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`^3.7.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 12am and before 5am every weekday,every weekend" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/browser-js-library-template).
kodiakhq bot pushed a commit to timelessco/browser-js-website-template that referenced this pull request May 26, 2023
…#109)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`^3.7.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 12am and before 5am every weekday,every weekend" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/browser-js-website-template).
kodiakhq bot pushed a commit to timelessco/js-bottomsheet that referenced this pull request May 26, 2023
…#122)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`^3.7.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 12am and before 5am every weekday,every weekend" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/js-bottomsheet).
kodiakhq bot pushed a commit to timelessco/node-ts-library-template that referenced this pull request May 26, 2023
…#79)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`3.7.2` -> `4.0.0`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.0/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 12am and before 5am on saturday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/node-ts-library-template).
kodiakhq bot pushed a commit to timelessco/node-js-library-template that referenced this pull request Jun 2, 2023
…#71)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`3.7.2` -> `4.0.2`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.2`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.2)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.1...v4.0.2)

#### What's Changed

-   Account for missing filepath by [@&#8203;IanVS](https://togithub.com/IanVS) in [IanVS/prettier-plugin-sort-imports#104

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.1...v4.0.2

### [`v4.0.1`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.1)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.0...v4.0.1)

#### What's Changed

-   Fix cli in Install section by [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) in [IanVS/prettier-plugin-sort-imports#99
-   Fix dollar sign ($) issue in Vue SFC by [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) in [IanVS/prettier-plugin-sort-imports#101

#### New Contributors

-   [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) made their first contribution in [IanVS/prettier-plugin-sort-imports#99
-   [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) made their first contribution in [IanVS/prettier-plugin-sort-imports#101

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.0...v4.0.1

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 12am and before 5am on saturday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/node-js-library-template).
kodiakhq bot pushed a commit to timelessco/recollect that referenced this pull request Jun 4, 2023
…#36)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`3.7.2` -> `4.0.2`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.2`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.2)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.1...v4.0.2)

#### What's Changed

-   Account for missing filepath by [@&#8203;IanVS](https://togithub.com/IanVS) in [IanVS/prettier-plugin-sort-imports#104

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.1...v4.0.2

### [`v4.0.1`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.1)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.0...v4.0.1)

#### What's Changed

-   Fix cli in Install section by [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) in [IanVS/prettier-plugin-sort-imports#99
-   Fix dollar sign ($) issue in Vue SFC by [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) in [IanVS/prettier-plugin-sort-imports#101

#### New Contributors

-   [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) made their first contribution in [IanVS/prettier-plugin-sort-imports#99
-   [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) made their first contribution in [IanVS/prettier-plugin-sort-imports#101

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.0...v4.0.1

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

##### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/bookmark-tags).
kodiakhq bot pushed a commit to timelessco/next-ts-app that referenced this pull request Jun 11, 2023
…#161)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`3.7.2` -> `4.0.2`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/3.7.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@ianvs%2fprettier-plugin-sort-imports/4.0.2/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports</summary>

### [`v4.0.2`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.2)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.1...v4.0.2)

#### What's Changed

-   Account for missing filepath by [@&#8203;IanVS](https://togithub.com/IanVS) in [IanVS/prettier-plugin-sort-imports#104

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.1...v4.0.2

### [`v4.0.1`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.1)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.0.0...v4.0.1)

#### What's Changed

-   Fix cli in Install section by [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) in [IanVS/prettier-plugin-sort-imports#99
-   Fix dollar sign ($) issue in Vue SFC by [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) in [IanVS/prettier-plugin-sort-imports#101

#### New Contributors

-   [@&#8203;torn4dom4n](https://togithub.com/torn4dom4n) made their first contribution in [IanVS/prettier-plugin-sort-imports#99
-   [@&#8203;istiak-tridip](https://togithub.com/istiak-tridip) made their first contribution in [IanVS/prettier-plugin-sort-imports#101

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.0.0...v4.0.1

### [`v4.0.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.0.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v3.7.2...v4.0.0)

#### What's Changed

This new release focuses on simplifying the plugin options, shipping more useful defaults, handling comments around import statements more reliably, and improving Vue and TypeScript compatibility.  We also are targeting Node 16 syntax with our build, though older versions may continue to work (untested).  See the full [migration guide](https://togithub.com/IanVS/prettier-plugin-sort-imports/blob/next/docs/MIGRATION.md#migrating-from-v3xx-to-v4xx) for details of the breaking changes.

##### ⬆️ Breaking Changes

-   Build for Node 16+ ([IanVS/prettier-plugin-sort-imports#59)
-   Remove `importOrderBuiltinModulesToTop` (always true) ([IanVS/prettier-plugin-sort-imports#60)
-   Remove `importOrderSeparation` option ([IanVS/prettier-plugin-sort-imports#62)
-   Remove `importOrderCaseInsensitive` option ([IanVS/prettier-plugin-sort-imports#63)
-   Remove `importOrderGroupNamespaceSpecifiers` option ([IanVS/prettier-plugin-sort-imports#64)
-   Remove `importOrderSortSpecifiers` option ([IanVS/prettier-plugin-sort-imports#65)
-   Remove `importOrderMergeDuplicateImports` option (always on) ([IanVS/prettier-plugin-sort-imports#66)
-   Replace `importOrderCombineTypeAndValueImports` with `importOrderTypeScriptVersion` ([IanVS/prettier-plugin-sort-imports#67)
-   Improve default sort order ([IanVS/prettier-plugin-sort-imports#83)

##### 🐛 Bug Fixes

-   Fix behavior around comments embedded in imports ([IanVS/prettier-plugin-sort-imports#71)
-   Preserve trailing comments on specifiers ([IanVS/prettier-plugin-sort-imports#80)
-   Preserve comments and blank lines at top-of-file (in [IanVS/prettier-plugin-sort-imports#82)
-   Prevent comment gap when re-arranging first import ([IanVS/prettier-plugin-sort-imports#85)
-   Fix: Top-of-file Comments get duplicated when moving runtime code ([IanVS/prettier-plugin-sort-imports#88)
-   Vue: Sort both script and setup script ([IanVS/prettier-plugin-sort-imports#90)
-   Vue and TypeScript: Use correct parser plugins ([IanVS/prettier-plugin-sort-imports#91)

##### ⚡️ Features

-   Add `<BUILTIN_MODULES>` Special Word ([IanVS/prettier-plugin-sort-imports#86)
-   Allow Explicit Separator after Top-of-file-comments ([IanVS/prettier-plugin-sort-imports#92)
-   Support babel-ts parser ([IanVS/prettier-plugin-sort-imports#97)

##### 🛠️ Repo Maintenance

-   Update dependencies, jest -> vitest ([IanVS/prettier-plugin-sort-imports#59)
-   Check formatting in CI ([IanVS/prettier-plugin-sort-imports#61)
-   Update to latest versions of Github Actions ([IanVS/prettier-plugin-sort-imports#73)
-   Add some more tests for comments ([IanVS/prettier-plugin-sort-imports#77)

##### 🧳 Dependencies

-   Drop javascript-natural-sort dependency ([IanVS/prettier-plugin-sort-imports#28)
-   Drop lodash.clone dependency ([IanVS/prettier-plugin-sort-imports#74)
-   Upgrade Babel to 7.21 ([IanVS/prettier-plugin-sort-imports#72)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v3.7.2...v4.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Asia/Kolkata, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/timelessco/next-ts-app).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants