chore(deps): update dependency prettier to v3.7.1
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| prettier (source) | devDependencies | minor | 3.5.1 -> 3.7.1 |
Release Notes
prettier/prettier (prettier)
v3.7.1
API: Fix performance regression in doc printer (#18342 by @fisker)
Prettier 3.7.0 can be very slow when formatting big files, the regression has been fixed.
v3.7.0
v3.6.2
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
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
v3.5.3
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
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.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.