diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index d380ccdfa..c5698f027 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 2.5.0** +**Prettier 2.5.1** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 19c6fb6fd..5475c704a 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 2.5.0 +- Prettier Version: 2.5.1 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index 529ed086f..bfa58ad02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +# 2.5.1 + +[diff](https://github.com/prettier/prettier/compare/2.5.0...2.5.1) + +#### Improve formatting for empty tuple types ([#11884](https://github.com/prettier/prettier/pull/11884) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```tsx +// Input +type Foo = + Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] + ? Foo3 + : Foo4; + +// Prettier 2.5.0 +type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [ + +] + ? Foo3 + : Foo4; + +// Prettier 2.5.0 (tailingCommma = all) +// Invalid TypeScript code +type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [ + , +] + ? Foo3 + : Foo4; + +// Prettier 2.5.1 +type Foo = + Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] + ? Foo3 + : Foo4; + +``` + +#### Fix compatibility with Jest inline snapshot test ([#11892](https://github.com/prettier/prettier/pull/11892) by [@fisker](https://github.com/fisker)) + +A internal change in Prettier@v2.5.0 accidentally breaks the Jest inline snapshot test. + +#### Support Glimmer's named blocks ([#11899](https://github.com/prettier/prettier/pull/11899) by [@duailibe](https://github.com/duailibe)) + +Prettier already supported this feature, but it converted empty named blocks to self-closing, which is not supported by the Glimmer compiler. + +See: [Glimmer's named blocks](https://emberjs.github.io/rfcs/0460-yieldable-named-blocks.html). + + +```hbs +// Input + + <:named> + + +// Prettier 2.5.0 + + <:named /> + + +// Prettier 2.5.1 + + <:named> + +``` + # 2.5.0 [diff](https://github.com/prettier/prettier/compare/2.4.1...2.5.0) diff --git a/docs/browser.md b/docs/browser.md index bb0117920..38c132e6c 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -32,8 +32,8 @@ See below for examples. ### Global ```html - - + + - + +