Skip to content

Commit 4ff5dc5

Browse files
committed
Release 3.5.3
1 parent a2e560e commit 4ff5dc5

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

.github/ISSUE_TEMPLATE/formatting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you:
2626
2727
-->
2828

29-
**Prettier 3.5.2**
29+
**Prettier 3.5.3**
3030
[Playground link](https://prettier.io/playground/#.....)
3131

3232
```sh

.github/ISSUE_TEMPLATE/integration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:
2020

2121
**Environments:**
2222

23-
- Prettier Version: 3.5.2
23+
- Prettier Version: 3.5.3
2424
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
2525
- Runtime: <!-- Node.js v14, Chrome v83, etc. -->
2626
- Operating System: <!-- Windows, Linux, macOS, etc. -->

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# 3.5.3
2+
3+
[diff](https://github.com/prettier/prettier/compare/3.5.2...3.5.3)
4+
5+
#### Flow: Fix missing parentheses in `ConditionalTypeAnnotation` ([#17196](https://github.com/prettier/prettier/pull/17196) by [@fisker](https://github.com/fisker))
6+
7+
<!-- prettier-ignore -->
8+
```jsx
9+
// Input
10+
type T<U> = 'a' | ('b' extends U ? 'c' : empty);
11+
type T<U> = 'a' & ('b' extends U ? 'c' : empty);
12+
13+
// Prettier 3.5.2
14+
type T<U> = "a" | "b" extends U ? "c" : empty;
15+
type T<U> = "a" & "b" extends U ? "c" : empty;
16+
17+
// Prettier 3.5.3
18+
type T<U> = "a" | ("b" extends U ? "c" : empty);
19+
type T<U> = "a" & ("b" extends U ? "c" : empty);
20+
```
21+
122
# 3.5.2
223

324
[diff](https://github.com/prettier/prettier/compare/3.5.1...3.5.2)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prettier",
3-
"version": "3.6.0-dev",
3+
"version": "3.5.3",
44
"description": "Prettier is an opinionated code formatter",
55
"bin": "./bin/prettier.cjs",
66
"repository": "prettier/prettier",

website/versioned_docs/version-stable/browser.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Required options:
2121

2222
- **[`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.
2323

24-
- **`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/[email protected].2/plugins](https://unpkg.com/browse/[email protected].2/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
24+
- **`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/[email protected].3/plugins](https://unpkg.com/browse/[email protected].3/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
2525

2626
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.
2727

@@ -32,8 +32,8 @@ See below for examples.
3232
### Global
3333

3434
```html
35-
<script src="https://unpkg.com/[email protected].2/standalone.js"></script>
36-
<script src="https://unpkg.com/[email protected].2/plugins/graphql.js"></script>
35+
<script src="https://unpkg.com/[email protected].3/standalone.js"></script>
36+
<script src="https://unpkg.com/[email protected].3/plugins/graphql.js"></script>
3737
<script>
3838
(async () => {
3939
const formatted = await prettier.format("type Query { hello: String }", {
@@ -50,8 +50,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
5050

5151
```html
5252
<script type="module">
53-
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
54-
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].2/plugins/graphql.mjs";
53+
import * as prettier from "https://unpkg.com/[email protected].3/standalone.mjs";
54+
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].3/plugins/graphql.mjs";
5555
5656
const formatted = await prettier.format("type Query { hello: String }", {
5757
parser: "graphql",
@@ -64,8 +64,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
6464

6565
```js
6666
define([
67-
"https://unpkg.com/[email protected].2/standalone.js",
68-
"https://unpkg.com/[email protected].2/plugins/graphql.js",
67+
"https://unpkg.com/[email protected].3/standalone.js",
68+
"https://unpkg.com/[email protected].3/plugins/graphql.js",
6969
], async (prettier, ...plugins) => {
7070
const formatted = await prettier.format("type Query { hello: String }", {
7171
parser: "graphql",
@@ -96,8 +96,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
9696
<TabItem value="module" label="Module worker">
9797

9898
```js
99-
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
100-
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].21/plugins/graphql.mjs";
99+
import * as prettier from "https://unpkg.com/[email protected].3/standalone.mjs";
100+
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].31/plugins/graphql.mjs";
101101

102102
const formatted = await prettier.format("type Query { hello: String }", {
103103
parser: "graphql",
@@ -110,8 +110,8 @@ const formatted = await prettier.format("type Query { hello: String }", {
110110

111111
```js
112112
importScripts(
113-
"https://unpkg.com/[email protected].2/standalone.js",
114-
"https://unpkg.com/[email protected].2/plugins/graphql.js",
113+
"https://unpkg.com/[email protected].3/standalone.js",
114+
"https://unpkg.com/[email protected].3/plugins/graphql.js",
115115
);
116116

117117
(async () => {
@@ -131,9 +131,9 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
131131

132132
```html
133133
<script type="module">
134-
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
135-
import * as prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
136-
import * as prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
134+
import * as prettier from "https://unpkg.com/[email protected].3/standalone.mjs";
135+
import * as prettierPluginBabel from "https://unpkg.com/[email protected].3/plugins/babel.mjs";
136+
import * as prettierPluginEstree from "https://unpkg.com/[email protected].3/plugins/estree.mjs";
137137
138138
console.log(
139139
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -149,10 +149,10 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
149149

150150
```html
151151
<script type="module">
152-
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
153-
import * as prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
154-
import * as prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
155-
import * as prettierPluginHtml from "https://unpkg.com/[email protected].2/plugins/html.mjs";
152+
import * as prettier from "https://unpkg.com/[email protected].3/standalone.mjs";
153+
import * as prettierPluginBabel from "https://unpkg.com/[email protected].3/plugins/babel.mjs";
154+
import * as prettierPluginEstree from "https://unpkg.com/[email protected].3/plugins/estree.mjs";
155+
import * as prettierPluginHtml from "https://unpkg.com/[email protected].3/plugins/html.mjs";
156156
157157
console.log(
158158
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

0 commit comments

Comments
 (0)