commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
0b188ccdff487bc5c344b0e70b102ce1d9ba308d
Ian Tan
2023-12-29T08:48:24
fix(es/parser): Disallowing await as an identifier in class static block (#8450)
diff --git a/crates/swc_ecma_parser/src/lib.rs b/crates/swc_ecma_parser/src/lib.rs index 9b5844a09c..6c8e0bb51e 100644 --- a/crates/swc_ecma_parser/src/lib.rs +++ b/crates/swc_ecma_parser/src/lib.rs @@ -394,6 +394,9 @@ pub struct Context { /// keyword. in_generator: bool, + /// If true, await is treated ...
6
52
3
daf6265af43a8e214adbcee67512bc292d0753ef
Donny/강동윤
2023-12-12T04:38:21
feat(es/ast): Add `as_import_with` to `ObjectLit` to provide easier API (#8405)
diff --git a/crates/swc_ecma_ast/src/expr.rs b/crates/swc_ecma_ast/src/expr.rs index a4638348b7..e883732306 100644 --- a/crates/swc_ecma_ast/src/expr.rs +++ b/crates/swc_ecma_ast/src/expr.rs @@ -24,7 +24,7 @@ use crate::{ TsAsExpr, TsConstAssertion, TsInstantiation, TsNonNullExpr, TsSatisfiesExpr, TsTypeAnn, ...
1
84
1
eb41cfcaf964af02120e064b4c2cc22fad8a13c7
SWC Bot
2023-12-11T04:46:28
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index cf45deb005..b06346966f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1087,7 +1087,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.89.97" +version = "0.89.98" dependencies = [ "anyhow", "clap ...
2
2
2
6a73d47aa132ea03abcf8008630ca1634bafe389
Donny/강동윤
2023-12-08T01:57:27
perf(common): Fix OOM of `inputSourceMap` (#8402) **Description:** The previous code was very strange, and it could easily cause OOM.
diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index cc121bee11..f5f9687670 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -1331,8 +1331,9 @@ impl SourceMap { if token.has_name() { name =...
1
3
2
19d1d013b2e0567a301bd7593db6e16b713e7490
magic-akari
2023-12-07T20:19:22
refactor(css/lints): Support stable rust (#8384) **Related issue:** - #8316
diff --git a/crates/swc_css_lints/src/lib.rs b/crates/swc_css_lints/src/lib.rs index 39064afb8b..f2fb077adb 100644 --- a/crates/swc_css_lints/src/lib.rs +++ b/crates/swc_css_lints/src/lib.rs @@ -1,5 +1,4 @@ #![deny(clippy::all)] -#![feature(box_patterns)] mod config; mod dataset; diff --git a/crates/swc_css_lints/...
4
51
59
f93f2b8334e82255c21d4abf23d474ee8c6fff73
magic-akari
2023-12-07T17:37:26
refactor(css/prefixer): Support stable rust (#8385) **Related issue:** - #8316
diff --git a/crates/swc_css_prefixer/src/lib.rs b/crates/swc_css_prefixer/src/lib.rs index f85d87497d..310edcb7b4 100644 --- a/crates/swc_css_prefixer/src/lib.rs +++ b/crates/swc_css_prefixer/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(box_patterns)] #![allow(clippy::vec_box)] pub use self::prefixer::prefixer; diff --gi...
2
91
89
bc1e32829deb4ebe91ebea5ce08b5c6bc95292a3
magic-akari
2023-12-07T16:57:26
refactor(css/compat): Support stable rust (#8386) **Related issue:** - #8316
diff --git a/crates/swc_css_compat/src/compiler/color_hex_alpha.rs b/crates/swc_css_compat/src/compiler/color_hex_alpha.rs index 6e66d35660..399b895402 100644 --- a/crates/swc_css_compat/src/compiler/color_hex_alpha.rs +++ b/crates/swc_css_compat/src/compiler/color_hex_alpha.rs @@ -22,9 +22,10 @@ fn shorten_hex_color(v...
7
92
91
e09f4b6c605ee70a5a2ec5026c521ef8f85ea3ba
Ronak Jain
2023-12-07T16:21:01
Use sha2 in place of sha-1 (#8383) **Descrption:** `sha-1` crate has been deprecated and the algorithm itself is not considered secure or collision-proof. Moving to `sha2` solves this. **Related issue:** - Closes #8382
diff --git a/Cargo.lock b/Cargo.lock index 3f4b44e516..f9c45cf91e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4675,7 +4675,7 @@ version = "0.22.12" dependencies = [ "anyhow", "hex", - "sha-1", + "sha2", "testing", "tracing", ] @@ -4915,7 +4915,7 @@ dependencies = [ "hex", "serde", "serde_json", - "sha-...
5
8
8
7cddbc618a189446d7f781a5c11f6f02bf7504e3
magic-akari
2023-12-04T20:54:14
refactor(css/codegen): Support stable rust (#8379) **Related issue:** - #8316
diff --git a/crates/swc_css_codegen/src/lib.rs b/crates/swc_css_codegen/src/lib.rs index 5af044875d..1ccd1ec895 100644 --- a/crates/swc_css_codegen/src/lib.rs +++ b/crates/swc_css_codegen/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(box_patterns)] #![deny(clippy::all)] #![allow(clippy::needless_update)] @@ -1050,25 +1049...
1
39
40
77145ce47ab66a1dbcbd614fc66886bfbec5f4f7
magic-akari
2023-12-04T20:14:44
refactor(html/minifier): Support stable rust (#8380) **Related issue:** - #8316
diff --git a/crates/swc_html_minifier/src/lib.rs b/crates/swc_html_minifier/src/lib.rs index 472e0df30d..7a851f99b7 100644 --- a/crates/swc_html_minifier/src/lib.rs +++ b/crates/swc_html_minifier/src/lib.rs @@ -1,5 +1,4 @@ #![deny(clippy::all)] -#![feature(box_patterns)] use std::{borrow::Cow, cmp::Ordering, mem::t...
1
16
20
0ff4157375715b9bf6cf1ef791742707a24cfd70
magic-akari
2023-12-04T19:32:54
refactor(css/modules): Support stable rust (#8381) **Related issue:** - #8316
diff --git a/crates/swc_css_modules/src/imports.rs b/crates/swc_css_modules/src/imports.rs index 1ef96f9794..05bba24961 100644 --- a/crates/swc_css_modules/src/imports.rs +++ b/crates/swc_css_modules/src/imports.rs @@ -2,8 +2,7 @@ use swc_atoms::JsWord; use swc_css_ast::{ - ComponentValue, Declaration, Declarati...
2
21
24
4870e8b47e74939321c2e46ce0a1246ec957d342
magic-akari
2023-12-04T18:51:26
refactor(css/parser): Support stable rust (#8378) **Related issue:** - #8316
diff --git a/crates/swc_css_parser/src/lib.rs b/crates/swc_css_parser/src/lib.rs index b0f7252900..b8ff4b6ddd 100644 --- a/crates/swc_css_parser/src/lib.rs +++ b/crates/swc_css_parser/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(box_patterns)] #![cfg_attr(docsrs, feature(doc_cfg))] #![deny(unused_must_use)] #![deny(clippy...
5
119
159
91e0fc7250bed3ccf7078938e67e8ed23a539b56
Redfire
2023-12-03T01:12:30
chore(deps): Update `indexmap` to `v2` (#8370) **Description:** Updates `indexmap` to `v2`, reducing dependency duplication. Unfortunately there are still many dependencies that require `v1`, including `rkyv` and `cranelift-egraph` that have no published versions using indexmap `v2`.
diff --git a/Cargo.lock b/Cargo.lock index 174003b3a0..93c2b65a29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1831,7 +1831,6 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "rayon", "serde", ] @@ -1843,6 +1842,8 @@ checksum = ...
15
31
30
c2d1a6c9fee715d72594389360b47ed2395d8745
Redfire
2023-12-02T11:40:56
chore(deps): Update `base64` to `v0.21` (#8369)
diff --git a/Cargo.lock b/Cargo.lock index 721420b482..edeecaf20e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,12 +284,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" -[[package]] -name = "base6...
12
53
37
1e8edb4769874eda94d862caee1b25513143a80e
David Sherret
2023-12-01T20:06:12
chore(atoms): Evaluate `.into()` in `AtomStoreCell` eagerly (#8363) **Related issue:** - Closes #8362
diff --git a/crates/swc_atoms/src/lib.rs b/crates/swc_atoms/src/lib.rs index 7aa557e83b..8b19f66862 100644 --- a/crates/swc_atoms/src/lib.rs +++ b/crates/swc_atoms/src/lib.rs @@ -238,6 +238,8 @@ pub struct AtomStoreCell(UnsafeCell<AtomStore>); impl AtomStoreCell { #[inline] pub fn atom<'a>(&self, s: impl Int...
1
2
0
2cdea3fbeaf4a2dac662a4d019982943c0a896ba
bohan
2023-11-29T14:09:44
fix(es/codegen): Wrap quote for length greater than one (#8351)
diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index 101c44b01d..082bc94702 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -3820,7 +3820,7 @@ fn get_ascii_only_ident(sym: &str, target: EsVersion) -> Cow<str> { le...
2
23
1
a423681df897956e58650b3acc9f2331887e42e8
Han Seung Min - 한승민
2023-11-26T11:36:05
fix(es/parser): Fix conditional compilation (#8343) **Description:** `swc_ecma_parser` crate has a `typescript` feature which enables TS parsing, the `Syntax::Typescript` variant is behind the `typescript` feature, compiling without this feature fails as `Syntax::Typescript` is referenced at many places without `#[...
diff --git a/crates/swc_ecma_parser/src/lib.rs b/crates/swc_ecma_parser/src/lib.rs index 6f45a07167..9b5844a09c 100644 --- a/crates/swc_ecma_parser/src/lib.rs +++ b/crates/swc_ecma_parser/src/lib.rs @@ -171,6 +171,7 @@ impl Syntax { auto_accessors: true, .. }) => true, + ...
2
33
17
13156157ebf9434fef8ed04ee4cf59c22421a3fa
Redfire
2023-11-23T11:20:12
build(cargo): Update `vergen` to `v8` (#8325) **Description:** Updates `vergen` build dependency in `swc_core` to v8. This reduces the amount of dependency duplication. In my case in particular, it allows me to remove `syn` v1 from my [repository](https://github.com/redfire75369/spiderfire).
diff --git a/Cargo.lock b/Cargo.lock index 07d0910ee1..8bb398c59b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1241,16 +1241,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" dependencies = [ - "enum-i...
3
12
69
e9fa6e90c827982cc2d16aab02010271d8251870
강동윤 (Donny)
2023-11-20T17:28:23
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index d5a91cd65c..2b854d6aa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2754,7 +2754,7 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "preset_env_base" -version = "0.4.7" +version = "0.4.8" dependencies = [ "ahash 0.8.5",...
4
4
4
25ac679bd3906c09212134859df9c75f38018822
David Sherret
2023-11-15T23:36:38
build(es): Remove duplicate `phf` dependency (#8294)
diff --git a/Cargo.lock b/Cargo.lock index 62a9a25f7c..ea309b4d5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1639,7 +1639,7 @@ checksum = "e1f8f73ec6174bb83c7a1239dce719901936ede000e343b189f242db15146d47" dependencies = [ "new_debug_unreachable", "once_cell", - "phf 0.11.2", + "phf", "rustc-hash", "smallvec"...
3
8
33
66a4d370314d45b5d4a0117401002ac43dbcba0a
David Sherret
2023-11-15T22:43:22
build(common): Remove dependency on `string-cache` (#8291)
diff --git a/Cargo.lock b/Cargo.lock index 84fe15c343..93dfa50ae6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3891,7 +3891,6 @@ dependencies = [ "serde_json", "siphasher", "sourcemap", - "string_cache", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", diff --git a/crates/swc_bundler/src/bundler/load.rs b/...
4
2
19
7d1836de3fd96786351f5ae30c2b0e7bbda2fa55
Zak
2023-11-15T22:02:29
perf(es/minifier): Improve `format.inline_script` (#8292)
diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index c4d33bb470..441c3a9c39 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -78,50 +78,32 @@ where fn replace_close_inline_script(raw: &str) -> Cow<str> { let chars = raw.as_bytes(); ...
1
23
41
f059270348a7ee26ee8ed2d185ba71d166f43e14
bohan
2023-11-14T21:37:05
feat(es/minifier): Support `format.inline_script` (#8252)
diff --git a/crates/swc_ecma_codegen/src/config.rs b/crates/swc_ecma_codegen/src/config.rs index 90ff3f84d4..431028297c 100644 --- a/crates/swc_ecma_codegen/src/config.rs +++ b/crates/swc_ecma_codegen/src/config.rs @@ -36,6 +36,9 @@ pub struct Config { #[cfg_attr(feature = "serde-impl", serde(default))] pub...
4
151
3
302954e4e54b7190c88667534c2dd6105f744f90
Donny/강동윤
2023-11-09T21:50:33
perf(css/parser): Use `AtomStoreCell` (#8247)
diff --git a/crates/swc_css_parser/src/lexer/mod.rs b/crates/swc_css_parser/src/lexer/mod.rs index 8185902864..aa5fae9deb 100644 --- a/crates/swc_css_parser/src/lexer/mod.rs +++ b/crates/swc_css_parser/src/lexer/mod.rs @@ -1,6 +1,6 @@ use std::{borrow::Cow, cell::RefCell, char::REPLACEMENT_CHARACTER, rc::Rc}; -use s...
1
21
28
9a4bad4e9ec67a09761398eae5e6bb37e6d0d94f
Donny/강동윤
2023-11-09T03:45:59
refactor(atoms): Improve APIs (#8249)
diff --git a/Cargo.lock b/Cargo.lock index 9eed4d33dd..432674f6b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1633,9 +1633,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-l...
3
34
51
a5a6eb53a56faa8e224f59f5cd967e5075c12edd
David Sherret
2023-11-09T00:59:20
perf(atoms): Introduce `AtomStoreCell` (#8232)
diff --git a/crates/swc_atoms/src/lib.rs b/crates/swc_atoms/src/lib.rs index 2b20f40353..ac1e14a710 100644 --- a/crates/swc_atoms/src/lib.rs +++ b/crates/swc_atoms/src/lib.rs @@ -247,3 +247,18 @@ impl AtomStore { Atom(self.0.atom(s)) } } + +/// A fast internally mutable cell for [AtomStore]. +#[derive(De...
5
44
33
a3c03b30fb3aa19cb590addbf47b0583d1b05dad
Donny/강동윤
2023-11-07T12:38:54
perf(css/parser): Use `AtomStore` (#8238) **Related issue:** - Closes #8237.
diff --git a/crates/swc_css_parser/src/lexer/mod.rs b/crates/swc_css_parser/src/lexer/mod.rs index 42c11b389c..8185902864 100644 --- a/crates/swc_css_parser/src/lexer/mod.rs +++ b/crates/swc_css_parser/src/lexer/mod.rs @@ -1,6 +1,6 @@ -use std::{cell::RefCell, char::REPLACEMENT_CHARACTER, rc::Rc}; +use std::{borrow::Co...
5
69
40
c01454ad4165d5e6ba58dc2b3b72910bbbc3a518
Donny/강동윤
2023-11-07T09:52:21
perf(atoms): Update `hstr` to make global APIs fast (#8241) **Related issue:** - https://github.com/dudykr/ddbase/pull/14
diff --git a/Cargo.lock b/Cargo.lock index 532dc6f903..136d9e5e29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1633,11 +1633,10 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust...
2
3
4
37657b8bd53d848035040f31a386029ef4af7cea
David Sherret
2023-11-07T08:52:14
perf(es/lexer): Remove needless clones of `Rc<RefCell<AtomStore>>` (#8231) Removes some clones of `self.atom`. `> cargo "bench" "--package" "swc_ecma_parser" "--bench" "parser" "--" "three"` Main: ~38.2ms This PR: ~37.8ms
diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index a37842e220..58a2cdbfca 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -767,9 +767,8 @@ impl<'a> Lexer<'a> { fn read_ident_unknown(&mut self) -> LexResult<Token...
2
12
19
aa22746d034c2579bcb0f0404866ff933b9037ba
Donny/강동윤
2023-11-07T00:51:43
perf(atoms): Replace `string-cache` with `hstr` (#8126) **Description:** `hstr` is an alternative for `string-cache` which does not support static strings and does not use a global mutex. **Related issue:** - Closes #4946. - Closes #7974.
diff --git a/Cargo.lock b/Cargo.lock index f9084c9e61..0725fa1bd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1037,12 +1037,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1...
11
133
135
d4ae44ac4547ad0964bb4c3bc482c9a23c13feb9
Donny/강동윤
2023-11-06T10:45:46
perf(es/parser): Use smarter lookup table for lexer (#8226) **Description:** `phf` is slower than expected.
diff --git a/crates/swc_ecma_ast/src/ident.rs b/crates/swc_ecma_ast/src/ident.rs index b684247a27..7b9b4d58dd 100644 --- a/crates/swc_ecma_ast/src/ident.rs +++ b/crates/swc_ecma_ast/src/ident.rs @@ -151,6 +151,12 @@ impl From<Ident> for Id { } } +#[repr(C, align(64))] +struct Align64<T>(pub(crate) T); + +const ...
3
303
74
495268f12611161285536ccbc03304a1bf1589d0
Austaras
2023-11-06T09:57:49
chore(bindings/node): Upgrade jemalloc (#8227) **Description:** To get rid of rustc warning.
diff --git a/Cargo.lock b/Cargo.lock index ae1ff492b4..048fe069b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5572,20 +5572,19 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-in...
2
5
6
e3e439dba638cd631560d2eb0c2b0ec4db288e68
Donny/강동윤
2023-11-06T05:28:30
perf(es/parser): Improve performance (#8224) **Description:** Small things
diff --git a/Cargo.lock b/Cargo.lock index aef70d528f..6621f73b45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4530,6 +4530,7 @@ version = "0.141.10" dependencies = [ "criterion", "either", + "new_debug_unreachable", "num-bigint", "num-traits", "phf 0.11.2", diff --git a/crates/swc_common/src/input.rs b/crat...
5
47
46
b745ed7ac8a87582d43fb2f975f53ad96ed3477b
Donny/강동윤
2023-11-06T04:46:43
perf(es/minifier): Remove needless operations for char freq analysis (#8222) **Description:** This skips a string search operation, which is quite costly, without affecting the output.
diff --git a/crates/swc_bundler/src/hash.rs b/crates/swc_bundler/src/hash.rs index 5fc467bd58..e70eab7a55 100644 --- a/crates/swc_bundler/src/hash.rs +++ b/crates/swc_bundler/src/hash.rs @@ -126,4 +126,8 @@ impl WriteJs for &mut Hasher<'_> { fn commit_pending_semi(&mut self) -> io::Result<()> { Ok(()) ...
6
49
4
3833cf4e55a27982c930c18c901a9b06e60f92fc
Donny/강동윤
2023-11-06T04:16:35
perf(es/parser): Remove needless `strcmp` ops (#8223) **Description:** ## The current `main` ``` es/parser/angular time: [7.9848 ms 8.0003 ms 8.0243 ms] ``` ## This PR ``` es/parser/angular time: [7.3380 ms 7.3498 ms 7.3663 ms] ```
diff --git a/Cargo.lock b/Cargo.lock index a3e0bbcba9..5c9198f80b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2598,18 +2598,38 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ - "phf_...
7
194
171
67e2c4a4fd17436732099422c25d1c0d82f815dd
bohan
2023-11-04T08:26:25
perf(es): Delete useless partition and extend in comments (#8214) I've used `bizcharts` as a benchmark, and: before this PR 17s: <img width="288" alt="image" src="https://github.com/web-infra-dev/rspack/assets/30187863/35232863-247a-4825-a08f-977de46e7216"> after this PR 1.7s: <img width="585" alt="image...
diff --git a/crates/swc/src/dropped_comments_preserver.rs b/crates/swc/src/dropped_comments_preserver.rs index 3899ef2f24..b0c15a55b1 100644 --- a/crates/swc/src/dropped_comments_preserver.rs +++ b/crates/swc/src/dropped_comments_preserver.rs @@ -100,16 +100,14 @@ impl DroppedCommentsPreserver { fn shift_leading_c...
1
10
14
a00f575837a44a14dd09dd634f45a64e138263b0
magic-akari
2023-11-04T02:13:27
perf(es/typescript): Visit ts import/export only once (#8213) **Description:** Move `visit_mut_for_ts_import_export` into `visit_mut_module` to make sure we only visit the top-level items.
diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 41384d8008..70497ae8e1 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -90,9 +90,13 @@ impl VisitMut for ...
1
51
26
c061356b63431fcd0323e434402ead143c622340
Donny/강동윤
2023-11-02T03:29:59
fix(es/transforms): Do not add `PURE` comment to `BytePos(0)` (#8207) **Related issue:** - https://github.com/vercel/next.js/pull/57904 (CI failed)
diff --git a/crates/swc_ecma_compat_es2015/src/classes/mod.rs b/crates/swc_ecma_compat_es2015/src/classes/mod.rs index 1f36c13864..21df2a1e05 100644 --- a/crates/swc_ecma_compat_es2015/src/classes/mod.rs +++ b/crates/swc_ecma_compat_es2015/src/classes/mod.rs @@ -243,9 +243,9 @@ where fn visit_mut_expr(&mut self, n...
3
26
10
5ca3b6358219ec71a000fa30d8be14ee2c3f2fc8
Donny/강동윤
2023-10-24T00:01:58
build(deps): Update `ahash` (#8174)
diff --git a/Cargo.lock b/Cargo.lock index be496936a0..a8220c731f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang...
5
36
15
02d0613a35a3875ad3b0c0b008cf063bd162bc07
David Sherret
2023-10-23T20:40:16
fix(es/typescript): Support `ts_enum_is_mutable` with const enums (#8171)
diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 568999a535..156743fbf7 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -84,7 +84,7 @@ impl VisitMut for T...
2
49
5
cf92d8fbe75d5cd93f1cd8a5f8ac21dde587ad47
SWC Bot
2023-10-21T11:36:36
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 4863d83878..7d42f64e0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1055,7 +1055,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.89.13" +version = "0.89.14" dependencies = [ "anyhow", "clap ...
2
2
2
13106e0d2eaa08c4c74f58205f57c4f2d7d4479f
Austaras
2023-10-19T19:37:37
refactor(es/minifier): Decouple `assign_count` from `reassigned` (#8137)
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index 3851696b91..980bc44425 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -174,7 +174,7 @@ impl Opti...
5
35
39
8d7894c71f86ef6b1813b69a15d72bb7911ed7ca
pshu
2023-10-19T17:10:48
fix(css/ast): Make `.hash()` of `Token` not recursive (#8151)
diff --git a/crates/swc_css_ast/src/token.rs b/crates/swc_css_ast/src/token.rs index 548622072e..24f1328cd8 100644 --- a/crates/swc_css_ast/src/token.rs +++ b/crates/swc_css_ast/src/token.rs @@ -264,9 +264,7 @@ impl Hash for Token { | Token::LParen | Token::RParen | Token::LBrace ...
1
1
3
bffe33a27036d01d409bad3fcc69d35157665662
David Sherret
2023-10-18T04:22:03
feat(es/parser): Implement `AsRef<str>` for `IdentLike` (#8133)
diff --git a/crates/swc_ecma_parser/src/token.rs b/crates/swc_ecma_parser/src/token.rs index 2cdca050dd..8e5444d7b8 100644 --- a/crates/swc_ecma_parser/src/token.rs +++ b/crates/swc_ecma_parser/src/token.rs @@ -583,6 +583,15 @@ impl From<&'_ str> for IdentLike { } } +impl AsRef<str> for IdentLike { + fn as_r...
1
9
0
57b171dcbe55a8d285d5bc477844b24fdf48835a
David Sherret
2023-10-15T08:22:47
feat(es/typescript): Add `ts_enum_is_mutable` to disable enum inlining (#8115) **Related issue:** - Closes #8114.
diff --git a/crates/swc_ecma_transforms_typescript/src/config.rs b/crates/swc_ecma_transforms_typescript/src/config.rs index 6939b0efc3..e93d9a99b8 100644 --- a/crates/swc_ecma_transforms_typescript/src/config.rs +++ b/crates/swc_ecma_transforms_typescript/src/config.rs @@ -18,6 +18,14 @@ pub struct Config { #[s...
4
46
6
95eb147742ea1aa207845807a306847afc859702
Donny/강동윤
2023-10-12T04:04:10
refactor(es/preset-env): Rename parameter to avoid confusion (#8106) **Related issue:** - Closes #8103
diff --git a/crates/swc_ecma_preset_env/src/lib.rs b/crates/swc_ecma_preset_env/src/lib.rs index 65c5dd3e23..b715b4f231 100644 --- a/crates/swc_ecma_preset_env/src/lib.rs +++ b/crates/swc_ecma_preset_env/src/lib.rs @@ -36,7 +36,7 @@ mod regenerator; mod transform_data; pub fn preset_env<C>( - global_mark: Mark, ...
1
22
12
11f31da3862399d1998fd788f597a9dcdeaf6858
강동윤 (Donny)
2023-10-12T01:17:52
chore(xtask): Bump version correctly
diff --git a/xtask/src/npm/nightly.rs b/xtask/src/npm/nightly.rs index 339e4b5d3a..e567c89ee9 100644 --- a/xtask/src/npm/nightly.rs +++ b/xtask/src/npm/nightly.rs @@ -85,6 +85,10 @@ fn find_first_nightly(prev_version: &semver::Version, date: &str) -> Result<Vers for i in 1.. { ver.pre = Prerelease::new(&f...
1
4
0
d3c548843b33b38eddc40a6d93cf17f491af0ef6
SWC Bot
2023-10-12T01:15:58
chore: Publish 1.3.93-nightly-20231012.1
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bb2f2cd70e..8695088e40 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -2953,7 +2953,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.83" +version = "0.91.84" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bi...
2
2
2
4cb383d339c8d121813c98350515bc5bae2f0885
SWC Bot
2023-10-12T01:12:25
chore: Publish 1.3.93-nightly-20231012.1
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index f5857f2993..bb2f2cd70e 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -2953,7 +2953,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.82" +version = "0.91.83" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bi...
2
2
2
372f78ce12d7b5e54ea71de642658aead7c2ead7
강동윤 (Donny)
2023-10-11T23:26:00
chore(xtask): Typo
diff --git a/xtask/src/npm/nightly.rs b/xtask/src/npm/nightly.rs index 3ea5fed6d9..339e4b5d3a 100644 --- a/xtask/src/npm/nightly.rs +++ b/xtask/src/npm/nightly.rs @@ -83,7 +83,7 @@ fn find_first_nightly(prev_version: &semver::Version, date: &str) -> Result<Vers } for i in 1.. { - ver.pre = Prerelease...
1
1
1
b8c57870fa55840d8f7045b1b1f31bd0095bc6c1
강동윤 (Donny)
2023-10-11T23:17:48
chore(xtask): Inherit stderr
diff --git a/xtask/src/npm/util.rs b/xtask/src/npm/util.rs index e8d472195a..b79316a4b4 100644 --- a/xtask/src/npm/util.rs +++ b/xtask/src/npm/util.rs @@ -1,4 +1,4 @@ -use std::process::Command; +use std::process::{Command, Stdio}; use anyhow::{Context, Result}; use cargo_metadata::MetadataCommand; @@ -40,7 +40,7 @...
1
8
5
bd254f67d4367bf550088f89bb021fc97c503a26
강동윤 (Donny)
2023-10-11T23:00:17
chore(xtask): Create a git tag
diff --git a/xtask/src/npm/nightly.rs b/xtask/src/npm/nightly.rs index c0a3bf2196..da0bbf5c65 100644 --- a/xtask/src/npm/nightly.rs +++ b/xtask/src/npm/nightly.rs @@ -46,7 +46,7 @@ impl NightlyCmd { .status() .context("git add failed")?; - // git commit --no-ve...
1
11
1
db4ca650e445e602f289f7964b24f7e2647beacd
Donny/강동윤
2023-10-11T22:55:29
fix(xtask): Fix nightly command (#8105)
diff --git a/xtask/src/npm/nightly.rs b/xtask/src/npm/nightly.rs index b8455379fd..c0a3bf2196 100644 --- a/xtask/src/npm/nightly.rs +++ b/xtask/src/npm/nightly.rs @@ -12,6 +12,7 @@ use crate::{ #[derive(Debug, Args)] pub(super) struct NightlyCmd { + #[clap(long)] git: bool, } @@ -52,7 +53,7 @@ impl Night...
1
2
1
3b449e3bcaaf90ae72493133e7c88099b0733ebc
Donny/강동윤
2023-10-10T06:47:27
chore(xtask): Add `git reduce core-ver` (#8088) **Description:** This command should be useful for reducing regressions to commits.
diff --git a/Cargo.lock b/Cargo.lock index c87cc95952..1dbb76e9ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -510,7 +510,7 @@ dependencies = [ "bitflags 1.3.2", "clap_derive 3.2.25", "clap_lex 0.2.4", - "indexmap", + "indexmap 1.9.3", "once_cell", "strsim", "termcolor", @@ -767,7 +767,7 @@ dependencies = [...
7
291
35
7073e83f65ed5e98ee294c8e366a80b0a0f5921f
Donny/강동윤
2023-10-08T02:03:50
fix(ci): Fix CI (#8079)
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index c719fba68e..8255d98b64 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -242,9 +242,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.57.36" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-...
7
83
83
9b9bc51c28fee51de9eeedf6d49fbe115d6052e6
Donny/강동윤
2023-10-06T00:09:48
refactor(es/parser): Introduce `TokenKind` along with `Token` (#8071) **Description:** This is extracted from https://github.com/swc-project/swc/pull/7790 because this PR is extremely large PR. I'll switch to `TokenKind` gradually.
diff --git a/crates/swc_common/src/syntax_pos.rs b/crates/swc_common/src/syntax_pos.rs index 96e95a585a..a90dbce073 100644 --- a/crates/swc_common/src/syntax_pos.rs +++ b/crates/swc_common/src/syntax_pos.rs @@ -49,6 +49,20 @@ pub struct Span { pub ctxt: SyntaxContext, } +impl From<(BytePos, BytePos)> for Span {...
14
505
218
3e5b062cd2792703371bbbfeaf1be309e8280abd
magic-akari
2023-10-05T09:15:27
refactor(es/module): Reimplement some functions of module/typescript (#8063)
diff --git a/crates/swc_ecma_transforms_module/src/amd.rs b/crates/swc_ecma_transforms_module/src/amd.rs index c4f3d136f6..59063a505c 100644 --- a/crates/swc_ecma_transforms_module/src/amd.rs +++ b/crates/swc_ecma_transforms_module/src/amd.rs @@ -5,20 +5,22 @@ use swc_atoms::{js_word, JsWord}; use swc_common::{ c...
10
406
368
725f7f5bda0881bdaac1bf1254f58e5341633d4e
Donny/강동윤
2023-09-29T10:59:43
refactor(es/minifier): Move JS options to `swc_ecma_minifier` (#8028) **Description:** This is not a public API, though.
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 4372263eba..147662910f 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -44,6 +44,7 @@ use swc_ecma_loader::{ resolvers::{lru::CachingResolver, node::NodeModulesResolver, tsc::TsConfigResolver}, Targe...
3
212
200
58172689ce7f8dd2f0a79d8771c52fe309880b44
magic-akari
2023-09-27T14:34:59
fix(es/typescript): Rename wrong `unresolved_mark` (#8018) **Related issue:** - Closes: #8016
diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 1f98738d7b..acda6c0111 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -49,7 +49,7 @@ use crate::{ /// [...
3
34
36
f374ad903a066ebf3a7e54a3656cb3fc44b37445
Donny/강동윤
2023-09-24T23:39:12
fix(es): Enable resolver if `jsc.baseUrl` is specified (#7998) **Related issue:** - Closes #7990
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 0dbb836cd7..fc8eb4b753 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -1587,13 +1587,14 @@ impl ModuleConfig { config: Option<ModuleConfig>, available_features: FeatureFlag, ) -> Box<dy...
1
3
2
2dac39304dc09fcf03ab2f5afdf1e15d05fca602
강동윤 (Donny)
2023-09-18T22:09:26
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 93c4196434..9891d2b375 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -964,7 +964,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.87.17" +version = "0.87.18" dependencies = [ "anyhow", "clap 3....
4
4
4
76b7a747adcc17d9dba375d06a7539ccca6b8c06
강동윤 (Donny)
2023-09-18T22:05:57
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 11343f80e6..93c4196434 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -964,7 +964,7 @@ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "dbg-swc" -version = "0.87.16" +version = "0.87.17" dependencies = [ "anyhow", "clap 3....
4
4
4
f7b5e16aef968c9c9f38f40962edf334cc3983e6
magic-akari
2023-09-18T14:39:53
refactor(es/lint): Remove usage of `box_patterns` (#7966) **Related issue:** - Closes #7964
diff --git a/crates/swc_ecma_lints/src/lib.rs b/crates/swc_ecma_lints/src/lib.rs index d06a038506..af91c07f27 100644 --- a/crates/swc_ecma_lints/src/lib.rs +++ b/crates/swc_ecma_lints/src/lib.rs @@ -1,6 +1,5 @@ #![cfg_attr(feature = "non_critical_lints", deny(unused))] #![cfg_attr(feature = "non_critical_lints", deny...
3
39
39
005ddc573e3752183783cc25dd6242b750f8beb5
Donny/강동윤
2023-09-18T13:20:23
chore(es/preset-env): Ignore `tp` in the version of a browser version (#7968)
diff --git a/crates/swc_ecma_preset_env/src/transform_data.rs b/crates/swc_ecma_preset_env/src/transform_data.rs index ab907b1cbc..11424f9fab 100644 --- a/crates/swc_ecma_preset_env/src/transform_data.rs +++ b/crates/swc_ecma_preset_env/src/transform_data.rs @@ -201,7 +201,17 @@ pub(crate) static FEATURES: Lazy<AHashMa...
1
11
1
be5b02a8cfe2a2c1c399a4f9404b8fd097084234
Donny/강동윤
2023-09-15T12:36:25
fix(es/module): Preserve import specifier if resolving fails (#7955) **Related issue:** - https://github.com/vercel/next.js/pull/55216 This PR fixes a regression caught by the PR above.
diff --git a/crates/swc_ecma_transforms_module/src/path.rs b/crates/swc_ecma_transforms_module/src/path.rs index 3f74d07bc7..7c33109ef7 100644 --- a/crates/swc_ecma_transforms_module/src/path.rs +++ b/crates/swc_ecma_transforms_module/src/path.rs @@ -193,13 +193,8 @@ where target_path.display().to_string()...
1
14
6
ca22359dbd0ca6e2e925bdc240939f6bd6e9ac9a
Gábor Szabó
2023-09-15T08:23:23
chore(es/preset-env): Add the repository url to `Cargo.toml` (#7941)
diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index 51f6051b26..4400cff776 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -2,6 +2,7 @@ authors = ["강동윤 <kdy1997.dev@gmail.com>"] description = "preset-env for the swc...
1
1
0
97068e12d16803012a4859114702577def024a36
Austaras
2023-09-10T06:27:30
fix(es/compat): Visit assign expr in generator (#7932) **Related issue:** - Closes #7809
diff --git a/crates/swc_ecma_transforms_compat/src/es2015/generator.rs b/crates/swc_ecma_transforms_compat/src/es2015/generator.rs index a6da0916a0..a409203a50 100644 --- a/crates/swc_ecma_transforms_compat/src/es2015/generator.rs +++ b/crates/swc_ecma_transforms_compat/src/es2015/generator.rs @@ -572,72 +572,70 @@ imp...
2
103
61
8db968a25d508a0d28d15d556ad121951f39ae0d
Austaras
2023-08-30T03:01:29
refactor(es/minifier): Remove `mutated` and `mutation_by_call_count` (#7890) **Description:** `mutated` can be seen as a combination of `reassigned` and `has_property_mutation`, and `mutation_by_call_count` is simply useless.
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index 15c20bcaa7..0bd90c936e 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -98,9 +98,7 @@ impl Optimi...
6
20
46
01cbd6edbd37c95ece7ca20ad2f6c85d6c1b6e35
Donny/강동윤
2023-08-30T02:23:57
chore(deps): Update `memchr` (#7891)
diff --git a/Cargo.lock b/Cargo.lock index b94d877443..526b85957c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1955,9 +1955,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b75...
2
3
3
a50501255d2a91f2bbc1ce9767689dc4fad540cc
Donny/강동윤
2023-08-29T05:04:11
perf(es/transforms): Remove wrong parallelism (#7889)
diff --git a/crates/swc_ecma_transforms_macros/src/parallel.rs b/crates/swc_ecma_transforms_macros/src/parallel.rs index 006ee04400..2a0da6eddb 100644 --- a/crates/swc_ecma_transforms_macros/src/parallel.rs +++ b/crates/swc_ecma_transforms_macros/src/parallel.rs @@ -1,3 +1,5 @@ +#![allow(non_snake_case)] + use pmutil:...
3
23
242
057bd5f3efe55077a5a8e7f627e80175c8af2bd0
David Sherret
2023-08-29T01:39:05
fix(es/dep-graph): Analyze import type children (#7883) **Description:** It was not analyzing children of a dynamic imports.
diff --git a/crates/swc_ecma_dep_graph/src/lib.rs b/crates/swc_ecma_dep_graph/src/lib.rs index 64e3eb11ed..e94780e9a5 100644 --- a/crates/swc_ecma_dep_graph/src/lib.rs +++ b/crates/swc_ecma_dep_graph/src/lib.rs @@ -177,6 +177,7 @@ impl<'a> Visit for DependencyCollector<'a> { specifier_span: node.arg.span, ...
1
44
0
3180e68bf27fb95ff00bd24677ae7e96b3aa6c62
Donny/강동윤
2023-08-27T18:23:32
fix(es/compat): Apply transforms for explicit resource management (#7881) **Related issue:** - Closes #7879
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 6b86cab03a..003a6c9d41 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -57,7 +57,10 @@ use swc_ecma_transforms::{ modules::{path::NodeImportResolver, rewriter::import_rewriter}, optimization::{const_...
3
11
4
854e2e78b38699fd09c65074a38a21d1d9836002
Donny/강동윤
2023-08-25T03:32:44
chore(ci): Fix CI (#7857)
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 2f1f56f0bb..e144164ad8 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -242,9 +242,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.53.66" +version = "0.55.1" source = "registry+https://github.com/rust-lang/crates.io-...
4
71
71
c65732496e4e2aab664b7443a29f5180cba6e965
Donny/강동윤
2023-08-24T12:56:38
refactor(common): Mark some methods of `Input` unsafe (#7848) **Related issue:** - Closes #7709
diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs index 246a98b1d9..b08277c4ca 100644 --- a/crates/swc_common/src/input.rs +++ b/crates/swc_common/src/input.rs @@ -46,7 +46,10 @@ impl<'a> StringInput<'a> { #[inline] pub fn bump_bytes(&mut self, n: usize) { - self.reset_to(s...
10
360
102
9099883175c590106109670de01ab32b33303bfd
Donny/강동윤
2023-08-17T14:35:39
feat(es/module): Improve error message about relative `jsc.baseUrl` (#7827)
diff --git a/crates/swc_ecma_transforms_module/src/path.rs b/crates/swc_ecma_transforms_module/src/path.rs index abc448767b..7f10d7e527 100644 --- a/crates/swc_ecma_transforms_module/src/path.rs +++ b/crates/swc_ecma_transforms_module/src/path.rs @@ -103,8 +103,14 @@ where if let Some(base_dir) = &base_dir { ...
1
8
2
981d7b152b2f488a67d42052152db22225f1d094
David Sherret
2023-08-16T18:02:05
refactor(common): Make `ahash` optional (#7816) **Description:** This adds the ability to not include `ahash` with swc_common, which caused some issues for me compiling dprint-plugin-typescript to Wasm because of: ``` Compiling ahash v0.8.3 Compiling getrandom v0.2.10 error: the wasm*-unknown-unknown ...
diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index e750070bcc..9f60ed0737 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -37,7 +37,6 @@ serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.4.5" swc_cor...
7
13
15
b43e38d3f92bc889e263b741dbe173a6f2206d88
David Sherret
2023-08-16T14:16:52
refactor: Use `ahash` from `swc_common` in more places (#7815) **Description:** Uses ahash from swc_common in more places. This allows for more easily swapping out ahash with rustc_hash.
diff --git a/Cargo.lock b/Cargo.lock index 5cdddb58aa..9f80ca40e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3527,7 +3527,6 @@ dependencies = [ name = "swc" version = "0.264.57" dependencies = [ - "ahash 0.8.3", "ansi_term", "anyhow", "base64 0.13.1", @@ -3598,7 +3597,6 @@ dependencies = [ name = "swc_bundl...
40
82
88
8b809dbe23cab3db2159979cf1852a69c109f1e0
Donny/강동윤
2023-08-16T13:24:35
refactor(es/parser): Remove needless `unsafe` (#7818) **Related issue:** - Closes #7797
diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index 2e818cfab9..387389f9b1 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -55,6 +55,7 @@ impl From<u32> for Char { pub(crate) struct CharIter(SmallVec<[char; 7]>); ...
1
19
10
478fa4736f355555c7a19e7b674db5d7bd81c0e2
Johnil Quezada
2023-08-16T02:10:51
feat(es/ast): Expose `Archived` types (#7811) **Description:** For crates using both `rkyv` and `swc`, where ast nodes from `swc_ecma_ast` are included in data that's serialized with `rkyv`, it's difficult to access the archived data from the archived ast nodes since the types are private. More context in the...
diff --git a/crates/swc_common/src/lib.rs b/crates/swc_common/src/lib.rs index da7a7a58a6..1476bb17c5 100644 --- a/crates/swc_common/src/lib.rs +++ b/crates/swc_common/src/lib.rs @@ -78,3 +78,15 @@ pub mod util; #[cfg(all(not(debug_assertions), feature = "plugin-rt", feature = "plugin-mode"))] compile_error!("You c...
2
109
0
5e7834aa2ecb0cd01b72979f393a517f1c1e5add
Manish Goregaokar
2023-08-14T01:33:50
refactor(es/parser): Don't attempt to handle shebangs in `read_token_number_sign` (#7803) bump() has a safety invariant that there must be input in the buffer to read (See https://github.com/swc-project/swc/issues/7709). This function as currently written calls `bump()` after calling `read_token_interpreter()`, w...
diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index adc6b39232..2e818cfab9 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -192,35 +192,15 @@ impl<'a> Lexer<'a> { fn read_token_number_sign(&mut self) -> LexResult...
1
7
27
7aea2bdd97b7f47d5c2333c682e5d413a2977367
Donny/강동윤
2023-08-10T08:12:04
chore: Publish `v1.3.76` with `swc_core` `v0.79.55` (#7794)
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bf1aaf8312..42b3a7b851 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -242,9 +242,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.53.51" +version = "0.53.52" source = "registry+https://github.com/rust-lang/crates.io...
4
55
55
76c6258d1544ede09cb4f281c42e1fc80ad4145b
Donny/강동윤
2023-08-09T09:17:14
perf(es/compat): Improve time complexity of `class_properties` (#7786) **Related issue:** - Closes #7780
diff --git a/crates/swc_ecma_transforms_compat/src/es2022/class_properties/private_field.rs b/crates/swc_ecma_transforms_compat/src/es2022/class_properties/private_field.rs index 6978eb2651..57138f474f 100644 --- a/crates/swc_ecma_transforms_compat/src/es2022/class_properties/private_field.rs +++ b/crates/swc_ecma_tran...
1
0
1
f7afe7edecc65f41845721c75b77d2f6dba04a6a
Donny/강동윤
2023-08-07T22:55:00
refactor(es/minifier): Support stable rustc (#7734)
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs index 0a808a2cbc..0f1959a831 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/iife.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/iife.rs @@ -635,7 +635,7 @@ impl Optimizer<'_...
4
52
49
225827423355cab8cd3c0ae80f335cd2873e6cd4
Manish Goregaokar
2023-08-07T19:59:15
refactor(es/ast): Avoid `transmute` in impl of `Hash` for `Number` (#7771) **Description:** [`f64::to_bits()`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.to_bits) does the same thing.
diff --git a/crates/swc_ecma_ast/src/lit.rs b/crates/swc_ecma_ast/src/lit.rs index cef39e5b7f..98fa2a460c 100644 --- a/crates/swc_ecma_ast/src/lit.rs +++ b/crates/swc_ecma_ast/src/lit.rs @@ -2,7 +2,6 @@ use std::{ borrow::Cow, fmt::{self, Display, Formatter}, hash::{Hash, Hasher}, - mem, }; use nu...
1
1
2
e50cfde938b2504b723a95f034ac4b388d8725c3
Gareth McSorley
2023-08-06T20:29:17
refactor(es/parser): Do not use `lexical` (#7758) This PR replaces the current usage of lexical within the swc_ecma_parser crate with equivalent parsing of large numbers using BigInt. **Description:** As discussed in https://github.com/swc-project/swc/issues/7752, lexical contains a number of soundness issues...
diff --git a/Cargo.lock b/Cargo.lock index ee2a748740..6e1da93c0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4115,8 +4115,8 @@ version = "0.137.5" dependencies = [ "criterion", "either", - "lexical", "num-bigint", + "num-traits", "pretty_assertions", "serde", "serde_json", diff --git a/crates/swc_ecma_pa...
4
29
38
1122de7d8b3c178b4e315bb50a6e214669c37a4f
Fy
2023-08-03T22:20:51
fix(plugin/runner): Use fs cache properly (#7748)
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 8376d7341b..9ef2e5ca14 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -696,17 +696,17 @@ impl Options { // target. init_plugin_module_cache_once(true, &experimental.c...
2
19
15
28dfc518879b9125a382b48e8310895e137d4fd4
Donny/강동윤
2023-08-03T03:22:09
feat(es): Alias `format` as `output` for `minify()` (#7746) **Related issue:** - Closes #7738.
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index 4d67355480..8376d7341b 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -1071,7 +1071,7 @@ pub struct JsMinifyOptions { #[serde(default)] pub mangle: BoolOrDataConfig<MangleOptions>, - #[serde(de...
1
1
1
f713f6aba84ffe84bed9dff80a772b0cd78135b8
thy486
2023-08-03T02:43:17
fix(es/module): Fix handling of continuous assignments in `systemjs` (#7741) **Description:** Fix transpile the continuous assignment code like `d.a = d.b = d.c = d.d = ... = void 0;` to SystemJS may cause Infinite loop. **Related issue:** - Closes #7143.
diff --git a/crates/swc_ecma_transforms_module/src/system_js.rs b/crates/swc_ecma_transforms_module/src/system_js.rs index 25bc0127a0..520eb06b7d 100644 --- a/crates/swc_ecma_transforms_module/src/system_js.rs +++ b/crates/swc_ecma_transforms_module/src/system_js.rs @@ -562,6 +562,15 @@ impl Fold for SystemJs { ...
2
27
0
22e06cce630b365b17f390559e065ee48cb3d2b9
Jean-Cédric Huet
2023-08-02T20:40:57
fix(es): Fix typo in a warning (#7740)
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs index bdcc591e41..4d67355480 100644 --- a/crates/swc/src/config/mod.rs +++ b/crates/swc/src/config/mod.rs @@ -374,7 +374,7 @@ impl Options { let top_level_mark = self.top_level_mark.unwrap_or_else(Mark::new); if target.is_some(...
1
1
1
864bdefbe0012ddbe93075c70f0b2b44577a5424
Rene B
2023-07-28T05:57:31
refactor(es/parser): Make `stacker` an optional dependency (#7720)
diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index e3123cc3ce..7828b47c79 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -19,7 +19,7 @@ bench = false [features] # Used for debugging debug = [] -default = ["typescript"] +default ...
2
7
4
2bc96373b736ce4d81336c1c0340a1d4f7d7f4b0
OJ Kwon
2023-07-28T03:27:55
feat(swc_core): Expose `visit/serde` as serde feature (#7722)
diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 60fd3177d8..0b4aaddce3 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -129,7 +129,7 @@ testing_transform = ["__ecma", "__testing_transform"] # Enable swc_ecma_ast / swc_atoms support. # TODO: currently both are ena...
1
1
1
a961090c9da5994ec83ad6ffca1074277d61431d
Manish Goregaokar
2023-07-13T02:07:25
chore(es/parser): Scope use of `lexical` to certain features (#7644)
diff --git a/Cargo.toml b/Cargo.toml index 8fb74282a5..3d75263616 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ "crates/swc_timer", "crates/swc_xml", ] - +resolver = "2" [profile.release] # lto = true diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml ...
2
2
2
0a26066b7b01d06a6d9e3df2ab7c7e47f4aa9e4c
David Sherret
2023-07-03T01:52:51
refactor(es/compat): Remove usage of `box_patterns` (#7613)
diff --git a/crates/swc_ecma_transforms_compat/src/es2020/optional_chaining.rs b/crates/swc_ecma_transforms_compat/src/es2020/optional_chaining.rs index 960249c83c..1147075e1b 100644 --- a/crates/swc_ecma_transforms_compat/src/es2020/optional_chaining.rs +++ b/crates/swc_ecma_transforms_compat/src/es2020/optional_chain...
2
9
5
8209594a8c11d2a65061763fef5d3a7780976f39
OJ Kwon
2023-06-30T03:28:35
fix(plugin/runner): Disable wasi env cleanup (#7607) **Description:** Even after setting shared runtime for the wasi env, `cleanup` still panics. I suspect something internal to cleanup doesn't honor those handles correctly; for now, disable it and try to see if this works. As commented, this is not a huge issue...
diff --git a/crates/swc_plugin_runner/src/transform_executor.rs b/crates/swc_plugin_runner/src/transform_executor.rs index a3692d658a..8ce39bbd5e 100644 --- a/crates/swc_plugin_runner/src/transform_executor.rs +++ b/crates/swc_plugin_runner/src/transform_executor.rs @@ -119,8 +119,13 @@ impl PluginTransformState { ...
1
6
1
ac02b84918932f2d51840b4c4cef9adf460fce40
廖应龙
2023-06-30T02:12:45
feat(es/optimization): Support `default` imports for const modules (#7604)
diff --git a/crates/swc_ecma_transforms_optimization/src/const_modules.rs b/crates/swc_ecma_transforms_optimization/src/const_modules.rs index 5137c055b8..c8d4b3b0f8 100644 --- a/crates/swc_ecma_transforms_optimization/src/const_modules.rs +++ b/crates/swc_ecma_transforms_optimization/src/const_modules.rs @@ -6,7 +6,7 ...
2
26
3
e2725451aa507c18222c5f66cf0a5a049c92bd0b
underfin
2023-06-29T07:50:25
fix(es/fixer): Don't change default decls to default expr exports (#7585) **Related issue:** - Closes #7584.
diff --git a/crates/swc_ecma_transforms_base/src/fixer.rs b/crates/swc_ecma_transforms_base/src/fixer.rs index 453c1b4b0d..d2f8a874a4 100644 --- a/crates/swc_ecma_transforms_base/src/fixer.rs +++ b/crates/swc_ecma_transforms_base/src/fixer.rs @@ -438,6 +438,15 @@ impl VisitMut for Fixer<'_> { } fn visit_mut...
3
33
0
9512ea31ff1bb0c70f4f96a620b429fa01f48e0c
OJ Kwon
2023-06-29T01:56:55
feat(plugin/runner): Share runtime `Engine` (#7590)
diff --git a/crates/swc_plugin_runner/src/cache.rs b/crates/swc_plugin_runner/src/cache.rs index eeae10a424..5e57ad6580 100644 --- a/crates/swc_plugin_runner/src/cache.rs +++ b/crates/swc_plugin_runner/src/cache.rs @@ -19,8 +19,9 @@ use wasmer::{Module, Store}; #[cfg(all(not(target_arch = "wasm32"), feature = "filesys...
3
50
36
c51eac6075c161bdf4e8211fd6f96df8bd902e7d
Donny/강동윤
2023-06-27T14:34:41
chore(ci): Fix CI (#7589)
diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 4700b03d17..a6b875441d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -190,9 +190,9 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "better_scoped_tls" -version = "0.1.0" +version = "0.1.1...
4
247
161
ab7b17cf106620caa1ba46adf23e6013cc4d6288
OJ Kwon
2023-06-24T01:28:50
feat(plugin/runner): Update `wasmer` to `v4` (#7576)
diff --git a/Cargo.lock b/Cargo.lock index f90b832b6f..60e59a888c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1532,9 +1532,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-l...
7
162
105
95ac74e6e494afc90f32c8fc9add2b1824f25db5
Kieran Siek
2023-06-23T02:26:22
refactor(common): Remove `add_bitflags` and update `bitflags` (#7571)
diff --git a/Cargo.lock b/Cargo.lock index aed396d00b..6443a752c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -260,9 +260,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.1.0" +version = "2.3.2" source = "registry+https://github.com/rust...
17
217
584