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

Fix behavior around comments embedded in imports #71

Merged
merged 25 commits into from May 12, 2023

Conversation

fbartho
Copy link
Collaborator

@fbartho fbartho commented May 11, 2023

Fixes #9
Fixes #54

While attempting to work on #9 I found a lot of gnarly edge cases \o/.

Turns out our previous comment-adjuster didn't work for most cases (indeed it thought it was mutating nodes when it was actually generating clean nodes that it was then throwing away πŸ€¦πŸ»β€β™‚οΈ, and what "correct" behavior we were seeing before was incredibly brittle and lucky).

I've now added a section to the README that talks about how it handles comments, but generally speaking here's a quick tl;dr:

  1. Comments at top of File and below last import (> 1 line separation) are now preserved in those positions instead of being moved around when the nearest import is re-sorted/merged/moved.
  2. Single-line-comments on ImportDeclaration or some flavor of ImportSpecifier are properly sorted with their parent-node now!
  3. "loose" comments generally attach to the next-subsequent ImportDeclaration or ImportSpecifier. This means that we can now have a leading comment directly before an import, and it will follow that import. But it also meant that a ton of our test-cases had "top-of-file" comments that were interpreted as being attached to the first import, so I patched those test-cases so there's a new-line.

I think the new rules are internally consistent, but I await your feedback!

Please help me with the wording in the README and/or feel free to rewrite it, or use the bullets here to improve the phrasing. I thought about hot-linking to exact examples (snapshots?), but I wasn't sure if that was a good idea. We could use <details> components to embed them directly in the readme?

@fbartho fbartho requested a review from IanVS May 11, 2023 02:41
@fbartho
Copy link
Collaborator Author

fbartho commented May 11, 2023

@IanVS Happy to report this is green in CI! Now just needs to go βœ… in our hearts.

@fbartho fbartho linked an issue May 11, 2023 that may be closed by this pull request
1 task
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.

Really great work here! I haven't reviewed the whole thing yet, because I think there's a chance we might be able to simplify some of it based on improvements made to babel itself.

README.md Outdated Show resolved Hide resolved
src/constants.ts Outdated Show resolved Hide resolved
src/utils/get-comment-registry.ts Outdated Show resolved Hide resolved
@IanVS IanVS mentioned this pull request May 11, 2023
@fbartho
Copy link
Collaborator Author

fbartho commented May 11, 2023

@IanVS Green again with new babel!

@fbartho
Copy link
Collaborator Author

fbartho commented May 11, 2023

I think there's a chance we might be able to simplify some of it based on improvements made to babel itself.

While I was able to remove my patch/hack/workaround, I wasn't able to significantly simplify the rest of the implementation because babel doesn't concern itself with "moving nodes". So we still had the problem that comments were associated with multiple Import statements (trailing one, and leading another), and the whole point of our plugin is to move the leaders/trailer nodes around.

Babel would then naively render the comment the first time it sees it, which would often lead to unexpected (from the user-perspective) comment positioning.

So we have to detach all the comments, and reattach them to only the right attachment points.

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.

I reviewed all the easy stuff (mostly the tests, which are excellent, by the way). I have some questions, mostly about trailing comments on lines after the import declaration. I'll review the code itself tomorrow, which will probably give me a better understanding of why things are working the way they are.

expect(leadingComments(adjustedNodes[1])).toEqual([]);
expect(trailingComments(adjustedNodes[1])).toEqual([]);
expect(adjustedNodes).toHaveLength(4);
// Comment c1 is explicitly detached so it stays with the top-of-file
Copy link
Owner

Choose a reason for hiding this comment

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

Why doesn't comment c1 move? In your note in the readme, it says"

If you leave a gap after a comment at the top of your file, we will avoid moving it around if the imports below it shift.

So I would assume since there's no gap, that c1 and c2 would both move with the import from "c".

Copy link
Collaborator Author

@fbartho fbartho May 12, 2023

Choose a reason for hiding this comment

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

Sorry, I see how I confused things particularly with my variable names and the term β€œgap”.

I didn’t mean β€œgap” as in blank line β€” I have to consider each comment independently (or I need even more richness in my data model/scan-passes). β€” So gap is β€œif this comment and the import-node were the only things that existed, would there be a gap?”

So β€œleading gap” really was β€œis this specific 1-line comment ending more than 1 line before the import.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed the variables and comments, in particular because the change from #71 (comment) also further twisted the meaning of one of them.

Copy link
Owner

Choose a reason for hiding this comment

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

OK, this makes sense, thanks. It seems like a pretty rare thing to happen, and has an easy solution if someone wants both to stay at the top (add a blank line underneath).

expect(leadingComments(adjustedNodes[1])).toEqual([]);
expect(trailingComments(adjustedNodes[1])).toEqual([]);
// "final 1" is attached as a trailing-comment for import from "a"
// but "final 2" is detached so it stays with the bottom-of-imports
Copy link
Owner

Choose a reason for hiding this comment

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

This behavior seems a bit odd to me. The test description is that comments after all the imports should not be moved, and I think I agree with that. The only kind of "trailing" comment that feels like it should move with an import is one that is on the same line. Comments that start on the line below an import feel like they shouldn't be associated with that import.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could accept that argument.

If you want to change that behavior, it’s just removing the β€œ+ 1” on the trailingGap comparison (plus updating Readme and test-cases)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm implementing this change now, and then updating the comments/snapshots to match!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[Done βœ… ]

