Release 2.6.1
This commit is contained in:
1 parent
6128c5c4e4
commit
ad505bf771
6 files changed
+95
-29
No files matched your search
@@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you:
|
||||
|
||||
-->
|
||||
|
||||
**Prettier 2.6.0**
|
||||
**Prettier 2.6.1**
|
||||
[Playground link](https://prettier.io/playground/#.....)
|
||||
|
||||
```sh
|
||||
|
||||
@@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE:
|
||||
|
||||
**Environments:**
|
||||
|
||||
- Prettier Version: 2.6.0
|
||||
- Prettier Version: 2.6.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,69 @@
|
||||
# 2.6.1
|
||||
|
||||
[diff](https://github.com/prettier/prettier/compare/2.6.0...2.6.1)
|
||||
|
||||
#### Ignore `loglevel` when printing information ([#12477](https://github.com/prettier/prettier/pull/12477) by [@fisker](https://github.com/fisker))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```bash
|
||||
# Prettier 2.6.0
|
||||
prettier --loglevel silent --find-config-path index.js
|
||||
# Nothing printed
|
||||
|
||||
# Prettier 2.6.1
|
||||
prettier --loglevel silent --help no-color
|
||||
# .prettierrc
|
||||
```
|
||||
|
||||
#### Make artifact friendly for webpack ([#12485](https://github.com/prettier/prettier/pull/12485), [#12511](https://github.com/prettier/prettier/pull/12511) by [@fisker](https://github.com/fisker))
|
||||
|
||||
Fixes two problems when bundling our UMD files with webpack:
|
||||
|
||||
- A error `` "`....__exportStar` is not a function" `` throws when running the bundles.
|
||||
- Some files cause warning about `"Critical dependency: the request of a dependency is an expression"`.
|
||||
|
||||
#### Fix non-idempotent formatting of function calls with complex type arguments ([#12508](https://github.com/prettier/prettier/pull/12508) by [@sosukesuzuki](https://github.com/sosukesuzuki))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
const foo =
|
||||
doSomething<{ foo1: "foo1", foo2: "foo2", foo3: "foo3", foo4: "foo4", foo5: "foo5" }>();
|
||||
|
||||
// Prettier 2.6.0 (first)
|
||||
const foo =
|
||||
doSomething<{
|
||||
foo1: "foo1";
|
||||
foo2: "foo2";
|
||||
foo3: "foo3";
|
||||
foo4: "foo4";
|
||||
foo5: "foo5";
|
||||
}>();
|
||||
|
||||
// Prettier 2.6.0 (second)
|
||||
const foo = doSomething<{
|
||||
foo1: "foo1";
|
||||
foo2: "foo2";
|
||||
foo3: "foo3";
|
||||
foo4: "foo4";
|
||||
foo5: "foo5";
|
||||
}>();
|
||||
|
||||
// Prettier 2.6.1
|
||||
const foo = doSomething<{
|
||||
foo1: "foo1";
|
||||
foo2: "foo2";
|
||||
foo3: "foo3";
|
||||
foo4: "foo4";
|
||||
foo5: "foo5";
|
||||
}>();
|
||||
|
||||
```
|
||||
|
||||
#### Fix minimist security issue ([#12513](https://github.com/prettier/prettier/pull/12513) by [@dependabot](https://github.com/dependabot))
|
||||
|
||||
Details: [Prototype Pollution](https://security.snyk.io/vuln/SNYK-JS-MINIMIST-559764)
|
||||
|
||||
# 2.6.0
|
||||
|
||||
[diff](https://github.com/prettier/prettier/compare/2.5.1...2.6.0)
|
||||
|
||||
+13
-13
@@ -32,8 +32,8 @@ See below for examples.
|
||||
### Global
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/prettier@2.6.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.1/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.1/parser-graphql.js"></script>
|
||||
<script>
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -48,8 +48,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.6.0/esm/parser-graphql.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.6.1/esm/parser-graphql.mjs";
|
||||
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -62,8 +62,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.com/prettier@2.6.0/standalone.js",
|
||||
"https://unpkg.com/prettier@2.6.0/parser-graphql.js",
|
||||
"https://unpkg.com/prettier@2.6.1/standalone.js",
|
||||
"https://unpkg.com/prettier@2.6.1/parser-graphql.js",
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -88,8 +88,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
|
||||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.com/prettier@2.6.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.0/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.1/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.1/parser-graphql.js");
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
plugins: prettierPlugins,
|
||||
@@ -102,8 +102,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.0/esm/parser-babel.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.1/esm/parser-babel.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
@@ -119,9 +119,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.0/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.6.0/esm/parser-html.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.1/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.6.1/esm/parser-html.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "2.7.0-dev",
|
||||
"version": "2.6.1",
|
||||
"description": "Prettier is an opinionated code formatter",
|
||||
"bin": "./bin/prettier.js",
|
||||
"repository": "prettier/prettier",
|
||||
|
||||
@@ -33,8 +33,8 @@ See below for examples.
|
||||
### Global
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/prettier@2.6.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.1/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.1/parser-graphql.js"></script>
|
||||
<script>
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -49,8 +49,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.6.0/esm/parser-graphql.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.6.1/esm/parser-graphql.mjs";
|
||||
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -63,8 +63,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.com/prettier@2.6.0/standalone.js",
|
||||
"https://unpkg.com/prettier@2.6.0/parser-graphql.js",
|
||||
"https://unpkg.com/prettier@2.6.1/standalone.js",
|
||||
"https://unpkg.com/prettier@2.6.1/parser-graphql.js",
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -89,8 +89,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
|
||||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.com/prettier@2.6.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.0/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.1/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.1/parser-graphql.js");
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
plugins: prettierPlugins,
|
||||
@@ -103,8 +103,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.0/esm/parser-babel.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.1/esm/parser-babel.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
@@ -120,9 +120,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.0/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.6.0/esm/parser-html.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.6.1/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.1/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.6.1/esm/parser-html.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
|
||||
Reference in new issue
Block a user