chore(deps): update dependency prettier to v2.3.1 #271

Merged
renovate[bot] merged 2 commits from renovate/prettier-2.x into master 2021-06-05 15:04:40 +00:00
renovate[bot] commented 2021-06-04 13:10:48 +00:00 (Migrated from github.com)

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prettier (source) ^2.0.5 -> 2.3.1 age adoption passing confidence

Release Notes

prettier/prettier

v2.3.1

Compare Source

diff

Support TypeScript 4.3 (#​10945 by @​sosukesuzuki)
override modifiers in class elements
class Foo extends  {
  override method() {}
}
static index signatures ([key: KeyType]: ValueType) in classes
class Foo {
  static [key: string]: Bar;
}
get / set in type declarations
interface Foo {
  set foo(value);
  get foo(): string;
}
Preserve attributes order for element node (#​10958 by @​dcyriller)
{{!-- Input --}}
<MyComponent
  {{! this is a comment for arg 1}}
  @&#8203;arg1="hello"
  {{on "clik" this.modify}}
  @&#8203;arg2="hello"
  {{! this is a comment for arg 3}}
  @&#8203;arg3="hello"
  @&#8203;arg4="hello"
  {{! this is a comment for arg 5}}
  @&#8203;arg5="hello"
  ...arguments
/>
{{!-- Prettier stable --}}
<MyComponent
  @&#8203;arg1="hello"
  @&#8203;arg2="hello"
  @&#8203;arg3="hello"
  @&#8203;arg4="hello"
  @&#8203;arg5="hello"
  ...arguments
  {{on "clik" this.modify}}
  {{! this is a comment for arg 1}}
  {{! this is a comment for arg 3}}
  {{! this is a comment for arg 5}}
/>
{{!-- Prettier main --}}
<MyComponent
  {{! this is a comment for arg 1}}
  @&#8203;arg1="hello"
  {{on "clik" this.modify}}
  @&#8203;arg2="hello"
  {{! this is a comment for arg 3}}
  @&#8203;arg3="hello"
  @&#8203;arg4="hello"
  {{! this is a comment for arg 5}}
  @&#8203;arg5="hello"
  ...arguments
/>
Track cursor position properly when it’s at the end of the range to format (#​10938 by @​j-f1)

Previously, if the cursor was at the end of the range to format, it would simply be placed back at the end of the updated range.
Now, it will be repositioned if Prettier decides to add additional code to the end of the range (such as a semicolon).

// Input (<|> represents the cursor)
const someVariable = myOtherVariable<|>
// range to format:  ^^^^^^^^^^^^^^^

// Prettier stable
const someVariable = myOtherVariable;<|>
// range to format:  ^^^^^^^^^^^^^^^

// Prettier main
const someVariable = myOtherVariable<|>;
// range to format:  ^^^^^^^^^^^^^^^
Break the LHS of type alias that has complex type parameters (#​10901 by @​sosukesusuzki)
// Input
type FieldLayoutWith<
  T extends string,
  S extends unknown = { width: string }
> = {
  type: T;
  code: string;
  size: S;
};

// Prettier stable
type FieldLayoutWith<T extends string, S extends unknown = { width: string }> =
  {
    type: T;
    code: string;
    size: S;
  };

// Prettier main
type FieldLayoutWith<
  T extends string,
  S extends unknown = { width: string }
> = {
  type: T;
  code: string;
  size: S;
};

Break the LHS of assignments that has complex type parameters (#​10916 by @​sosukesuzuki)
// Input
const map: Map<
  Function,
  Map<string | void, { value: UnloadedDescriptor }>
> = new Map();

// Prettier stable
const map: Map<Function, Map<string | void, { value: UnloadedDescriptor }>> =
  new Map();

// Prettier main
const map: Map<
  Function,
  Map<string | void, { value: UnloadedDescriptor }>
> = new Map();

Fix incorrectly wrapped arrow functions with return types (#​10940 by @​thorn0)
// Input
longfunctionWithCall12("bla", foo, (thing: string): complex<type<something>> => {
  code();
});

// Prettier stable
longfunctionWithCall12("bla", foo, (thing: string): complex<
  type<something>
> => {
  code();
});

// Prettier main
longfunctionWithCall12(
  "bla",
  foo,
  (thing: string): complex<type<something>> => {
    code();
  }
);
Avoid breaking call expressions after assignments with complex type arguments (#​10949 by @​sosukesuzuki)
// Input
const foo = call<{
  prop1: string;
  prop2: string;
  prop3: string;
}>();

// Prettier stable
const foo =
  call<{
    prop1: string;
    prop2: string;
    prop3: string;
  }>();

// Prettier main
const foo = call<{
  prop1: string;
  prop2: string;
  prop3: string;
}>();

Fix order of override modifiers (#​10961 by @​sosukesuzuki)
// Input
class Foo extends Bar {
  abstract override foo: string;
}

// Prettier stable
class Foo extends Bar {
  abstract override foo: string;
}

// Prettier main
class Foo extends Bar {
  abstract override foo: string;
}

v2.3.0

Compare Source

diff

🔗 Release Notes


Configuration

📅 Schedule: At any time (no schedule defined).

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

Rebasing: Whenever PR becomes conflicted, 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 WhiteSource Renovate. View repository job log here.

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [prettier](https://prettier.io) ([source](https://togithub.com/prettier/prettier)) | [`^2.0.5` -> `2.3.1`](https://renovatebot.com/diffs/npm/prettier/2.2.1/2.3.1) | [![age](https://badges.renovateapi.com/packages/npm/prettier/2.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/prettier/2.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/prettier/2.3.1/compatibility-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/prettier/2.3.1/confidence-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prettier/prettier</summary> ### [`v2.3.1`](https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;231) [Compare Source](https://togithub.com/prettier/prettier/compare/2.3.0...2.3.1) [diff](https://togithub.com/prettier/prettier/compare/2.3.0...2.3.1) ##### Support TypeScript 4.3 ([#&#8203;10945](https://togithub.com/prettier/prettier/issues/10945) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki)) ##### [`override` modifiers in class elements](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#override) ```ts class Foo extends { override method() {} } ``` ##### [static index signatures (`[key: KeyType]: ValueType`) in classes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#static-index-signatures) ```ts class Foo { static [key: string]: Bar; } ``` ##### [`get` / `set` in type declarations](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#separate-write-types) ```ts interface Foo { set foo(value); get foo(): string; } ``` ##### Preserve attributes order for element node ([#&#8203;10958](https://togithub.com/prettier/prettier/issues/10958) by [@&#8203;dcyriller](https://togithub.com/dcyriller)) <!-- prettier-ignore --> ```handlebars {{!-- Input --}} <MyComponent {{! this is a comment for arg 1}} @&#8203;arg1="hello" {{on "clik" this.modify}} @&#8203;arg2="hello" {{! this is a comment for arg 3}} @&#8203;arg3="hello" @&#8203;arg4="hello" {{! this is a comment for arg 5}} @&#8203;arg5="hello" ...arguments /> {{!-- Prettier stable --}} <MyComponent @&#8203;arg1="hello" @&#8203;arg2="hello" @&#8203;arg3="hello" @&#8203;arg4="hello" @&#8203;arg5="hello" ...arguments {{on "clik" this.modify}} {{! this is a comment for arg 1}} {{! this is a comment for arg 3}} {{! this is a comment for arg 5}} /> {{!-- Prettier main --}} <MyComponent {{! this is a comment for arg 1}} @&#8203;arg1="hello" {{on "clik" this.modify}} @&#8203;arg2="hello" {{! this is a comment for arg 3}} @&#8203;arg3="hello" @&#8203;arg4="hello" {{! this is a comment for arg 5}} @&#8203;arg5="hello" ...arguments /> ``` ##### Track cursor position properly when it’s at the end of the range to format ([#&#8203;10938](https://togithub.com/prettier/prettier/issues/10938) by [@&#8203;j-f1](https://togithub.com/j-f1)) Previously, if the cursor was at the end of the range to format, it would simply be placed back at the end of the updated range. Now, it will be repositioned if Prettier decides to add additional code to the end of the range (such as a semicolon). <!-- prettier-ignore --> ```jsx // Input (<|> represents the cursor) const someVariable = myOtherVariable<|> // range to format: ^^^^^^^^^^^^^^^ // Prettier stable const someVariable = myOtherVariable;<|> // range to format: ^^^^^^^^^^^^^^^ // Prettier main const someVariable = myOtherVariable<|>; // range to format: ^^^^^^^^^^^^^^^ ``` ##### Break the LHS of type alias that has complex type parameters ([#&#8203;10901](https://togithub.com/prettier/prettier/issues/10901) by [@&#8203;sosukesusuzki](https://togithub.com/sosukesusuzki)) <!-- prettier-ignore --> ```ts // Input type FieldLayoutWith< T extends string, S extends unknown = { width: string } > = { type: T; code: string; size: S; }; // Prettier stable type FieldLayoutWith<T extends string, S extends unknown = { width: string }> = { type: T; code: string; size: S; }; // Prettier main type FieldLayoutWith< T extends string, S extends unknown = { width: string } > = { type: T; code: string; size: S; }; ``` ##### Break the LHS of assignments that has complex type parameters ([#&#8203;10916](https://togithub.com/prettier/prettier/issues/10916) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki)) <!-- prettier-ignore --> ```ts // Input const map: Map< Function, Map<string | void, { value: UnloadedDescriptor }> > = new Map(); // Prettier stable const map: Map<Function, Map<string | void, { value: UnloadedDescriptor }>> = new Map(); // Prettier main const map: Map< Function, Map<string | void, { value: UnloadedDescriptor }> > = new Map(); ``` ##### Fix incorrectly wrapped arrow functions with return types ([#&#8203;10940](https://togithub.com/prettier/prettier/issues/10940) by [@&#8203;thorn0](https://togithub.com/thorn0)) <!-- prettier-ignore --> ```ts // Input longfunctionWithCall12("bla", foo, (thing: string): complex<type<something>> => { code(); }); // Prettier stable longfunctionWithCall12("bla", foo, (thing: string): complex< type<something> > => { code(); }); // Prettier main longfunctionWithCall12( "bla", foo, (thing: string): complex<type<something>> => { code(); } ); ``` ##### Avoid breaking call expressions after assignments with complex type arguments ([#&#8203;10949](https://togithub.com/prettier/prettier/issues/10949) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki)) <!-- prettier-ignore --> ```ts // Input const foo = call<{ prop1: string; prop2: string; prop3: string; }>(); // Prettier stable const foo = call<{ prop1: string; prop2: string; prop3: string; }>(); // Prettier main const foo = call<{ prop1: string; prop2: string; prop3: string; }>(); ``` ##### Fix order of `override` modifiers ([#&#8203;10961](https://togithub.com/prettier/prettier/issues/10961) by [@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki)) ```ts // Input class Foo extends Bar { abstract override foo: string; } // Prettier stable class Foo extends Bar { abstract override foo: string; } // Prettier main class Foo extends Bar { abstract override foo: string; } ``` ### [`v2.3.0`](https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;230) [Compare Source](https://togithub.com/prettier/prettier/compare/2.2.1...2.3.0) [diff](https://togithub.com/prettier/prettier/compare/2.2.1...2.3.0) 🔗 [Release Notes](https://prettier.io/blog/2021/05/09/2.3.0.html) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/mcataford/packwatch).
codecov-commenter commented 2021-06-04 13:12:02 +00:00 (Migrated from github.com)

Codecov Report

Merging #271 (6e265ba) into master (5e1dec8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #271   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines           73        73           
  Branches        12        12           
=========================================
  Hits            73        73           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 606cb4d...6e265ba. Read the comment docs.

# [Codecov](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford) Report > Merging [#271](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford) (6e265ba) into [master](https://codecov.io/gh/mcataford/packwatch/commit/5e1dec842a89b19dab994c995a5fdd0e8f13f96e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford) (5e1dec8) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/mcataford/packwatch/pull/271/graphs/tree.svg?width=650&height=150&src=pr&token=IVEisJMCje&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford)](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford) ```diff @@ Coverage Diff @@ ## master #271 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 4 4 Lines 73 73 Branches 12 12 ========================================= Hits 73 73 ``` ------ [Continue to review full report at Codecov](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford). Last update [606cb4d...6e265ba](https://codecov.io/gh/mcataford/packwatch/pull/271?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Cataford).
This repo is archived. You cannot comment on pull requests.
No description provided.