Skip to content

Commit 157e42a

Browse files
committed
Release 3.0.2
1 parent 1b0c756 commit 157e42a

File tree

6 files changed

+99
-35
lines changed

6 files changed

+99
-35
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.0.1**
29+
**Prettier 3.0.2**
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.0.1
23+
- Prettier Version: 3.0.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

+64
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
# 3.0.2
2+
3+
[diff](https://github.com/prettier/prettier/compare/3.0.1...3.0.2)
4+
5+
#### Break after `=` of assignment if RHS is poorly breakable AwaitExpression or YieldExpression ([#15204](https://github.com/prettier/prettier/pull/15204) by [@seiyab](https://github.com/seiyab))
6+
7+
<!-- prettier-ignore -->
8+
```js
9+
// Input
10+
const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData);
11+
12+
// Prettier 3.0.1
13+
const { section, rubric, authors, tags } = await utils.upsertCommonData(
14+
mainData,
15+
);
16+
17+
// Prettier 3.0.2
18+
const { section, rubric, authors, tags } =
19+
await utils.upsertCommonData(mainData);
20+
```
21+
22+
#### Do not add trailing comma for grouped scss comments ([#15217](https://github.com/prettier/prettier/pull/15217) by [@auvred](https://github.com/auvred))
23+
24+
<!-- prettier-ignore -->
25+
```scss
26+
/* Input */
27+
$foo: (
28+
'property': (),
29+
// comment 1
30+
// comment 2
31+
)
32+
33+
/* Prettier 3.0.1 */
34+
$foo: (
35+
"property": (),
36+
// comment 1
37+
// comment 2,
38+
);
39+
40+
/* Prettier 3.0.2 */
41+
$foo: (
42+
"property": (),
43+
// comment 1
44+
// comment 2
45+
);
46+
```
47+
48+
#### Print `declare` and `export` keywords for nested namespace ([#15249](https://github.com/prettier/prettier/pull/15249) by [@sosukesuzuki](https://github.com/sosukesuzuki))
49+
50+
<!-- prettier-ignore -->
51+
```tsx
52+
// Input
53+
declare namespace abc1.def {}
54+
export namespace abc2.def {}
55+
56+
// Prettier 3.0.1
57+
namespace abc1.def {}
58+
namespace abc2.def {}
59+
60+
// Prettier 3.0.2
61+
declare namespace abc1.def {}
62+
export namespace abc2.def {}
63+
```
64+
165
# 3.0.1
266

367
[diff](https://github.com/prettier/prettier/compare/3.0.0...3.0.1)

docs/browser.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Required options:
1818

1919
- **[`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.
2020

21-
- **`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/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
21+
- **`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/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
2222

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

@@ -29,8 +29,8 @@ See below for examples.
2929
### Global
3030

3131
```html
32-
<script src="https://unpkg.com/[email protected].1/standalone.js"></script>
33-
<script src="https://unpkg.com/[email protected].1/plugins/graphql.js"></script>
32+
<script src="https://unpkg.com/[email protected].2/standalone.js"></script>
33+
<script src="https://unpkg.com/[email protected].2/plugins/graphql.js"></script>
3434
<script>
3535
(async () => {
3636
const formatted = await prettier.format("type Query { hello: String }", {
@@ -47,8 +47,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
4747

4848
```html
4949
<script type="module">
50-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
51-
import prettierPluginGraphql from "https://unpkg.com/[email protected].1/plugins/graphql.mjs";
50+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
51+
import prettierPluginGraphql from "https://unpkg.com/[email protected].2/plugins/graphql.mjs";
5252
5353
const formatted = await prettier.format("type Query { hello: String }", {
5454
parser: "graphql",
@@ -61,8 +61,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
6161

6262
```js
6363
define([
64-
"https://unpkg.com/[email protected].1/standalone.js",
65-
"https://unpkg.com/[email protected].1/plugins/graphql.js",
64+
"https://unpkg.com/[email protected].2/standalone.js",
65+
"https://unpkg.com/[email protected].2/plugins/graphql.js",
6666
], async (prettier, ...plugins) => {
6767
const formatted = await prettier.format("type Query { hello: String }", {
6868
parser: "graphql",
@@ -90,8 +90,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
9090
### Worker
9191

9292
```js
93-
importScripts("https://unpkg.com/[email protected].1/standalone.js");
94-
importScripts("https://unpkg.com/[email protected].1/plugins/graphql.js");
93+
importScripts("https://unpkg.com/[email protected].2/standalone.js");
94+
importScripts("https://unpkg.com/[email protected].2/plugins/graphql.js");
9595

9696
(async () => {
9797
const formatted = await prettier.format("type Query { hello: String }", {
@@ -107,9 +107,9 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
107107

108108
```html
109109
<script type="module">
110-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
111-
import prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
112-
import prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
110+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
111+
import prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
112+
import prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
113113
114114
console.log(
115115
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -125,10 +125,10 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
125125

126126
```html
127127
<script type="module">
128-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
129-
import prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
130-
import prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
131-
import prettierPluginHtml from "https://unpkg.com/[email protected].1/plugins/html.mjs";
128+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
129+
import prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
130+
import prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
131+
import prettierPluginHtml from "https://unpkg.com/[email protected].2/plugins/html.mjs";
132132
133133
console.log(
134134
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prettier",
3-
"version": "3.1.0-dev",
3+
"version": "3.0.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

+16-16
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Required options:
1919

2020
- **[`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.
2121

22-
- **`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/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
22+
- **`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/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
2323

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

@@ -30,8 +30,8 @@ See below for examples.
3030
### Global
3131

3232
```html
33-
<script src="https://unpkg.com/[email protected].1/standalone.js"></script>
34-
<script src="https://unpkg.com/[email protected].1/plugins/graphql.js"></script>
33+
<script src="https://unpkg.com/[email protected].2/standalone.js"></script>
34+
<script src="https://unpkg.com/[email protected].2/plugins/graphql.js"></script>
3535
<script>
3636
(async () => {
3737
const formatted = await prettier.format("type Query { hello: String }", {
@@ -48,8 +48,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
4848

4949
```html
5050
<script type="module">
51-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
52-
import prettierPluginGraphql from "https://unpkg.com/[email protected].1/plugins/graphql.mjs";
51+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
52+
import prettierPluginGraphql from "https://unpkg.com/[email protected].2/plugins/graphql.mjs";
5353
5454
const formatted = await prettier.format("type Query { hello: String }", {
5555
parser: "graphql",
@@ -62,8 +62,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
6262

6363
```js
6464
define([
65-
"https://unpkg.com/[email protected].1/standalone.js",
66-
"https://unpkg.com/[email protected].1/plugins/graphql.js",
65+
"https://unpkg.com/[email protected].2/standalone.js",
66+
"https://unpkg.com/[email protected].2/plugins/graphql.js",
6767
], async (prettier, ...plugins) => {
6868
const formatted = await prettier.format("type Query { hello: String }", {
6969
parser: "graphql",
@@ -91,8 +91,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
9191
### Worker
9292

9393
```js
94-
importScripts("https://unpkg.com/[email protected].1/standalone.js");
95-
importScripts("https://unpkg.com/[email protected].1/plugins/graphql.js");
94+
importScripts("https://unpkg.com/[email protected].2/standalone.js");
95+
importScripts("https://unpkg.com/[email protected].2/plugins/graphql.js");
9696

9797
(async () => {
9898
const formatted = await prettier.format("type Query { hello: String }", {
@@ -108,9 +108,9 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
108108

109109
```html
110110
<script type="module">
111-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
112-
import prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
113-
import prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
111+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
112+
import prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
113+
import prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
114114
115115
console.log(
116116
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -126,10 +126,10 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
126126

127127
```html
128128
<script type="module">
129-
import * as prettier from "https://unpkg.com/[email protected].1/standalone.mjs";
130-
import prettierPluginBabel from "https://unpkg.com/[email protected].1/plugins/babel.mjs";
131-
import prettierPluginEstree from "https://unpkg.com/[email protected].1/plugins/estree.mjs";
132-
import prettierPluginHtml from "https://unpkg.com/[email protected].1/plugins/html.mjs";
129+
import * as prettier from "https://unpkg.com/[email protected].2/standalone.mjs";
130+
import prettierPluginBabel from "https://unpkg.com/[email protected].2/plugins/babel.mjs";
131+
import prettierPluginEstree from "https://unpkg.com/[email protected].2/plugins/estree.mjs";
132+
import prettierPluginHtml from "https://unpkg.com/[email protected].2/plugins/html.mjs";
133133
134134
console.log(
135135
await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

0 commit comments

Comments
 (0)