Skip to content

Commit 03384c9

Browse files
committed
Release 3.7.2
1 parent 514e51a commit 03384c9

File tree

5 files changed

+71
-21
lines changed

5 files changed

+71
-21
lines changed

.github/ISSUE_TEMPLATE/formatting.md

Lines changed: 1 addition & 1 deletion
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.7.1**
29+
**Prettier 3.7.2**
3030
[Playground link](https://prettier.io/playground/#.....)
3131

3232
```sh

.github/ISSUE_TEMPLATE/integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:
2020

2121
**Environments:**
2222

23-
- Prettier Version: 3.7.1
23+
- Prettier Version: 3.7.2
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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# 3.7.2
2+
3+
[diff](https://github.com/prettier/prettier/compare/3.7.1...3.7.2)
4+
5+
#### JavaScript: Fix string print when switching quotes ([#18351](https://github.com/prettier/prettier/pull/18351) by [@fisker](https://github.com/fisker))
6+
7+
<!-- prettier-ignore -->
8+
```jsx
9+
// Input
10+
console.log("A descriptor\\'s .kind must be \"method\" or \"field\".")
11+
12+
// Prettier 3.7.1
13+
console.log('A descriptor\\'s .kind must be "method" or "field".');
14+
15+
// Prettier 3.7.2
16+
console.log('A descriptor\\\'s .kind must be "method" or "field".');
17+
```
18+
19+
#### JavaScript: Preserve quote for embedded HTML attribute values ([#18352](https://github.com/prettier/prettier/pull/18352) by [@kovsu](https://github.com/kovsu))
20+
21+
<!-- prettier-ignore -->
22+
```tsx
23+
// Input
24+
const html = /* HTML */ ` <div class="${styles.banner}"></div> `;
25+
26+
// Prettier 3.7.1
27+
const html = /* HTML */ ` <div class=${styles.banner}></div> `;
28+
29+
// Prettier 3.7.2
30+
const html = /* HTML */ ` <div class="${styles.banner}"></div> `;
31+
```
32+
33+
#### TypeScript: Fix comment in empty type literal ([#18364](https://github.com/prettier/prettier/pull/18364) by [@fisker](https://github.com/fisker))
34+
35+
<!-- prettier-ignore -->
36+
```tsx
37+
// Input
38+
export type XXX = {
39+
// tbd
40+
};
41+
42+
// Prettier 3.7.1
43+
export type XXX = { // tbd };
44+
45+
// Prettier 3.7.2
46+
export type XXX = {
47+
// tbd
48+
};
49+
```
50+
151
# 3.7.1
252

353
[diff](https://github.com/prettier/prettier/compare/3.7.0...3.7.1)

package.json

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

website/versioned_docs/version-stable/browser.md

Lines changed: 18 additions & 18 deletions
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].1/plugins](https://unpkg.com/browse/[email protected].1/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].2/plugins](https://unpkg.com/browse/[email protected].2/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].1/standalone.js"></script>
36-
<script src="https://unpkg.com/[email protected].1/plugins/graphql.js"></script>
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>
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].1/standalone.mjs";
54-
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].1/plugins/graphql.mjs";
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";
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].1/standalone.js",
68-
"https://unpkg.com/[email protected].1/plugins/graphql.js",
67+
"https://unpkg.com/[email protected].2/standalone.js",
68+
"https://unpkg.com/[email protected].2/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].1/standalone.mjs";
100-
import * as prettierPluginGraphql from "https://unpkg.com/[email protected].11/plugins/graphql.mjs";
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";
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].1/standalone.js",
114-
"https://unpkg.com/[email protected].1/plugins/graphql.js",
113+
"https://unpkg.com/[email protected].2/standalone.js",
114+
"https://unpkg.com/[email protected].2/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].1/standalone.mjs";
135-
import * as prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
136-
import * as prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
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";
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].1/standalone.mjs";
153-
import * as prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
154-
import * as prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
155-
import * as prettierPluginHtml from "https://unpkg.com/[email protected].1/plugins/html.mjs";
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";
156156
157157
console.log(
158158
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

0 commit comments

Comments
 (0)