From 58cd52b4d3b0b94adaf59eb9c920e6344cc0359a Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Mon, 16 Sep 2019 08:46:10 -0300 Subject: [PATCH 01/14] 1.19 blog post --- CHANGELOG.unreleased.md | 583 ----------------------------- website/blog/2019-09-16-1.19.0.md | 590 ++++++++++++++++++++++++++++++ 2 files changed, 590 insertions(+), 583 deletions(-) create mode 100644 website/blog/2019-09-16-1.19.0.md diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 5ea0f757cfcc..538a5fec42a5 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -43,586 +43,3 @@ const link = http://example.com; ``` --> - -#### JavaScript: More readable parentheses for new-call ([#6412] by [@bakkot]) - - -```js -// Input -var a = new (x().y)(); -var a = new (x().y.z)(); -var a = new (x().y().z)(); - -// Output (Prettier stable) -var a = new (x()).y(); -var a = new (x()).y.z(); -var a = new (x().y()).z(); - -// Output (Prettier master) -var a = new (x().y)(); -var a = new (x().y.z)(); -var a = new (x().y().z)(); -``` - -#### MDX: fix text with whitespace after JSX trim incorrectly ([#6340] by [@JounQin]) - -Previous versions format text with whitespace after JSX incorrectly in mdx, this has been fixed in this version. - - -```md - -# Heading - - test test - 123 - - - - test test -123 - - - - test test - 123 -``` - -#### MDX: Adjacent JSX elements should be allowed in mdx ([#6332] by [@JounQin]) - -Previous versions would not format adjacent JSX elements in mdx, this has been fixed in this version. - - -```jsx -// Input - - test test -123 - -// Output (Prettier stable) -SyntaxError: Unexpected token (3:9) - 1 | - 2 | test test -> 3 | 123 - | ^ - -// Output (Prettier master) - - test test -123 - - -// Input - - test test - - - test test -123 - -// Output (Prettier stable) -SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (4:1) - 2 | test test - 3 | -> 4 | - | ^ - 5 | test test - 6 | 123 - -// Output (Prettier master) - - test test - - - test test -123 -``` - -#### TypeScript: Print comment following a JSX element with generic ([#6209] by [@duailibe]) - -Previous versions would not print this comment, this has been fixed in this version. - - -```ts -// Input -const comp = ( - - // This comment goes missing - value={4} - > - Test - -); - -// Output (Prettier stable) -const comp = value={4}>Test; - -// Output (Prettier master) -const comp = ( - - // This comment goes missing - value={4} - > - Test - -); -``` - -### Handlebars: Avoid adding unwanted line breaks between text and mustaches ([#6186] by [@gavinjoyce]) - -Previously, Prettier added line breaks between text and mustaches which resulted in unwanted whitespace in rendered output. - - -```hbs -// Input -

Your username is @{{name}}

-

Hi {{firstName}} {{lastName}}

- -// Output (Prettier stable) -

- Your username is @ - {{name}} -

-

- Hi - {{firstName}} - {{lastName}} -

- -// Output (Prettier master) -

- Your username is @{{name}} -

-

- Hi {{firstName}} {{lastName}} -

-``` - -### Handlebars: Improve comment formatting ([#6206] by [@gavinjoyce]) - -Previously, Prettier would sometimes ignore whitespace when formatting comments. - - -```hbs -// Input -
- {{! Foo }} - {{#if @foo}} - Foo - {{/if}} - - {{! Bar }} - {{#if @bar}} - Bar - {{/if}} -
- -// Output (Prettier stable) -
- {{! Foo }} - {{#if @foo}} - Foo - {{/if}}{{! Bar }}{{#if @bar}} - Bar - {{/if}} -
- -// Output (Prettier master) -
- {{! Foo }} - {{#if @foo}} - Foo - {{/if}} - {{! Bar }} - {{#if @bar}} - Bar - {{/if}} -
-``` - -#### JavaScript: Update ?? precedence to match stage 3 proposal ([#6404] by [@vjeux]) - -We've updated Prettier's support for the nullish coalescing operator to match a spec update that no longer allows it to immediately contain, or be contained within an `&&` or `||` operation. - - -```js -// Input -(foo ?? baz) || baz; - -// Output (Prettier stable) -foo ?? baz || baz; - -// Output (Prettier master) -(foo ?? baz) || baz; -``` - -Please note, as we update our parsers with versions that support this spec update, code without the parenthesis will throw a parse error. - -#### JavaScript: Keep unary expressions parentheses with comments ([#6217] by [@sosukesuzuki]) - -Previously, Prettier removes parentheses enclose unary expressions. This change modify to keep it when the expression has comments. - - -```ts -// Input -!( - /* foo */ - foo -); -!( - foo // foo -); - -// Output (Prettier stable) -!/* foo */ -foo; -!foo; // foo - -// Output (Prettier master) -!(/* foo */ foo); -!( - foo // foo -); -``` - -### Handlebars: Improve comment formatting ([#6234] by [@gavinjoyce]) - -Previously, Prettier would incorrectly decode HTML entiites. - - -```hbs -// Input -

- Some escaped characters: < > & -

- -// Output (Prettier stable) -

- Some escaped characters: < > & -

- -// Output (Prettier master) -

- Some escaped characters: < > & -

-``` - -#### JavaScript: Stop moving comments inside tagged template literals ([#6236] by [@sosukesuzuki]) - -Previously, Prettier would move comments after the tag inside the template literal. This version fixes this problem. - - -```js -// Input -foo //comment -` -`; - -// Output (Prettier stable) -foo` // comment -`; - -// Output (Prettier master) -foo // comment -` -`; -``` - -#### JavaScript: Fix moving comments in function calls like `useEffect` second argument ([#6270] by [@sosukesuzuki]) - -This fixes a bug that was affecting function calls that have a arrow function as first argument and an array expression as second argument, such as the common React's `useEffect`. A comment in its own line before the second argument would be moved to the line above. - -The bug was only present when using the Flow and TypeScript parsers. - - -```js -// Input -useEffect( - () => { - console.log("some code", props.foo); - }, - - // We need to disable the eslint warning here, - // because of some complicated reason. - // eslint-disable line react-hooks/exhaustive-deps - [] -); - -// Output (Prettier stable) -useEffect(() => { - console.log("some code", props.foo); -}, // We need to disable the eslint warning here, -// because of some complicated reason. -// eslint-disable line react-hooks/exhaustive-deps -[]); - -// Output (Prettier master) -useEffect( - () => { - console.log("some code", props.foo); - }, - - // We need to disable the eslint warning here, - // because of some complicated reason. - // eslint-disable line react-hooks/exhaustive-deps - [] -); -``` - -#### TypeScript: Fix crashes when using `//` in JSX texts ([#6289] by [@duailibe]) - -This version updates the TypeScript parser to correctly handle JSX text with double slashes (`//`). In previous versions, this would cause Prettier to crash. - -#### CLI: Add `--only-changed` flag ([#5910] by [@g-harel]) - -Flag used with `--write` to avoid re-checking files that were not changed since they were last written (with the same formatting configuration). - -#### HTML, Vue: Don't break the template element included in a line shorter than print-width([#6284] by [@sosukesuzuki]) - -Previously, even if the line length is shorter than print-width is Prettier breaks the line with a template element. - - -```html -// Input - - -// Output (Prettier stable) - - -// Output (Prettier master) - -``` - -#### JavaScript: Fix breaks indentation and idempotency when an arrow function that args include object pattern is passed to a function as parameter. ([#6301] by [@sosukesuzuki]) - -Previously, Prettier collapses strangely, when an arrow function that args include object pattern is passed to a function as parameter. Also, it breaks idempotency. Please see [#6294](https://github.com/prettier/prettier/issues/6294) for detail. - - -```js -// Input -foo( - ({ - a, - - b - }) => {} -); - -// Output (Prettier stable) -foo(({ a, - b }) => {}); - -// Output (Prettier master) -foo( - ({ - a, - - b - }) => {} -); -``` - -#### TypeScript: Fix specific union type breaks after opening parenthesis, but not before closing ([#6307] by [@sosukesuzuki]) - -Previously, union type that put with `as` , `keyof`, `[]`, other union(`|`) and intersection(`&`) breaks after opening parenthesis, but not before closing. Please see [#6303](https://github.com/prettier/prettier/issues/6303) for detail. - - -```ts -// Input -const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( - | string - | undefined -)[]; - -// Prettier (stable) -const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( - | string - | undefined)[]; - -// Prettier (master) -const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( - | string - | undefined -)[]; -``` - -#### HTML: Script tags are now treated as blocks for the purposes of formatting ([#6423] by [@thorn0]) - -Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/options.html#html-whitespace-sensitivity), they were formatted as if they were inline. - - -```html - - - - - - - - - -``` - -#### TypeScript: Fixed to break line and add a semicolon in one execution on one line long mapped types ([#6420] by [@sosukesuzuki]) - -Previously, when Prettier formatted long, one-line mapped types, it would break the line but didn’t add a semicolon – until you ran Prettier again (which broke Prettier’s idempotency rule). Now, Prettier adds the semicolon in the first run, fixing the issue. - - -```ts -// Input -type FooBar = { [P in keyof T]: T[P] extends Something ? Something : T[P] } - -// Prettier (stable) -type FooBar = { - [P in keyof T]: T[P] extends Something ? Something : T[P] -}; - -// Prettier (master) -type FooBar = { - [P in keyof T]: T[P] extends Something ? Something : T[P]; -}; -``` - -#### JavaScript: Fix ugly formatting on object destructuring with parameter decorators ([#6411] by [@sosukesuzuki]) - -Previously, Prettier formatted decorators for destructured parameters in a weird way. Now, parameter decorators are placed just above the parameter they belong to. - - -```js -// Input -class Class { - method( - @decorator - { foo } - ) {} -} - -// Prettier (stable) -class Class { - method(@decorator - { - foo - }) {} -} - -// Prettier (master) -class Class { - method( - @decorator - { foo } - ) {} -} -``` - -#### JavaScript: Handle empty object patterns with type annotations in function parameters ([#6438] by [@bakkot]) - - -```js -// Input -const f = ({}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; -function g({}: Foo) {} - -// Output (Prettier stable) -const f = ({ - , -}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; -function g({ }: Foo) {} - -// Output (Prettier master) -const f = ({}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; -function g({}: Foo) {} -``` - -#### JavaScript: Fix ugly formatting parens wrap binary expressions within call expressions ([#6441] by [@sosukesuzuki]) - -Previously, Prettier formatted parens wrap binary expressions within call expressions in a weird way. There was no line break before and after each parens. - - -```js -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)(); - -// Prettier (stable) -(aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee)(); - -// Prettier (master) -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)(); -``` - -#### JavaScript: Fix formatting on long named exports ([#6446] by [@sosukesuzuki]) - -Previously, Prettier formatted long named exports differently than named imports. - -```js -// Input -export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; - -// Prettier (stable) -export { - fooooooooooooooooooooooooooooooooooooooooooooooooo -} from "fooooooooooooooooooooooooooooo"; - -// Prettier (master) -export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; -``` - -[#5910]: https://github.com/prettier/prettier/pull/5910 -[#6186]: https://github.com/prettier/prettier/pull/6186 -[#6206]: https://github.com/prettier/prettier/pull/6206 -[#6209]: https://github.com/prettier/prettier/pull/6209 -[#6217]: https://github.com/prettier/prettier/pull/6217 -[#6234]: https://github.com/prettier/prettier/pull/6234 -[#6236]: https://github.com/prettier/prettier/pull/6236 -[#6270]: https://github.com/prettier/prettier/pull/6270 -[#6289]: https://github.com/prettier/prettier/pull/6289 -[#6332]: https://github.com/prettier/prettier/pull/6332 -[#6284]: https://github.com/prettier/prettier/pull/6284 -[#6301]: https://github.com/prettier/prettier/pull/6301 -[#6307]: https://github.com/prettier/prettier/pull/6307 -[#6340]: https://github.com/prettier/prettier/pull/6340 -[#6412]: https://github.com/prettier/prettier/pull/6412 -[#6423]: https://github.com/prettier/prettier/pull/6423 -[#6420]: https://github.com/prettier/prettier/pull/6420 -[#6411]: https://github.com/prettier/prettier/pull/6411 -[#6438]: https://github.com/prettier/prettier/pull/6411 -[#6441]: https://github.com/prettier/prettier/pull/6441 -[#6446]: https://github.com/prettier/prettier/pull/6446 -[@duailibe]: https://github.com/duailibe -[@gavinjoyce]: https://github.com/gavinjoyce -[@sosukesuzuki]: https://github.com/sosukesuzuki -[@g-harel]: https://github.com/g-harel -[@jounqin]: https://github.com/JounQin -[@bakkot]: https://gibhub.com/bakkot -[@thorn0]: https://github.com/thorn0 diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md new file mode 100644 index 000000000000..23e3592135d5 --- /dev/null +++ b/website/blog/2019-09-16-1.19.0.md @@ -0,0 +1,590 @@ +### JavaScript + +#### More readable parentheses for new-call ([#6412] by [@bakkot]) + + +```js +// Input +var a = new (x().y)(); +var a = new (x().y.z)(); +var a = new (x().y().z)(); + +// Output (Prettier 1.18) +var a = new (x()).y(); +var a = new (x()).y.z(); +var a = new (x().y()).z(); + +// Output (Prettier 1.19) +var a = new (x().y)(); +var a = new (x().y.z)(); +var a = new (x().y().z)(); +``` + +#### Update ?? precedence to match stage 3 proposal ([#6404] by [@vjeux]) + +We've updated Prettier's support for the nullish coalescing operator to match a spec update that no longer allows it to immediately contain, or be contained within an `&&` or `||` operation. + + +```js +// Input +(foo ?? baz) || baz; + +// Output (Prettier 1.18) +foo ?? baz || baz; + +// Output (Prettier 1.19) +(foo ?? baz) || baz; +``` + +Please note, as we update our parsers with versions that support this spec update, code without the parenthesis will throw a parse error. + +#### Fix ugly formatting on object destructuring with parameter decorators ([#6411] by [@sosukesuzuki]) + +Previously, Prettier formatted decorators for destructured parameters in a weird way. Now, parameter decorators are placed just above the parameter they belong to. + + +```js +// Input +class Class { + method( + @decorator + { foo } + ) {} +} + +// Prettier (stable) +class Class { + method(@decorator + { + foo + }) {} +} + +// Prettier (master) +class Class { + method( + @decorator + { foo } + ) {} +} +``` + +#### Handle empty object patterns with type annotations in function parameters ([#6438] by [@bakkot]) + + +```js +// Input +const f = ({}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; +function g({}: Foo) {} + +// Output (Prettier 1.18) +const f = ({ + , +}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; +function g({ }: Foo) {} + +// Output (Prettier 1.19) +const f = ({}: MyVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType) => {}; +function g({}: Foo) {} +``` + +#### Fix ugly formatting parens wrap binary expressions within call expressions ([#6441] by [@sosukesuzuki]) + +Previously, Prettier formatted parens wrap binary expressions within call expressions in a weird way. There was no line break before and after each parens. + + +```js +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +// Prettier (stable) +(aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee)(); + +// Prettier (master) +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)(); +``` + +#### Fix formatting on long named exports ([#6446] by [@sosukesuzuki]) + +Previously, Prettier formatted long named exports differently than named imports. + +```js +// Input +export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; + +// Prettier (stable) +export { + fooooooooooooooooooooooooooooooooooooooooooooooooo +} from "fooooooooooooooooooooooooooooo"; + +// Prettier (master) +export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; +``` + +#### Fix breaks indentation and idempotency when an arrow function that args include object pattern is passed to a function as parameter. ([#6301] by [@sosukesuzuki]) + +Previously, Prettier collapses strangely, when an arrow function that args include object pattern is passed to a function as parameter. Also, it breaks idempotency. Please see [#6294](https://github.com/prettier/prettier/issues/6294) for detail. + + +```js +// Input +foo( + ({ + a, + + b + }) => {} +); + +// Output (Prettier 1.18) +foo(({ a, + b }) => {}); + +// Output (Prettier 1.19) +foo( + ({ + a, + + b + }) => {} +); +``` + +#### Keep unary expressions parentheses with comments ([#6217] by [@sosukesuzuki]) + +Previously, Prettier removes parentheses enclose unary expressions. This change modify to keep it when the expression has comments. + + +```ts +// Input +!( + /* foo */ + foo +); +!( + foo // foo +); + +// Output (Prettier 1.18) +!/* foo */ +foo; +!foo; // foo + +// Output (Prettier 1.19) +!(/* foo */ foo); +!( + foo // foo +); +``` + +#### Stop moving comments inside tagged template literals ([#6236] by [@sosukesuzuki]) + +Previously, Prettier would move comments after the tag inside the template literal. This version fixes this problem. + + +```js +// Input +foo //comment +` +`; + +// Output (Prettier 1.18) +foo` // comment +`; + +// Output (Prettier 1.19) +foo // comment +` +`; +``` + +#### Fix moving comments in function calls like `useEffect` second argument ([#6270] by [@sosukesuzuki]) + +This fixes a bug that was affecting function calls that have a arrow function as first argument and an array expression as second argument, such as the common React's `useEffect`. A comment in its own line before the second argument would be moved to the line above. + +The bug was only present when using the Flow and TypeScript parsers. + + +```js +// Input +useEffect( + () => { + console.log("some code", props.foo); + }, + + // We need to disable the eslint warning here, + // because of some complicated reason. + // eslint-disable line react-hooks/exhaustive-deps + [] +); + +// Output (Prettier 1.18) +useEffect(() => { + console.log("some code", props.foo); +}, // We need to disable the eslint warning here, +// because of some complicated reason. +// eslint-disable line react-hooks/exhaustive-deps +[]); + +// Output (Prettier 1.19) +useEffect( + () => { + console.log("some code", props.foo); + }, + + // We need to disable the eslint warning here, + // because of some complicated reason. + // eslint-disable line react-hooks/exhaustive-deps + [] +); +``` + +### TypeScript + +#### Print comment following a JSX element with generic ([#6209] by [@duailibe]) + +Previous versions would not print this comment, this has been fixed in this version. + + +```ts +// Input +const comp = ( + + // This comment goes missing + value={4} + > + Test + +); + +// Output (Prettier 1.18) +const comp = value={4}>Test; + +// Output (Prettier 1.19) +const comp = ( + + // This comment goes missing + value={4} + > + Test + +); +``` + +#### Fix crashes when using `//` in JSX texts ([#6289] by [@duailibe]) + +This version updates the TypeScript parser to correctly handle JSX text with double slashes (`//`). In previous versions, this would cause Prettier to crash. + +#### Fix specific union type breaks after opening parenthesis, but not before closing ([#6307] by [@sosukesuzuki]) + +Previously, union type that put with `as` , `keyof`, `[]`, other union(`|`) and intersection(`&`) breaks after opening parenthesis, but not before closing. Please see [#6303](https://github.com/prettier/prettier/issues/6303) for detail. + + +```ts +// Input +const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + | string + | undefined +)[]; + +// Prettier (stable) +const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + | string + | undefined)[]; + +// Prettier (master) +const foo = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + | string + | undefined +)[]; +``` + +#### Fixed to break line and add a semicolon in one execution on one line long mapped types ([#6420] by [@sosukesuzuki]) + +Previously, when Prettier formatted long, one-line mapped types, it would break the line but didn’t add a semicolon – until you ran Prettier again (which broke Prettier’s idempotency rule). Now, Prettier adds the semicolon in the first run, fixing the issue. + + +```ts +// Input +type FooBar = { [P in keyof T]: T[P] extends Something ? Something : T[P] } + +// Prettier (stable) +type FooBar = { + [P in keyof T]: T[P] extends Something ? Something : T[P] +}; + +// Prettier (master) +type FooBar = { + [P in keyof T]: T[P] extends Something ? Something : T[P]; +}; +``` + +### MDX + +#### Fix text with whitespace after JSX trim incorrectly ([#6340] by [@JounQin]) + +Previous versions format text with whitespace after JSX incorrectly in mdx, this has been fixed in this version. + + +```md + +# Heading + + test test + 123 + + + + test test +123 + + + + test test + 123 +``` + +#### Adjacent JSX elements should be allowed in mdx ([#6332] by [@JounQin]) + +Previous versions would not format adjacent JSX elements in mdx, this has been fixed in this version. + + +```jsx +// Input + + test test +123 + +// Output (Prettier 1.18) +SyntaxError: Unexpected token (3:9) + 1 | + 2 | test test +> 3 | 123 + | ^ + +// Output (Prettier 1.19) + + test test +123 + + +// Input + + test test + + + test test +123 + +// Output (Prettier 1.18) +SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (4:1) + 2 | test test + 3 | +> 4 | + | ^ + 5 | test test + 6 | 123 + +// Output (Prettier 1.19) + + test test + + + test test +123 +``` + +### Handlebars + +#### Avoid adding unwanted line breaks between text and mustaches ([#6186] by [@gavinjoyce]) + +Previously, Prettier added line breaks between text and mustaches which resulted in unwanted whitespace in rendered output. + + +```hbs +// Input +

Your username is @{{name}}

+

Hi {{firstName}} {{lastName}}

+ +// Output (Prettier 1.18) +

+ Your username is @ + {{name}} +

+

+ Hi + {{firstName}} + {{lastName}} +

+ +// Output (Prettier 1.19) +

+ Your username is @{{name}} +

+

+ Hi {{firstName}} {{lastName}} +

+``` + +#### Improve comment formatting ([#6206] by [@gavinjoyce]) + +Previously, Prettier would sometimes ignore whitespace when formatting comments. + + +```hbs +// Input +
+ {{! Foo }} + {{#if @foo}} + Foo + {{/if}} + + {{! Bar }} + {{#if @bar}} + Bar + {{/if}} +
+ +// Output (Prettier 1.18) +
+ {{! Foo }} + {{#if @foo}} + Foo + {{/if}}{{! Bar }}{{#if @bar}} + Bar + {{/if}} +
+ +// Output (Prettier 1.19) +
+ {{! Foo }} + {{#if @foo}} + Foo + {{/if}} + {{! Bar }} + {{#if @bar}} + Bar + {{/if}} +
+``` + +### Handlebars: Improve comment formatting ([#6234] by [@gavinjoyce]) + +Previously, Prettier would incorrectly decode HTML entiites. + + +```hbs +// Input +

+ Some escaped characters: < > & +

+ +// Output (Prettier 1.18) +

+ Some escaped characters: < > & +

+ +// Output (Prettier 1.19) +

+ Some escaped characters: < > & +

+``` + +#### CLI: Add `--only-changed` flag ([#5910] by [@g-harel]) + +Flag used with `--write` to avoid re-checking files that were not changed since they were last written (with the same formatting configuration). + +#### HTML, Vue: Don't break the template element included in a line shorter than print-width([#6284] by [@sosukesuzuki]) + +Previously, even if the line length is shorter than print-width is Prettier breaks the line with a template element. + + +```html +// Input + + +// Output (Prettier 1.18) + + +// Output (Prettier 1.19) + +``` + +#### HTML: Script tags are now treated as blocks for the purposes of formatting ([#6423] by [@thorn0]) + +Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/options.html#html-whitespace-sensitivity), they were formatted as if they were inline. + + +```html + + + + + + + + + +``` + +[#5910]: https://github.com/prettier/prettier/pull/5910 +[#6186]: https://github.com/prettier/prettier/pull/6186 +[#6206]: https://github.com/prettier/prettier/pull/6206 +[#6209]: https://github.com/prettier/prettier/pull/6209 +[#6217]: https://github.com/prettier/prettier/pull/6217 +[#6234]: https://github.com/prettier/prettier/pull/6234 +[#6236]: https://github.com/prettier/prettier/pull/6236 +[#6270]: https://github.com/prettier/prettier/pull/6270 +[#6289]: https://github.com/prettier/prettier/pull/6289 +[#6332]: https://github.com/prettier/prettier/pull/6332 +[#6284]: https://github.com/prettier/prettier/pull/6284 +[#6301]: https://github.com/prettier/prettier/pull/6301 +[#6307]: https://github.com/prettier/prettier/pull/6307 +[#6340]: https://github.com/prettier/prettier/pull/6340 +[#6412]: https://github.com/prettier/prettier/pull/6412 +[#6423]: https://github.com/prettier/prettier/pull/6423 +[#6420]: https://github.com/prettier/prettier/pull/6420 +[#6411]: https://github.com/prettier/prettier/pull/6411 +[#6438]: https://github.com/prettier/prettier/pull/6411 +[#6441]: https://github.com/prettier/prettier/pull/6441 +[#6446]: https://github.com/prettier/prettier/pull/6446 +[@duailibe]: https://github.com/duailibe +[@gavinjoyce]: https://github.com/gavinjoyce +[@sosukesuzuki]: https://github.com/sosukesuzuki +[@g-harel]: https://github.com/g-harel +[@jounqin]: https://github.com/JounQin +[@bakkot]: https://gibhub.com/bakkot +[@thorn0]: https://github.com/thorn0 From be0ee5901afd19b2a67769fda7d16b7be0bd7a29 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Mon, 16 Sep 2019 12:37:29 -0300 Subject: [PATCH 02/14] add frontmatter --- website/blog/2019-09-16-1.19.0.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md index 23e3592135d5..efd37081d4f8 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-16-1.19.0.md @@ -1,3 +1,17 @@ +--- +author: Lucas Duailibe (@duailibe) +authorURL: https://github.com/duailibe +title: "Prettier 1.19: what what what what" +--- + +This release includes lots of stuff + + + +## Highlights + +## Other changes + ### JavaScript #### More readable parentheses for new-call ([#6412] by [@bakkot]) From 2837eb4c54f8384ea998c0aaf77d30db0158594c Mon Sep 17 00:00:00 2001 From: Lipis Date: Wed, 25 Sep 2019 13:52:15 +0200 Subject: [PATCH 03/14] Update website/blog/2019-09-16-1.19.0.md Co-Authored-By: Sosuke Suzuki --- website/blog/2019-09-16-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md index efd37081d4f8..6bb18fe7e62f 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-16-1.19.0.md @@ -497,7 +497,7 @@ Previously, Prettier would sometimes ignore whitespace when formatting comments. ``` -### Handlebars: Improve comment formatting ([#6234] by [@gavinjoyce]) +#### Improve comment formatting ([#6234] by [@gavinjoyce]) Previously, Prettier would incorrectly decode HTML entiites. From 51aebeb2e75d70f426404dcb01e15a423017d860 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 09:07:26 -0300 Subject: [PATCH 04/14] update blog post --- website/blog/2019-09-16-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md index 6bb18fe7e62f..832539d69902 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-16-1.19.0.md @@ -34,7 +34,7 @@ var a = new (x().y.z)(); var a = new (x().y().z)(); ``` -#### Update ?? precedence to match stage 3 proposal ([#6404] by [@vjeux]) +#### Update `??` precedence to match stage 3 proposal ([#6404] by [@vjeux]) We've updated Prettier's support for the nullish coalescing operator to match a spec update that no longer allows it to immediately contain, or be contained within an `&&` or `||` operation. From d9fc722ce6b50af0c5df32dd16316ef01eba6721 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 09:18:00 -0300 Subject: [PATCH 05/14] add --vue-indent-script-and-style --- website/blog/2019-09-16-1.19.0.md | 42 +++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md index 832539d69902..dee8ceccf21f 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-16-1.19.0.md @@ -4,12 +4,26 @@ authorURL: https://github.com/duailibe title: "Prettier 1.19: what what what what" --- -This release includes lots of stuff +This release includes as asual lots of fixes and improvements, but most importantly includes a feature very requested by the Vue community to indent `script` and `style` tags contents and a flag `--only-changed` to speed up Prettier CLI runs. ## Highlights +### Vue + +#### Indent `script` and `style` tags with `--vue-indent-script-and-style` ([#6157] by [@kamilic]) + +After a lot of requests we now have an option to indent the contents of `style` and `script` tags. + +Refer to the [documentation](https://prettier.io/docs/en/options.html#vue-files-script-and-style-tags-indentation) for more information. + +### CLI + +#### Add `--only-changed` flag ([#5910] by [@g-harel]) + +Flag used with `--write` to avoid re-checking files that were not changed since they were last written (with the same formatting configuration). + ## Other changes ### JavaScript @@ -519,11 +533,9 @@ Previously, Prettier would incorrectly decode HTML entiites.

``` -#### CLI: Add `--only-changed` flag ([#5910] by [@g-harel]) - -Flag used with `--write` to avoid re-checking files that were not changed since they were last written (with the same formatting configuration). +### Vue -#### HTML, Vue: Don't break the template element included in a line shorter than print-width([#6284] by [@sosukesuzuki]) +#### Don't break the template element included in a line shorter than print width ([#6284] by [@sosukesuzuki]) Previously, even if the line length is shorter than print-width is Prettier breaks the line with a template element. @@ -547,7 +559,9 @@ Previously, even if the line length is shorter than print-width is Prettier brea ``` -#### HTML: Script tags are now treated as blocks for the purposes of formatting ([#6423] by [@thorn0]) +### HTML + +#### Script tags are now treated as blocks for the purposes of formatting ([#6423] by [@thorn0]) Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/options.html#html-whitespace-sensitivity), they were formatted as if they were inline. @@ -575,6 +589,7 @@ Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/optio ``` [#5910]: https://github.com/prettier/prettier/pull/5910 +[#6157]: https://github.com/prettier/prettier/pull/6157 [#6186]: https://github.com/prettier/prettier/pull/6186 [#6206]: https://github.com/prettier/prettier/pull/6206 [#6209]: https://github.com/prettier/prettier/pull/6209 @@ -582,23 +597,24 @@ Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/optio [#6234]: https://github.com/prettier/prettier/pull/6234 [#6236]: https://github.com/prettier/prettier/pull/6236 [#6270]: https://github.com/prettier/prettier/pull/6270 -[#6289]: https://github.com/prettier/prettier/pull/6289 -[#6332]: https://github.com/prettier/prettier/pull/6332 [#6284]: https://github.com/prettier/prettier/pull/6284 +[#6289]: https://github.com/prettier/prettier/pull/6289 [#6301]: https://github.com/prettier/prettier/pull/6301 [#6307]: https://github.com/prettier/prettier/pull/6307 +[#6332]: https://github.com/prettier/prettier/pull/6332 [#6340]: https://github.com/prettier/prettier/pull/6340 +[#6411]: https://github.com/prettier/prettier/pull/6411 [#6412]: https://github.com/prettier/prettier/pull/6412 -[#6423]: https://github.com/prettier/prettier/pull/6423 [#6420]: https://github.com/prettier/prettier/pull/6420 -[#6411]: https://github.com/prettier/prettier/pull/6411 +[#6423]: https://github.com/prettier/prettier/pull/6423 [#6438]: https://github.com/prettier/prettier/pull/6411 [#6441]: https://github.com/prettier/prettier/pull/6441 [#6446]: https://github.com/prettier/prettier/pull/6446 +[@bakkot]: https://gibhub.com/bakkot [@duailibe]: https://github.com/duailibe -[@gavinjoyce]: https://github.com/gavinjoyce -[@sosukesuzuki]: https://github.com/sosukesuzuki [@g-harel]: https://github.com/g-harel +[@gavinjoyce]: https://github.com/gavinjoyce [@jounqin]: https://github.com/JounQin -[@bakkot]: https://gibhub.com/bakkot +[@kamilic]: https://github.com/kamilic +[@sosukesuzuki]: https://github.com/sosukesuzuki [@thorn0]: https://github.com/thorn0 From 086d70d6877fb664a458a213cee5fafd138c3eb9 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 09:25:30 -0300 Subject: [PATCH 06/14] add recent PRs --- website/blog/2019-09-16-1.19.0.md | 84 +++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-16-1.19.0.md index dee8ceccf21f..1edd65aca105 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-16-1.19.0.md @@ -282,6 +282,71 @@ useEffect( ); ``` +#### Fix bad formatting for multi-line optional chaining with comment ([#6506] by [@sosukesuzuki]) + + +```js +// Input +return a + .b() + .c() + // Comment + ?.d(); + +// Prettier (stable) +return a + .b() + .c() + ?.// Comment + d(); + +// Prettier (master) +return ( + a + .b() + .c() + // Comment + ?.d(); +); +``` + +#### Fix inconsistent indentation in switch statement ([#6514] by [@sosukesuzuki]) + + +```js +// Input +switch ($veryLongAndVeryVerboseVariableName && $anotherVeryLongAndVeryVerboseVariableName) { +} + +switch ($longButSlightlyShorterVariableName && $anotherSlightlyShorterVariableName) { +} + +// Prettier (stable) +switch ( + $veryLongAndVeryVerboseVariableName && + $anotherVeryLongAndVeryVerboseVariableName +) { +} + +switch ( + $longButSlightlyShorterVariableName && $anotherSlightlyShorterVariableName +) { +} + +// Prettier (master) +switch ( + $veryLongAndVeryVerboseVariableName && + $anotherVeryLongAndVeryVerboseVariableName +) { +} + +switch ( + $longButSlightlyShorterVariableName && + $anotherSlightlyShorterVariableName +) { +} +``` + ### TypeScript #### Print comment following a JSX element with generic ([#6209] by [@duailibe]) @@ -362,6 +427,22 @@ type FooBar = { }; ``` +#### Keep type parameters inline for a type annotation of variable declaration ([#6467] by [@sosukesuzuki]) + + +```ts +// Input +const fooooooooooooooo: SomeThing = looooooooooooooooooooooooooooooongNameFunc(); + +// Prettier (stable) +const fooooooooooooooo: SomeThing< + boolean +> = looooooooooooooooooooooooooooooongNameFunc(); + +// Prettier (master) +const fooooooooooooooo: SomeThing = looooooooooooooooooooooooooooooongNameFunc(); +``` + ### MDX #### Fix text with whitespace after JSX trim incorrectly ([#6340] by [@JounQin]) @@ -610,6 +691,9 @@ Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/optio [#6438]: https://github.com/prettier/prettier/pull/6411 [#6441]: https://github.com/prettier/prettier/pull/6441 [#6446]: https://github.com/prettier/prettier/pull/6446 +[#6467]: https://github.com/prettier/prettier/pull/6467 +[#6506]: https://github.com/prettier/prettier/pull/6506 +[#6514]: https://github.com/prettier/prettier/pull/6514 [@bakkot]: https://gibhub.com/bakkot [@duailibe]: https://github.com/duailibe [@g-harel]: https://github.com/g-harel From 764d112c4fa265fb01117a8f11320ef76ee9ca83 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 09:28:49 -0300 Subject: [PATCH 07/14] include title and change date --- website/blog/{2019-09-16-1.19.0.md => 2019-09-25-1.19.0.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename website/blog/{2019-09-16-1.19.0.md => 2019-09-25-1.19.0.md} (99%) diff --git a/website/blog/2019-09-16-1.19.0.md b/website/blog/2019-09-25-1.19.0.md similarity index 99% rename from website/blog/2019-09-16-1.19.0.md rename to website/blog/2019-09-25-1.19.0.md index 1edd65aca105..41cea50b8c45 100644 --- a/website/blog/2019-09-16-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -1,7 +1,7 @@ --- author: Lucas Duailibe (@duailibe) authorURL: https://github.com/duailibe -title: "Prettier 1.19: what what what what" +title: "Prettier 1.19: Vue script and style indentation, and skipping unchanged files" --- This release includes as asual lots of fixes and improvements, but most importantly includes a feature very requested by the Vue community to indent `script` and `style` tags contents and a flag `--only-changed` to speed up Prettier CLI runs. From 03bec2eeac0cbe593d954a1202ae25fd2c116174 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 09:53:24 -0300 Subject: [PATCH 08/14] add pr --- website/blog/2019-09-25-1.19.0.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-25-1.19.0.md index 41cea50b8c45..e94158eeb18c 100644 --- a/website/blog/2019-09-25-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -443,6 +443,30 @@ const fooooooooooooooo: SomeThing< const fooooooooooooooo: SomeThing = looooooooooooooooooooooooooooooongNameFunc(); ``` +#### Don't breakup call expressions when the last argument is an `as` type expression wrapping a simple expression ([#6471] by [@mattleff]) +Previously, when Prettier formatted a call expression containing an `as` type expression or a type assertion, it would break the line. Now, Prettier uses the expression contained by the `as` type or type assertion to determine line breaks. + + +```ts +// Input +const bar = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([] as unknown) as number[]); + +// Prettier (stable) +const bar = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + ([] as unknown) as number[] +); + +// Prettier (master) +const bar = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([] as unknown) as number[]); +``` + ### MDX #### Fix text with whitespace after JSX trim incorrectly ([#6340] by [@JounQin]) @@ -692,6 +716,7 @@ Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/optio [#6441]: https://github.com/prettier/prettier/pull/6441 [#6446]: https://github.com/prettier/prettier/pull/6446 [#6467]: https://github.com/prettier/prettier/pull/6467 +[#6471]: https://github.com/prettier/prettier/pull/6471 [#6506]: https://github.com/prettier/prettier/pull/6506 [#6514]: https://github.com/prettier/prettier/pull/6514 [@bakkot]: https://gibhub.com/bakkot @@ -700,5 +725,6 @@ Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/optio [@gavinjoyce]: https://github.com/gavinjoyce [@jounqin]: https://github.com/JounQin [@kamilic]: https://github.com/kamilic +[@mattleff]: https://github.com/mattleff [@sosukesuzuki]: https://github.com/sosukesuzuki [@thorn0]: https://github.com/thorn0 From e45bb22f557110acedd1377bd43c3faac2bcae6b Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 25 Sep 2019 10:02:27 -0300 Subject: [PATCH 09/14] fix lint --- website/blog/2019-09-25-1.19.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-25-1.19.0.md index e94158eeb18c..1e6ad28ac152 100644 --- a/website/blog/2019-09-25-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -444,6 +444,7 @@ const fooooooooooooooo: SomeThing = looooooooooooooooooooooooooooooongN ``` #### Don't breakup call expressions when the last argument is an `as` type expression wrapping a simple expression ([#6471] by [@mattleff]) + Previously, when Prettier formatted a call expression containing an `as` type expression or a type assertion, it would break the line. Now, Prettier uses the expression contained by the `as` type or type assertion to determine line breaks. From 333799d748edd1216ce7aa0956ff798505593373 Mon Sep 17 00:00:00 2001 From: Lipis Date: Fri, 27 Sep 2019 13:18:35 +0200 Subject: [PATCH 10/14] Update website/blog/2019-09-25-1.19.0.md Co-Authored-By: Nick Freeman --- website/blog/2019-09-25-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-25-1.19.0.md index 1e6ad28ac152..a0a947ea4d96 100644 --- a/website/blog/2019-09-25-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -243,7 +243,7 @@ foo // comment #### Fix moving comments in function calls like `useEffect` second argument ([#6270] by [@sosukesuzuki]) -This fixes a bug that was affecting function calls that have a arrow function as first argument and an array expression as second argument, such as the common React's `useEffect`. A comment in its own line before the second argument would be moved to the line above. +This fixes a bug that was affecting function calls that have an arrow function as first argument and an array expression as second argument, such as the common React's `useEffect`. A comment in its own line before the second argument would be moved to the line above. The bug was only present when using the Flow and TypeScript parsers. From e69bb0225cc30d1739ee07eff531037b63a20193 Mon Sep 17 00:00:00 2001 From: Lipis Date: Fri, 27 Sep 2019 13:18:46 +0200 Subject: [PATCH 11/14] Update website/blog/2019-09-25-1.19.0.md Co-Authored-By: Nick Freeman --- website/blog/2019-09-25-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-25-1.19.0.md index a0a947ea4d96..9f0dfc684bc5 100644 --- a/website/blog/2019-09-25-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -4,7 +4,7 @@ authorURL: https://github.com/duailibe title: "Prettier 1.19: Vue script and style indentation, and skipping unchanged files" --- -This release includes as asual lots of fixes and improvements, but most importantly includes a feature very requested by the Vue community to indent `script` and `style` tags contents and a flag `--only-changed` to speed up Prettier CLI runs. +This release includes as usual lots of fixes and improvements, but most importantly includes a feature much requested by the Vue community to indent `script` and `style` tags' contents and a flag `--only-changed` to speed up Prettier CLI runs. From 28d7f95e2cce6d0140b04e7bac4043d480571583 Mon Sep 17 00:00:00 2001 From: Lipis Date: Fri, 27 Sep 2019 13:18:55 +0200 Subject: [PATCH 12/14] Update website/blog/2019-09-25-1.19.0.md Co-Authored-By: Nick Freeman --- website/blog/2019-09-25-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-25-1.19.0.md index 9f0dfc684bc5..9111304c4693 100644 --- a/website/blog/2019-09-25-1.19.0.md +++ b/website/blog/2019-09-25-1.19.0.md @@ -643,7 +643,7 @@ Previously, Prettier would incorrectly decode HTML entiites. #### Don't break the template element included in a line shorter than print width ([#6284] by [@sosukesuzuki]) -Previously, even if the line length is shorter than print-width is Prettier breaks the line with a template element. +Previously, even if the line length is shorter than print-width, Prettier broke the line with a template element. ```html From 31c00bddfa25525ac0ff7a71016ead398b4534a0 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Mon, 30 Sep 2019 13:41:23 -0300 Subject: [PATCH 13/14] change date --- website/blog/{2019-09-25-1.19.0.md => 2019-09-30-1.19.0.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename website/blog/{2019-09-25-1.19.0.md => 2019-09-30-1.19.0.md} (100%) diff --git a/website/blog/2019-09-25-1.19.0.md b/website/blog/2019-09-30-1.19.0.md similarity index 100% rename from website/blog/2019-09-25-1.19.0.md rename to website/blog/2019-09-30-1.19.0.md From a9e103466429301f14f7fd84925728a024056e9e Mon Sep 17 00:00:00 2001 From: Lipis Date: Wed, 30 Oct 2019 18:42:27 +0200 Subject: [PATCH 14/14] Update website/blog/2019-09-30-1.19.0.md Co-Authored-By: Jed Fox --- website/blog/2019-09-30-1.19.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/blog/2019-09-30-1.19.0.md b/website/blog/2019-09-30-1.19.0.md index be0142c1460d..5f39cf80784b 100644 --- a/website/blog/2019-09-30-1.19.0.md +++ b/website/blog/2019-09-30-1.19.0.md @@ -64,7 +64,7 @@ foo ?? baz || baz; (foo ?? baz) || baz; ``` -Please note, as we update our parsers with versions that support this spec update, code without the parenthesis will throw a parse error. +Please note that since we have updated our parsers with versions that support this spec update, code without the parentheses will throw a parse error. #### Fix ugly formatting on object destructuring with parameter decorators ([#6411] by [@sosukesuzuki])