From 8f0c95057cc91d5836409466cd9d9af3bb901e84 Mon Sep 17 00:00:00 2001 From: fisker Date: Tue, 21 Jul 2026 13:50:05 +0800 Subject: [PATCH] Release 3.9.6 --- .github/ISSUE_TEMPLATE/formatting.md | 2 +- .github/ISSUE_TEMPLATE/integration.md | 2 +- CHANGELOG.md | 65 +++++++++++++++++++ package.json | 2 +- .../versioned_docs/version-stable/browser.md | 36 +++++----- .../versioned_docs/version-stable/install.md | 10 +-- .../version-stable/sharing-configurations.md | 4 +- 7 files changed, 93 insertions(+), 28 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index 94333d55a..7849d0248 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 3.9.5** +**Prettier 3.9.6** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 0e11a8461..9d78e6d82 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 3.9.5 +- Prettier Version: 3.9.6 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index aab56669b..0f8737f13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +# 3.9.6 + +[diff](https://github.com/prettier/prettier/compare/3.9.5...3.9.6) + +#### TypeScript: Preserve quotes for methods named `new` ([#19621](https://github.com/prettier/prettier/pull/19621) by [@kovsu](https://github.com/kovsu)) + + +```tsx +// Input +interface Container { + "new"(id: string): number; +} + +// Prettier 3.9.5 +interface Container { + new(id: string): number; +} + +// Prettier 3.9.6 +interface Container { + "new"(id: string): number; +} +``` + +#### TypeScript: Support `import defer` ([#19624](https://github.com/prettier/prettier/pull/19624), [#19675](https://github.com/prettier/prettier/pull/19675) by [@fisker](https://github.com/fisker)) + + +```tsx +// Input +import defer * as foo from "foo"; + +// Prettier 3.9.5 +import * as foo from "foo"; + +// Prettier 3.9.6 +import defer * as foo from "foo"; +``` + +#### JavaScript: Added a new official plugin `@prettier/plugin-yuku` ([#19628](https://github.com/prettier/prettier/pull/19628), [#19629](https://github.com/prettier/prettier/pull/19629) by [@fisker](https://github.com/fisker)) + +`@prettier/plugin-yuku` is powered by [Yuku](https://yuku.fyi/) (A high-performance JavaScript/TypeScript compiler toolchain written in Zig). + +This plugin includes two new parsers: `yuku` (JavaScript syntax) and `yuku-ts` (TypeScript syntax). + +**To use this plugin:** + +1. Install the plugin: + + ```bash + yarn add --dev prettier @prettier/plugin-yuku + ``` + +2. Add it to your `.prettierrc`: + + ```yaml + plugins: + - "@prettier/plugin-yuku" + ``` + +Due to package size limitations, this plugin is not bundled with the main prettier package and must be installed separately. + +For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-yuku). + +Big thanks to [@arshad-yaseen](https://github.com/arshad-yaseen) for his excellent work. + # 3.9.5 [diff](https://github.com/prettier/prettier/compare/3.9.4...3.9.5) diff --git a/package.json b/package.json index 44c21731d..b330ab4d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "3.10.0-dev", + "version": "3.9.6", "description": "Prettier is an opinionated code formatter", "bin": "./bin/prettier.cjs", "repository": "prettier/prettier", diff --git a/website/versioned_docs/version-stable/browser.md b/website/versioned_docs/version-stable/browser.md index cfc456463..c6780109a 100644 --- a/website/versioned_docs/version-stable/browser.md +++ b/website/versioned_docs/version-stable/browser.md @@ -21,7 +21,7 @@ Required options: - **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use. -- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@3.9.5/plugins](https://unpkg.com/browse/prettier@3.9.5/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. +- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@3.9.6/plugins](https://unpkg.com/browse/prettier@3.9.6/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option. @@ -32,8 +32,8 @@ See below for examples. ### Global ```html - - + +