Skip to content

Commit 16883d4

Browse files
committed
add whitespace change to release notes
1 parent 7383d0d commit 16883d4

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,36 @@
1818

1919
In addition, esbuild's decorator parser has been rewritten to fix several subtle and likely unimportant edge cases with esbuild's parsing of exports and decorators in TypeScript (e.g. TypeScript apparently does automatic semicolon insertion after `interface` and `export interface` but not after `export default interface`).
2020

21+
* Pretty-print decorators using the same whitespace as the original
22+
23+
When printing code containing decorators, esbuild will now try to respect whether the original code contained newlines after the decorator or not. This can make generated code containing many decorators much more compact to read:
24+
25+
```js
26+
// Original code
27+
class Foo {
28+
@a @b @c abc
29+
@x @y @z xyz
30+
}
31+
32+
// Old output
33+
class Foo {
34+
@a
35+
@b
36+
@c
37+
abc;
38+
@x
39+
@y
40+
@z
41+
xyz;
42+
}
43+
44+
// New output
45+
class Foo {
46+
@a @b @c abc;
47+
@x @y @z xyz;
48+
}
49+
```
50+
2151
## 0.19.7
2252

2353
* Add support for bundling code that uses import attributes ([#3384](https://github.com/evanw/esbuild/issues/3384))

0 commit comments

Comments
 (0)