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.7 #1954

Merged
merged 4 commits into from
Mar 29, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 20, 2023

Mend Renovate

This PR contains the following updates:

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

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} />;

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 March 20, 2023 17:24
@renovate renovate bot added the c: dependencies Pull requests that adds/updates a dependency label Mar 20, 2023
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

❗ No coverage uploaded for pull request base (next@a6e6104). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head a03f25a differs from pull request most recent head f3fbf8c. Consider uploading reports for the commit f3fbf8c to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1954   +/-   ##
=======================================
  Coverage        ?   99.63%           
=======================================
  Files           ?     2450           
  Lines           ?   239748           
  Branches        ?     1274           
=======================================
  Hits            ?   238865           
  Misses          ?      861           
  Partials        ?       22           

Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

IMO The required formatting changes for markdown look bad. This needs at least some more thoughts.

grafik

@renovate renovate bot force-pushed the renovate/prettier branch 4 times, most recently from a3ee824 to 0422e5f Compare March 20, 2023 20:43
@renovate renovate bot changed the title chore(deps): update dependency prettier to v2.8.5 chore(deps): update dependency prettier to v2.8.6 Mar 21, 2023
@renovate renovate bot force-pushed the renovate/prettier branch 4 times, most recently from 3ae5867 to 67f1e00 Compare March 23, 2023 17:10
@renovate renovate bot changed the title chore(deps): update dependency prettier to v2.8.6 chore(deps): update dependency prettier to v2.8.7 Mar 24, 2023
@renovate renovate bot force-pushed the renovate/prettier branch 2 times, most recently from ccab8cf to 69e2284 Compare March 24, 2023 15:13
@ST-DDT
Copy link
Member

ST-DDT commented Mar 24, 2023

The change of behavior started with prettier 2.8.5 and is still present in 2.8.7.

@renovate renovate bot force-pushed the renovate/prettier branch 4 times, most recently from ce7ea76 to 46bfc7a Compare March 27, 2023 10:12
@Shinigami92
Copy link
Member

@fisker we experiences some markdown indentations that I cannot find in the changelog
I just write you to ask you if you can forward this to your team
Should I already create an issue for this now? Or is there already something known related to this?

@fisker
Copy link

fisker commented Mar 27, 2023

Should be bug, please open an issue in Prettier repo with minimum reproduction.

@Shinigami92
Copy link
Member

Should be bug, please open an issue in Prettier repo with minimum reproduction.

Blocked by prettier/prettier#14607
/cc @fisker

@fisker
Copy link

fisker commented Mar 27, 2023

@Shinigami92
Copy link
Member

prettier/prettier#14607 (comment)

When I configure printWidth: 80 in our .prettierrc.cjs everything works fine
So it looks like the default of 80 is not taken for embedded typescript inside markdown
I absolutely dont know why 🤷

@renovate
Copy link
Contributor Author

renovate bot commented Mar 27, 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 Shinigami92 requested a review from ST-DDT March 27, 2023 19:17
ST-DDT
ST-DDT previously approved these changes Mar 27, 2023
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

😿

matthewmayer
matthewmayer previously approved these changes Mar 27, 2023
@fisker
Copy link

fisker commented Mar 28, 2023

Caused by

max_line_length = off

It means printWith: Infinity since 2.8.5, it was treated as undefined (default to 80) before.

https://github.com/prettier/prettier/blob/main/CHANGELOG.md#support-max_line_lengthoff-when-parsing-editorconfig-14516-by-josephfrazier

@fisker

This comment was marked as outdated.

@fisker

This comment was marked as outdated.

@fisker

This comment was marked as outdated.

@fisker
Copy link

fisker commented Mar 28, 2023

You may want consider remove that line instead.

@Shinigami92
Copy link
Member

.editorconfig / v2.8.5

I don't know why I missed to read this in the changelog like 3 times 🤔
But I also always expected that this config is only for markdown and not embedded code inside markdown 🤔 🤷

You may want consider remove that line instead.

Yes, we should do/try that, maybe it was more or less a legacy configuration on our side

@fisker
Copy link

fisker commented Mar 28, 2023

I also always expected that this config is only for markdown and not embedded code inside markdown

It's not possible to implement such feature with current printer (We called "Doc Printer").

@Shinigami92 Shinigami92 dismissed stale reviews from matthewmayer and ST-DDT via a03f25a March 28, 2023 07:05
@Shinigami92
Copy link
Member

Looks like it's working 🙌
Thank you @fisker

@ST-DDT ST-DDT requested review from matthewmayer and a team March 28, 2023 07:28
@Shinigami92 Shinigami92 enabled auto-merge (squash) March 29, 2023 07:41
@Shinigami92 Shinigami92 merged commit de47aaa into next Mar 29, 2023
@ST-DDT ST-DDT deleted the renovate/prettier branch March 30, 2023 15:34
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.

5 participants