Boshen
|
a1752a062c
|
fix(codegen): fix incorrect minified return 1n output (#8374)
|
2025-01-09 05:01:41 +00:00 |
|
Boshen
|
5a648bc3cd
|
fix(codegen): fix white space issue with do statements (#8348)
|
2025-01-08 13:28:10 +00:00 |
|
Boshen
|
a542013773
|
feat(minifier): minimize do{}while(true) -> do;while(true) (#8311)
|
2025-01-07 12:55:03 +00:00 |
|
Boshen
|
ad146bbb90
|
feat(codegen): print real newline when \n is inside template literals (#8178)
|
2024-12-29 12:20:47 +00:00 |
|
Boshen
|
ad61e70186
|
fix(codegen): print if else without block with proper indentation (#8135)
|
2024-12-27 00:39:52 +00:00 |
|
Boshen
|
bdc241d41d
|
fix(codegen): disallow template literals in object property key (#8108)
|
2024-12-25 11:22:54 +00:00 |
|
Boshen
|
47276679f5
|
feat(codegen): minify arrow expr (x) => y -> x => y (#8078)
|
2024-12-24 14:25:01 +00:00 |
|
Boshen
|
728ed20c1c
|
fix(codegen): print yield * ident correctly
|
2024-12-24 21:57:58 +08:00 |
|
Boshen
|
0562830549
|
feat(codegen): minify string with backtick when needed (#8095)
|
2024-12-24 13:39:31 +00:00 |
|
Boshen
|
ad2a620d61
|
fix(ast)!: add missing AssignmentTargetProperty::computed (#8097)
|
2024-12-24 13:27:00 +00:00 |
|
Boshen
|
6237c0527f
|
feat(codegen): minify more whitespace (#8089)
|
2024-12-24 09:54:13 +00:00 |
|
Boshen
|
6355b7ca70
|
feat(codegen): minify export { 's' as 's' } -> export { 's' } (#8093)
|
2024-12-24 09:17:51 +00:00 |
|
Boshen
|
fccfda91c1
|
feat(codegen): minify class{static[computed]} (#8088)
|
2024-12-24 05:06:57 +00:00 |
|
Boshen
|
414c118309
|
feat(codegen): minify yield "s" -> yield"s" (#8084)
|
2024-12-24 00:41:28 +00:00 |
|
Boshen
|
f8f067bfc6
|
feat(codegen): minify class method async*fn(){} (#8083)
|
2024-12-24 00:35:29 +00:00 |
|
Boshen
|
618b6aa085
|
feat(codege): minify whitespace in object getter / setter (#8080)
|
2024-12-23 16:36:03 +00:00 |
|
Boshen
|
1d5ae817d7
|
feat(codegen): minify const [foo] = bar -> const[foo]=bar (#8079)
|
2024-12-23 16:20:37 +00:00 |
|
Boshen
|
e3f78fba0b
|
feat(codegen): new Foo() -> new Foo when minify (#8077)
|
2024-12-23 15:34:31 +00:00 |
|
Boshen
|
a222f2b055
|
fix(codegen): print delete 2e308 as delete (0, Infinity) (#7761)
closes #7736
|
2024-12-10 08:37:50 +00:00 |
|
Boshen
|
b701232098
|
fix(codegen): print quote correctly for directive (#7735)
closes #7734
|
2024-12-09 07:17:02 +00:00 |
|
Dunqing
|
8c3a954336
|
fix(codegen): missing parens for in in for in loop init (#7705)
Well, this looks like an accidental change before, `Context::empty().and_forbid_in(false)` does nothing at all.
|
2024-12-06 15:52:05 +00:00 |
|
Dunqing
|
4afbe5599e
|
fix(codegen): missing parens for in in for loop init when it includes two binary expression (#7703)
close: #7690
I don't know the logic much, it works without `left_ctx` and no tests failed
|
2024-12-06 15:52:04 +00:00 |
|
Boshen
|
d0b78f7361
|
feat(codegen): minify whitespace for some expressions (#7671)
part of #7638
|
2024-12-05 06:59:17 +00:00 |
|
Boshen
|
c523ccb7ef
|
feat(codegen): better whitespace minification for import / export statements (#7650)
part of #7638
|
2024-12-04 19:24:03 +00:00 |
|
Boshen
|
82773cb455
|
feat(codegen): remove underscore from bigint (#7367)
closes #7285
closes #7286
|
2024-11-20 09:08:51 +00:00 |
|
Dunqing
|
c587dd3cd6
|
fix(codegen): do not print parenthesis for in expression in ArrowFunctionExpression (#7360)
Please check out [esbuild](https://esbuild.github.io/try/#dAAwLjI0LjAAACgpID0+ICIiIGluIHt9)
|
2024-11-19 14:29:18 +00:00 |
|
Dunqing
|
58db9ef322
|
refactor(codegen): do not print unnecessary parentheses if both sides use the same logical operator (#7325)
As shown by the changing tests, we don't need to print parentheses for them.
### Comparison
In [esbuild](https://esbuild.github.io/try/#dAAwLjI0LjAAAGEgPz8gKGIgPz8gKGMgPz8gZCkpOwooYSA/PyAoYiA/PyAoYyA/PyBkKSkpOwooYSB8fCAoYiB8fCBjKSkgfHwgZDsKYSB8fCAoYiB8fCAoYyB8fCBkKSk7CmEgJiYgKChiICYmIGMpICYmIGQp), it will print parentheses as-is, in [SWC](https://play.swc.rs/?version=1.9.2&code=H4sIAAAAAAAAA0tUsLdX0EgCk8kgMkVT05pLIxGLMES8pgYkDiSTNTVBVIo1F5IgUDFIDKQ2UUFNTUEDKAykkjVBZIomAGEbiHtuAAAA&config=H4sIAAAAAAAAA1VQzW7DIAy%2B9ykin6tlyrHXTb3ttCdA1GmpACPbSIuqvPuAJml6w9%2Bv8ePQdXAXC6fuUZ5lSIYFeZsLIlNU81cQ0CmhWHZJ4biyKpVSztiQ%2BUmAGr6iVhPK8DkMsOJsoozEYd%2BQBb9xdBHPxF%2FeiJwd%2BossuVsVo7G68xXIhUSsv5TZYi27qSY59T1K%2BJBbn56W48vAOaoLTWuyUjDqLCz0%2FPYDTyRVNxovyw4QXHTjtF%2FdUiglIu%2FCKjXx6jf%2FYc1v6RDokhu5HL0etq5U0gLFu8BLuTZu6eDkZ7W3s8%2F%2FYy0r4MUBAAA%3D), we have the same output now
|
2024-11-19 10:31:53 +00:00 |
|
Song Gao
|
cf3415b0e4
|
chore(doc): replace main/master to tag/commit to make the url always accessible (#7298)
|
2024-11-16 21:00:30 +08:00 |
|
Boshen
|
05ef03dbab
|
fix(codegen): correct print __proto__ shorthand (#6802)
|
2024-10-23 07:16:00 +00:00 |
|
Boshen
|
1b7897cf01
|
fix(codegen): print #field in {} << 0; correctly (#6799)
|
2024-10-23 05:34:22 +00:00 |
|
Boshen
|
e5ed6a56a8
|
feat(codegen): print negative numbers (#6624)
|
2024-10-16 22:38:54 +00:00 |
|
camc314
|
2ade16ece5
|
fix(codegen): invalid codegen when in inside bin expr in or loop (#6431)
https://github.com/oxc-project/monitor-oxc/actions/runs/11278829870 ??
|
2024-10-13 06:47:10 +00:00 |
|
camc314
|
6896efc00c
|
fix(codegen): fix in in sequence expr in for loops (#6428)
not sure if this is right, but it doesn't break any existing tests so hopefully?
|
2024-10-13 06:47:09 +00:00 |
|
Dunqing
|
cca433f84a
|
feat(codegen): print vite / webpack special comments (#6021)
Related: https://github.com/oxc-project/oxc/issues/1046#issuecomment-2347345319
Close: #6024
|
2024-09-26 15:19:31 +00:00 |
|
Boshen
|
f4aefb57d8
|
fix(codegen): print let[0] as (let)[0] (#5947)
|
2024-09-21 15:09:55 +00:00 |
|
Boshen
|
5901d2a0f1
|
fix(codegen): various spacing issues (#5820)
|
2024-09-17 09:03:28 +00:00 |
|
Boshen
|
d62defb42d
|
fix(codegen): do not print trailing commas for ArrayExpression (#5551)
closes #5532
|
2024-09-06 16:35:10 +00:00 |
|
rzvxa
|
0df1d9d97b
|
fix(ast, codegen, linter): panics in fixers. (#5431)
Closes #5434
https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/10685877915/job/29619941099
|
2024-09-05 05:59:22 +00:00 |
|
Dunqing
|
292d162b23
|
feat(codegen): print missing fields for AccessorProperty (#5291)
Found in https://github.com/oxc-project/monitor-oxc/actions/runs/10592050362/job/29350666018
|
2024-08-28 08:42:39 +00:00 |
|
Boshen
|
21f576252a
|
fix(codegen): minify large numbers (#4889)
|
2024-08-14 06:52:17 +00:00 |
|
Boshen
|
e8de4bde41
|
fix(codegen): fix whitespace issue when minifying x in new Error() (#4886)
|
2024-08-14 04:29:17 +00:00 |
|
Boshen
|
3da33d3647
|
fix(codegen): missing parenthesis for PrivateInExpression (#4865)
|
2024-08-13 06:54:26 +00:00 |
|
Boshen
|
a558492bf9
|
feat(codegen): implement BinaryExpressionVisitor (#4548)
part of https://github.com/oxc-project/backlog/issues/58
`monitor-oxc` run: https://github.com/oxc-project/monitor-oxc/actions/runs/10179047831
binary expression stack length tally using `counts` in top 100 npm packages from monitor-oxc:
```
29772 counts
( 1) 17652 (59.3%, 59.3%): 0
( 2) 5772 (19.4%, 78.7%): 1
( 3) 3204 (10.8%, 89.4%): 2
( 4) 1276 ( 4.3%, 93.7%): 3
( 5) 616 ( 2.1%, 95.8%): 4
( 6) 308 ( 1.0%, 96.8%): 5
( 7) 202 ( 0.7%, 97.5%): 6
( 8) 168 ( 0.6%, 98.1%): 7
( 9) 114 ( 0.4%, 98.5%): 9
( 10) 90 ( 0.3%, 98.8%): 8
( 11) 84 ( 0.3%, 99.0%): 13
( 12) 58 ( 0.2%, 99.2%): 10
( 13) 48 ( 0.2%, 99.4%): 12
( 14) 32 ( 0.1%, 99.5%): 11
( 15) 20 ( 0.1%, 99.6%): 134
( 16) 16 ( 0.1%, 99.6%): 18
( 17) 16 ( 0.1%, 99.7%): 20
( 18) 12 ( 0.0%, 99.7%): 19
( 19) 12 ( 0.0%, 99.8%): 35
( 20) 12 ( 0.0%, 99.8%): 51
( 21) 10 ( 0.0%, 99.8%): 15
( 22) 6 ( 0.0%, 99.9%): 17
( 23) 6 ( 0.0%, 99.9%): 21
( 24) 6 ( 0.0%, 99.9%): 45
( 25) 4 ( 0.0%, 99.9%): 14
( 26) 4 ( 0.0%, 99.9%): 26
( 27) 4 ( 0.0%, 99.9%): 53
( 28) 2 ( 0.0%, 99.9%): 172
( 29) 2 ( 0.0%, 99.9%): 214
( 30) 2 ( 0.0%,100.0%): 22
( 31) 2 ( 0.0%,100.0%): 27
( 32) 2 ( 0.0%,100.0%): 28
( 33) 2 ( 0.0%,100.0%): 29
( 34) 2 ( 0.0%,100.0%): 31
( 35) 2 ( 0.0%,100.0%): 36
( 36) 2 ( 0.0%,100.0%): 46
( 37) 2 ( 0.0%,100.0%): 55
```
|
2024-07-31 12:44:19 +00:00 |
|
Boshen
|
6a94e3f573
|
fix(codegen): fixes for esbuild test cases (#4503)
|
2024-07-28 08:57:15 +00:00 |
|
Boshen
|
44a10c4b91
|
fix(codegen): object shorthand with parens ({x: (x)}) -> ({ x }) (#4391)
|
2024-07-21 14:04:17 +00:00 |
|
Boshen
|
3d88f20cbb
|
fix(codegen): print shorthand for all { x } variants (#4374)
closes #4340
|
2024-07-21 19:54:21 +08:00 |
|
Boshen
|
9a094e861e
|
chore(codegen): add ts snapshot test
|
2024-07-14 20:46:22 +08:00 |
|
Boshen
|
06197b8be4
|
refactor(codegen): separate tests
|
2024-07-14 12:56:02 +08:00 |
|