Skip to content

Conversation

fisker
Copy link
Member

@fisker fisker commented Feb 19, 2025

Reverts #16958

Fixes #17139

@tats-u

Copy link

github-actions bot commented Feb 19, 2025

Size Change: -699 B (-0.01%)

Total Size: 7.89 MB

Filename Size Change
./dist/package.json 6.33 kB -699 B (-9.94%) 👏
ℹ️ View Unchanged
Filename Size
./dist/bin 4.1 kB
./dist/bin/prettier.cjs 2.24 kB
./dist/doc.d.ts 7.42 kB
./dist/doc.js 53.8 kB
./dist/doc.mjs 50.2 kB
./dist/index.cjs 36.9 kB
./dist/index.d.ts 27.1 kB
./dist/index.mjs 744 kB
./dist/internal 4.1 kB
./dist/internal/cli.mjs 146 kB
./dist/LICENSE 1.06 kB
./dist/plugins 4.1 kB
./dist/plugins/acorn.d.ts 109 B
./dist/plugins/acorn.js 152 kB
./dist/plugins/acorn.mjs 152 kB
./dist/plugins/angular.d.ts 177 B
./dist/plugins/angular.js 85.9 kB
./dist/plugins/angular.mjs 85.2 kB
./dist/plugins/babel.d.ts 419 B
./dist/plugins/babel.js 316 kB
./dist/plugins/babel.mjs 316 kB
./dist/plugins/estree.d.ts 11 B
./dist/plugins/estree.js 202 kB
./dist/plugins/estree.mjs 201 kB
./dist/plugins/flow.d.ts 90 B
./dist/plugins/flow.js 680 kB
./dist/plugins/flow.mjs 680 kB
./dist/plugins/glimmer.d.ts 93 B
./dist/plugins/glimmer.js 138 kB
./dist/plugins/glimmer.mjs 137 kB
./dist/plugins/graphql.d.ts 93 B
./dist/plugins/graphql.js 44.1 kB
./dist/plugins/graphql.mjs 43.4 kB
./dist/plugins/html.d.ts 139 B
./dist/plugins/html.js 152 kB
./dist/plugins/html.mjs 151 kB
./dist/plugins/markdown.d.ts 127 B
./dist/plugins/markdown.js 149 kB
./dist/plugins/markdown.mjs 149 kB
./dist/plugins/meriyah.d.ts 93 B
./dist/plugins/meriyah.js 132 kB
./dist/plugins/meriyah.mjs 131 kB
./dist/plugins/postcss.d.ts 121 B
./dist/plugins/postcss.js 154 kB
./dist/plugins/postcss.mjs 153 kB
./dist/plugins/typescript.d.ts 96 B
./dist/plugins/typescript.js 889 kB
./dist/plugins/typescript.mjs 888 kB
./dist/plugins/yaml.d.ts 90 B
./dist/plugins/yaml.js 122 kB
./dist/plugins/yaml.mjs 122 kB
./dist/README.md 3.94 kB
./dist/standalone.d.ts 1.36 kB
./dist/standalone.js 82.1 kB
./dist/standalone.mjs 81.9 kB
./dist/THIRD-PARTY-NOTICES.md 208 kB

compressed-size-action

Copy link

pkg-pr-new bot commented Feb 19, 2025

Open in Stackblitz

npm i https://pkg.pr.new/prettier@17156

commit: 27da981

@fisker fisker requested a review from sosukesuzuki February 19, 2025 16:25
@fisker fisker marked this pull request as ready for review February 19, 2025 16:29
@fisker
Copy link
Member Author

fisker commented Feb 20, 2025

As tested, this also fixes shufo/prettier-plugin-blade#311

@fisker
Copy link
Member Author

fisker commented Feb 20, 2025

I haven't got enough information from prettier/plugin-php#2418, but shufo/prettier-plugin-blade#311 products the same error.

@fisker
Copy link
Member Author

fisker commented Feb 22, 2025

I'm going to merge this and release a patch.

@fisker fisker merged commit bf5aab8 into main Feb 22, 2025
33 checks passed
@fisker fisker deleted the revert-16958-module-sync branch February 22, 2025 04:07
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Feb 22, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.2 |


## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Feb 23, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.2 |


## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Feb 26, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.2 |


## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 1, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.2 |


## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 2, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.2 |


## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 5, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 8, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 9, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 11, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 13, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 14, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 15, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 16, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 18, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 21, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 22, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 23, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.5.1 | 3.5.3 |


## [v3.5.3](prettier/prettier@3.5.2...b51ba9d)



## [v3.5.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#17156](prettier/prettier#17156) by [@fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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.
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Jul 4, 2025
…fleeting-plugin-hetzner!256)

This MR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | `3.3.3` -> `3.6.2` | [![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.3.3/3.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.6.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#362)

[Compare Source](prettier/prettier@3.6.1...3.6.2)

[diff](prettier/prettier@3.6.1...3.6.2)

##### Markdown: Add missing blank line around code block ([#&#8203;17675](prettier/prettier#17675) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

````md
<!-- 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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#361)

[Compare Source](prettier/prettier@3.6.0...3.6.1)

[diff](prettier/prettier@3.6.0...3.6.1)

##### TypeScript: Allow const without initializer ([#&#8203;17650](prettier/prettier#17650), [#&#8203;17654](prettier/prettier#17654) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```jsx
// 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 ([#&#8203;17665](prettier/prettier#17665) by [@&#8203;43081j](https://github.com/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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#360)

[Compare Source](prettier/prettier@3.5.3...3.6.0)

[diff](prettier/prettier@3.5.3...3.6.0)

🔗 [Release Notes](https://prettier.io/blog/2025/06/23/3.6.0)

### [`v3.5.3`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#353)

[Compare Source](prettier/prettier@3.5.2...3.5.3)

[diff](prettier/prettier@3.5.2...3.5.3)

##### Flow: Fix missing parentheses in `ConditionalTypeAnnotation` ([#&#8203;17196](prettier/prettier#17196) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```jsx
// 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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#352)

[Compare Source](prettier/prettier@3.5.1...3.5.2)

[diff](prettier/prettier@3.5.1...3.5.2)

##### Remove `module-sync` condition ([#&#8203;17156](prettier/prettier#17156) by [@&#8203;fisker](https://github.com/fisker))

In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), 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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#351)

[Compare Source](prettier/prettier@3.5.0...3.5.1)

[diff](prettier/prettier@3.5.0...3.5.1)

##### Fix CLI crash when cache for old version exists ([#&#8203;17100](prettier/prettier#17100) by [@&#8203;sosukesuzuki](https://github.com/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 ([#&#8203;17101](prettier/prettier#17101) by [@&#8203;remcohaszing](https://github.com/remcohaszing))

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

### [`v3.5.0`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#350)

[Compare Source](prettier/prettier@3.4.2...3.5.0)

[diff](prettier/prettier@3.4.2...3.5.0)

🔗 [Release Notes](https://prettier.io/blog/2025/02/09/3.5.0.html)

### [`v3.4.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342)

[Compare Source](prettier/prettier@3.4.1...3.4.2)

[diff](prettier/prettier@3.4.1...3.4.2)

##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#&#8203;16796](prettier/prettier#16796) by [@&#8203;tats-u](https://github.com/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.

<!-- prettier-ignore -->

```md
<!-- 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 ([#&#8203;16891](prettier/prettier#16891) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```jsx
// 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 ([#&#8203;16899](prettier/prettier#16899) by [@&#8203;seiyab](https://github.com/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.

<!-- prettier-ignore -->

```jsx
// 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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#341)

[Compare Source](prettier/prettier@3.4.0...3.4.1)

[diff](prettier/prettier@3.4.0...3.4.1)

##### Remove unnecessary parentheses around assignment in `v-on` ([#&#8203;16887](prettier/prettier#16887) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```vue
<!-- 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`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#340)

[Compare Source](prettier/prettier@3.3.3...3.4.0)

[diff](prettier/prettier@3.3.3...3.4.0)

🔗 [Release Notes](https://prettier.io/blog/2024/11/26/3.4.0.html)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOS4wIiwidXBkYXRlZEluVmVyIjoiNDEuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[error] Cannot read properties of undefined (reading 'async')
2 participants