diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 7ae5ab1b2d70..7bf46148bb93 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 +# 3.2.1 +5811ad00705488365e0d0baf50c92965edddf58e # 3.2.0 ee0d667fa2bf175c194f2f93c98c25a575454476 # 3.1.1 diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index b36d796ade81..0df60bdedde0 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 3.2.1** +**Prettier 3.2.2** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 74e3f9380f82..b4a5566d9946 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 3.2.1 +- Prettier Version: 3.2.2 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index a81c229859d0..0a65d7de2430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# 3.2.2 + +[diff](https://github.com/prettier/prettier/compare/3.2.1...3.2.2) + +#### Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute ([#15896](https://github.com/prettier/prettier/pull/15896) by [@eelco](https://github.com/eelco)) + +For example this code would crash before: + + +```jsx + +``` + +#### Fix formatting error on optional call expression and member chain ([#15920](https://github.com/prettier/prettier/pull/15920) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```jsx +// Input +a(() => {}, c?.d()); + +// Prettier 3.2.1 +TypeError: Cannot read properties of undefined (reading 'type') + +// Prettier 3.2.2 +a(() => {}, c?.d()); +``` + # 3.2.1 [diff](https://github.com/prettier/prettier/compare/3.2.0...3.2.1) @@ -350,7 +377,7 @@ function fn() { return ( /** * @type {...} - */ expresssion + */ expression ) } @@ -358,7 +385,7 @@ function fn() { function fn() { return /** * @type {...} - */ expresssion; + */ expression; } // Prettier 3.0.1 @@ -366,7 +393,7 @@ function fn() { return ( /** * @type {...} - */ expresssion + */ expression ); } ``` @@ -1694,7 +1721,7 @@ interface Foo { - -If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! diff --git a/changelog_unreleased/javascript/15896.md b/changelog_unreleased/javascript/15896.md new file mode 100644 index 000000000000..1ae1ed20c121 --- /dev/null +++ b/changelog_unreleased/javascript/15896.md @@ -0,0 +1,8 @@ +#### Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute (#15896 by @eelco) + +For example this code would crash before: + + +```jsx + +``` diff --git a/changelog_unreleased/javascript/15915.md b/changelog_unreleased/javascript/15915.md deleted file mode 100644 index b493ac1b2517..000000000000 --- a/changelog_unreleased/javascript/15915.md +++ /dev/null @@ -1,14 +0,0 @@ -#### Fix formatting error on member chain (#15915 by @sosukesuzuki) - - -```jsx -// Input -test().test2().test2(thing?.something); - -// Prettier stable -TypeError: Cannot read properties of undefined (reading 'type') - -// Prettier main -test().test2().test2(thing?.something); - -``` diff --git a/changelog_unreleased/javascript/15920.md b/changelog_unreleased/javascript/15920.md new file mode 100644 index 000000000000..b802807c5f1d --- /dev/null +++ b/changelog_unreleased/javascript/15920.md @@ -0,0 +1,13 @@ +#### Fix formatting error on optional call expression and member chain (#15920 by @sosukesuzuki) + + +```jsx +// Input +a(() => {}, c?.d()); + +// Prettier stable +TypeError: Cannot read properties of undefined (reading 'type') + +// Prettier main +a(() => {}, c?.d()); +``` diff --git a/docs/browser.md b/docs/browser.md index 49236cf37e8c..ff257f9ad080 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 . Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. +- **`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 . Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. 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 - - + + - + +