chore(deps): update dependency prettier to v2.8.7 #16

Merged
Kichiyaki merged 1 commits from renovate/prettier-2.x-lockfile into master 2023-03-25 11:49:02 +00:00
Collaborator

This PR contains the following updates:

Package Type Update Change
prettier (source) devDependencies patch 2.8.3 -> 2.8.7

Release Notes

prettier/prettier

v2.8.7

Compare Source

diff

Allow multiple decorators on same getter/setter (#​14584 by @​fisker)
// Input
class A {
  @​decorator()
  get foo () {}
  
  @​decorator()
  set foo (value) {}
}

// Prettier 2.8.6
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
  3 |   get foo () {}
  4 |   
> 5 |   @​decorator()
    |   ^^^^^^^^^^^^
  6 |   set foo (value) {}
  7 | }

// Prettier 2.8.7
class A {
  @​decorator()
  get foo() {}

  @​decorator()
  set foo(value) {}
}

v2.8.6

Compare Source

diff

Allow decorators on private members and class expressions (#​14548 by @​fisker)
// Input
class A {
  @​decorator()
  #privateMethod () {}
}

// Prettier 2.8.5
SyntaxError: Decorators are not valid here. (2:3)
  1 | class A {
> 2 |   @​decorator()
    |   ^^^^^^^^^^^^
  3 |   #privateMethod () {}
  4 | }

// Prettier 2.8.6
class A {
  @​decorator()
  #privateMethod() {}
}

v2.8.5

Compare Source

diff

Support TypeScript 5.0 (#​14391 by @​fisker, #​13819 by @​fisker, @​sosukesuzuki)

TypeScript 5.0 introduces two new syntactic features:

  • const modifiers for type parameters
  • export type * declarations
Add missing parentheses for decorator (#​14393 by @​fisker)
// Input
class Person {
  @​(myDecoratorArray[0])
  greet() {}
}

// Prettier 2.8.4
class Person {
  @​myDecoratorArray[0]
  greet() {}
}

// Prettier 2.8.5
class Person {
  @​(myDecoratorArray[0])
  greet() {}
}
Add parentheses for TypeofTypeAnnotation to improve readability (#​14458 by @​fisker)
// Input
type A = (typeof node.children)[];

// Prettier 2.8.4
type A = typeof node.children[];

// Prettier 2.8.5
type A = (typeof node.children)[];
Support max_line_length=off when parsing .editorconfig (#​14516 by @​josephfrazier)

If an .editorconfig file is in your project and it sets max_line_length=off for the file you're formatting,
it will be interpreted as a printWidth of Infinity rather than being ignored
(which previously resulted in the default printWidth of 80 being applied, if not overridden by Prettier-specific configuration).

<!-- Input -->
<div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}/>

<!-- Prettier 2.8.4 -->
<div
  className="HelloWorld"
  title={`You are visitor number ${num}`}
  onMouseOver={onMouseOver}
/>;

<!-- Prettier 2.8.5 -->
<div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />;

v2.8.4

Compare Source

diff

Fix leading comments in mapped types with readonly (#​13427 by @​thorn0, @​sosukesuzuki)
// Input
type Type = {
  // comment
  readonly [key in Foo];
};

// Prettier 2.8.3
type Type = {
  readonly // comment
  [key in Foo];
};

// Prettier 2.8.4
type Type = {
  // comment
  readonly [key in Foo];
};
Group params in opening block statements (#​14067 by @​jamescdavis)

This is a follow-up to #​13930 to establish wrapping consistency between opening block statements and else blocks by
grouping params in opening blocks. This causes params to break to a new line together and not be split across lines
unless the length of params exceeds the print width. This also updates the else block wrapping to behave exactly the
same as opening blocks.

{{! Input }}
{{#block param param param param param param param param param param as |blockParam|}}
  Hello
{{else block param param param param param param param param param param as |blockParam|}}
  There
{{/block}}

{{! Prettier 2.8.3 }}
{{#block
  param
  param
  param
  param
  param
  param
  param
  param
  param
  param
  as |blockParam|
}}
  Hello
{{else block param
param
param
param
param
param
param
param
param
param}}
  There
{{/block}}

{{! Prettier 2.8.4 }}
{{#block
  param param param param param param param param param param
  as |blockParam|
}}
  Hello
{{else block
  param param param param param param param param param param
  as |blockParam|
}}
  There
{{/block}}
Ignore files in .sl/ (#​14206 by @​bolinfest)

In Sapling SCM, .sl/ is the folder where it stores its state, analogous to .git/ in Git. It should be ignored in Prettier like the other SCM folders.

Recognize @satisfies in Closure-style type casts (#​14262 by @​fisker)
// Input
const a = /** @&#8203;satisfies {Record<string, string>} */ ({hello: 1337});
const b = /** @&#8203;type {Record<string, string>} */ ({hello: 1337});

// Prettier 2.8.3
const a = /** @&#8203;satisfies {Record<string, string>} */ { hello: 1337 };
const b = /** @&#8203;type {Record<string, string>} */ ({ hello: 1337 });

// Prettier 2.8.4
const a = /** @&#8203;satisfies {Record<string, string>} */ ({hello: 1337});
const b = /** @&#8203;type {Record<string, string>} */ ({hello: 1337});
Fix parens in inferred function return types with extends (#​14279 by @​fisker)
// Input
type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never;

// Prettier 2.8.3 (First format)
type Foo<T> = T extends (a) => a is infer R extends string ? R : never;

// Prettier 2.8.3 (Second format)
SyntaxError: '?' expected. 

// Prettier 2.8.4
type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never;

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - 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 Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`2.8.3` -> `2.8.7`](https://renovatebot.com/diffs/npm/prettier/2.8.3/2.8.7) | --- ### Release Notes <details> <summary>prettier/prettier</summary> ### [`v2.8.7`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;287) [Compare Source](https://github.com/prettier/prettier/compare/2.8.6...2.8.7) [diff](https://github.com/prettier/prettier/compare/2.8.6...2.8.7) ##### Allow multiple decorators on same getter/setter ([#&#8203;14584](https://github.com/prettier/prettier/pull/14584) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```ts // Input class A { @&#8203;decorator() get foo () {} @&#8203;decorator() set foo (value) {} } // Prettier 2.8.6 SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3) 3 | get foo () {} 4 | > 5 | @&#8203;decorator() | ^^^^^^^^^^^^ 6 | set foo (value) {} 7 | } // Prettier 2.8.7 class A { @&#8203;decorator() get foo() {} @&#8203;decorator() set foo(value) {} } ``` ### [`v2.8.6`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;286) [Compare Source](https://github.com/prettier/prettier/compare/2.8.5...2.8.6) [diff](https://github.com/prettier/prettier/compare/2.8.5...2.8.6) ##### Allow decorators on private members and class expressions ([#&#8203;14548](https://github.com/prettier/prettier/pull/14548) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```ts // Input class A { @&#8203;decorator() #privateMethod () {} } // Prettier 2.8.5 SyntaxError: Decorators are not valid here. (2:3) 1 | class A { > 2 | @&#8203;decorator() | ^^^^^^^^^^^^ 3 | #privateMethod () {} 4 | } // Prettier 2.8.6 class A { @&#8203;decorator() #privateMethod() {} } ``` ### [`v2.8.5`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;285) [Compare Source](https://github.com/prettier/prettier/compare/2.8.4...2.8.5) [diff](https://github.com/prettier/prettier/compare/2.8.4...2.8.5) ##### Support TypeScript 5.0 ([#&#8203;14391](https://github.com/prettier/prettier/pull/14391) by [@&#8203;fisker](https://github.com/fisker), [#&#8203;13819](https://github.com/prettier/prettier/pull/13819) by [@&#8203;fisker](https://github.com/fisker), [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)) TypeScript 5.0 introduces two new syntactic features: - `const` modifiers for type parameters - `export type *` declarations ##### Add missing parentheses for decorator ([#&#8203;14393](https://github.com/prettier/prettier/pull/14393) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class Person { @&#8203;(myDecoratorArray[0]) greet() {} } // Prettier 2.8.4 class Person { @&#8203;myDecoratorArray[0] greet() {} } // Prettier 2.8.5 class Person { @&#8203;(myDecoratorArray[0]) greet() {} } ``` ##### Add parentheses for `TypeofTypeAnnotation` to improve readability ([#&#8203;14458](https://github.com/prettier/prettier/pull/14458) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```tsx // Input type A = (typeof node.children)[]; // Prettier 2.8.4 type A = typeof node.children[]; // Prettier 2.8.5 type A = (typeof node.children)[]; ``` ##### Support `max_line_length=off` when parsing `.editorconfig` ([#&#8203;14516](https://github.com/prettier/prettier/pull/14516) by [@&#8203;josephfrazier](https://github.com/josephfrazier)) If an .editorconfig file is in your project and it sets `max_line_length=off` for the file you're formatting, it will be interpreted as a `printWidth` of `Infinity` rather than being ignored (which previously resulted in the default `printWidth` of 80 being applied, if not overridden by Prettier-specific configuration). <!-- prettier-ignore --> ```html <!-- Input --> <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}/> <!-- Prettier 2.8.4 --> <div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />; <!-- Prettier 2.8.5 --> <div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />; ``` ### [`v2.8.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;284) [Compare Source](https://github.com/prettier/prettier/compare/2.8.3...2.8.4) [diff](https://github.com/prettier/prettier/compare/2.8.3...2.8.4) ##### Fix leading comments in mapped types with `readonly` ([#&#8203;13427](https://github.com/prettier/prettier/pull/13427) by [@&#8203;thorn0](https://github.com/thorn0), [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)) <!-- prettier-ignore --> ```tsx // Input type Type = { // comment readonly [key in Foo]; }; // Prettier 2.8.3 type Type = { readonly // comment [key in Foo]; }; // Prettier 2.8.4 type Type = { // comment readonly [key in Foo]; }; ``` ##### Group params in opening block statements ([#&#8203;14067](https://github.com/prettier/prettier/pull/14067) by [@&#8203;jamescdavis](https://github.com/jamescdavis)) This is a follow-up to [#&#8203;13930](https://github.com/prettier/prettier/issues/13930) to establish wrapping consistency between opening block statements and else blocks by grouping params in opening blocks. This causes params to break to a new line together and not be split across lines unless the length of params exceeds the print width. This also updates the else block wrapping to behave exactly the same as opening blocks. <!-- prettier-ignore --> ```hbs {{! Input }} {{#block param param param param param param param param param param as |blockParam|}} Hello {{else block param param param param param param param param param param as |blockParam|}} There {{/block}} {{! Prettier 2.8.3 }} {{#block param param param param param param param param param param as |blockParam| }} Hello {{else block param param param param param param param param param param}} There {{/block}} {{! Prettier 2.8.4 }} {{#block param param param param param param param param param param as |blockParam| }} Hello {{else block param param param param param param param param param param as |blockParam| }} There {{/block}} ``` ##### Ignore files in `.sl/` ([#&#8203;14206](https://github.com/prettier/prettier/pull/14206) by [@&#8203;bolinfest](https://github.com/bolinfest)) In [Sapling SCM](https://sapling-scm.com/), `.sl/` is the folder where it stores its state, analogous to `.git/` in Git. It should be ignored in Prettier like the other SCM folders. ##### Recognize `@satisfies` in Closure-style type casts ([#&#8203;14262](https://github.com/prettier/prettier/pull/14262) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input const a = /** @&#8203;satisfies {Record<string, string>} */ ({hello: 1337}); const b = /** @&#8203;type {Record<string, string>} */ ({hello: 1337}); // Prettier 2.8.3 const a = /** @&#8203;satisfies {Record<string, string>} */ { hello: 1337 }; const b = /** @&#8203;type {Record<string, string>} */ ({ hello: 1337 }); // Prettier 2.8.4 const a = /** @&#8203;satisfies {Record<string, string>} */ ({hello: 1337}); const b = /** @&#8203;type {Record<string, string>} */ ({hello: 1337}); ``` ##### Fix parens in inferred function return types with `extends` ([#&#8203;14279](https://github.com/prettier/prettier/pull/14279) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```ts // Input type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never; // Prettier 2.8.3 (First format) type Foo<T> = T extends (a) => a is infer R extends string ? R : never; // Prettier 2.8.3 (Second format) SyntaxError: '?' expected. // Prettier 2.8.4 type Foo<T> = T extends ((a) => a is infer R extends string) ? R : never; ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - 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 [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMC4wIiwidXBkYXRlZEluVmVyIjoiMzUuMjAuMCJ9-->
renovate added the
dependencies
label 2023-03-25 05:50:31 +00:00
renovate added 1 commit 2023-03-25 05:50:31 +00:00
continuous-integration/drone/pr Build is passing Details
b59eb65a54
chore(deps): update dependency prettier to v2.8.7
Kichiyaki merged commit 6b037c00fd into master 2023-03-25 11:49:02 +00:00
Kichiyaki deleted branch renovate/prettier-2.x-lockfile 2023-03-25 11:49:02 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twhelp/scripts#16
No description provided.