Clean changelog_unreleased (#14144)

Clean changelog
This commit is contained in:
Sosuke Suzuki authored and GitHub committed 2023-01-09 16:48:32 +09:00
1 parent 4cf4c2c563
commit a37ce0b8f6
19 files changed
-438

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
#### Fix formatting of empty type parameters (#14073 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
const foo: bar</* comment */> = () => baz;
// Prettier stable
Error: Comment "comment" was not printed. Please report this error!
// Prettier main
const foo: bar</* comment */> = () => baz;
```
-34
View File
@@ -1,34 +0,0 @@
#### Preserve self-closing tags (#13691 by @dcyriller)
<!-- prettier-ignore -->
```hbs
{{! Input }}
<div />
<div></div>
<custom-component />
<custom-component></custom-component>
<i />
<i></i>
<Component />
<Component></Component>
{{! Prettier stable }}
<div></div>
<div></div>
<custom-component></custom-component>
<custom-component></custom-component>
<i></i>
<i></i>
<Component />
<Component />
{{! Prettier main }}
<div />
<div></div>
<custom-component />
<custom-component></custom-component>
<i />
<i></i>
<Component />
<Component />
```
-42
View File
@@ -1,42 +0,0 @@
#### Allow custom "else if"-like blocks with block params (#13930 by @jamescdavis)
#13507 added support for custom block keywords used with `else`, but failed to allow block params. This updates printer-glimmer to allow block params with custom "else if"-like blocks.
<!-- prettier-ignore -->
```hbs
{{! Input }}
{#when isAtWork as |work|}}
Ship that
{{work}}!
{{else when isReading as |book|}}
You can finish
{{book}}
eventually...
{{else}}
Go to bed!
{{/when}}
{{! Prettier stable }}
{{#when isAtWork as |work|}}
Ship that
{{work}}!
{{else when isReading}}
You can finish
{{book}}
eventually...
{{else}}
Go to bed!
{{/when}}
{{! Prettier main }}
{#when isAtWork as |work|}}
Ship that
{{work}}!
{{else when isReading as |book|}}
You can finish
{{book}}
eventually...
{{else}}
Go to bed!
{{/when}}
```
-19
View File
@@ -1,19 +0,0 @@
#### Fix missing parentheses when an expression statement starts with `let[` (#14000, #14044 by @fisker, @thorn0)
<!-- prettier-ignore -->
```jsx
// Input
(let[0] = 2);
// Prettier stable
let[0] = 2;
// Prettier stable (second format)
SyntaxError: Unexpected token (1:5)
> 1 | let[0] = 2;
| ^
2 |
// Prettier main
(let)[0] = 2;
```
-32
View File
@@ -1,32 +0,0 @@
#### Fix formatting for auto-accessors with comments (#14038 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
class A {
@dec()
// comment
accessor b;
}
// Prettier stable
class A {
@dec()
accessor // comment
b;
}
// Prettier stable (second format)
class A {
@dec()
accessor; // comment
b;
}
// Prettier main
class A {
@dec()
// comment
accessor b;
}
```
-27
View File
@@ -1,27 +0,0 @@
#### Fix displacing of comments in default switch case (#14047 by @thorn0)
It was a regression in Prettier 2.6.0.
<!-- prettier-ignore -->
```jsx
// Input
switch (state) {
default:
result = state; // no change
break;
}
// Prettier stable
switch (state) {
default: // no change
result = state;
break;
}
// Prettier main
switch (state) {
default:
result = state; // no change
break;
}
```
-19
View File
@@ -1,19 +0,0 @@
#### Add parentheses to head of `ExpressionStatement` instead of the whole statement (#14077 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
({}).toString.call(foo) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo);
// Prettier stable
({}.toString.call(foo) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo));
// Prettier main
({}).toString.call(foo.forEach) === "[object Array]"
? foo.forEach(iterateArray)
: iterateObject(foo);
```
-13
View File
@@ -1,13 +0,0 @@
#### Fix comments after directive (#14081 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
"use strict" /* comment */;
// Prettier stable (with other js parsers except `babel`)
Error: Comment "comment" was not printed. Please report this error!
// Prettier main
<Same as input>
```
-17
View File
@@ -1,17 +0,0 @@
#### Fix formatting for comments inside JSX attribute (#14082 with by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
function MyFunctionComponent() {
<button label=/*old*/"new">button</button>
}
// Prettier stable
Error: Comment "old" was not printed. Please report this error!
// Prettier main
function MyFunctionComponent() {
<button label=/*old*/ "new">button</button>;
}
```
-17
View File
@@ -1,17 +0,0 @@
#### Quote numeric keys for json-stringify parser (#14083 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
{0: 'value'}
// Prettier stable
{
0: "value"
}
// Prettier main
{
"0": "value"
}
```
-19
View File
@@ -1,19 +0,0 @@
#### Fix semicolon duplicated at the end of LESS file (#14007 by @mvorisek)
<!-- prettier-ignore -->
```less
// Input
@variable: {
field: something;
};
// Prettier stable
@variable: {
field: something;
}; ;
// Prettier main
@variable: {
field: something;
};
```
-43
View File
@@ -1,43 +0,0 @@
#### Fix no space after unary minus when followed by opening parenthesis in LESS (#14008 by @mvorisek)
<!-- prettier-ignore -->
```less
// Input
.unary_minus_single {
margin: -(@a);
}
.unary_minus_multi {
margin: 0 -(@a);
}
.binary_minus {
margin: 0 - (@a);
}
// Prettier stable
.unary_minus_single {
margin: - (@a);
}
.unary_minus_multi {
margin: 0 - (@a);
}
.binary_minus {
margin: 0 - (@a);
}
// Prettier main
.unary_minus_single {
margin: -(@a);
}
.unary_minus_multi {
margin: 0 -(@a);
}
.binary_minus {
margin: 0 - (@a);
}
```
-19
View File
@@ -1,19 +0,0 @@
#### Do not change case of property name if inside a variable declaration in LESS (#14034 by @mvorisek)
<!-- prettier-ignore -->
```less
// Input
@var: {
preserveCase: 0;
};
// Prettier stable
@var: {
preservecase: 0;
};
// Prettier main
@var: {
preserveCase: 0;
};
```
-17
View File
@@ -1,17 +0,0 @@
#### Do not insert space in LESS property access (#14103 by @fisker)
<!-- prettier-ignore -->
```less
// Input
a {
color: @colors[@white];
}
// Prettier stable
a {
color: @colors[ @white];
}
// Prettier main
<Same as input>
```
-20
View File
@@ -1,20 +0,0 @@
#### Don't lowercase link references (#13155 by @DerekNonGeneric & @fisker)
<!-- prettier-ignore -->
```markdown
<!-- Input -->
We now don't strictly follow the release notes format suggested by [Keep a Changelog].
[Keep a Changelog]: https://example.com/
<!-- Prettier stable -->
We now don't strictly follow the release notes format suggested by [Keep a Changelog].
[keep a changelog]: https://example.com/
<!--
^^^^^^^^^^^^^^^^^^ lowercased
-->
<!-- Prettier main -->
<Same as input>
```
-36
View File
@@ -1,36 +0,0 @@
#### Preserve empty lines between nested SCSS maps (#13931 by @jneander)
<!-- prettier-ignore -->
```scss
/* Input */
$map: (
'one': (
'key': 'value',
),
'two': (
'key': 'value',
),
)
/* Prettier stable */
$map: (
'one': (
'key': 'value',
),
'two': (
'key': 'value',
),
)
/* Prettier main */
$map: (
'one': (
'key': 'value',
),
'two': (
'key': 'value',
),
)
```
-22
View File
@@ -1,22 +0,0 @@
#### Fix removing commas from function arguments in maps (#14089 by @sosukesuzuki)
<!-- prettier-ignore -->
```scss
/* Input */
$foo: map-fn(
(
"#{prop}": inner-fn($first, $second),
)
);
/* Prettier stable */
$foo: map-fn(("#{prop}": inner-fn($first $second)));
/* Prettier main */
$foo: map-fn(
(
"#{prop}": inner-fn($first, $second),
)
);
```
-19
View File
@@ -1,19 +0,0 @@
#### Add parentheses for TSTypeQuery to improve readability (#14042 by @onishi-kohei)
<!-- prettier-ignore -->
```tsx
// Input
a as (typeof node.children)[number]
a as (typeof node.children)[]
a as ((typeof node.children)[number])[]
// Prettier stable
a as typeof node.children[number];
a as typeof node.children[];
a as typeof node.children[number][];
// Prettier main
a as (typeof node.children)[number];
a as (typeof node.children)[];
a as (typeof node.children)[number][];
```
-10
View File
@@ -1,10 +0,0 @@
#### Support type annotations on auto accessors via `babel-ts` (#14049 by @sosukesuzuki)
[The bug that `@babel/parser` cannot parse auto accessors with type annotations](https://github.com/babel/babel/issues/15205) has been fixed. So we now support it via `babel-ts` parser.
<!-- prettier-ignore -->
```tsx
class Foo {
accessor prop: number;
}
```