src/utils/__tests__/get-code-from-ast.spec.ts Show resolved Hide resolved
@@ -33,7 +34,6 @@ export function givesAFoo3Obj(): AliasFoo3 {
/**
* @flow
*/

Copy link
Owner

Choose a reason for hiding this comment

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

Ideally we wouldn't remove this newline. I wonder if we can somehow use the loc of all comments at the top of a file that aren't attached to an import.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't deleted exactly, it's the comment below that was injected as a "second" top-of-file comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not actually being removed so much as a comment is being shuffled to be directly trailing this comment.

Copy link
Owner

Choose a reason for hiding this comment

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

OK, I can live with this. πŸ‘

tests/Flow/__snapshots__/ppsi.spec.ts.snap Show resolved Hide resolved
@@ -164,7 +170,7 @@ import thirdParty from "third-party";
import {
random // inner comment
} from './random';
// leading comment
// trailing comment for import-random (export statement is code that will be sorted to below imports, and so doesn't have precedence over the import-comment-attachment rules!)
Copy link
Owner

Choose a reason for hiding this comment

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

Is this a side-effect of how things are working, or a behavior that you think is correct?

Personally, it seems to me like the only kind of trailing comments we should keep with an import are the ones that start on the same line as the end of the import declaration. Anything else feels unexpected, since I never put a comment on a line after something that it's associated with. But maybe some people do that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The situation here is that export is not considered part of the nodes we’re allowed to modify, but we do have logic to support pulling trailing comments around elsewhere, so the comment is preferentially bound.

I’ll tweak things to disable trailing comments except-on-same-line, and then you can review the result.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This issue is gone with the latest commit! fca0377

import { bar } from "a";
import { foo } from "c";
/* foo */ import { foo } from "c";
Copy link
Owner

Choose a reason for hiding this comment

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

Nice!

fbartho

This comment was marked as outdated.

Fixes:
- trailing attachments should be used much more rarely / leading comment on code shouldn't treated as trailing comment on an import
- various unexpected newline injections
- unnecessary test3, is duplicate of test2
- some test cases now behave correctly, but had comments added implying things about gaps being unexpectedly deleted (when they're definitely present)
@fbartho
Copy link
Collaborator Author

fbartho commented May 12, 2023

βœ… Ready for next review!

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.

This is awesome work! I think you've managed to handle all the tricky comment cases in a way that makes good sense. I pushed up a couple of commits to add a couple of small test cases, reword the README slightly, and clean up some more of the trailing comment logic. Feel free to push back on any of it, or merge if you're satisfied.

expect(leadingComments(adjustedNodes[1])).toEqual([]);
expect(trailingComments(adjustedNodes[1])).toEqual([]);
expect(adjustedNodes).toHaveLength(4);
// Comment c1 is explicitly detached so it stays with the top-of-file
Copy link
Owner

Choose a reason for hiding this comment

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

OK, this makes sense, thanks. It seems like a pretty rare thing to happen, and has an easy solution if someone wants both to stay at the top (add a blank line underneath).

@@ -33,7 +34,6 @@ export function givesAFoo3Obj(): AliasFoo3 {
/**
* @flow
*/

Copy link
Owner

Choose a reason for hiding this comment

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

OK, I can live with this. πŸ‘

// This comment should be kept close to the ImportDeclaration it follows
commentEntry.processingPriority +=
DeferredCommentClaimPriorityAdjustment.trailingNonSameLine;
deferredCommentClaims.push(commentEntry);
Copy link
Owner

Choose a reason for hiding this comment

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

In what case would this else be hit? I added a throw new Error() here, and it's not hit in any tests. I think it's covered by the if and else if above. Trailing comments can only be on the same line or below. I'll make the change and push it up, but wanted to point it out in case I'm missing something.

/** Constructed Output Nodes */
outputNodes: ImportDeclaration[];
}) => {
if ((outputNodes.length === 0 || !firstImport, !lastImport)) {
Copy link
Owner

Choose a reason for hiding this comment

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

I haven't seen this syntax before in an if statement, and I'm not sure I understand it. But, from playing around, it seems that only the last expression in the sequence is considered. So, if I have:

function test(x, y) {
    if (x, y) {
        console.log('true');
    } else {
        console.log('false');
    }
}

Then the only way to get true is to pass a truthy y, and it doesn't matter what x is.

Can you maybe explain what the goal of this check is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Brain-πŸ’¨ β€” that was just supposed to be || instead of javascript’s crazy & unnecessary comma operator , (that should be banned β€” eslint-rule?).

You’re right there’s not a test-case.

The way I wrote the code that calls this function, I construct the lastImport from the same array that I construct the firstImport β€” so unless you’re calling this helper in new code, it’s not possible to get one of the imports to be non-null while the other is null.

Copy link
Owner

Choose a reason for hiding this comment

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

Take a look at my commits, I think we don't need lastImport at all anymore, so I simplified it down.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I looked at all your commits and have no objections with them! I definitely had stuff in there that was "left-overs" from previous implementation/approaches, or just no longer relevant debugging. Thanks for cleaning all that up!

@fbartho fbartho merged commit cd836a3 into next May 12, 2023
6 checks passed
@fbartho fbartho deleted the fb/fix-import-comments branch May 12, 2023 16:57
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
2 participants