Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jun 11, 2024

This PR contains the following updates:

Package Change Age Confidence
prettier (source) ^3.3.1^3.7.4 age confidence

Release Notes

prettier/prettier (prettier)

v3.7.4

Compare Source

diff

LWC: Avoid quote around interpolations (#​18383 by @​kovsu)
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
TypeScript: Fix comment inside union type gets duplicated (#​18393 by @​fisker)
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
TypeScript: Fix unstable comment print in union type comments (#​18395 by @​fisker)
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);

v3.7.3

Compare Source

diff

API: Fix prettier.getFileInfo() change that breaks VSCode extension (#​18375 by @​fisker)

An internal refactor accidentally broke the VSCode extension plugin loading.

v3.7.2

Compare Source

diff

JavaScript: Fix string print when switching quotes (#​18351 by @​fisker)
// Input
console.log("A descriptor\\'s .kind must be \"method\" or \"field\".")

// Prettier 3.7.1
console.log('A descriptor\\'s .kind must be "method" or "field".');

// Prettier 3.7.2
console.log('A descriptor\\\'s .kind must be "method" or "field".');
JavaScript: Preserve quote for embedded HTML attribute values (#​18352 by @​kovsu)
// Input
const html = /* HTML */ ` <div class="${styles.banner}"></div> `;

// Prettier 3.7.1
const html = /* HTML */ ` <div class=${styles.banner}></div> `;

// Prettier 3.7.2
const html = /* HTML */ ` <div class="${styles.banner}"></div> `;
TypeScript: Fix comment in empty type literal (#​18364 by @​fisker)
// Input
export type XXX = {
  // tbd
};

// Prettier 3.7.1
export type XXX = { // tbd };

// Prettier 3.7.2
export type XXX = {
  // tbd
};

v3.7.1

Compare Source

diff

API: Fix performance regression in doc printer (#​18342 by @​fisker)

Prettier 3.7.1 can be very slow when formatting big files, the regression has been fixed.

v3.7.0

Compare Source

diff

🔗 Release Notes

v3.6.2

Compare Source

diff

Markdown: Add missing blank line around code block (#​17675 by @​fisker)
<!-- Input -->
1. Some text, and code block below, with newline after code block

   ```yaml
   ---
   foo: bar
   ```

   1. Another
   2. List

<!-- Prettier 3.6.1 -->
1. Some text, and code block below, with newline after code block

   ```yaml
   ---
   foo: bar
   ```
   1. Another
   2. List

<!-- Prettier 3.6.2 -->
1. Some text, and code block below, with newline after code block

   ```yaml
   ---
   foo: bar
   ```

   1. Another
   2. List

v3.6.1

Compare Source

diff

TypeScript: Allow const without initializer (#​17650, #​17654 by @​fisker)
// Input
export const version: string;

// Prettier 3.6.0 (--parser=babel-ts)
SyntaxError: Unexpected token (1:21)
> 1 | export const version: string;
    |                     ^

// Prettier 3.6.0 (--parser=oxc-ts)
SyntaxError: Missing initializer in const declaration (1:14)
> 1 | export const version: string;
    |              ^^^^^^^^^^^^^^^

// Prettier 3.6.1
export const version: string;
Miscellaneous: Avoid closing files multiple times (#​17665 by @​43081j)

When reading a file to infer the interpreter from a shebang, we use the
n-readlines library to read the first line in order to get the shebang.

This library closes files when it reaches EOF, and we later try close the same
files again. We now close files only if n-readlines did not already close
them.

v3.6.0

Compare Source

diff

🔗 Release Notes

v3.5.3

Compare Source

diff

Flow: Fix missing parentheses in ConditionalTypeAnnotation (#​17196 by @​fisker)
// Input
type T<U> = 'a' | ('b' extends U ? 'c' : empty);
type T<U> = 'a' & ('b' extends U ? 'c' : empty);

// Prettier 3.5.2
type T<U> = "a" | "b" extends U ? "c" : empty;
type T<U> = "a" & "b" extends U ? "c" : empty;

// Prettier 3.5.3
type T<U> = "a" | ("b" extends U ? "c" : empty);
type T<U> = "a" & ("b" extends U ? "c" : empty);

v3.5.2

Compare Source

diff

Remove module-sync condition (#​17156 by @​fisker)

In Prettier 3.5.0, we added module-sync condition to package.json, so that require("prettier") can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove the module-sync condition, so require("prettier") will still use the CommonJS version, we'll revisit until require(ESM) feature is more stable.

v3.5.1

Compare Source

diff

Fix CLI crash when cache for old version exists (#​17100 by @​sosukesuzuki)

Prettier 3.5 uses a different cache format than previous versions, Prettier 3.5.0 crashes when reading existing cache file, Prettier 3.5.1 fixed the problem.

Support dockercompose and github-actions-workflow in VSCode (#​17101 by @​remcohaszing)

Prettier now supports the dockercompose and github-actions-workflow languages in Visual Studio Code.

v3.5.0

Compare Source

diff

🔗 Release Notes

v3.4.2

Compare Source

diff

Treat U+30A0 & U+30FB in Katakana Block as CJK (#​16796 by @​tats-u)

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese.

<!-- Input (--prose-wrap=never) -->

C言
語
・
C++
・
Go
・
Rust

<!-- Prettier 3.4.1 -->
C言語・ C++ ・ Go ・ Rust

<!-- Prettier 3.4.2 -->
C言語・C++・Go・Rust

U+30A0 can be used as the replacement of the - in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”).

Fix comments print on class methods with decorators (#​16891 by @​fisker)
// Input
class A {
  @&#8203;decorator
  /** 
   * The method description
   *
  */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.1
class A {
  @&#8203;decorator
  async /**
   * The method description
   *
   */
  method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.2
class A {
  @&#8203;decorator
  /**
   * The method description
   *
   */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}
Fix non-idempotent formatting (#​16899 by @​seiyab)

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.

// Input
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

// Prettier 3.4.1 (first)
<div>
  foo
  <span>
    longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
  </span>, abc
</div>;

// Prettier 3.4.1 (second)
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

// Prettier 3.4.2
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

v3.4.1

Compare Source

diff

Remove unnecessary parentheses around assignment in v-on (#​16887 by @​fisker)
<!-- Input -->
<template>
  <button @&#8203;click="foo += 2">Click</button>
</template>

<!-- Prettier 3.4.0 -->
<template>
  <button @&#8203;click="(foo += 2)">Click</button>
</template>

<!-- Prettier 3.4.1 -->
<template>
  <button @&#8203;click="foo += 2">Click</button>
</template>

v3.4.0

Compare Source

diff

🔗 Release Notes

v3.3.3

Compare Source

diff

Add parentheses for nullish coalescing in ternary (#​16391 by @​cdignam-segment)

This change adds clarity to operator precedence.

// Input
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.2
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.3
foo ? (bar ?? foo) : baz;
(foo ?? bar) ? a : b;
a ? b : (foo ?? bar);
Add parentheses for decorator expressions (#​16458 by @​y-schneider)

Prevent parentheses around member expressions or tagged template literals from being removed to follow the stricter parsing rules of TypeScript 5.5.

// Input
@&#8203;(foo`tagged template`)
class X {}

// Prettier 3.3.2
@&#8203;foo`tagged template`
class X {}

// Prettier 3.3.3
@&#8203;(foo`tagged template`)
class X {}
Support @let declaration syntax (#​16474 by @​sosukesuzuki)

Adds support for Angular v18 @let declaration syntax.

Please see the following code example. The @let declaration allows you to define local variables within the template:

@&#8203;let name = 'Frodo';

<h1>Dashboard for {{name}}</h1>
Hello, {{name}}

For more details, please refer to the excellent blog post by the Angular Team: Introducing @​let in Angular.

We also appreciate the Angular Team for kindly answering our questions to implement this feature.

v3.3.2

Compare Source

diff

Fix handlebars path expressions starts with @ (#​16358 by @​Princeyadav05)
{{! Input }}
<div>{{@&#8203;x.y.z}}</div>

{{! Prettier 3.3.1 }}
<div>{{@&#8203;x}}</div>

{{! Prettier 3.3.2 }}
<div>{{@&#8203;x.y.z}}</div>

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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from fuxingloh as a code owner June 11, 2024 07:36
@vercel
Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
crypto-frontmatter Ready Ready Preview Comment Dec 3, 2025 5:41am
cryptomatter Error Error Dec 3, 2025 5:41am

fuxingloh
fuxingloh previously approved these changes Jul 7, 2024
@renovate renovate bot force-pushed the renovate/prettier-3.x branch 2 times, most recently from 1af7cd6 to 335e693 Compare July 7, 2024 08:53
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 335e693 to 47f59f0 Compare July 13, 2024 14:06
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.3.2 bump(deps): update dependency prettier to ^3.3.3 Jul 13, 2024
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 47f59f0 to 38ad7c9 Compare November 26, 2024 05:21
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.3.3 bump(deps): update dependency prettier to ^3.4.0 Nov 26, 2024
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 38ad7c9 to 2d2332c Compare November 26, 2024 13:29
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.4.0 bump(deps): update dependency prettier to ^3.4.1 Nov 26, 2024
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 2d2332c to 5294c80 Compare December 3, 2024 03:49
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 5294c80 to 67a13c7 Compare December 6, 2024 03:01
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.4.1 bump(deps): update dependency prettier to ^3.4.2 Dec 6, 2024
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 67a13c7 to fb540db Compare February 9, 2025 13:50
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.4.2 bump(deps): update dependency prettier to ^3.5.0 Feb 9, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from fb540db to 6cf680e Compare February 13, 2025 18:29
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.5.0 bump(deps): update dependency prettier to ^3.5.1 Feb 13, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 6cf680e to d7e22cb Compare February 22, 2025 06:39
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.5.1 bump(deps): update dependency prettier to ^3.5.2 Feb 22, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from d7e22cb to 387b58f Compare March 3, 2025 06:45
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.5.2 bump(deps): update dependency prettier to ^3.5.3 Mar 3, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 387b58f to 0ae4f23 Compare June 23, 2025 02:30
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.5.3 bump(deps): update dependency prettier to ^3.6.0 Jun 23, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 0ae4f23 to 046793c Compare June 25, 2025 09:11
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.6.0 bump(deps): update dependency prettier to ^3.6.1 Jun 25, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 046793c to eecb82e Compare June 27, 2025 06:13
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.6.1 bump(deps): update dependency prettier to ^3.6.2 Jun 27, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from eecb82e to eb8c3a6 Compare November 27, 2025 16:10
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.6.2 bump(deps): update dependency prettier to ^3.7.1 Nov 27, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from eb8c3a6 to 94ea027 Compare November 28, 2025 22:07
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.7.1 bump(deps): update dependency prettier to ^3.7.2 Nov 28, 2025
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.7.2 bump(deps): update dependency prettier to ^3.7.3 Nov 29, 2025
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 94ea027 to 09b01ca Compare November 29, 2025 18:45
@renovate renovate bot force-pushed the renovate/prettier-3.x branch from 09b01ca to d9e1273 Compare December 3, 2025 05:41
@renovate renovate bot changed the title bump(deps): update dependency prettier to ^3.7.3 bump(deps): update dependency prettier to ^3.7.4 Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants