diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index e4c1197ed..446e59aff 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -5,6 +5,8 @@ # See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt # Prettier bump after release +# 2.8.8 +fe8fcb5f9888ddbe9c749da01439dbdc7d28e367 # 2.8.7 0e26a75ebf0cb5b436f6a2d26a7bb88d04f23b90 # 2.8.6 diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index fefab43bd..c790749e9 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.8.7** +**Prettier 2.8.8** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index a50a5df0c..7a0204a67 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.8.7 +- Prettier Version: 2.8.8 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb365cf9..a479c93ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,64 @@ +# 2.8.8 + +[diff](https://github.com/prettier/prettier/compare/2.8.7...2.8.8) + +#### Allow decorators on private members and class expressions ([#14548](https://github.com/prettier/prettier/pull/14548) by [@fisker](https://github.com/fisker)) + + +```ts +// Input +class A { + @decorator() + #privateMethod () {} +} + +// Prettier 2.8.7 +SyntaxError: Decorators are not valid here. (2:3) + 1 | class A { +> 2 | @decorator() + | ^^^^^^^^^^^^ + 3 | #privateMethod () {} + 4 | } + +// Prettier 2.8.8 +class A { + @decorator() + #privateMethod() {} +} +``` + +#### Allow multiple decorators on same getter/setter ([#14584](https://github.com/prettier/prettier/pull/14584) by [@fisker](https://github.com/fisker)) + + +```ts +// Input +class A { + @decorator() + get foo () {} + + @decorator() + set foo (value) {} +} + +// Prettier 2.8.7 +SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3) + 3 | get foo () {} + 4 | +> 5 | @decorator() + | ^^^^^^^^^^^^ + 6 | set foo (value) {} + 7 | } + +// Prettier 2.8.8 +class A { + @decorator() + get foo() {} + + @decorator() + set foo(value) {} +} +``` + # 2.8.7 [diff](https://github.com/prettier/prettier/compare/2.8.6...2.8.7) diff --git a/docs/browser.md b/docs/browser.md index 62ba96f26..bb47b5271 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -18,7 +18,7 @@ Required options: - **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use. -- **`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 in +- **`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 in You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option. @@ -29,8 +29,8 @@ See below for examples. ### Global ```html - - + + - + +