From 28cc1908fd8fd1d8d62b62ce55d735325dd5f118 Mon Sep 17 00:00:00 2001 From: sosukesuzuki Date: Fri, 20 Nov 2020 14:01:22 +0900 Subject: [PATCH] Clean changelog_unreleased --- changelog_unreleased/api/pr-8983.md | 13 ---- changelog_unreleased/api/pr-9371.md | 19 ------ changelog_unreleased/blog-post-intro.md | 7 --- changelog_unreleased/cli/pr-8937.md | 12 ---- changelog_unreleased/cli/pr-9298.md | 15 ----- changelog_unreleased/flow/pr-9071.md | 18 ------ changelog_unreleased/flow/pr-9432.md | 22 ------- changelog_unreleased/flow/pr-9457.md | 21 ------- changelog_unreleased/flow/pr-9523.md | 18 ------ changelog_unreleased/flow/pr-9543.md | 25 -------- changelog_unreleased/flow/pr-9553.md | 22 ------- changelog_unreleased/flow/pr-9563.md | 22 ------- changelog_unreleased/handlebars/pr-9403.md | 29 --------- changelog_unreleased/html/pr-9368.md | 14 ----- changelog_unreleased/javascript/pr-9000.md | 9 --- changelog_unreleased/javascript/pr-9078.md | 20 ------ changelog_unreleased/javascript/pr-9278.md | 61 ------------------ changelog_unreleased/javascript/pr-9341.md | 33 ---------- changelog_unreleased/javascript/pr-9345.md | 20 ------ changelog_unreleased/javascript/pr-9408.md | 34 ---------- changelog_unreleased/javascript/pr-9431.md | 21 ------- changelog_unreleased/javascript/pr-9435.md | 16 ----- changelog_unreleased/javascript/pr-9650.md | 17 ----- changelog_unreleased/javascript/pr-9662.md | 29 --------- changelog_unreleased/javascript/pr-9670.md | 13 ---- changelog_unreleased/less/pr-9356.md | 19 ------ changelog_unreleased/markdown/pr-7938.md | 19 ------ changelog_unreleased/markdown/pr-8786.md | 12 ---- changelog_unreleased/markdown/pr-9275.md | 21 ------- changelog_unreleased/markdown/pr-9365.md | 38 ----------- changelog_unreleased/markdown/pr-9654.md | 29 --------- changelog_unreleased/mdx/pr-9267.md | 35 ----------- changelog_unreleased/typescript/pr-9318.md | 22 ------- changelog_unreleased/typescript/pr-9473.md | 38 ----------- changelog_unreleased/typescript/pr-9484.md | 13 ---- changelog_unreleased/typescript/pr-9521.md | 25 -------- changelog_unreleased/typescript/pr-9551.md | 22 ------- changelog_unreleased/vue/pr-9225.md | 57 ----------------- changelog_unreleased/vue/pr-9609.md | 73 ---------------------- changelog_unreleased/yaml/pr-9665.md | 46 -------------- changelog_unreleased/yaml/pr-9669.md | 60 ------------------ 41 files changed, 1059 deletions(-) delete mode 100644 changelog_unreleased/api/pr-8983.md delete mode 100644 changelog_unreleased/api/pr-9371.md delete mode 100644 changelog_unreleased/blog-post-intro.md delete mode 100644 changelog_unreleased/cli/pr-8937.md delete mode 100644 changelog_unreleased/cli/pr-9298.md delete mode 100644 changelog_unreleased/flow/pr-9071.md delete mode 100644 changelog_unreleased/flow/pr-9432.md delete mode 100644 changelog_unreleased/flow/pr-9457.md delete mode 100644 changelog_unreleased/flow/pr-9523.md delete mode 100644 changelog_unreleased/flow/pr-9543.md delete mode 100644 changelog_unreleased/flow/pr-9553.md delete mode 100644 changelog_unreleased/flow/pr-9563.md delete mode 100644 changelog_unreleased/handlebars/pr-9403.md delete mode 100644 changelog_unreleased/html/pr-9368.md delete mode 100644 changelog_unreleased/javascript/pr-9000.md delete mode 100644 changelog_unreleased/javascript/pr-9078.md delete mode 100644 changelog_unreleased/javascript/pr-9278.md delete mode 100644 changelog_unreleased/javascript/pr-9341.md delete mode 100644 changelog_unreleased/javascript/pr-9345.md delete mode 100644 changelog_unreleased/javascript/pr-9408.md delete mode 100644 changelog_unreleased/javascript/pr-9431.md delete mode 100644 changelog_unreleased/javascript/pr-9435.md delete mode 100644 changelog_unreleased/javascript/pr-9650.md delete mode 100644 changelog_unreleased/javascript/pr-9662.md delete mode 100644 changelog_unreleased/javascript/pr-9670.md delete mode 100644 changelog_unreleased/less/pr-9356.md delete mode 100644 changelog_unreleased/markdown/pr-7938.md delete mode 100644 changelog_unreleased/markdown/pr-8786.md delete mode 100644 changelog_unreleased/markdown/pr-9275.md delete mode 100644 changelog_unreleased/markdown/pr-9365.md delete mode 100644 changelog_unreleased/markdown/pr-9654.md delete mode 100644 changelog_unreleased/mdx/pr-9267.md delete mode 100644 changelog_unreleased/typescript/pr-9318.md delete mode 100644 changelog_unreleased/typescript/pr-9473.md delete mode 100644 changelog_unreleased/typescript/pr-9484.md delete mode 100644 changelog_unreleased/typescript/pr-9521.md delete mode 100644 changelog_unreleased/typescript/pr-9551.md delete mode 100644 changelog_unreleased/vue/pr-9225.md delete mode 100644 changelog_unreleased/vue/pr-9609.md delete mode 100644 changelog_unreleased/yaml/pr-9665.md delete mode 100644 changelog_unreleased/yaml/pr-9669.md diff --git a/changelog_unreleased/api/pr-8983.md b/changelog_unreleased/api/pr-8983.md deleted file mode 100644 index 4282ea7a04d2..000000000000 --- a/changelog_unreleased/api/pr-8983.md +++ /dev/null @@ -1,13 +0,0 @@ -#### [HIGHLIGHT]ESM standalone bundles ([#8983](https://github.com/prettier/prettier/pull/8983) by [@Monchi](https://github.com/Monchi), [@fisker](https://github.com/fisker)) - -Prettier now also comes as ES modules, which can be directly used in modern browsers: - -```js -import prettier from "https://unpkg.com/prettier/esm/standalone.mjs"; -import parserGraphql from "https://unpkg.com/prettier/esm/parser-graphql.mjs"; - -prettier.format("query { }", { - parser: "graphql", - plugins: [parserGraphql], -}); -``` diff --git a/changelog_unreleased/api/pr-9371.md b/changelog_unreleased/api/pr-9371.md deleted file mode 100644 index 22af5459ed4a..000000000000 --- a/changelog_unreleased/api/pr-9371.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Stop inferring the parser to be `json` for `.jsonl` files (#9371 by @fisker) - - -```console -// Prettier stable -$ prettier --check . -Checking formatting... -[error] bad.jsonl: SyntaxError: Unexpected token (2:1) -[error] 1 | '{"type": "t/f", "head": "England", "relation": "invaded", "tail": "United States"}' -[error] > 2 | '{"type": "t/f", "head": "England", "relation": "attacked", "tail": "Baltimore"}' -[error] | ^ -[error] 3 | -All matched files use Prettier code style! - -// Prettier master -$ prettier --check . -Checking formatting... -All matched files use Prettier code style! -``` diff --git a/changelog_unreleased/blog-post-intro.md b/changelog_unreleased/blog-post-intro.md deleted file mode 100644 index 166e4bd1ae35..000000000000 --- a/changelog_unreleased/blog-post-intro.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" -title: "Prettier 2.2: new JavaScript parsers, TS 4.1 and ESM standalone bundles" ---- - -This release supports new JavaScript parsers [espree](https://github.com/eslint/espree) and [meriyah](https://github.com/meriyah/meriyah), supports [TypeScript 4.1](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-rc/), ships ESM standalone bundles for modern browsers, and includes many bug fixes and improvements! diff --git a/changelog_unreleased/cli/pr-8937.md b/changelog_unreleased/cli/pr-8937.md deleted file mode 100644 index ad053189be2b..000000000000 --- a/changelog_unreleased/cli/pr-8937.md +++ /dev/null @@ -1,12 +0,0 @@ -#### Move [pre-commit](https://github.com/pre-commit/pre-commit) support to github.com/pre-commit/mirrors-prettier ([#8937](https://github.com/prettier/prettier/pull/8937) by [@FloChehab](https://github.com/FloChehab)) - -`pre-commit` support has moved to https://github.com/pre-commit/mirrors-prettier, please update your `.pre-commit-config.yaml` file . - -```diff -- - repo: https://github.com/prettier/prettier -+ - repo: https://github.com/pre-commit/mirrors-prettier -- rev: "2.2.0" -+ rev: "v2.2.0" - hooks: - - id: prettier -``` diff --git a/changelog_unreleased/cli/pr-9298.md b/changelog_unreleased/cli/pr-9298.md deleted file mode 100644 index d402fa7d563b..000000000000 --- a/changelog_unreleased/cli/pr-9298.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Fix: error on directories and files with numeric names (#9298 by @fisker) - - -```console -$ cat 1/index.js -hello('world') - -// Prettier stable -$ prettier 1 -[error] The "path" argument must be of type string. Received type number (1) - -// Prettier master -$ prettier 1 -hello("world"); -``` diff --git a/changelog_unreleased/flow/pr-9071.md b/changelog_unreleased/flow/pr-9071.md deleted file mode 100644 index 7859461a55ce..000000000000 --- a/changelog_unreleased/flow/pr-9071.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Switch the `babel` parser to `babel-flow` if the `@flow` pragma is found (#9071 by @fisker) - -In practice, this means that as long as your Flow files have the pragma, it's safe to use the `.js` extension for them. Prettier will correctly parse and print them without any additional configuration. Previously, the pragma was recognized by the parser, but there existed minor correctness issues with the printer. E.g. it's not safe to unquote number keys in Flow. - - -```jsx -// Input (with --parser babel) -// @flow -f({ "2": 2 }) - -// Prettier stable -// @flow -f({ 2: 2 }); - -// Prettier master -// @flow -f({ "2": 2 }); -``` diff --git a/changelog_unreleased/flow/pr-9432.md b/changelog_unreleased/flow/pr-9432.md deleted file mode 100644 index a677ea5044ae..000000000000 --- a/changelog_unreleased/flow/pr-9432.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Enums with unknown members (#9432 by @gkz) - -Previously, was not supported. Now, the following is formatted: - - -```jsx -// Input -enum E { - A, - B, - ... -} - -// Prettier stable: parse error - -// Prettier master -enum E { - A, - B, - ... -} -``` diff --git a/changelog_unreleased/flow/pr-9457.md b/changelog_unreleased/flow/pr-9457.md deleted file mode 100644 index 7899e4fa5323..000000000000 --- a/changelog_unreleased/flow/pr-9457.md +++ /dev/null @@ -1,21 +0,0 @@ -#### `this` parameter annotations (#9457 by @dsainati1, #9489 by @fisker) - - -```jsx -// Input -function f(this: string, a: number) { -} - -type T = (this: boolean, a: number) => boolean; - -// Prettier stable -function f(this: string, a: number) {} - -type T = (a: number) => boolean; - -// Prettier master -function f(this: string, a: number) { -} - -type T = (this: boolean, a: number) => boolean; -``` diff --git a/changelog_unreleased/flow/pr-9523.md b/changelog_unreleased/flow/pr-9523.md deleted file mode 100644 index da75c9926d1f..000000000000 --- a/changelog_unreleased/flow/pr-9523.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Support `BigIntLiteralTypeAnnotation` and `BigIntTypeAnnotation` (#9523 by @fisker) - -Add support for `BigIntLiteralTypeAnnotation` and `BigIntTypeAnnotation` in Flow. - - -```jsx -// Input -const foo: bigint = 1n; -const bar: baz<1n> = 1n; - -// Prettier stable -Error: unknown type: "BigIntTypeAnnotation" - at ... - -// Prettier master -const foo: bigint = 1n; -const bar: baz<1n> = 1n; -``` diff --git a/changelog_unreleased/flow/pr-9543.md b/changelog_unreleased/flow/pr-9543.md deleted file mode 100644 index c328264ae0f1..000000000000 --- a/changelog_unreleased/flow/pr-9543.md +++ /dev/null @@ -1,25 +0,0 @@ -#### Treat more simple types as non-breaking in generic type annotations (#9543 by @fisker) - - -```jsx -// Input -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo = a -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; - -// Prettier stable -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< - symbol -> = a; -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< - "STRING" -> = a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< - 0 -> = a; - -// Prettier master (typescript and flow parser) -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo = a -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; -``` diff --git a/changelog_unreleased/flow/pr-9553.md b/changelog_unreleased/flow/pr-9553.md deleted file mode 100644 index a041ea4fb7f9..000000000000 --- a/changelog_unreleased/flow/pr-9553.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fix missing parentheses around `prettier-ignore`d type assertions (#9553 by @fisker) - - -```jsx -// Input -transform( - // prettier-ignore - (pointTransformer: (Point => Point)) -); - -// Prettier stable -transform( - // prettier-ignore - pointTransformer: (Point => Point) -); - -// Prettier master -transform( - // prettier-ignore - (pointTransformer: (Point => Point)) -); -``` diff --git a/changelog_unreleased/flow/pr-9563.md b/changelog_unreleased/flow/pr-9563.md deleted file mode 100644 index 0c843229d70b..000000000000 --- a/changelog_unreleased/flow/pr-9563.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Improve comment types detection (#9563 by @fisker) - - -```jsx -// Input -foo/*::*/(baz); -class Foo { - bar( data: Array) {} -} - -// Prettier stable -foo/*:: */(baz); -class Foo { - bar(data: Array/*:: */) {} -} - -// Prettier master -foo/*:: */(baz); -class Foo { - bar(data: Array) {} -} -``` diff --git a/changelog_unreleased/handlebars/pr-9403.md b/changelog_unreleased/handlebars/pr-9403.md deleted file mode 100644 index b8afd996bf8f..000000000000 --- a/changelog_unreleased/handlebars/pr-9403.md +++ /dev/null @@ -1,29 +0,0 @@ -#### Fix unstable newlines after `