diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index b3358e557..1f6d75d25 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.5 +c1808e86a3c7c2c8f43093f99e78fce3b6d0a97d # 2.8.4 f3b23ab63c9387329dc1993e1d0aa71583d67a0b # 2.8.3 diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index f2a21f21f..e02c53586 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.4** +**Prettier 2.8.5** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 58f004f6c..12e84bc26 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.4 +- Prettier Version: 2.8.5 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index 92259f95c..889c02730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,73 @@ +# 2.8.5 + +[diff](https://github.com/prettier/prettier/compare/2.8.4...2.8.5) + +#### Support TypeScript 5.0 ([#14391](https://github.com/prettier/prettier/pull/14391) by [@fisker](https://github.com/fisker), [#13819](https://github.com/prettier/prettier/pull/13819) by [@fisker](https://github.com/fisker), [@sosukesuzuki](https://github.com/sosukesuzuki)) + +TypeScript 5.0 introduces two new syntactic features: + +- `const` modifiers for type parameters +- `export type *` declarations + +#### Add missing parentheses for decorator ([#14393](https://github.com/prettier/prettier/pull/14393) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +class Person { + @(myDecoratorArray[0]) + greet() {} +} + +// Prettier 2.8.4 +class Person { + @myDecoratorArray[0] + greet() {} +} + +// Prettier 2.8.5 +class Person { + @(myDecoratorArray[0]) + greet() {} +} +``` + +#### Add parentheses for `TypeofTypeAnnotation` to improve readability ([#14458](https://github.com/prettier/prettier/pull/14458) by [@fisker](https://github.com/fisker)) + + +```tsx +// Input +type A = (typeof node.children)[]; + +// Prettier 2.8.4 +type A = typeof node.children[]; + +// Prettier 2.8.5 +type A = (typeof node.children)[]; +``` + +#### Support `max_line_length=off` when parsing `.editorconfig` ([#14516](https://github.com/prettier/prettier/pull/14516) by [@josephfrazier](https://github.com/josephfrazier)) + +If an .editorconfig file is in your project and it sets `max_line_length=off` for the file you're formatting, +it will be interpreted as a `printWidth` of `Infinity` rather than being ignored +(which previously resulted in the default `printWidth` of 80 being applied, if not overridden by Prettier-specific configuration). + + +```html + +
+ + +
; + + +
; +``` + # 2.8.4 [diff](https://github.com/prettier/prettier/compare/2.8.3...2.8.4) diff --git a/changelog_unreleased/flow/14458.md b/changelog_unreleased/flow/14458.md deleted file mode 100644 index baa2c52ab..000000000 --- a/changelog_unreleased/flow/14458.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Add parentheses for `TypeofTypeAnnotation` to improve readability (#14458 by @fisker) - - -```tsx -// Input -type A = (typeof node.children)[]; - -// Prettier stable -type A = typeof node.children[]; - -// Prettier main -type A = (typeof node.children)[]; -``` diff --git a/changelog_unreleased/javascript/14393.md b/changelog_unreleased/javascript/14393.md deleted file mode 100644 index 00cb3e4cd..000000000 --- a/changelog_unreleased/javascript/14393.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Add missing parentheses for decorator (#14393 by @fisker) - - -```jsx -// Input -class Person { - @(myDecoratorArray[0]) - greet() {} -} - -// Prettier stable -class Person { - @myDecoratorArray[0] - greet() {} -} - -// Prettier main -class Person { - @(myDecoratorArray[0]) - greet() {} -} -``` diff --git a/changelog_unreleased/misc/14516.md b/changelog_unreleased/misc/14516.md deleted file mode 100644 index e05195a64..000000000 --- a/changelog_unreleased/misc/14516.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Support `max_line_length=off` when parsing `.editorconfig` (#14516 by @josephfrazier) - -If an .editorconfig file is in your project and it sets `max_line_length=off` for the file you're formatting, -it will be interpreted as a `printWidth` of `Infinity` rather than being ignored -(which previously resulted in the default `printWidth` of 80 being applied, if not overridden by Prettier-specific configuration). - - -```html - -
- - -
; - - -
; -``` diff --git a/docs/browser.md b/docs/browser.md index e8221b5bb..69f615539 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 - - + + - + +