Release 2.1.1
This commit is contained in:
1 parent
ebe9e07716
commit
18bcaefc77
10 files changed
+105
-97
No files matched your search
@@ -26,7 +26,7 @@ Tip! Don't write this stuff manually.
|
||||
|
||||
-->
|
||||
|
||||
**Prettier 2.1.0**
|
||||
**Prettier 2.1.1**
|
||||
[Playground link](https://prettier.io/playground/#.....)
|
||||
|
||||
```sh
|
||||
|
||||
@@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:
|
||||
|
||||
**Environments:**
|
||||
|
||||
- Prettier Version: 2.1.0
|
||||
- Prettier Version: 2.1.1
|
||||
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
|
||||
- Runtime: <!-- Node.js v14, Chrome v83, etc. -->
|
||||
- Operating System: <!-- Windows, Linux, macOS, etc. -->
|
||||
|
||||
@@ -1,3 +1,93 @@
|
||||
# 2.1.1
|
||||
|
||||
[diff](https://github.com/prettier/prettier/compare/2.1.0...2.1.1)
|
||||
|
||||
#### Fix format on html with frontMatter ([#9043](https://github.com/prettier/prettier/pull/9043) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
<!-- Input -->
|
||||
---
|
||||
layout: foo
|
||||
---
|
||||
|
||||
Test <a
|
||||
href="https://prettier.io">abc</a>.
|
||||
|
||||
<!-- Prettier stable -->
|
||||
TypeError: Cannot read property 'end' of undefined
|
||||
...
|
||||
|
||||
<!-- Prettier master -->
|
||||
---
|
||||
layout: foo
|
||||
---
|
||||
|
||||
Test <a href="https://prettier.io">abc</a>.
|
||||
```
|
||||
|
||||
#### Fix broken format for `...infer T` ([#9044](https://github.com/prettier/prettier/pull/9044) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```typescript
|
||||
// Input
|
||||
type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never;
|
||||
|
||||
// Prettier stable
|
||||
type Tail<T extends any[]> = T extends [infer U, ...(infer R)] ? R : never;
|
||||
|
||||
// Prettier master
|
||||
type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never;
|
||||
```
|
||||
|
||||
#### Fix format on `style[lang="sass"]` ([#9051](https://github.com/prettier/prettier/pull/9051) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
<!-- Input -->
|
||||
<style lang="sass">
|
||||
.hero
|
||||
@include background-centered
|
||||
</style>
|
||||
|
||||
<!-- Prettier stable -->
|
||||
<style lang="sass">
|
||||
.hero @include background-centered;
|
||||
</style>
|
||||
|
||||
<!-- Prettier master -->
|
||||
<style lang="sass">
|
||||
.hero
|
||||
@include background-centered
|
||||
</style>
|
||||
```
|
||||
|
||||
#### Fix self-closing blocks and blocks with `src` attribute format ([#9052](https://github.com/prettier/prettier/pull/9052), [#9055](https://github.com/prettier/prettier/pull/9055) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```vue
|
||||
<!-- Input -->
|
||||
<custom lang="markdown" src="./foo.md"></custom>
|
||||
<custom lang="markdown" src="./foo.md" />
|
||||
<custom lang="markdown" />
|
||||
|
||||
<!-- Prettier stable -->
|
||||
<custom lang="markdown" src="./foo.md">
|
||||
|
||||
</custom>
|
||||
<custom lang="markdown" src="./foo.md"
|
||||
|
||||
/>
|
||||
<custom lang="markdown"
|
||||
|
||||
/>
|
||||
|
||||
<!-- Prettier master -->
|
||||
<custom lang="markdown" src="./foo.md"></custom>
|
||||
<custom lang="markdown" src="./foo.md" />
|
||||
<custom lang="markdown" />
|
||||
```
|
||||
|
||||
# 2.1.0
|
||||
|
||||
[diff](https://github.com/prettier/prettier/compare/2.0.5...2.1.0)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#### Fix format on html with frontMatter ([#9043](https://github.com/prettier/prettier/pull/9043) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
<!-- Input -->
|
||||
---
|
||||
layout: foo
|
||||
---
|
||||
|
||||
Test <a
|
||||
href="https://prettier.io">abc</a>.
|
||||
|
||||
<!-- Prettier stable -->
|
||||
TypeError: Cannot read property 'end' of undefined
|
||||
...
|
||||
|
||||
<!-- Prettier master -->
|
||||
---
|
||||
layout: foo
|
||||
---
|
||||
|
||||
Test <a href="https://prettier.io">abc</a>.
|
||||
```
|
||||
@@ -1,21 +0,0 @@
|
||||
#### Fix format on `style[lang="sass"]` ([#9051](https://github.com/prettier/prettier/pull/9051) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
<!-- Input -->
|
||||
<style lang="sass">
|
||||
.hero
|
||||
@include background-centered
|
||||
</style>
|
||||
|
||||
<!-- Prettier stable -->
|
||||
<style lang="sass">
|
||||
.hero @include background-centered;
|
||||
</style>
|
||||
|
||||
<!-- Prettier master -->
|
||||
<style lang="sass">
|
||||
.hero
|
||||
@include background-centered
|
||||
</style>
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
#### Fix broken format for `...infer T` ([#9044](https://github.com/prettier/prettier/pull/9044) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```typescript
|
||||
// Input
|
||||
type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never;
|
||||
|
||||
// Prettier stable
|
||||
type Tail<T extends any[]> = T extends [infer U, ...(infer R)] ? R : never;
|
||||
|
||||
// Prettier master
|
||||
type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never;
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
#### Fix self-closing blocks and blocks with `src` attribute format ([#9052](https://github.com/prettier/prettier/pull/9052), [#9055](https://github.com/prettier/prettier/pull/9055) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```vue
|
||||
<!-- Input -->
|
||||
<custom lang="markdown" src="./foo.md"></custom>
|
||||
<custom lang="markdown" src="./foo.md" />
|
||||
<custom lang="markdown" />
|
||||
|
||||
<!-- Prettier stable -->
|
||||
<custom lang="markdown" src="./foo.md">
|
||||
|
||||
</custom>
|
||||
<custom lang="markdown" src="./foo.md"
|
||||
|
||||
/>
|
||||
<custom lang="markdown"
|
||||
|
||||
/>
|
||||
|
||||
<!-- Prettier master -->
|
||||
<custom lang="markdown" src="./foo.md"></custom>
|
||||
<custom lang="markdown" src="./foo.md" />
|
||||
<custom lang="markdown" />
|
||||
```
|
||||
+6
-6
@@ -18,8 +18,8 @@ See [Usage](#usage) below for examples.
|
||||
### Global
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/prettier@2.1.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.1/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.1/parser-graphql.js"></script>
|
||||
<script>
|
||||
prettier.format("query { }", {
|
||||
parser: "graphql",
|
||||
@@ -46,8 +46,8 @@ prettier.format("query { }", {
|
||||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.com/prettier@2.1.0/standalone.js",
|
||||
"https://unpkg.com/prettier@2.1.0/parser-graphql.js",
|
||||
"https://unpkg.com/prettier@2.1.1/standalone.js",
|
||||
"https://unpkg.com/prettier@2.1.1/parser-graphql.js",
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("query { }", { parser: "graphql", plugins });
|
||||
});
|
||||
@@ -66,7 +66,7 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
|
||||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.com/prettier@2.1.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.0/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.1/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.1/parser-graphql.js");
|
||||
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
||||
```
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "2.2.0-dev",
|
||||
"version": "2.1.1",
|
||||
"description": "Prettier is an opinionated code formatter",
|
||||
"bin": "./bin/prettier.js",
|
||||
"repository": "prettier/prettier",
|
||||
|
||||
@@ -19,8 +19,8 @@ See [Usage](#usage) below for examples.
|
||||
### Global
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/prettier@2.1.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.1/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.1.1/parser-graphql.js"></script>
|
||||
<script>
|
||||
prettier.format("query { }", {
|
||||
parser: "graphql",
|
||||
@@ -47,8 +47,8 @@ prettier.format("query { }", {
|
||||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.com/prettier@2.1.0/standalone.js",
|
||||
"https://unpkg.com/prettier@2.1.0/parser-graphql.js",
|
||||
"https://unpkg.com/prettier@2.1.1/standalone.js",
|
||||
"https://unpkg.com/prettier@2.1.1/parser-graphql.js",
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("query { }", { parser: "graphql", plugins });
|
||||
});
|
||||
@@ -67,7 +67,7 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
|
||||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.com/prettier@2.1.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.0/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.1/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.1.1/parser-graphql.js");
|
||||
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
||||
```
|
||||
Reference in new issue
Block a user