Boshen
f0029d5310
feat(minifier): reenable mangler
...
closes #952
closes #955
2023-10-09 09:59:14 +08:00
Boshen
55b2f031df
feat(minifier): partially re-enable minifier ( #963 )
...
closes #949
closes #950
closes #951
All minifier tests are disable from this PR.
We are going to fix the compilation errors first, then the behavioral
errors.
2023-10-08 11:06:42 +08:00
Boshen
817f8c295e
ci: turn off doc tests because they are slow to compile and run ( #961 )
2023-10-07 17:01:23 +08:00
Cameron
5b1e1e5408
feat(parser): TypeScript 5.2 ( #811 )
...
- adds support for [Using
Declarations](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management )
Closes #786
2023-10-05 12:52:14 +13:00
Boshen
38bbc96fb0
Release oxc v0.2.0
2023-09-14 23:41:44 +08:00
Don Isaac
027a67d94c
feat(minifier): constant addition expression folding ( #882 )
...
Fold constant addition expressions. Handles string concatenation and
addition, both with implicit casting.
For example,
```ts
let x = 1 + 1
let y = "hello " + "world"
```
now becomes
```ts
let x = 2
let y = "hello world"
```
## Extra Goodies
- test(minifier): add `test_snapshot` helper to perform snapshot tests
with `insta`
- up(hir): implement `std::ops::Add` for `NumericValue`
- up(span): impl `TryFrom<Cow<'_, &str>>` for `Atom`
2023-09-11 10:38:35 +08:00
Boshen
93adc9b9c2
Release oxc v0.1.3
2023-09-03 12:22:05 +08:00
Boshen
37bf4c4421
Release oxc v0.1.2
2023-09-03 11:30:44 +08:00
Boshen
1f27426570
Release crates as v0.1.1
2023-08-26 17:53:11 +08:00
Boshen
5152b39b17
chore: clean up Cargo.toml with cargo machete ( #767 )
2023-08-20 15:29:09 +08:00
Yunfei He
35167599bc
refactor(ast): use atom for Directive and Hashbang ( #701 )
...
The main reason is using Atom to remove the lifetime for convenience.
And after removing the lifetime of these nodes, the `Program<'a>`
doesn't rely on `&'a source` anymore, which allows us to [specify more
accurate
lifetimes](https://github.com/web-infra-dev/oxc/discussions/700 ).
2023-08-09 13:52:56 +08:00
Makoto Tateno
c5ff534b08
feat(semantic): add node_id to Reference ( #689 )
...
Closes #685
Intend to use this in the following ways in #672 .
```rs
let node = ctx.nodes().get_node(reference.node_id());
if !self.type_of && has_typeof_operator(node, ctx) {
return;
}
```
2023-08-05 12:45:22 +08:00
阿良仔
e090b560be
feat(minifier): initialize conditions folding ( #658 )
...
related: #401
2023-07-30 01:02:32 +08:00
Boshen
1012d8300c
chore: release crates as v0.1.0
2023-07-27 13:54:17 +08:00
Boshen
d587065436
chore(rust): update crate info, add minimal rust-version, add categories
2023-07-27 13:33:18 +08:00
Boshen
fa82f940f0
chore: stable Rust
...
closes #626
2023-07-27 13:11:46 +08:00
Boshen
b34ef4f07a
chore: reformat
2023-07-27 13:11:46 +08:00
Boshen
f2df32d1c0
fix(taplo): adjust the include glob so it doesn't time out searching for files
2023-07-27 12:30:34 +08:00
Matthew "strager" Glazar
318d55806f
refactor: format code
...
Removing uses of let_chains now allows rustfmt to format some files.
Run 'cargo fmt' to reformat these files.
2023-07-27 09:44:57 +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
Sg
fbb8aa3338
refactor: remove unstable feature const_trait_impl & const_slice_index & slice_group_by ( #629 )
2023-07-26 17:37:09 +08:00
Don Isaac
87e65ac0f7
refactor(semantic): symbol declarations and references ( #594 )
2023-07-24 10:55:56 +08:00
阿良仔
3c76cef11c
feat(minifier): fold NaN comparison ( #580 )
2023-07-21 11:00:21 +08:00
阿良仔
3cbec3459a
test: add tests for boolean related comparison ( #563 )
2023-07-17 20:55:42 +08:00
Don Isaac
2591194dba
feat(minifier): drop console statements and exprs ( #552 )
2023-07-16 14:41:51 +08:00
阿良仔
c09678a48f
test: add tests for null comparison ( #548 )
2023-07-14 23:25:25 +08:00
Boshen
38e11956be
chore(rust): rust version 1.71.0 nightly
2023-07-13 23:10:10 +08:00
阿良仔
db3ef449fc
test(minifier): add tests for bigint string comparison ( #541 )
2023-07-13 11:44:03 +08:00
阿良仔
f0495ef924
feat(minifier): fold string number comparison ( #538 )
2023-07-11 21:50:51 +08:00
阿良仔
2d984f0401
feat(minifier): fold bigint number comparison ( #536 )
2023-07-10 23:11:28 +08:00
Don Isaac
fd899be4a9
feat(minifier): compress undefined variable declarations ( #532 )
2023-07-10 10:33:42 +08:00
Boshen
2e32140450
publish: bump all crates to v0.0.7
2023-07-06 14:27:13 +08:00
Boshen
19c68c8c57
chore(Cargo): change how crates are version and published
...
Let's publish everything under `oxc` instead of individual crates
2023-07-06 14:14:29 +08:00
Boshen
bc0b69e5e7
chore(rust): fix clippy
2023-07-04 16:09:51 +08:00
Wenzhe Wang
9e24dbb0fa
chore(minifier): remove unused param ( #494 )
2023-06-28 20:21:26 +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
阿良仔
26c3ece37c
feat: handle UnaryOpsWithBigInt ( #475 )
2023-06-25 22:37:36 +08:00
Wenzhe Wang
b8f5e3ad92
feat(minifier): try reduce void ( #457 )
2023-06-23 00:10:46 +08:00
Wenzhe Wang
a5ccc7da30
feat(minifier): port undefined_comparison1 ( #458 )
2023-06-20 22:25:28 +08:00
Boshen
527b94fba6
refactor(hir): use Cell for SymbolId instead of RefCell
2023-06-19 20:23:46 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate ( #460 )
2023-06-19 20:20:59 +08:00
Boshen
c4008d8014
perf(manger): use RefCell<SymbolId> instead of roundtrip with BTreeMap ( #455 )
2023-06-16 21:15: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
a79480b078
feat(minifier): separate mangler pass ( #439 )
2023-06-14 10:46:13 +08:00
Carter Snook
985b8f21d9
feat: support hashbang interpreter comments ( #431 )
2023-06-11 23:55:58 +08:00
Boshen
5c91fd54e3
feat(minifier): print [-In] Context ( #428 )
2023-06-11 16:44:48 +08:00
Wenzhe Wang
7c79fbc026
feat(minifier): try fold typeof ( #408 )
2023-06-07 10:44:28 +08:00