Boshen
2f48bdf26f
fix(parser,semantic): make semantic own Trivias ( #711 )
...
closes #708
Making the parser return Rc<Trivias> is not a good API, and ideally
`Semantic` should just own `Trivias` so it can process or mutate it.
2023-08-10 15:30:32 +08:00
Alexandr Metreniuc
f8358a148a
feat(linter): @typescript-eslint/no-namespace ( #703 )
2023-08-09 23:02:24 +08:00
Wenzhe Wang
de110828cc
fix(task): update taggedTemplateExpression template ( #676 )
...
For generate test cases like:
```js
{
code: dedent`
afterAll(async (done) => {
await myAsyncTask();
done();
});
`,
errors: [{ messageId: 'useAwaitInsteadOfCallback', line: 1, column: 17 }],
},
```
2023-08-02 11:46:15 +08:00
Don Isaac
e7d8d4ba46
feat(linter): enable module record builder
2023-08-02 11:44:27 +08:00
EliLichtblau
5e54bd0537
Adding types to the symbol table - consistent export type sample rule implemented ( #667 )
...
Fixes 11 TS conformance tests and 18 babel tests.
Adds types to the symbol table functionally conformant to TS behavior
but symbol flags implemented slightly differently.
Symbol redeclaration check is also not entirely conformant but fixing
this seems like a separate PR.
For testing purposes - consistent-export-type was also implemented
(WIP).
2023-07-31 12:33:47 +08:00
Matthew "strager" Glazar
ad00720d75
refactor: avoid unstable let_chains
...
The let_chains Rust feature is unstable, preventing Oxc from using a
stable Rust compiler. Refactor the code to avoid let_chains.
2023-07-27 09:44:57 +08:00
Boshen
a55ba5941c
refactor(benchmark): use iter_with_large_drop ( #587 )
...
This also removes `black_box`, since criterion always black boxes the values for us
2023-07-23 11:35:16 +08:00
Boshen
2330099a34
deps(rust): bump dependencies
2023-07-21 11:38:12 +08:00
Boshen
38e11956be
chore(rust): rust version 1.71.0 nightly
2023-07-13 23:10:10 +08:00
Don Isaac
fd899be4a9
feat(minifier): compress undefined variable declarations ( #532 )
2023-07-10 10:33:42 +08:00
Boshen
e25f6e2dd4
chore(rust): rust cargo fmt and fix clippy warnings
2023-07-04 15:41:30 +08:00
Wenzhe Wang
a0eba67ad9
feat(tasks): support init jest lint rule ( #513 )
2023-07-04 14:53:29 +08:00
Boshen
c5402c1cae
feat(linter): implement no-import-assign (nursery)
2023-07-01 11:20:31 +08:00
Boshen
06764f8574
chore(tasks): add swc-7187 test case
2023-06-30 16:41:52 +08:00
Boshen
9ca942ab2e
fix(tasks): save eslint files to the eslint/ directory
2023-06-28 20:48:51 +08:00
Wenzhe Wang
a32320646d
feat(minfier): try fold and or operator ( #472 )
2023-06-28 14:58:55 +08:00
阿良仔
1182985bb0
feat(minifier): implement try_fold_shift ( #478 )
...
* feat: implement `try_fold_shift`
* update minsize
2023-06-27 04:44:23 +08:00
Wenzhe Wang
cb94937ba6
feat(minifier): fold string string comparison ( #471 )
2023-06-26 22:37:50 +08:00
Wenzhe Wang
b8f5e3ad92
feat(minifier): try reduce void ( #457 )
2023-06-23 00:10:46 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter ( #464 )
2023-06-20 21:56:28 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate ( #460 )
2023-06-19 20:20:59 +08:00
Boshen
0d5db3d2f7
feat(benchmark): add bench semantic
2023-06-19 18:30:30 +08:00
Wenzhe Wang
5d10f96051
feat(minifier): try fold unary expression ( #430 )
2023-06-16 00:08:14 +08:00
u9g
db624da84d
Reimplement more of the closure var rename step ( #447 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
closes #442
2023-06-15 23:37:04 +08:00
Boshen
bad8bfcf16
ci: run conformance tests and bail if there are outdated snapshots ( #444 )
2023-06-14 21:44:10 +08:00
Boshen
a79480b078
feat(minifier): separate mangler pass ( #439 )
2023-06-14 10:46:13 +08:00
Carter Snook
c0726e444f
feat(lexer): use linear lexing on WASM ( #436 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-06-13 15:18:02 +08:00
Boshen
243e48ac09
fix(coverage): make ignoring "literals/regexp" work on Windows
2023-06-13 14:31:59 +08:00
Carter Snook
a518bcbb3b
fix(tasks/rulegen): use correct Span import ( #433 )
2023-06-12 11:09:02 +08:00
Boshen
5c91fd54e3
feat(minifier): print [-In] Context ( #428 )
2023-06-11 16:44:48 +08:00
Boshen
b26900f8c4
fix(rulegen): fix ureq not working without tls
2023-06-09 12:43:41 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 ( #416 )
2023-06-08 22:26:35 +08:00
Wenzhe Wang
7c79fbc026
feat(minifier): try fold typeof ( #408 )
2023-06-07 10:44:28 +08:00
Wenzhe Wang
ddc129262d
feat(minifer): minify number ( #405 )
2023-06-03 21:24:39 +08:00
Boshen
f8125af850
feat(minimizer): print parentheses
2023-06-01 22:45:26 +08:00
Wenzhe Wang
4109c8b8a5
feat(parser): distinguish exponential number ( #399 )
2023-06-01 15:15:22 +08:00
Boshen
895d26ebf9
chore(coverage): update snapshot
2023-06-01 14:28:00 +08:00
Boshen
6ef839b781
chore(rust): bump deps
2023-05-31 16:34:28 +08:00
Wenzhe Wang
a20d5b55cd
feat(minifier): may add space before binaryOperator ( #380 )
2023-05-27 19:18:06 +08:00
Wenzhe Wang
a0b9628177
feat(minifer): distinguish-op-lessthan ( #391 )
2023-05-27 17:04:54 +08:00
Boshen
829f945479
chore(minifier): add a few passing tests
2023-05-27 12:27:25 +08:00
Boshen
8ea9e38ee5
feat(minifier): remove redundant curly braces from block statements ( #390 )
2023-05-27 10:52:15 +08:00
Boshen
a7f8b66618
chore: bump submodules
2023-05-25 22:48:10 +08:00
Boshen
ee6f18091b
chore(minsize): add newlines in between for better diff
2023-05-25 22:42:11 +08:00
Boshen
c4a67b6cfb
feat(minifier): fold return undefined to return ( #387 )
2023-05-25 22:37:55 +08:00
Boshen
b6d9104a52
chore(coverage): remove catch_unwind
...
There's a stack overflow in one of the files, I think this is one of the cause?
2023-05-25 21:22:00 +08:00
Boshen
c613583544
chore(coverage): bump coverage status
2023-05-25 18:46:48 +08:00
Boshen
4414f3e071
chore(just): add command for updating submodules
2023-05-25 18:40:35 +08:00
Boshen
a31c7ac77a
refactor(index): use static_assertions
2023-05-24 22:53:11 +08:00
Boshen
f5b57944e2
feat(minifier): print shorter numbers ( #381 )
2023-05-24 22:03:50 +08:00