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

chore(deps): update dependency prettier to v2.8.3 #1726

Merged
merged 2 commits into from Jan 17, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 10, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prettier (source) 2.8.1 -> 2.8.3 age adoption passing confidence

Release Notes

prettier/prettier

v2.8.3

Compare Source

diff

Allow self-closing tags on custom elements (#​14170 by @​fisker)

See Angular v15.1.0 release note for details.

// Input
<app-test/>

// Prettier 2.8.2
SyntaxError: Only void and foreign elements can be self closed "app-test" (1:1)
> 1 | <app-test/>
    | ^^^^^^^^^
  2 |

// Prettier 2.8.3
<app-test />

v2.8.2

Compare Source

diff

Don't lowercase link references (#​13155 by @​DerekNonGeneric & @​fisker)
<!-- Input -->
We now don't strictly follow the release notes format suggested by [Keep a Changelog].

[Keep a Changelog]: https://example.com/

<!-- Prettier 2.8.1 -->
We now don't strictly follow the release notes format suggested by [Keep a Changelog].

[keep a changelog]: https://example.com/
<!--
^^^^^^^^^^^^^^^^^^ lowercased
-->

<!-- Prettier 2.8.2 -->
<Same as input>
Preserve self-closing tags (#​13691 by @​dcyriller)
{{! Input }}
<div />
<div></div>
<custom-component />
<custom-component></custom-component>
<i />
<i></i>
<Component />
<Component></Component>

{{! Prettier 2.8.1 }}
<div></div>
<div></div>
<custom-component></custom-component>
<custom-component></custom-component>
<i></i>
<i></i>
<Component />
<Component />

{{! Prettier 2.8.2 }}
<div />
<div></div>
<custom-component />
<custom-component></custom-component>
<i />
<i></i>
<Component />
<Component />
Allow custom "else if"-like blocks with block params (#​13930 by @​jamescdavis)

#​13507 added support for custom block keywords used with else, but failed to allow block params. This updates printer-glimmer to allow block params with custom "else if"-like blocks.

{{! Input }}
{{#when isAtWork as |work|}}
  Ship that
  {{work}}!
{{else when isReading as |book|}}
  You can finish
  {{book}}
  eventually...
{{else}}
  Go to bed!
{{/when}}

{{! Prettier 2.8.1 }}
{{#when isAtWork as |work|}}
  Ship that
  {{work}}!
{{else when isReading}}
  You can finish
  {{book}}
  eventually...
{{else}}
  Go to bed!
{{/when}}

{{! Prettier 2.8.2 }}
{{#when isAtWork as |work|}}
  Ship that
  {{work}}!
{{else when isReading as |book|}}
  You can finish
  {{book}}
  eventually...
{{else}}
  Go to bed!
{{/when}}
Preserve empty lines between nested SCSS maps (#​13931 by @​jneander)
/* Input */
$map: (
  'one': (
     'key': 'value',
  ),

  'two': (
     'key': 'value',
  ),
)

/* Prettier 2.8.1 */
$map: (
  'one': (
     'key': 'value',
  ),
  'two': (
     'key': 'value',
  ),
)

/* Prettier 2.8.2 */
$map: (
  'one': (
     'key': 'value',
  ),

  'two': (
     'key': 'value',
  ),
)
Fix missing parentheses when an expression statement starts with let[ (#​14000, #​14044 by @​fisker, @​thorn0)
// Input
(let[0] = 2);

// Prettier 2.8.1
let[0] = 2;

// Prettier 2.8.1 (second format)
SyntaxError: Unexpected token (1:5)
> 1 | let[0] = 2;
    |     ^
  2 |

// Prettier 2.8.2
(let)[0] = 2;
Fix semicolon duplicated at the end of LESS file (#​14007 by @​mvorisek)
// Input
@&#8203;variable: {
  field: something;
};

// Prettier 2.8.1
@&#8203;variable: {
  field: something;
}; ;

// Prettier 2.8.2
@&#8203;variable: {
  field: something;
};
Fix no space after unary minus when followed by opening parenthesis in LESS (#​14008 by @​mvorisek)
// Input
.unary_minus_single {
  margin: -(@&#8203;a);
}

.unary_minus_multi {
  margin: 0 -(@&#8203;a);
}

.binary_minus {
  margin: 0 - (@&#8203;a);
}

// Prettier 2.8.1
.unary_minus_single {
  margin: - (@&#8203;a);
}

.unary_minus_multi {
  margin: 0 - (@&#8203;a);
}

.binary_minus {
  margin: 0 - (@&#8203;a);
}

// Prettier 2.8.2
.unary_minus_single {
  margin: -(@&#8203;a);
}

.unary_minus_multi {
  margin: 0 -(@&#8203;a);
}

.binary_minus {
  margin: 0 - (@&#8203;a);
}
Do not change case of property name if inside a variable declaration in LESS (#​14034 by @​mvorisek)
// Input
@&#8203;var: {
  preserveCase: 0;
};

// Prettier 2.8.1
@&#8203;var: {
  preservecase: 0;
};

// Prettier 2.8.2
@&#8203;var: {
  preserveCase: 0;
};
Fix formatting for auto-accessors with comments (#​14038 by @​fisker)
// Input
class A {
  @&#8203;dec()
  // comment
  accessor b;
}

// Prettier 2.8.1
class A {
  @&#8203;dec()
  accessor // comment
  b;
}

// Prettier 2.8.1 (second format)
class A {
  @&#8203;dec()
  accessor; // comment
  b;
}

// Prettier 2.8.2
class A {
  @&#8203;dec()
  // comment
  accessor b;
}
Add parentheses for TSTypeQuery to improve readability (#​14042 by @​onishi-kohei)
// Input
a as (typeof node.children)[number]
a as (typeof node.children)[]
a as ((typeof node.children)[number])[]

// Prettier 2.8.1
a as typeof node.children[number];
a as typeof node.children[];
a as typeof node.children[number][];

// Prettier 2.8.2
a as (typeof node.children)[number];
a as (typeof node.children)[];
a as (typeof node.children)[number][];
Fix displacing of comments in default switch case (#​14047 by @​thorn0)

It was a regression in Prettier 2.6.0.

// Input
switch (state) {
  default:
    result = state; // no change
    break;
}

// Prettier 2.8.1
switch (state) {
  default: // no change
    result = state;
    break;
}

// Prettier 2.8.2
switch (state) {
  default:
    result = state; // no change
    break;
}
Support type annotations on auto accessors via babel-ts (#​14049 by @​sosukesuzuki)

The bug that @babel/parser cannot parse auto accessors with type annotations has been fixed. So we now support it via babel-ts parser.

class Foo {
  accessor prop: number;
}
Fix formatting of empty type parameters (#​14073 by @​fisker)
// Input
const foo: bar</* comment */> = () => baz;

// Prettier 2.8.1
Error: Comment "comment" was not printed. Please report this error!

// Prettier 2.8.2
const foo: bar</* comment */> = () => baz;
Add parentheses to head of ExpressionStatement instead of the whole statement (#​14077 by @​fisker)
// Input
({}).toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);

// Prettier 2.8.1
({}.toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo));

// Prettier 2.8.2
({}).toString.call(foo.forEach) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);
Fix comments after directive (#​14081 by @​fisker)
// Input
"use strict" /* comment */;

// Prettier 2.8.1 (with other js parsers except `babel`)
Error: Comment "comment" was not printed. Please report this error!

// Prettier 2.8.2
<Same as input>
Fix formatting for comments inside JSX attribute (#​14082 with by @​fisker)
// Input
function MyFunctionComponent() {
  <button label=/*old*/"new">button</button>
}

// Prettier 2.8.1
Error: Comment "old" was not printed. Please report this error!

// Prettier 2.8.2
function MyFunctionComponent() {
  <button label=/*old*/ "new">button</button>;
}
Quote numeric keys for json-stringify parser (#​14083 by @​fisker)
// Input
{0: 'value'}

// Prettier 2.8.1
{
  0: "value"
}

// Prettier 2.8.2
{
  "0": "value"
}
Fix removing commas from function arguments in maps (#​14089 by @​sosukesuzuki)
/* Input */
$foo: map-fn(
  (
    "#{prop}": inner-fn($first, $second),
  )
);

/* Prettier 2.8.1 */
$foo: map-fn(("#{prop}": inner-fn($first $second)));

/* Prettier 2.8.2 */
$foo: map-fn(
  (
    "#{prop}": inner-fn($first, $second),
  )
);
Do not insert space in LESS property access (#​14103 by @​fisker)
// Input
a {
  color: @&#8203;colors[@&#8203;white];
}

// Prettier 2.8.1
a {
  color: @&#8203;colors[ @&#8203;white];
}

// Prettier 2.8.2
<Same as input>

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), 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 Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner January 10, 2023 20:22
@renovate renovate bot added the c: dependencies Pull requests that adds/updates a dependency label Jan 10, 2023
@Shinigami92 Shinigami92 added the s: on hold Blocked by something or frozen to avoid conflicts label Jan 10, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Jan 10, 2023

Probably caused by this PR: prettier/prettier#14042

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #1726 (16ea439) into next (027e1dd) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1726   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files        2337     2337           
  Lines      241178   241178           
  Branches     1098     1098           
=======================================
  Hits       240294   240294           
  Misses        863      863           
  Partials       21       21           
Impacted Files Coverage Δ
src/modules/color/index.ts 99.73% <100.00%> (ø)
src/modules/system/index.ts 100.00% <100.00%> (ø)

@Shinigami92
Copy link
Member

Lets at least wait until prettier/prettier#14140 was solved/merged
And also if there will be reported feedback from the prettier community in the next few days

@renovate renovate bot force-pushed the renovate/prettier branch 5 times, most recently from c4a3120 to 64201d7 Compare January 14, 2023 04:38
@renovate renovate bot changed the title chore(deps): update dependency prettier to v2.8.2 chore(deps): update dependency prettier to v2.8.3 Jan 14, 2023
@ST-DDT
Copy link
Member

ST-DDT commented Jan 14, 2023

The linked issue got resolved, should we continue here?

@Shinigami92
Copy link
Member

The linked issue got resolved, should we continue here?

resolved, but not released yet

@Shinigami92
Copy link
Member

Wait I'm a bit confused, the linked prettier issue got not solved but closed 😕
So do they not change anything related to that anymore?

@fisker is there anything related to that or is it now how it is?

@renovate renovate bot force-pushed the renovate/prettier branch 2 times, most recently from e1da7bd to e056897 Compare January 16, 2023 13:46
@fisker
Copy link

fisker commented Jan 17, 2023

Linked issue is asking for more parens on TSTypeOperator, not about this change. Changes are intended, see prettier/prettier#13546, you should apply changes and merge, we are not going to revert.

If you have different opinion, you can comment on
prettier/prettier#14162

@Shinigami92
Copy link
Member

"we are not going to revert"

This is (one of the possible options) what I wanted to hear 👍

Thanks 🙏

@Shinigami92 Shinigami92 removed the s: on hold Blocked by something or frozen to avoid conflicts label Jan 17, 2023
@Shinigami92 Shinigami92 self-assigned this Jan 17, 2023
@fisker
Copy link

fisker commented Jan 17, 2023

Just out of curious, this change is mentioned in changelog "Add parentheses for TSTypeQuery to improve readability", shouldn't it mean it's intended? why do you put this on hold?

  1. Don't like the change?
  2. You didn't expect change in patch release?

@renovate
Copy link
Contributor Author

renovate bot commented Jan 17, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@Shinigami92
Copy link
Member

  1. Don't like the change?

Not really "don't like", but it was/looked weird/uncommon

@Shinigami92 Shinigami92 enabled auto-merge (squash) January 17, 2023 17:17
@fisker
Copy link

fisker commented Jan 17, 2023

I don't use TS, I don't know how it's written in common, feels better/friendly/readable for me. prettier/yaml-unist-parser#281 (comment)

@Shinigami92 Shinigami92 merged commit 9c47bcc into next Jan 17, 2023
@ST-DDT ST-DDT deleted the renovate/prettier branch January 17, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: dependencies Pull requests that adds/updates a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants