Fix version references in v2.0 blog post (#7819)

This commit is contained in:
Alexander Kachkaev authored and GitHub committed 2020-03-22 00:38:58 +02:00
1 parent 6953471d22
commit 171bc96b58
1 file changed
+141 -141
+141 -141
View File
@@ -20,7 +20,7 @@ Previously, any method call chain of length three or longer would be automatical
<!-- prettier-ignore -->
```javascript
// Output (Prettier stable)
// Prettier 1.19
if (
foo
.one()
@@ -34,7 +34,7 @@ if (
// ...
}
// Output (Prettier master)
// Prettier 2.0
if (foo.one().two().three() === bar.four().five().six()) {
// ...
}
@@ -55,10 +55,10 @@ const nestedAssertions = /** @type {MyType} */
(/** @type {unknown} */
(x));
// Prettier stable
// Prettier 1.19
const nestedAssertions /** @type {MyType} */ /** @type {unknown} */ = x;
// Prettier master
// Prettier 2.0
const nestedAssertions = /** @type {MyType} */ (/** @type {unknown} */ (x));
```
@@ -133,10 +133,10 @@ In version 2.0, this behavior has become the default.
// Input
const fn = (x) => y => x + y;
// Prettier stable
// Prettier 1.19
const fn = x => y => x + y;
// Prettier master
// Prettier 2.0
const fn = (x) => (y) => x + y;
```
@@ -191,7 +191,7 @@ Previously, a space would be added after the `function` keyword in function decl
<!-- prettier-ignore -->
```ts
// Prettier stable
// Prettier 1.19
const identity = function(value) {
return value;
};
@@ -201,7 +201,7 @@ function identity(value) {
const f = function<T>(value: T) {};
const g = function*() {};
// Prettier master
// Prettier 2.0
const identity = function (value) {
return value;
};
@@ -221,15 +221,15 @@ loop1:
//test
const i = 3;
// Prettier stable (first output)
// Prettier 1.19 (first output)
loop1: //test
const i = 3;
// Prettier stable (second output)
// Prettier 1.19 (second output)
//test
loop1: const i = 3;
// Prettier master (first output)
// Prettier 2.0 (first and second outputs)
//test
loop1: const i = 3;
```
@@ -243,7 +243,7 @@ loop1: const i = 3;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo | bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo, bar)}`;
// Prettier stable
// Prettier 1.19
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo ||
bar}`;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo |
@@ -251,7 +251,7 @@ loop1: const i = 3;
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo,
bar)}`;
// Prettier master
// Prettier 2.0
`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${
foo || bar
}`;
@@ -272,18 +272,18 @@ const averredBathersBoxroomBuggyNurl =
bifornCringerMoshedPerplexSawder === 1 ||
(askTrovenaBeenaDependsRowans === 2 || glimseGlyphsHazardNoopsTieTie === 3);
// Prettier stable (first output)
// Prettier 1.19 (first output)
const averredBathersBoxroomBuggyNurl =
bifornCringerMoshedPerplexSawder === 1 ||
askTrovenaBeenaDependsRowans === 2 || glimseGlyphsHazardNoopsTieTie === 3;
// Prettier stable (second output)
// Prettier 1.19 (second output)
const averredBathersBoxroomBuggyNurl =
bifornCringerMoshedPerplexSawder === 1 ||
askTrovenaBeenaDependsRowans === 2 ||
glimseGlyphsHazardNoopsTieTie === 3;
// Prettier master (first and second outputs)
// Prettier 2.0 (first and second outputs)
const averredBathersBoxroomBuggyNurl =
bifornCringerMoshedPerplexSawder === 1 ||
askTrovenaBeenaDependsRowans === 2 ||
@@ -299,14 +299,14 @@ function foo() {
throw this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right;
}
// Prettier stable
// Prettier 1.19
function foo() {
throw this.hasPlugin("dynamicImports") &&
this.lookahead().type === tt.parenLeft.right;
}
// Prettier master
// Prettier 2.0
function foo() {
throw (
this.hasPlugin("dynamicImports") &&
@@ -324,14 +324,14 @@ const foo = (number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20) ?
kochabCooieGameOnOboleUnweave : annularCooeedSplicesWalksWayWay)
? anodyneCondosMalateOverateRetinol : averredBathersBoxroomBuggyNurl;
// Prettier stable
// Prettier 1.19
const foo = (number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20)
? kochabCooieGameOnOboleUnweave
: annularCooeedSplicesWalksWayWay)
? anodyneCondosMalateOverateRetinol
: averredBathersBoxroomBuggyNurl;
// Prettier master
// Prettier 2.0
const foo = (
number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20)
? kochabCooieGameOnOboleUnweave
@@ -357,7 +357,7 @@ export class Item {
thing!: Thing;
}
// Output (Prettier stable)
// Prettier 1.19
export class Item {
@OneToOne(
() => Thing,
@@ -366,7 +366,7 @@ export class Item {
thing!: Thing;
}
// Output (Prettier master)
// Prettier 2.0
export class Item {
@OneToOne(() => Thing, x => x.item)
thing!: Thing;
@@ -381,10 +381,10 @@ export class Item {
return // comment
;
// Prettier stable
// Prettier 1.19
return // comment;
// Prettier master
// Prettier 2.0
return; // comment
```
@@ -399,7 +399,7 @@ This doesn't happen anymore unless `--html-whitespace-sensitivity ignore` option
html`<div>`;
html` <span>TEXT</span> `;
// Prettier stable
// Prettier 1.19
html`
<div></div>
`;
@@ -407,7 +407,7 @@ html`
<span>TEXT</span>
`;
// Prettier master
// Prettier 2.0
html`<div></div>`;
html` <span>TEXT</span> `;
```
@@ -421,12 +421,12 @@ function* f() {
yield <div>generator</div>;
}
// Prettier stable
// Prettier 1.19
function* f() {
yield (<div>generator</div>);
}
// Prettier master
// Prettier 2.0
function* f() {
yield <div>generator</div>;
}
@@ -441,10 +441,10 @@ Omitting these parentheses makes the code invalid.
// Input
export default (1, 2);
// Prettier stable
// Prettier 1.19
export default 1, 2;
// Prettier master
// Prettier 2.0
export default (1, 2);
```
@@ -456,11 +456,11 @@ export default (1, 2);
(foo?.bar)();
new (foo?.bar)();
// Prettier stable
// Prettier 1.19
foo?.bar();
new foo?.bar();
// Prettier master
// Prettier 2.0
(foo?.bar)();
new (foo?.bar)();
```
@@ -477,7 +477,7 @@ undefined
foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> :
null
// Prettier stable
// Prettier 1.19
foo ? (
<span>
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx
@@ -491,7 +491,7 @@ foo ? (
</span>
) : null;
// Prettier master
// Prettier 2.0
foo ? (
<span>
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx
@@ -512,10 +512,10 @@ foo ? (
const foo = /* comments */
bar;
// Prettier stable
// Prettier 1.19
const foo /* comments */ = bar;
// Prettier master
// Prettier 2.0
const foo = /* comments */ bar;
```
@@ -536,13 +536,13 @@ export const getVehicleDescriptor = async (
Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined
> => {};
// Prettier stable
// Prettier 1.19
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<Collections.Parts.PrintedCircuitBoardAssembly["attributes"] &
undefined> => {};
// Prettier master
// Prettier 2.0
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<
@@ -559,10 +559,10 @@ Another fix related to error recovery. Should come in handy to those who migrate
// Input
function fromFlow(arg: ?Maybe) {}
// Prettier stable
// Prettier 1.19
Error: unknown type: "TSJSDocNullableType"
// Prettier master
// Prettier 2.0
function fromFlow(arg: ?Maybe) {}
```
@@ -583,7 +583,7 @@ type ValidateArgs = [
...string[],
];
// Prettier stable
// Prettier 1.19
type ValidateArgs = [
{
[key: string]: any;
@@ -592,7 +592,7 @@ type ValidateArgs = [
...string[],
];
// Prettier master
// Prettier 2.0
type ValidateArgs = [
{
[key: string]: any;
@@ -616,7 +616,7 @@ const foo = () => {
// foo
;[1,2,3].forEach(bar)
// Prettier stable
// Prettier 1.19
const foo = () => {
return;
};
@@ -624,7 +624,7 @@ const foo = () => {
// foo
[1, 2, 3].forEach(bar);
// Prettier master
// Prettier 2.0
const foo = () => {
return;
};
@@ -643,13 +643,13 @@ type f1 = (
// TODO this is a very very very very long comment that makes it go > 80 columns
) => number;
// Prettier stable
// Prettier 1.19
type f1 = (currentRequest: {
a: number;
}) => // TODO this is a very very very very long comment that makes it go > 80 columns
number;
// Prettier master
// Prettier 2.0
type f1 = (
currentRequest: { a: number }
// TODO this is a very very very very long comment that makes it go > 80 columns
@@ -677,7 +677,7 @@ type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void
let foo9: new /* foo */ (/* bar */) /* baz */ => string;
let foo10: new /* foo */ (a: /* bar */ string) /* baz */ => string;
// Prettier stable
// Prettier 1.19
interface foo1 {
bar1 /* foo */ /* baz */(); // bat
bar2 /* foo */ /* bar */ /* baz */ /* bat */?();
@@ -694,7 +694,7 @@ type foo8 = /* foo */ (a: /* bar */ string) => /* baz */ void;
let foo9: new () => /* foo */ /* bar */ /* baz */ string;
let foo10: new (/* foo */ a: /* bar */ string) => /* baz */ string;
// Prettier master
// Prettier 2.0
interface foo1 {
bar1 /* foo */(/* baz */); // bat
bar2 /* foo */ /* bar */?(/* baz */) /* bat */;
@@ -720,10 +720,10 @@ abstract class Test {
abstract foo13 /* foo */ (/* bar */) /* baz */
}
// Prettier stable
// Prettier 1.19
Error: Comment "foo" was not printed. Please report this error!
// Prettier master
// Prettier 2.0
abstract class Test {
abstract foo12 /* foo */(a: /* bar */ string): /* baz */ void;
abstract foo13 /* foo */(/* bar */); /* baz */
@@ -737,10 +737,10 @@ abstract class Test {
// Input
type A = { [key in B] };
// Prettier stable
// Prettier 1.19
type A = { [key in B]: };
// Prettier master
// Prettier 2.0
type A = { [key in B] };
```
@@ -754,11 +754,11 @@ Even though index signatures without type annotations or with multiple parameter
type A = { [key: string] };
type B = { [a: string, b: string]: string; };
// Prettier stable
// Prettier 1.19
type A = { [key: string]: };
type B = { [a: stringb: string]: string };
// Prettier master
// Prettier 2.0
type A = { [key: string] };
type B = { [a: string, b: string]: string };
```
@@ -770,10 +770,10 @@ type B = { [a: string, b: string]: string };
// Input
const a: T</* comment */> = 1;
// Prettier stable
// Prettier 1.19
Error: Comment "comment" was not printed. Please report this error!
// Prettier master
// Prettier 2.0
const a: T</* comment */> = 1;
```
@@ -791,7 +791,7 @@ const x: symbol = Symbol();
// Prettier after updating Flow, but without this fix
Error: unknown type: "SymbolTypeAnnotation"
// Prettier master
// Prettier 2.0
const x: symbol = Symbol();
```
@@ -811,10 +811,10 @@ class Foo {
method2() {}
}
// Prettier stable
// Prettier 1.19
SyntaxError: Unexpected token `@`, expected the token `class` (2:1)
// Prettier master
// Prettier 2.0
/* @flow */
@decorator4
class Foo {
@@ -836,12 +836,12 @@ class Foo {
#privateProp: number;
}
// Prettier stable
// Prettier 1.19
class Foo {
privateProp: number;
}
// Prettier master
// Prettier 2.0
class Foo {
#privateProp: number;
}
@@ -861,11 +861,11 @@ Prettier now always preserves original casing.
Label {
}
/* Prettier stable */
/* Prettier 1.19 */
label {
}
/* Prettier master */
/* Prettier 2.0 */
Label {
}
```
@@ -884,7 +884,7 @@ $my-map: (
'bar': 2, // Comment
);
// Prettier stable
// Prettier 1.19
$my-map: (
"foo": 1,
// Comment
@@ -892,7 +892,7 @@ $my-map: (
// Comment,
);
// Prettier master
// Prettier 2.0
$my-map: (
"foo": 1,
// Comment
@@ -910,12 +910,12 @@ a {
background-image: url($test-path + 'static/test.jpg');
}
// Prettier stable
// Prettier 1.19
a {
background-image: url($test-path+"static/test.jpg");
}
// Prettier master
// Prettier 2.0
a {
background-image: url($test-path + "static/test.jpg");
}
@@ -942,14 +942,14 @@ a {
<!-- TEST -->
</pre></details>
<!-- Output (Prettier stable) -->
<!-- Prettier 1.19 -->
<details>
<pre>
<!-- TEST -->
</pre></details</details
>
<!-- Output (Prettier master) -->
<!-- Prettier 2.0 -->
<details>
<pre>
<!-- TEST -->
@@ -975,7 +975,7 @@ e-wrap </textarea>
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
</with:colon>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<with:colon>
<div>
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
@@ -991,7 +991,7 @@ e-wrap </textarea>
><span> inline </span>
</with:colon>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<with:colon>
<div>
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
@@ -1025,10 +1025,10 @@ e-wrap </textarea
<div><span>
<
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
TypeError: Cannot read property 'start' of null
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<div><span> < </span></div>
```
@@ -1043,10 +1043,10 @@ srcset="
/media/examples/surfer-240-200.jpg
">
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
Error: Mixed descriptor in srcset is not supported
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<img srcset="/media/examples/surfer-240-200.jpg" />
```
@@ -1058,10 +1058,10 @@ Error: Mixed descriptor in srcset is not supported
<pre><br></pre>
<pre><hr></pre>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
TypeError: Cannot read property 'start' of null
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<pre><br /></pre>
<pre><hr /></pre>
```
@@ -1075,14 +1075,14 @@ TypeError: Cannot read property 'start' of null
<span><span><input type="checkbox"/></span></span>
<span><input type="checkbox"/></span>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<span><input type="checkbox" /> </span>
<span
><span><input type="checkbox"/></span
></span>
<span><input type="checkbox"/></span>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<span><input type="checkbox" /> </span>
<span
><span><input type="checkbox" /></span
@@ -1099,14 +1099,14 @@ TypeError: Cannot read property 'start' of null
</tr>
</table><div>Should not insert empty line before this div</div>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<table>
<tr></tr>
</table>
<div>Should not insert empty line before this div</div>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<table>
<tr></tr>
</table>
@@ -1126,7 +1126,7 @@ even can not fit one line
really a lot and lot of classes
"></div>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<div
class=" foo
bar baz"
@@ -1139,7 +1139,7 @@ really a lot and lot of classes
"
></div>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<div class="foo bar baz"></div>
<div
class="another element with so many classes even can not fit one line really a lot and lot of classes"
@@ -1163,7 +1163,7 @@ really a lot and lot of classes
bottom: 0; ">
</div>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<div
style=" color : red;
display :inline "
@@ -1179,7 +1179,7 @@ really a lot and lot of classes
></div>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<div style="color: red; display: inline;"></div>
<div
style="
@@ -1205,12 +1205,12 @@ Previously, it worked only for tags. Useful for protecting various macros and pr
<!-- prettier-ignore -->
A super long string that has been marked as ignore because it was probably generated by some script.
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<!-- prettier-ignore -->
A super long string that has been marked as ignore because it was probably
generated by some script.
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<!-- prettier-ignore -->
A super long string that has been marked as ignore because it was probably generated by some script.
```
@@ -1223,13 +1223,13 @@ A super long string that has been marked as ignore because it was probably gener
| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ |
| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 |
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<!-- prettier-ignore -->
| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats |
Tigers | | ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- |
---- | ------ | | 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 |
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<!-- prettier-ignore -->
| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers |
| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ |
@@ -1257,7 +1257,7 @@ export default {
}
</script>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<script lang="jsx">
export default {
data: () => ({
@@ -1272,7 +1272,7 @@ export default {
}
</script>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<script lang="jsx">
export default {
data: () => ({
@@ -1296,7 +1296,7 @@ export default {
:attr2="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong string literal value'"/>
</template>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<template>
<MyComponent
:attr1="
@@ -1308,7 +1308,7 @@ export default {
/>
</template>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<template>
<MyComponent
:attr1="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong ${template} literal value`"
@@ -1335,7 +1335,7 @@ long_long_long_long_long_long_long_condition_4
/>
</template>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<template>
<MyComponent
v-if="
@@ -1351,7 +1351,7 @@ long_long_long_long_long_long_long_condition_4
/>
</template>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<template>
<MyComponent
v-if="
@@ -1380,10 +1380,10 @@ While there are some syntax incompatibilities (one-time bindings and the precede
<!-- Input -->
<div ng-if="$ctrl .shouldShowWarning&&!$ctrl.loading ">Warning!</div>
<!-- Output (Prettier stable) -->
<!-- Prettier 1.19 -->
<div ng-if="$ctrl .shouldShowWarning&&!$ctrl.loading ">Warning!</div>
<!-- Output (Prettier master) -->
<!-- Prettier 2.0 -->
<div ng-if="$ctrl.shouldShowWarning && !$ctrl.loading">Warning!</div>
```
@@ -1399,7 +1399,7 @@ broke [custom ids](https://angular.io/guide/i18n#set-a-custom-id-for-persistence
<div i18n-prop="Special-property|This is a special property with much important information@@MyTextId"
prop="My Text"></div>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
<div
i18n-prop="
Special-property|This is a special property with much important
@@ -1408,7 +1408,7 @@ prop="My Text"></div>
prop="My Text"
></div>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<div
i18n-prop="
Special-property|This is a special property with much important
@@ -1423,10 +1423,10 @@ prop="My Text"></div>
<!-- prettier-ignore -->
```hbs
{{!-- input --}}
{{!-- Input --}}
<a href="a-very-long-href-from-a-third-party-marketing-platform{{id}}longer-than-eighty-chars">Link</a>
{{!-- Prettier stable --}}
{{!-- Prettier 1.19 --}}
<a
href="a-very-long-href-from-a-third-party-marketing-platform
{{id}}
@@ -1435,7 +1435,7 @@ prop="My Text"></div>
Link
</a>
{{!-- Prettier master --}}
{{!-- Prettier 2.0 --}}
<a
href="a-very-long-href-from-a-third-party-marketing-platform{{id}}longer-than-eighty-chars"
>
@@ -1446,12 +1446,12 @@ prop="My Text"></div>
and
```hbs
{{!-- input --}}
{{!-- Input --}}
<div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
Hello
</div>
{{!-- Prettier stable --}}
{{!-- Prettier 1.19 --}}
<div
class="hello
{{if goodbye true}}
@@ -1467,7 +1467,7 @@ and
Hello
</div>
{{!-- Prettier master --}}
{{!-- Prettier 2.0 --}}
<div
class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if
goodbye
@@ -1482,16 +1482,16 @@ and
<!-- prettier-ignore -->
```hbs
{{!-- input --}}
{{!-- Input --}}
<GlimmerComponent @progress={{aPropertyEndingAfterEightiethColumnToHighlightAWeirdClosingParenIssue}} />
{{!-- stable --}}
{{!-- Prettier 1.19 --}}
<GlimmerComponent
@progress={{aPropertyEndingAfterEightiethColumnToHighlightAWeirdClosingParenIssue
}}
/>
{{!-- master --}}
{{!-- Prettier 2.0 --}}
<GlimmerComponent
@progress={{aPropertyEndingAfterEightiethColumnToHighlightAWeirdClosingParenIssue}}
/>
@@ -1501,16 +1501,16 @@ and
<!-- prettier-ignore -->
```hbs
{{!-- input --}}
{{!-- Input --}}
<p>Hi here is your name, as it will be displayed {{firstName}} {{lastName}} , welcome!</p>
{{!-- stable --}}
{{!-- Prettier 1.19 --}}
<p>
Hi here is your name, as it will be displayed {{firstName}} {{lastName
}} , welcome!
</p>
{{!-- master --}}
{{!-- Prettier 2.0 --}}
<p>
Hi here is your name, as it will be displayed {{firstName}} {{
lastName
@@ -1522,7 +1522,7 @@ and
<!-- prettier-ignore -->
```hbs
{{! Input}}
{{! Input }}
{{! prettier-ignore }}
<div>
"hello! my parent was ignored"
@@ -1538,7 +1538,7 @@ and
<ThisWillBeNormal backTo = "normal" />
{{/a-normal-component}}
{{! Prettier stable}}
{{! Prettier 1.19 }}
{{! prettier-ignore }}
<div>
"hello! my parent was ignored"
@@ -1551,7 +1551,7 @@ and
<ThisWillBeNormal backTo="normal" />
{{/a-normal-component}}
{{! Prettier master}}
{{! Prettier 2.0 }}
{{! prettier-ignore }}
<div>
"hello! my parent was ignored"
@@ -1577,12 +1577,12 @@ and
{{component arg1='hey' arg2=(helper this.arg7 this.arg4) arg3=anotherone arg6=this.arg8}}
</script>
<!-- Output (Prettier stable) -->
<!-- Prettier 1.19 -->
<script type="text/x-handlebars-template">
{{component arg1='hey' arg2=(helper this.arg7 this.arg4) arg3=anotherone arg6=this.arg8}}
</script>
<!-- Output (Prettier master) -->
<!-- Prettier 2.0 -->
<script type="text/x-handlebars-template">
{{component
arg1='hey'
@@ -1597,15 +1597,15 @@ and
<!-- prettier-ignore -->
```hbs
{{!-- input --}}
{{!-- Input --}}
<ul class="abc
def">
</ul>
{{!-- Prettier stable --}}
{{!-- Prettier 1.19 --}}
<ul class></ul>
{{!-- Prettier master --}}
{{!-- Prettier 2.0 --}}
<ul class="abc
def">
</ul>
@@ -1615,21 +1615,21 @@ and
<!-- prettier-ignore -->
```hbs
{{!-- input --}}
{{!-- Input --}}
{{~#if bar}}
if1
{{~else~}}
else
{{~/if~}}
{{!-- stable --}}
{{!-- Prettier 1.19 --}}
{{#if bar}}
if1
{{else}}
else
{{/if}}
{{!-- master --}}
{{!-- Prettier 2.0 --}}
{{~#if bar}}
if1
{{~else~}}
@@ -1647,14 +1647,14 @@ Even though using a comma to separate multiple implemented interfaces is depreca
```graphql
# Input
type Type1 implements A, B
# { & <-- Removing this comment changes the separator in stable
# { & <-- Removing this comment changes the separator in 1.19
{a: a}
type Type2 implements A, B & C{a: a}
# Prettier stable
# Prettier 1.19
type Type1 implements A & B {
# { & <-- Removing this comment changes the separator in stable
# { & <-- Removing this comment changes the separator in 1.19
a: a
}
@@ -1662,9 +1662,9 @@ type Type2 implements A & B & C {
a: a
}
# Prettier master
# Prettier 2.0
type Type1 implements A, B {
# { & <-- Removing this comment changes the separator in stable
# { & <-- Removing this comment changes the separator in 1.19
a: a
}
@@ -1684,12 +1684,12 @@ type Type2 implements A, B & C {
1. List
2. List
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
0. List
1. List
1. List
<!-- Prettier master -->
<!-- Prettier 2.0 -->
0. List
1. List
2. List
@@ -1724,7 +1724,7 @@ type Type2 implements A, B & C {
d
e
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
- a
b
c
@@ -1749,7 +1749,7 @@ type Type2 implements A, B & C {
d
e
<!-- Prettier master -->
<!-- Prettier 2.0 -->
- a
b
c
@@ -1794,7 +1794,7 @@ Previously, when Prettier formatted an HTML tag placed just after a list item, i
- A list item
<blockquote>asdf</blockquote>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
- A list item.
<details><summary>Summary</summary>
@@ -1808,7 +1808,7 @@ Previously, when Prettier formatted an HTML tag placed just after a list item, i
- A list item
<blockquote>asdf</blockquote>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
- A list item.
<details><summary>Summary</summary>
<p>
@@ -1833,7 +1833,7 @@ Here's a statement[^footnote].
Here's a multi-line footnote walking back the above statement, and showing
how it's all totally bollocks.
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
Here's a statement[^footnote].
[^footnote]:
@@ -1841,7 +1841,7 @@ Here's a statement[^footnote].
Here's a multi-line footnote walking back the above statement, and showing
how it's all totally bollocks.
<!-- Prettier master -->
<!-- Prettier 2.0 -->
Here's a statement[^footnote].
[^footnote]:
@@ -1860,12 +1860,12 @@ Here's a statement[^footnote].
test <World /> test
</> 123
<!-- Output (Prettier stable) -->
<!-- Prettier 1.19 -->
<>
test <World /> test
</> 123
<!-- Output (Prettier master) -->
<!-- Prettier 2.0 -->
<>
test <World /> test
</> 123
@@ -1890,12 +1890,12 @@ parsable as HTML, such as `<Tag value={{a: 'b'}}>test</Tag>`
</div>
</Foo>
<!-- Prettier stable -->
<!-- Prettier 1.19 -->
SyntaxError: Unexpected closing tag "Tag". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (1:35)
> 1 | <Tag value={ {a : 'b' } }>test</ Tag>
<!-- Prettier master -->
<!-- Prettier 2.0 -->
<Tag value={{ a: "b" }}>test</Tag>
@@ -1914,11 +1914,11 @@ SyntaxError: Unexpected closing tag "Tag". It may happen when the tag has alread
#### Support file extensions `.cjs` and `.yaml.sed` ([#7210](https://github.com/prettier/prettier/pull/7210) by [@sosukesuzuki](https://github.com/sosukesuzuki))
```sh
# Prettier stable
# Prettier 1.19
$ prettier test.cjs
test.cjs[error] No parser could be inferred for file: test.cjs
# Prettier master
# Prettier 2.0
$ prettier test.cjs
"use strict";
console.log("Hello, World!");