Skip to content

Commit 0a79535

Browse files
committed
Release 2.8.5
1 parent 019ebe5 commit 0a79535

File tree

7 files changed

+104
-34
lines changed

7 files changed

+104
-34
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 2.8.4**
29+
**Prettier 2.8.5**
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: 2.8.4
23+
- Prettier Version: 2.8.5
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: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
# 2.8.5
2+
3+
[diff](https://github.com/prettier/prettier/compare/2.8.4...2.8.5)
4+
5+
#### Support TypeScript 5.0 ([#14391](https://github.com/prettier/prettier/pull/14391) by [@fisker](https://github.com/fisker), [#13819](https://github.com/prettier/prettier/pull/13819) by [@fisker](https://github.com/fisker), [@sosukesuzuki](https://github.com/sosukesuzuki))
6+
7+
TypeScript 5.0 introduces two new syntactic features:
8+
9+
- `const` modifiers for type parameters
10+
- `export type *` declarations
11+
12+
#### Add missing parentheses for decorator ([#14393](https://github.com/prettier/prettier/pull/14393) by [@fisker](https://github.com/fisker))
13+
14+
<!-- prettier-ignore -->
15+
```jsx
16+
// Input
17+
class Person {
18+
@(myDecoratorArray[0])
19+
greet() {}
20+
}
21+
22+
// Prettier 2.8.4
23+
class Person {
24+
@myDecoratorArray[0]
25+
greet() {}
26+
}
27+
28+
// Prettier 2.8.5
29+
class Person {
30+
@(myDecoratorArray[0])
31+
greet() {}
32+
}
33+
```
34+
35+
#### Add parentheses for `TypeofTypeAnnotation` to improve readability ([#14458](https://github.com/prettier/prettier/pull/14458) by [@fisker](https://github.com/fisker))
36+
37+
<!-- prettier-ignore -->
38+
```tsx
39+
// Input
40+
type A = (typeof node.children)[];
41+
42+
// Prettier 2.8.4
43+
type A = typeof node.children[];
44+
45+
// Prettier 2.8.5
46+
type A = (typeof node.children)[];
47+
```
48+
49+
#### Support `max_line_length=off` when parsing `.editorconfig` ([#14516](https://github.com/prettier/prettier/pull/14516) by [@josephfrazier](https://github.com/josephfrazier))
50+
51+
If an .editorconfig file is in your project and it sets `max_line_length=off` for the file you're formatting,
52+
it will be interpreted as a `printWidth` of `Infinity` rather than being ignored
53+
(which previously resulted in the default `printWidth` of 80 being applied, if not overridden by Prettier-specific configuration).
54+
55+
<!-- prettier-ignore -->
56+
```html
57+
<!-- Input -->
58+
<div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}/>
59+
60+
<!-- Prettier 2.8.4 -->
61+
<div
62+
className="HelloWorld"
63+
title={`You are visitor number ${num}`}
64+
onMouseOver={onMouseOver}
65+
/>;
66+
67+
<!-- Prettier 2.8.5 -->
68+
<div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />;
69+
```
70+
171
# 2.8.4
272

373
[diff](https://github.com/prettier/prettier/compare/2.8.3...2.8.4)

docs/browser.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Required options:
2020

2121
- **`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 named
2222

23-
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.8.4/> and
24-
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.8.4/esm/>
23+
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.8.5/> and
24+
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.8.5/esm/>
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/prettier@2.8.4/standalone.js"></script>
36-
<script src="https://unpkg.com/prettier@2.8.4/parser-graphql.js"></script>
35+
<script src="https://unpkg.com/prettier@2.8.5/standalone.js"></script>
36+
<script src="https://unpkg.com/prettier@2.8.5/parser-graphql.js"></script>
3737
<script>
3838
prettier.format("type Query { hello: String }", {
3939
parser: "graphql",
@@ -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 prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
52-
import parserGraphql from "https://unpkg.com/prettier@2.8.4/esm/parser-graphql.mjs";
51+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
52+
import parserGraphql from "https://unpkg.com/prettier@2.8.5/esm/parser-graphql.mjs";
5353
5454
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/prettier@2.8.4/standalone.js",
66-
"https://unpkg.com/prettier@2.8.4/parser-graphql.js",
65+
"https://unpkg.com/prettier@2.8.5/standalone.js",
66+
"https://unpkg.com/prettier@2.8.5/parser-graphql.js",
6767
], (prettier, ...plugins) => {
6868
prettier.format("type Query { hello: String }", {
6969
parser: "graphql",
@@ -88,8 +88,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
8888
### Worker
8989

9090
```js
91-
importScripts("https://unpkg.com/prettier@2.8.4/standalone.js");
92-
importScripts("https://unpkg.com/prettier@2.8.4/parser-graphql.js");
91+
importScripts("https://unpkg.com/prettier@2.8.5/standalone.js");
92+
importScripts("https://unpkg.com/prettier@2.8.5/parser-graphql.js");
9393
prettier.format("type Query { hello: String }", {
9494
parser: "graphql",
9595
plugins: prettierPlugins,
@@ -102,8 +102,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
102102

103103
```html
104104
<script type="module">
105-
import prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
106-
import parserBabel from "https://unpkg.com/prettier@2.8.4/esm/parser-babel.mjs";
105+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
106+
import parserBabel from "https://unpkg.com/prettier@2.8.5/esm/parser-babel.mjs";
107107
108108
console.log(
109109
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -119,9 +119,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
119119

120120
```html
121121
<script type="module">
122-
import prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
123-
import parserBabel from "https://unpkg.com/prettier@2.8.4/esm/parser-babel.mjs";
124-
import parserHtml from "https://unpkg.com/prettier@2.8.4/esm/parser-html.mjs";
122+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
123+
import parserBabel from "https://unpkg.com/prettier@2.8.5/esm/parser-babel.mjs";
124+
import parserHtml from "https://unpkg.com/prettier@2.8.5/esm/parser-html.mjs";
125125
126126
console.log(
127127
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

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": "2.9.0-dev",
3+
"version": "2.8.5",
44
"description": "Prettier is an opinionated code formatter",
55
"bin": "./bin/prettier.js",
66
"repository": "prettier/prettier",

website/versioned_docs/version-stable/browser.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Required options:
2121

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

24-
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.8.4/> and
25-
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.8.4/esm/>
24+
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.8.5/> and
25+
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.8.5/esm/>
2626

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

@@ -33,8 +33,8 @@ See below for examples.
3333
### Global
3434

3535
```html
36-
<script src="https://unpkg.com/prettier@2.8.4/standalone.js"></script>
37-
<script src="https://unpkg.com/prettier@2.8.4/parser-graphql.js"></script>
36+
<script src="https://unpkg.com/prettier@2.8.5/standalone.js"></script>
37+
<script src="https://unpkg.com/prettier@2.8.5/parser-graphql.js"></script>
3838
<script>
3939
prettier.format("type Query { hello: String }", {
4040
parser: "graphql",
@@ -49,8 +49,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
4949

5050
```html
5151
<script type="module">
52-
import prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
53-
import parserGraphql from "https://unpkg.com/prettier@2.8.4/esm/parser-graphql.mjs";
52+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
53+
import parserGraphql from "https://unpkg.com/prettier@2.8.5/esm/parser-graphql.mjs";
5454
5555
prettier.format("type Query { hello: String }", {
5656
parser: "graphql",
@@ -63,8 +63,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
6363

6464
```js
6565
define([
66-
"https://unpkg.com/prettier@2.8.4/standalone.js",
67-
"https://unpkg.com/prettier@2.8.4/parser-graphql.js",
66+
"https://unpkg.com/prettier@2.8.5/standalone.js",
67+
"https://unpkg.com/prettier@2.8.5/parser-graphql.js",
6868
], (prettier, ...plugins) => {
6969
prettier.format("type Query { hello: String }", {
7070
parser: "graphql",
@@ -89,8 +89,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
8989
### Worker
9090

9191
```js
92-
importScripts("https://unpkg.com/prettier@2.8.4/standalone.js");
93-
importScripts("https://unpkg.com/prettier@2.8.4/parser-graphql.js");
92+
importScripts("https://unpkg.com/prettier@2.8.5/standalone.js");
93+
importScripts("https://unpkg.com/prettier@2.8.5/parser-graphql.js");
9494
prettier.format("type Query { hello: String }", {
9595
parser: "graphql",
9696
plugins: prettierPlugins,
@@ -103,8 +103,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
103103

104104
```html
105105
<script type="module">
106-
import prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
107-
import parserBabel from "https://unpkg.com/prettier@2.8.4/esm/parser-babel.mjs";
106+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
107+
import parserBabel from "https://unpkg.com/prettier@2.8.5/esm/parser-babel.mjs";
108108
109109
console.log(
110110
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
@@ -120,9 +120,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
120120

121121
```html
122122
<script type="module">
123-
import prettier from "https://unpkg.com/prettier@2.8.4/esm/standalone.mjs";
124-
import parserBabel from "https://unpkg.com/prettier@2.8.4/esm/parser-babel.mjs";
125-
import parserHtml from "https://unpkg.com/prettier@2.8.4/esm/parser-html.mjs";
123+
import prettier from "https://unpkg.com/prettier@2.8.5/esm/standalone.mjs";
124+
import parserBabel from "https://unpkg.com/prettier@2.8.5/esm/parser-babel.mjs";
125+
import parserHtml from "https://unpkg.com/prettier@2.8.5/esm/parser-html.mjs";
126126
127127
console.log(
128128
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {

website/versioned_docs/version-stable/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Indent lines with tabs instead of spaces.
5252

5353
Setting `indent_style` in an [`.editorconfig` file](https://editorconfig.org/) will configure Prettier’s tab usage, unless overridden.
5454

55-
(Tabs will be used for _indentation_ but Prettier uses spaces to _align_ things, such as in ternaries.)
55+
(Tabs will be used for _indentation_ but Prettier uses spaces to _align_ things, such as in ternaries. This behavior is known as [SmartTabs](https://www.emacswiki.org/emacs/SmartTabs).)
5656

5757
## Semicolons
5858

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy