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 |
|---|---|---|---|---|---|---|---|
356d3a0850d32e79ff9615f3b696207902732895 | bohan | 2025-07-13T08:28:03 | refactor(es/parser): Reduce call to `parse_decorators` (#10846) | diff --git a/crates/swc_ecma_lexer/src/common/parser/expr.rs b/crates/swc_ecma_lexer/src/common/parser/expr.rs
index efad95e685..1ffd1174ea 100644
--- a/crates/swc_ecma_lexer/src/common/parser/expr.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/expr.rs
@@ -2327,10 +2327,14 @@ pub fn parse_primary_expr_rest<'a, P: Par... | 3 | 18 | 6 |
502e991a8bccaefef03f6379bbda8522bde4f62e | Donny/κ°λμ€ | 2025-07-12T00:15:31 | test(es/plugin): Test memory layout of archived types (#10841)
**Description:**
If any of these assertions fail, it means a Wasm-ABI breaking change.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/10839 | diff --git a/crates/swc_ecma_ast/src/lib.rs b/crates/swc_ecma_ast/src/lib.rs
index ffd3923998..60291b4804 100644
--- a/crates/swc_ecma_ast/src/lib.rs
+++ b/crates/swc_ecma_ast/src/lib.rs
@@ -495,3 +495,272 @@ pub use self::{
ArchivedTsUnionOrIntersectionType, ArchivedTsUnionType,
},
};
+
+#[cfg(feature =... | 1 | 269 | 0 |
5cd5185a7a51ec838a12005c44dc982642af9508 | bohan | 2025-07-11T17:50:36 | refactor(es/parser): Reduce token query (#10834) | diff --git a/crates/swc_ecma_lexer/src/common/parser/expr.rs b/crates/swc_ecma_lexer/src/common/parser/expr.rs
index 7318e35c7a..d52e4f70c5 100644
--- a/crates/swc_ecma_lexer/src/common/parser/expr.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/expr.rs
@@ -228,7 +228,11 @@ pub(crate) fn parse_tagged_tpl<'a, P: Parser... | 1 | 10 | 10 |
ed6956a46e1f0abbcfc447773c5429659fe91289 | CPunisher | 2025-07-11T17:47:58 | perf(es/minifier): Use `u8` for `remaining_depth` (#10833)
**Description:**
`u8` is enough for this field.
This PR reduces the size of `ExprCtx` from 12 bytes to 8 bytes. 8 bits (64 bits) is sufficient for now. | diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs
index f83f92c791..3a5e84a762 100644
--- a/crates/swc_ecma_utils/src/lib.rs
+++ b/crates/swc_ecma_utils/src/lib.rs
@@ -705,7 +705,7 @@ pub struct ExprCtx {
/// function should not operate and return the safe value.
///
/// De... | 1 | 1 | 1 |
66ae1e8d5aa047e2ea7c2a1c46a618bfa7d6a500 | CPunisher | 2025-07-11T15:52:43 | perf(hstr): Remove static tag (#10832)
**Description:**
I notice this may reduce the count of instructions and memory access before calculating the jump table. | diff --git a/crates/hstr/src/lib.rs b/crates/hstr/src/lib.rs
index 80c5ce0f89..f9cda1169c 100644
--- a/crates/hstr/src/lib.rs
+++ b/crates/hstr/src/lib.rs
@@ -182,7 +182,6 @@ impl<'de> serde::de::Deserialize<'de> for Atom {
const DYNAMIC_TAG: u8 = 0b_00;
const INLINE_TAG: u8 = 0b_01; // len in upper nybble
const INL... | 1 | 0 | 7 |
cac40f135d517e9c3e1dbbe9250c8b1dbe39320b | bohan | 2025-07-11T14:04:05 | refactor(es/lexer): Don't store buffer in lexer (#10830) | diff --git a/crates/swc_ecma_lexer/src/common/lexer/mod.rs b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
index f4dcc90863..e32c94edb8 100644
--- a/crates/swc_ecma_lexer/src/common/lexer/mod.rs
+++ b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
@@ -93,7 +93,6 @@ pub trait Lexer<'a, TokenAndSpan>: Tokens<TokenAndSpan>... | 3 | 198 | 225 |
afda0f9d0d65e231615f955e365f77a18dc716d1 | bohan | 2025-07-10T16:47:35 | refactor(hstr): Remove `is_global` (#10820) | diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs
index e1e1326c70..4e49ef17a1 100644
--- a/crates/hstr/src/dynamic.rs
+++ b/crates/hstr/src/dynamic.rs
@@ -20,7 +20,6 @@ use crate::{
#[derive(PartialEq, Eq)]
pub(crate) struct Metadata {
pub hash: u64,
- pub is_global: bool,
}
#[derive(C... | 1 | 8 | 9 |
2116ab2fa25b0d4121d0dc69afd42e41ea24e299 | magic-akari | 2025-07-10T15:03:06 | refactor(es/react): Remove `count_children` (#10818) | diff --git a/crates/swc_ecma_transforms_react/src/jsx/mod.rs b/crates/swc_ecma_transforms_react/src/jsx/mod.rs
index 264aca5193..26f70ebcbd 100644
--- a/crates/swc_ecma_transforms_react/src/jsx/mod.rs
+++ b/crates/swc_ecma_transforms_react/src/jsx/mod.rs
@@ -535,10 +535,6 @@ where
fn jsx_frag_to_expr(&mut self, el... | 1 | 40 | 62 |
3886c9720dbf992bf2dbc6a09e416ed63833d6d7 | CPunisher | 2025-07-10T05:49:55 | perf(hstr): Inline one more byte (#10817)
**Description:**
7 bytes for data + 4 bits for length + 4 bits (actually 2 bits) for tag | diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs
index 1a630da9f8..fd2ad57ea0 100644
--- a/crates/hstr/src/dynamic.rs
+++ b/crates/hstr/src/dynamic.rs
@@ -123,7 +123,7 @@ where
{
let len = text.len();
- if len < MAX_INLINE_LEN {
+ if len <= MAX_INLINE_LEN {
// INLINE_TAG ensur... | 1 | 2 | 2 |
45d225047221f60e28fae3bd8e6ff8c5376fa30a | Donny/κ°λμ€ | 2025-07-07T15:03:24 | chore: Publish crates with `swc_core` `v31.0.1` | diff --git a/Cargo.lock b/Cargo.lock
index 4909879c82..273d8b38f8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4982,7 +4982,7 @@ dependencies = [
[[package]]
name = "swc_core"
-version = "31.0.0"
+version = "31.0.1"
dependencies = [
"anyhow",
"binding_macros",
@@ -5606,7 +5606,7 @@ dependencies = [
[[packag... | 6 | 25 | 19 |
b3782cca8127de06d9c2a0d55b9e359a40a3ae00 | Donny/κ°λμ€ | 2025-07-07T14:33:04 | chore: Fix lockfile | diff --git a/Cargo.lock b/Cargo.lock
index 0c9a48a4b8..0f1ebfc876 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3496,7 +3496,8 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "precomputed-map"
version = "0.2.0"
-source = "git+https://github.com/quininer/precomputed-... | 1 | 2 | 1 |
658b26d8386c17cbe7abf740d905d41eac96b7f7 | quininer | 2025-07-07T14:31:55 | refactor(es/preset-env): Use phf for corejs3 entry (#10712)
**Description:**
This is a follow-up to https://github.com/swc-project/swc/pull/10684. I
simply chose an example to experiment with.
I did some simple testing and I believe there is no large regression in
single query performance.
```
// before
es/preset-en... | diff --git a/Cargo.lock b/Cargo.lock
index 22e803e215..0c9a48a4b8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3493,6 +3493,11 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+[[package]]
+name = "pre... | 6 | 201 | 23 |
c32569dd558e3bd4e27329275e090cc716a6e440 | hardfist | 2025-07-07T14:30:05 | fix(es): Make `swc_typescript` optional (#10792)
**Description:**
`swc_typescript` should be optional cause it's not needed for all consumers | diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml
index 233477966a..9d8a8d1e72 100644
--- a/crates/swc/Cargo.toml
+++ b/crates/swc/Cargo.toml
@@ -25,8 +25,9 @@ concurrent = [
]
debug = ["swc_ecma_visit/debug", "swc_ecma_minifier/debug"]
-default = ["es3", "lint"]
+default = ["es3", "lint", "isolated-dts"]
... | 2 | 21 | 12 |
b3f97604b8bc4713ab1f91fa3bd732b7af9cb2e9 | Donny/κ°λμ€ | 2025-07-07T08:08:55 | fix(ci): Fix CI (#10790) | diff --git a/Cargo.lock b/Cargo.lock
index 9f109be84a..22e803e215 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -885,15 +885,6 @@ dependencies = [
"windows-sys 0.59.0",
]
-[[package]]
-name = "cow-replace"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6cab584c4b83... | 4 | 0 | 16 |
f5d92ee1bf0a2fbeece6570b745ea833f6cd355e | bohan | 2025-07-07T07:48:00 | perf(es/lexer): Do not scan number if there's no underscore (#10788) | diff --git a/crates/swc_ecma_lexer/src/common/lexer/mod.rs b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
index 5196fea330..f4dcc90863 100644
--- a/crates/swc_ecma_lexer/src/common/lexer/mod.rs
+++ b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
@@ -1,9 +1,7 @@
use std::borrow::Cow;
-use ascii::AsciiChar;
use char... | 2 | 69 | 44 |
176ce36d2407b6d054ec6088a45025b76791fed3 | bohan | 2025-07-04T12:09:50 | refactor(es/parser): Cleanup (#10781) | diff --git a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
index 3463a93ffc..3bb6e720a9 100644
--- a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
@@ -640,22 +640,6 @@ fn parse_fn_... | 3 | 2 | 24 |
4ca12c97259fdf882b0849112473f3deea54be36 | bohan | 2025-07-03T14:56:37 | perf(es/parser): Remove useless call in `parse_ident` (#10770) | diff --git a/crates/swc_ecma_lexer/src/common/parser/ident.rs b/crates/swc_ecma_lexer/src/common/parser/ident.rs
index b655e4d17e..896820dac6 100644
--- a/crates/swc_ecma_lexer/src/common/parser/ident.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/ident.rs
@@ -153,81 +153,81 @@ pub fn parse_ident<'a>(
) -> PResult<I... | 1 | 70 | 70 |
12e318036caccee6d9b516baf391fccb07118ca9 | bohan | 2025-07-03T07:31:00 | chore(common): Remove `clone()` in proc macro (#10762) | diff --git a/crates/ast_node/src/enum_deserialize.rs b/crates/ast_node/src/enum_deserialize.rs
index 018539846f..df53e3e0e5 100644
--- a/crates/ast_node/src/enum_deserialize.rs
+++ b/crates/ast_node/src/enum_deserialize.rs
@@ -178,13 +178,13 @@ pub fn expand(
)
}
... | 1 | 2 | 2 |
c3d5ad1ea574ef00d5ab30c63753aa68e5788465 | Donny/κ°λμ€ | 2025-07-02T15:19:33 | chore(ci): Fix CI (#10755)
**Description:**
I needed to publish crates so I force-merged https://github.com/swc-project/swc/pull/10754 | diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock
index 991870621f..02a989e663 100644
--- a/bindings/Cargo.lock
+++ b/bindings/Cargo.lock
@@ -281,7 +281,7 @@ dependencies = [
[[package]]
name = "binding_core_wasm"
-version = "1.12.9"
+version = "1.12.10"
dependencies = [
"anyhow",
"getrandom 0.3.3",
@@ -3... | 6 | 99 | 89 |
4976b12f9398c471c0f77e69ad141e0172927a2b | bohan | 2025-07-02T07:00:37 | perf(es/parser): Reduce value set operations for context (#10751) | diff --git a/crates/swc_ecma_lexer/src/common/parser/ctx.rs b/crates/swc_ecma_lexer/src/common/parser/ctx.rs
index 76b7bffa52..c90eb0e78c 100644
--- a/crates/swc_ecma_lexer/src/common/parser/ctx.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/ctx.rs
@@ -3,10 +3,31 @@ use std::ops::{Deref, DerefMut};
use crate::common... | 2 | 31 | 21 |
70734f40d4ff0d9ad140b705c3356b44f8bd5663 | bohan | 2025-07-01T19:45:10 | refactor(es/parser): Cleanup `parse_setter_param` (#10745) | diff --git a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
index 79f4b253ca..ec22bb016d 100644
--- a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
@@ -1181,7 +1181,7 @@ fn parse_cl... | 3 | 2 | 25 |
b9eb23aec3dd0963afa5080d53bca4dd0325f233 | bohan | 2025-06-30T23:03:55 | refactor(es/lexer): Use const fn in `SyntaxFlags` (#10737) | diff --git a/crates/swc_ecma_lexer/src/common/syntax.rs b/crates/swc_ecma_lexer/src/common/syntax.rs
index bd429e2ce2..d2df87affb 100644
--- a/crates/swc_ecma_lexer/src/common/syntax.rs
+++ b/crates/swc_ecma_lexer/src/common/syntax.rs
@@ -298,33 +298,33 @@ impl EsSyntax {
impl SyntaxFlags {
#[inline(always)]
- ... | 1 | 13 | 13 |
9868b4d095007bf971dfc3372e12c934d9992fee | quininer | 2025-06-27T03:40:53 | test(es/preset-env): Add entry import bench (#10722)
**Description:**
See https://github.com/swc-project/swc/pull/10712#discussion_r2170380302 | diff --git a/crates/swc_ecma_preset_env/benches/polyfills.rs b/crates/swc_ecma_preset_env/benches/polyfills.rs
index 5da5453621..c90f109839 100644
--- a/crates/swc_ecma_preset_env/benches/polyfills.rs
+++ b/crates/swc_ecma_preset_env/benches/polyfills.rs
@@ -81,6 +81,18 @@ fn bench_cases(c: &mut Criterion) {
... | 1 | 12 | 0 |
c9eee0beadb2ba927b0c4e068eb034b7712ffffd | bohan | 2025-06-26T13:34:51 | refactor(es/lexer): useless reset (#10714) | diff --git a/crates/swc_ecma_lexer/src/common/lexer/mod.rs b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
index a4fcbe7bd0..aff64a4547 100644
--- a/crates/swc_ecma_lexer/src/common/lexer/mod.rs
+++ b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
@@ -600,10 +600,6 @@ pub trait Lexer<'a, TokenAndSpan>: Tokens<TokenAndSp... | 1 | 0 | 4 |
0ae0341d105a9c57810204352b775acdee26d18e | bohan | 2025-06-26T00:27:25 | perf(es/parser): Do not compare error each time (#10696) | diff --git a/crates/swc_ecma_lexer/src/common/parser/expr.rs b/crates/swc_ecma_lexer/src/common/parser/expr.rs
index 3cb3f4cb35..6915afdedf 100644
--- a/crates/swc_ecma_lexer/src/common/parser/expr.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/expr.rs
@@ -19,6 +19,7 @@ use crate::{
parse_async_fn_ex... | 9 | 191 | 75 |
0c2170ac80d14baf95a403c4f3fa634bf1887e4c | κ°λμ€ (Donny) | 2025-06-21T23:04:55 | chore: Fix CI by updating `swc_fast_ts_strip` | diff --git a/Cargo.lock b/Cargo.lock
index 1f0d118f4b..c80852205a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6216,7 +6216,7 @@ dependencies = [
[[package]]
name = "swc_fast_ts_strip"
-version = "23.0.0"
+version = "23.0.1"
dependencies = [
"anyhow",
"bytes-str",
diff --git a/bindings/Cargo.lock b/bindings/Ca... | 4 | 18 | 9 |
9c41e2f71016699917c8109c2bd4660cfa7fb4f3 | bohan | 2025-06-21T19:32:58 | perf(es/lexer): Compare `\n` first (#10669)
`\n` is more widely used. | diff --git a/crates/swc_ecma_lexer/src/common/lexer/mod.rs b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
index 60df996cb0..083dbe0b38 100644
--- a/crates/swc_ecma_lexer/src/common/lexer/mod.rs
+++ b/crates/swc_ecma_lexer/src/common/lexer/mod.rs
@@ -54,15 +54,15 @@ static BLOCK_COMMENT_SCAN_TABLE: SafeByteMatchTable =... | 1 | 4 | 4 |
3806ffd04872a556b4a906348ade955814da044d | magic-akari | 2025-06-21T19:00:46 | perf(es/lexer): Introduce `byte_search` to reduce comparison operations (#10668) | diff --git a/Cargo.lock b/Cargo.lock
index 1cb66611b8..bf86f42c34 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4341,6 +4341,12 @@ dependencies = [
"serde",
]
+[[package]]
+name = "seq-macro"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bc711410fbe7399f390ca1c3b... | 5 | 569 | 242 |
5f4f7dd0f164a30ff6340dd0114fe0759e64d83f | Donny/κ°λμ€ | 2025-06-21T11:07:01 | perf(es/minifier): Remove needless clones (#10661)
**Description:**
Call `.clone()` only if required. | diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs
index bbdc2b7e7c..0b0a1cc007 100644
--- a/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs
+++ b/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs
@@ -21,19 +21,21 @@ mod l... | 1 | 9 | 7 |
9df98f748eba99de4c51dc407de34b97456e93ce | Donny/κ°λμ€ | 2025-06-19T23:02:22 | fix: Fix CI (#10641) | diff --git a/crates/swc_core/tests/fixture/stub_napi/Cargo.lock b/crates/swc_core/tests/fixture/stub_napi/Cargo.lock
index a634f71783..bd47a453e5 100644
--- a/crates/swc_core/tests/fixture/stub_napi/Cargo.lock
+++ b/crates/swc_core/tests/fixture/stub_napi/Cargo.lock
@@ -109,7 +109,7 @@ checksum = "d92bec98840b8f03a5ff5... | 3 | 183 | 302 |
1434571477f5f8576a268a2bd32631eb9ce77229 | CPunisher | 2025-06-14T15:31:54 | perf(es/minifier): Avoid calling some costly function when optimizing deep nested binary expr (#10611)
**Description:**
From profiling, there are some time consuming function due to the deeply
nested binary expr:
1. recursively visit expr
2. recursive function: `compress::pure::misc::remove_invalid`
3. recursive func... | diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
index c08c50e2da..7ca7e2f7d2 100644
--- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
+++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
@@ -578,6 +578,9 @@ impl Optimizer<'_> {
... | 5 | 32 | 16 |
0f858fd3470c5c104ab9b6ca900ea97be37c615f | κ°λμ€ (Donny) | 2025-06-10T17:17:23 | fix: Fix bindings | diff --git a/bindings/binding_html_node/src/lib.rs b/bindings/binding_html_node/src/lib.rs
index c6d010072f..8222c8bca8 100644
--- a/bindings/binding_html_node/src/lib.rs
+++ b/bindings/binding_html_node/src/lib.rs
@@ -508,7 +508,7 @@ fn minify_inner(
None => FileName::Anon,
};
- ... | 2 | 2 | 2 |
c96fa238168ce6418781b6c6c14aea7de832d67c | bohan | 2025-06-10T15:57:38 | refactor(es/parser): Remove `cur!(false)` macro (#10583) | diff --git a/crates/swc_ecma_lexer/src/common/parser/expr.rs b/crates/swc_ecma_lexer/src/common/parser/expr.rs
index d61d6885e2..df1e53d959 100644
--- a/crates/swc_ecma_lexer/src/common/parser/expr.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/expr.rs
@@ -567,7 +567,7 @@ fn parse_subscript<'a, P: Parser<'a>>(
n... | 8 | 48 | 46 |
a00a0f2b77291bd38d22d5f2526e6604223eb5b0 | Donny/κ°λμ€ | 2025-06-09T16:00:55 | chore(ci): Remove flaky benchmarks (#10590)
**Description:**
These benchmarks are not useful | diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml
index b6aa52d3e7..cea2cb8d42 100644
--- a/crates/swc_common/Cargo.toml
+++ b/crates/swc_common/Cargo.toml
@@ -74,7 +74,3 @@ codspeed-criterion-compat = { workspace = true }
criterion = { workspace = true }
rayon ... | 3 | 3 | 75 |
49d15df1b4d2f5e07d10e10c75dcbeb637b2528d | bohan | 2025-06-06T14:46:21 | refactor(es/lexer): Remove unnecessary result wrap (#10578) | diff --git a/crates/swc_ecma_lexer/src/common/parser/expr.rs b/crates/swc_ecma_lexer/src/common/parser/expr.rs
index c98f1f8861..d61d6885e2 100644
--- a/crates/swc_ecma_lexer/src/common/parser/expr.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/expr.rs
@@ -1688,10 +1688,7 @@ pub fn parse_lhs_expr<'a, P: Parser<'a>>(p... | 2 | 12 | 13 |
72b1efeaec0931b17c9a7b0acd52be8de77d07dc | bohan | 2025-06-05T16:05:21 | test(es/parser): Enable jsx test (#10566) | diff --git a/crates/swc_ecma_parser/src/parser/jsx/mod.rs b/crates/swc_ecma_parser/src/parser/jsx/mod.rs
new file mode 100644
index 0000000000..ca95138f8e
--- /dev/null
+++ b/crates/swc_ecma_parser/src/parser/jsx/mod.rs
@@ -0,0 +1,120 @@
+#[cfg(test)]
+mod tests {
+ use swc_common::DUMMY_SP as span;
+ use swc_ecm... | 3 | 121 | 117 |
649278679eab86e6cf167c170ecb49987559e26c | bohan | 2025-06-05T14:59:47 | refactor(es/parser): Extract `parse_jsx_attrs` (#10569) | diff --git a/crates/swc_ecma_lexer/src/common/parser/jsx.rs b/crates/swc_ecma_lexer/src/common/parser/jsx.rs
index cf10b8b376..7e8ff5fbd5 100644
--- a/crates/swc_ecma_lexer/src/common/parser/jsx.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/jsx.rs
@@ -242,6 +242,27 @@ fn parse_jsx_opening_element_at<'a, P: Parser<'a... | 1 | 22 | 13 |
56443727dd195a2a3500014b8f54b9a18e14e484 | Donny/κ°λμ€ | 2025-05-22T21:34:21 | fix(es/utils): Fix `extract_var_ids` (#10511)
**Description:**
This had a bug. | diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs
index 135101fac0..88ba9f14f3 100644
--- a/crates/swc_ecma_utils/src/lib.rs
+++ b/crates/swc_ecma_utils/src/lib.rs
@@ -602,6 +602,8 @@ pub struct Hoister {
impl Visit for Hoister {
noop_visit_type!();
+ fn visit_arrow_expr(&mut s... | 1 | 10 | 2 |
de51be1a782af1f22c2ca5ab3ddc5fa187872281 | bohan | 2025-05-21T14:03:57 | refactor(ecma/transform): cleanup rename analyzer (#10500) | diff --git a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs
index 4cbcec8bae..a95469614f 100644
--- a/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs
+++ b/crates/swc_ecma_transforms_base/src/rename/analyzer/mod.rs
@@ -137,9 +137,11 @@ ... | 3 | 21 | 58 |
2212d3d688d5ca01e50b1ce8fb289d4f6b3e19d1 | κ°λμ€ (Donny) | 2025-05-20T19:58:23 | chore(ci): Patch wasmer to avoid build issues | diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock
index 2a9253ac88..1ee664a119 100644
--- a/bindings/Cargo.lock
+++ b/bindings/Cargo.lock
@@ -139,15 +139,6 @@ dependencies = [
"syn 2.0.100",
]
-[[package]]
-name = "atomic-polyfill"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-... | 2 | 47 | 110 |
b695b6830e2e7a4d1922fa455d94fe4d912effa4 | bohan | 2025-05-20T14:10:30 | refactor(es/parser): Cleanup usage of `is!` and `bump!` (#10490) | diff --git a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
index 934d88c2f3..1e1081d5fc 100644
--- a/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
+++ b/crates/swc_ecma_lexer/src/common/parser/class_and_fn.rs
@@ -189,8 +189,10 @@ pub fn parse... | 4 | 17 | 12 |
73377f09dc83624559f7d1539de59922c42836c9 | bohan | 2025-05-20T14:07:24 | perf(es/renamer): Merge Id/Def collector (#10487) | diff --git a/crates/swc_ecma_transforms_base/src/rename/collector.rs b/crates/swc_ecma_transforms_base/src/rename/collector.rs
index 46d1437e64..27d9d13028 100644
--- a/crates/swc_ecma_transforms_base/src/rename/collector.rs
+++ b/crates/swc_ecma_transforms_base/src/rename/collector.rs
@@ -6,47 +6,20 @@ use swc_ecma_as... | 2 | 176 | 113 |
3402270edc81838451c7ce3a5cc93ba205d076d6 | bohan | 2025-05-19T16:40:05 | perf(es/utils): Stop visiting once found in `EvalFinder` (#10483) | diff --git a/crates/swc_ecma_transforms_base/src/rename/eval.rs b/crates/swc_ecma_transforms_base/src/rename/eval.rs
index c38c0a2b1e..2146814ed7 100644
--- a/crates/swc_ecma_transforms_base/src/rename/eval.rs
+++ b/crates/swc_ecma_transforms_base/src/rename/eval.rs
@@ -26,12 +26,10 @@ impl Visit for EvalFinder {
... | 1 | 14 | 6 |
5add84dffcc4c03ed79e4aa29ded3fc1bfa70a7d | bohan | 2025-05-19T14:41:31 | refactor(es/minifier): Merge label/private name renamer (#10480)
Reduce visitor overhead by merging `LabelMangler` and `PrivateNameMangler` into a single visitor. | diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs
new file mode 100644
index 0000000000..bbdc2b7e7c
--- /dev/null
+++ b/crates/swc_ecma_minifier/src/pass/mangle_names/mangler.rs
@@ -0,0 +1,134 @@
+use swc_ecma_ast::*;
+use swc_ecma_visit::... | 3 | 139 | 113 |
619873a2cf7d5ddb1ce1aa59123371127dc9f2f6 | bohan | 2025-05-19T14:34:55 | refactor(es/parser): Parse shebang and cleanup (#10481) | diff --git a/crates/swc_ecma_lexer/src/common/lexer/token.rs b/crates/swc_ecma_lexer/src/common/lexer/token.rs
index cc1f5743e1..6557b11dff 100644
--- a/crates/swc_ecma_lexer/src/common/lexer/token.rs
+++ b/crates/swc_ecma_lexer/src/common/lexer/token.rs
@@ -178,6 +178,10 @@ pub trait TokenFactory<'a, TokenAndSpan, I: ... | 13 | 64 | 641 |
06c64cf9ed0e84891daf102f8756fcb1ee516527 | Donny/κ°λμ€ | 2025-05-16T18:26:27 | fix(es/renamer): Fix (broken) identifier preserving API (#10474)
**Description:**
The previous API is just broken | diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs
index 25442d101a..668c6be254 100644
--- a/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs
+++ b/crates/swc_ecma_minifier/src/pass/mangle_names/mod.rs
@@ -48,36 +48,29 @@ pub(crate) fn mangle_... | 4 | 38 | 36 |
9f104af5089b34f0ffccf29d5f77c2abdfc83066 | bohan | 2025-05-16T16:33:18 | refactor(es): Deduplicate `EvalFinder` (#10472) | diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
index 331463713b..c08c50e2da 100644
--- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
+++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs
@@ -7,6 +7,7 @@ use rustc_hash::{FxHashMa... | 4 | 6 | 49 |
ca859584036b2fb2e8a9398e602e2a7f42e36a07 | bohan | 2025-05-15T15:35:27 | chore(es/minifier): Remove useless check (#10471) | diff --git a/crates/swc_ecma_minifier/src/pass/merge_exports.rs b/crates/swc_ecma_minifier/src/pass/merge_exports.rs
index 1701435e2e..7207e2d6f0 100644
--- a/crates/swc_ecma_minifier/src/pass/merge_exports.rs
+++ b/crates/swc_ecma_minifier/src/pass/merge_exports.rs
@@ -55,7 +55,8 @@ impl VisitMut for Merger {
... | 1 | 2 | 1 |
b77311adfc19fa41c2b316e37ef3832c9ffaede8 | bohan | 2025-05-15T15:34:36 | refactor(common): Remove unused methods (#10469) | diff --git a/crates/swc_common/src/syntax_pos/hygiene.rs b/crates/swc_common/src/syntax_pos/hygiene.rs
index d2558cb3af..804273f958 100644
--- a/crates/swc_common/src/syntax_pos/hygiene.rs
+++ b/crates/swc_common/src/syntax_pos/hygiene.rs
@@ -445,114 +445,6 @@ impl SyntaxContext {
})
}
- /// Adjust t... | 1 | 0 | 108 |
7d490978251d85696e0279298a736ebd286c5685 | bohan | 2025-05-14T14:34:23 | refactor(es/minifier): Remove unused file (#10465) | diff --git a/crates/swc_ecma_minifier/src/pass/hygiene/vars.rs b/crates/swc_ecma_minifier/src/pass/hygiene/vars.rs
deleted file mode 100644
index d9ab226750..0000000000
--- a/crates/swc_ecma_minifier/src/pass/hygiene/vars.rs
+++ /dev/null
@@ -1,105 +0,0 @@
-use std::cell::RefCell;
-
-use fxhash::{FxHashMap, FxHashSet};... | 1 | 0 | 105 |
425eeb905656cede2e67cdd114beb5bc2fc6699d | κ°λμ€ (Donny) | 2025-05-14T03:10:42 | fix(ci): Remove wasmer override | diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml
index 0889500ba4..b7ccf2790a 100644
--- a/bindings/Cargo.toml
+++ b/bindings/Cargo.toml
@@ -144,10 +144,3 @@ strip = "symbols"
[profile.dev.package."*"]
debug-assertions = false
-
-[patch.crates-io]
-# Remove this once https://github.com/wasmerio/wasmer/pull/55... | 1 | 0 | 7 |
a72571e84f2320235a83d7565d38c642d2d8913a | κ°λμ€ (Donny) | 2025-05-13T23:29:30 | chore: Patch wasmer | diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock
index 78592e8c7b..b1c54d00da 100644
--- a/bindings/Cargo.lock
+++ b/bindings/Cargo.lock
@@ -141,15 +141,6 @@ dependencies = [
"syn 2.0.100",
]
-[[package]]
-name = "atomic-polyfill"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-... | 2 | 48 | 111 |
d074bcaf201e26ce2973633f9ef9f142b74f8dc3 | avee | 2025-05-10T19:17:26 | perf(es/utils): Make `IdentUsageFinder` parallel (#10444)
**Related issue:**
- Closes #9928 | diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs
index 3a8ff7d301..135101fac0 100644
--- a/crates/swc_ecma_utils/src/lib.rs
+++ b/crates/swc_ecma_utils/src/lib.rs
@@ -15,6 +15,8 @@ pub extern crate swc_ecma_ast;
use std::{borrow::Cow, hash::Hash, num::FpCategory, ops::Add};
use numbe... | 1 | 166 | 0 |
8e4b6ce881448813935e6ae68d16a838d7a01838 | Donny/κ°λμ€ | 2025-05-10T00:16:38 | perf(es/minifier): Remove needless `collect_decls` call (#10450)
**Description:**
We can rely on `resolver` to filter out unresolved bindings. | diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/dce/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/dce/mod.rs
index 982d3f53fb..885ee47e96 100644
--- a/crates/swc_ecma_transforms_optimization/src/simplify/dce/mod.rs
+++ b/crates/swc_ecma_transforms_optimization/src/simplify/dce/mod.rs
@... | 2 | 22 | 23 |
5eac076b77fa43649cde468deee49771a987781c | Donny/κ°λμ€ | 2025-05-06T20:13:52 | fix(es/react-compiler): Mark function components declared as a var interesting (#10437)
**Related issue:**
- https://github.com/vercel/next.js/issues/78867 | diff --git a/crates/swc_ecma_react_compiler/src/fast_check.rs b/crates/swc_ecma_react_compiler/src/fast_check.rs
index a64b2224ff..135abf552a 100644
--- a/crates/swc_ecma_react_compiler/src/fast_check.rs
+++ b/crates/swc_ecma_react_compiler/src/fast_check.rs
@@ -1,4 +1,4 @@
-use swc_ecma_ast::{Callee, Expr, FnDecl, FnE... | 1 | 16 | 1 |
edbeb4947a78d778de111c61f02edf0e8d3ce3ae | bohan | 2025-04-30T14:46:54 | refactor(common): Remove useless `&mut` (#10405) | diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs
index fe98ba0cb6..7f79f214e2 100644
--- a/crates/swc_common/src/input.rs
+++ b/crates/swc_common/src/input.rs
@@ -74,12 +74,12 @@ impl<'a> From<&'a SourceFile> for StringInput<'a> {
impl Input for StringInput<'_> {
#[inline]
- fn cu... | 1 | 12 | 12 |
69656ef240e910633e59821efe776c5d5e0f3426 | Donny/κ°λμ€ | 2025-04-29T16:08:56 | chore: Enable fat LTO by default (#10417)
**Description:**
Ensure that we use LTO for release binaries. | diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml
index 2a9d9ad138..c3b60c099f 100644
--- a/bindings/Cargo.toml
+++ b/bindings/Cargo.toml
@@ -63,7 +63,7 @@ resolver = "2"
# lto = true
# We use CARGO_PROFILE_RELEASE_LTO for production builds
-# lto = "fat"
+lto = "fat"
# debug = true
# opt-level = 'z'
@@ -7... | 1 | 1 | 4 |
df511ba183570f1a2f4564cd24a3d67dd3b3573c | Himanshu Sharma | 2025-04-21T20:32:12 | fix(swc_core): Fix downstream doc builds (#10401)
**Description:**
This PR fixes an issue where downstream projects using swc_core as a
dependency encounter build errors when generating documentation with
--cfg docsrs. The problem occurs because certain conditional compilation
flags include docsrs directly, causing ru... | diff --git a/crates/swc_core/src/lib.rs b/crates/swc_core/src/lib.rs
index 3b26d58d0b..94c203c2e2 100644
--- a/crates/swc_core/src/lib.rs
+++ b/crates/swc_core/src/lib.rs
@@ -19,7 +19,13 @@ pub extern crate swc_ecma_quote_macros;
// Plugins
#[cfg(any(
- docsrs,
+ all(
+ docsrs,
+ any(
+ ... | 2 | 45 | 6 |
126d43295e7f5e09092da653f537c843f2d79836 | CPunisher | 2025-04-17T19:01:01 | perf(es/minifier): Use `bitflags` to reduce context size of `InfectionCollector` (#10387)
Related: https://github.com/swc-project/swc/issues/10379
Context size 3 bytes -> 1 byte | diff --git a/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs b/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs
index 828c2d7e31..c30c9bc09d 100644
--- a/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs
+++ b/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs
@@ -1,5 +1,7 @@
use std::ops::{Deref, DerefMut};
+use bitflags... | 2 | 44 | 92 |
d1770ac5d75a295fc0910cc5185c8d6a75b2b9be | bohan | 2025-04-17T12:40:00 | chore(es/parser): Remove useless check (#10386) | diff --git a/crates/swc_ecma_parser/src/parser/stmt.rs b/crates/swc_ecma_parser/src/parser/stmt.rs
index de075a9a32..360c766227 100644
--- a/crates/swc_ecma_parser/src/parser/stmt.rs
+++ b/crates/swc_ecma_parser/src/parser/stmt.rs
@@ -870,12 +870,7 @@ impl<'a, I: Tokens> Parser<I> {
}
let mut decls ... | 1 | 5 | 6 |
68f76679b4a46205cb129be44f36ca31fac953c3 | CPunisher | 2025-04-13T12:18:22 | perf(es/parser): Replace byte arguments with generics (#10370) | diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs
index 137420a322..57195e963f 100644
--- a/crates/swc_ecma_parser/src/lexer/mod.rs
+++ b/crates/swc_ecma_parser/src/lexer/mod.rs
@@ -330,7 +330,7 @@ impl<'a> Lexer<'a> {
///
/// This is extracted as a method to reduc... | 2 | 35 | 37 |
3ab47b291f846d12aa26f209999978a91dc31719 | bohan | 2025-04-12T12:16:48 | perf(es/parser): Reduce clone of token contexts (#10364) | diff --git a/crates/swc_ecma_parser/src/lexer/state.rs b/crates/swc_ecma_parser/src/lexer/state.rs
index c881a0bc8d..8bb3a3688f 100644
--- a/crates/swc_ecma_parser/src/lexer/state.rs
+++ b/crates/swc_ecma_parser/src/lexer/state.rs
@@ -768,7 +768,7 @@ impl TokenContexts {
}
#[inline]
- fn push(&mut self, ... | 2 | 6 | 7 |
7b7b50e6cd96e49f2db7d564ad7724ee17909be2 | bohan | 2025-04-12T04:59:31 | perf(es/parser): Add initial capacitity for some vectors (#10361) | diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs
index da23ed2368..328e61477c 100644
--- a/crates/swc_ecma_parser/src/lexer/mod.rs
+++ b/crates/swc_ecma_parser/src/lexer/mod.rs
@@ -910,7 +910,7 @@ impl Lexer<'_> {
fn read_unicode_escape(&mut self) -> LexResult<Vec<Char... | 7 | 9 | 9 |
0f6a8c3f3d64ef80b888bf7d4d7fed31d28d81f5 | bohan | 2025-04-12T04:57:46 | chore(es/parser): Remove useless check (#10363) | diff --git a/crates/swc_ecma_parser/src/parser/stmt.rs b/crates/swc_ecma_parser/src/parser/stmt.rs
index 8336a6611b..cde9321295 100644
--- a/crates/swc_ecma_parser/src/parser/stmt.rs
+++ b/crates/swc_ecma_parser/src/parser/stmt.rs
@@ -810,12 +810,7 @@ impl<'a, I: Tokens> Parser<I> {
assert_and_bump!(self, "usi... | 1 | 4 | 6 |
4279b96d12f259bd3205a71b3402402fe4880d5b | bohan | 2025-04-11T03:11:26 | perf(es/parser): Remove ascii check for no-ascii (#10350)
**Description:**
Skip that ascii check for no-ascii char.
It probably wonβt move the needle in benchmarks since non-ASCII chars are rare in our data, but I still think itβs a valid optimization. | diff --git a/crates/swc_ecma_ast/src/ident.rs b/crates/swc_ecma_ast/src/ident.rs
index 735d30f51f..bff302b894 100644
--- a/crates/swc_ecma_ast/src/ident.rs
+++ b/crates/swc_ecma_ast/src/ident.rs
@@ -275,16 +275,27 @@ impl Ident {
ASCII_START.0[c as usize]
}
+ pub fn is_valid_non_ascii_start(c: char) ... | 2 | 15 | 4 |
5970f937f7dec526fc45d0c33f28e2f0c3f86758 | qixuan | 2025-04-09T09:11:29 | fix(error_reporters): Removing unused code to fix clippy check (#10338) | diff --git a/crates/swc_error_reporters/tests/fixture.rs b/crates/swc_error_reporters/tests/fixture.rs
index b70a8a0c5a..22f59cbd46 100644
--- a/crates/swc_error_reporters/tests/fixture.rs
+++ b/crates/swc_error_reporters/tests/fixture.rs
@@ -7,22 +7,13 @@ use swc_common::{
sync::Lrc,
BytePos, FileName, Sourc... | 1 | 4 | 14 |
fa27919d39153c7e50de28ace1d6c6a0697db94c | Donny/κ°λμ€ | 2025-04-09T08:09:31 | chore: Fix CI for rebase (#10337) | diff --git a/crates/swc_error_reporters/tests/fixture.rs b/crates/swc_error_reporters/tests/fixture.rs
index e87609a96d..b70a8a0c5a 100644
--- a/crates/swc_error_reporters/tests/fixture.rs
+++ b/crates/swc_error_reporters/tests/fixture.rs
@@ -32,15 +32,6 @@ where
let output = Path::new("tests").join("fixture").j... | 1 | 0 | 9 |
0c58b1622a0afb514b56fd981617d3c6f6cb14f2 | κ°λμ€ (Donny) | 2025-04-09T02:41:51 | chore: Format code | diff --git a/crates/swc_error_reporters/tests/fixture.rs b/crates/swc_error_reporters/tests/fixture.rs
index 83f825f4f7..e87609a96d 100644
--- a/crates/swc_error_reporters/tests/fixture.rs
+++ b/crates/swc_error_reporters/tests/fixture.rs
@@ -7,8 +7,10 @@ use swc_common::{
sync::Lrc,
BytePos, FileName, Source... | 1 | 4 | 2 |
a3e4763ff6d0a9164456a0418e8270f9202972b7 | CPunisher | 2025-04-06T06:18:31 | chore: Upgrade `openssl` to fix cargo deny errors (#10319)
See https://github.com/swc-project/swc/actions/runs/14279596252/job/40027480076?pr=10316 | diff --git a/Cargo.lock b/Cargo.lock
index 5f4ac13479..ab86e7f718 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3152,9 +3152,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]]
name = "openssl"
-version = "0.10.70"
+version = "0.10.72"
source = "registry+https://github.com... | 1 | 4 | 4 |
3faae55a170664ff6d22824fe8dcb8cf1a110bec | Donny/κ°λμ€ | 2025-03-31T09:29:38 | fix(bindings/node): Fix build on platforms without plugin (#10301)
**Description:**
Related log: https://github.com/swc-project/swc/actions/runs/14167385153/job/39685609348 | diff --git a/bindings/binding_core_node/src/lib.rs b/bindings/binding_core_node/src/lib.rs
index 0165896a32..e62ed86541 100644
--- a/bindings/binding_core_node/src/lib.rs
+++ b/bindings/binding_core_node/src/lib.rs
@@ -14,6 +14,7 @@ use swc_core::{
common::{sync::Lazy, FilePathMapping, SourceMap},
};
+#[cfg(fea... | 1 | 1 | 0 |
85d1a56fdab952501acc1dd4f59ca3994c3c9c2b | κ°λμ€ (Donny) | 2025-03-31T08:28:21 | chore: Publish crates with `swc_core` `v19.0.0` | diff --git a/Cargo.lock b/Cargo.lock
index 874dc6597e..d3aada947b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4684,7 +4684,7 @@ dependencies = [
[[package]]
name = "swc_bundler"
-version = "12.0.0"
+version = "13.0.0"
dependencies = [
"anyhow",
"crc 2.1.0",
@@ -4740,7 +4740,7 @@ dependencies = [
[[package]... | 6 | 15 | 15 |
2919d1688a880e1fa4c6b1e6595e5aacb9167754 | Donny/κ°λμ€ | 2025-03-31T07:59:42 | fix(es/analysis): Support comments (#10299) | diff --git a/crates/swc/src/wasm_analysis.rs b/crates/swc/src/wasm_analysis.rs
index 681189f45a..75a6c13601 100644
--- a/crates/swc/src/wasm_analysis.rs
+++ b/crates/swc/src/wasm_analysis.rs
@@ -4,18 +4,18 @@ use std::sync::Arc;
use anyhow::{Context, Result};
use common::{
- comments::Comments,
+ comments::Si... | 1 | 62 | 53 |
4046d41af27092da22646fe6acd351fa28c906f6 | Donny/κ°λμ€ | 2025-03-29T02:58:31 | chore(ci): Fix CI (#10291) | diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock
index b8be47b8ef..5ae8f7d064 100644
--- a/bindings/Cargo.lock
+++ b/bindings/Cargo.lock
@@ -249,7 +249,7 @@ dependencies = [
"bitflags 2.9.0",
"cexpr",
"clang-sys",
- "itertools 0.10.5",
+ "itertools 0.13.0",
"log",
"prettyplease",
"proc-macro2",
@@ -32... | 3 | 172 | 136 |
443a6e1df6c103610fe53c5c0946c9ab30e70620 | Donny/κ°λμ€ | 2025-03-27T04:26:08 | chore: Update `par-core` and `chili` (#10277)
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/10243 | diff --git a/Cargo.lock b/Cargo.lock
index 48b7951408..bd6892a92c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -629,9 +629,9 @@ checksum = "2cc9a2cd1dfcbaf58c5a8552616ee811323cc614ffa612857b0ff610b5335b0e"
[[package]]
name = "chili"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-la... | 5 | 77 | 72 |
63bd8a10a9e90bb021d8425cd0563e2f0cd200a0 | Donny/κ°λμ€ | 2025-03-26T11:56:47 | fix(es): Do not reuse `Compiler` for `minify()` and `transform()` (#10273)
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/10272 | diff --git a/bindings/binding_core_node/src/lib.rs b/bindings/binding_core_node/src/lib.rs
index 7a951857bd..02ed410a3a 100644
--- a/bindings/binding_core_node/src/lib.rs
+++ b/bindings/binding_core_node/src/lib.rs
@@ -41,6 +41,12 @@ fn get_compiler() -> Arc<Compiler> {
COMPILER.clone()
}
+fn get_fresh_compiler... | 3 | 20 | 12 |
b23c8cb1385da356ac03398e5457a29b36e1c209 | Donny/κ°λμ€ | 2025-03-26T07:34:31 | refactor: Drop `swc_fast_graph` (#10268)
**Description:**
`petgraph` now allows switching hash function without a fork.
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/10132 | diff --git a/Cargo.lock b/Cargo.lock
index 1c9df979ac..48b7951408 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1622,6 +1622,12 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+[[package]]
+name = "fix... | 12 | 42 | 1,001 |
78e37a1eff64253a8f63885529f5c520be0ea224 | Donny/κ°λμ€ | 2025-03-25T16:42:13 | perf(es/minifier): Use `swc_par_iter` instead of `rayon` (#10267)
**Description:**
We now do not create a thread pool for Rayon. | diff --git a/Cargo.lock b/Cargo.lock
index f33152bbad..67ecee92cb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5429,7 +5429,6 @@ dependencies = [
"phf",
"pretty_assertions",
"radix_fmt",
- "rayon",
"regex",
"rustc-hash 2.1.0",
"ryu-js",
@@ -5449,6 +5448,7 @@ dependencies = [
"swc_ecma_utils",
"swc_ecma_... | 6 | 35 | 71 |
ccb6eb8f043db57c47dabfeb77e78da26e52ae24 | Donny/κ°λμ€ | 2025-03-24T09:33:10 | perf(es/minifier): Process `cons` and `alt` of `IfStmt` in parallel (#10262)
**Description:**
Typically, those are large enough to process in parallel. | diff --git a/crates/swc_ecma_minifier/src/compress/pure/mod.rs b/crates/swc_ecma_minifier/src/compress/pure/mod.rs
index 1a6c235858..7580ea6b85 100644
--- a/crates/swc_ecma_minifier/src/compress/pure/mod.rs
+++ b/crates/swc_ecma_minifier/src/compress/pure/mod.rs
@@ -181,6 +181,15 @@ impl Pure<'_> {
node.vi... | 1 | 25 | 8 |
4985b52cafd22e8f3b32261b2338e942c75f9386 | κ°λμ€ (Donny) | 2025-03-23T12:40:56 | chore: Fix `swc_cli` | diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml
index 7166d52b3a..d6f0d57c53 100644
--- a/bindings/swc_cli/Cargo.toml
+++ b/bindings/swc_cli/Cargo.toml
@@ -20,3 +20,4 @@ plugin = ["swc_cli_impl/plugin"]
[dependencies]
anyhow = { workspace = true }
swc_cli_impl = { workspace = true }
+sw... | 1 | 1 | 0 |
628666386877067c96c32f50b55cda80acde979e | Donny/κ°λμ€ | 2025-03-20T16:31:41 | fix(es/minifier): Fix access to `GLOBALS` in char freq compute (#10239)
**Description:**
The bug was not detected because `chili` is far better for reusing the current thread. | diff --git a/crates/swc_ecma_minifier/src/util/base54.rs b/crates/swc_ecma_minifier/src/util/base54.rs
index 03989398be..9abfa2db29 100644
--- a/crates/swc_ecma_minifier/src/util/base54.rs
+++ b/crates/swc_ecma_minifier/src/util/base54.rs
@@ -4,7 +4,8 @@ use arrayvec::ArrayVec;
use rustc_hash::FxHashSet;
use swc_atom... | 1 | 41 | 34 |
234789d5a8221d0ffdac8b6dac2b549766a2ce4b | κ°λμ€ (Donny) | 2025-03-20T15:23:57 | Revert "Revert "fix(es/minifier): Make `inline_globals` noop by default (#10231)""
This reverts commit 5787f49b0494c87d32e804fd29d05ddbafbd77b0. | diff --git a/bindings/binding_core_wasm/src/types.rs b/bindings/binding_core_wasm/src/types.rs
index 0a406216de..a69989c6dc 100644
--- a/bindings/binding_core_wasm/src/types.rs
+++ b/bindings/binding_core_wasm/src/types.rs
@@ -924,7 +924,7 @@ export interface GlobalPassOption {
/**
* Name of environment variable... | 3 | 4 | 8 |
5787f49b0494c87d32e804fd29d05ddbafbd77b0 | κ°λμ€ (Donny) | 2025-03-20T13:57:46 | Revert "fix(es/minifier): Make `inline_globals` noop by default (#10231)"
This reverts commit b192dc82e6a84bd30f159fb12ca8a216f41e8efb. | diff --git a/bindings/binding_core_wasm/src/types.rs b/bindings/binding_core_wasm/src/types.rs
index a69989c6dc..0a406216de 100644
--- a/bindings/binding_core_wasm/src/types.rs
+++ b/bindings/binding_core_wasm/src/types.rs
@@ -924,7 +924,7 @@ export interface GlobalPassOption {
/**
* Name of environment variable... | 3 | 8 | 4 |
b192dc82e6a84bd30f159fb12ca8a216f41e8efb | Donny/κ°λμ€ | 2025-03-20T04:44:56 | fix(es/minifier): Make `inline_globals` noop by default (#10231)
**Related issue:**
- Closes https://github.com/swc-project/swc/issues/10230 | diff --git a/bindings/binding_core_wasm/src/types.rs b/bindings/binding_core_wasm/src/types.rs
index 0a406216de..a69989c6dc 100644
--- a/bindings/binding_core_wasm/src/types.rs
+++ b/bindings/binding_core_wasm/src/types.rs
@@ -924,7 +924,7 @@ export interface GlobalPassOption {
/**
* Name of environment variable... | 3 | 4 | 8 |
482b63a905ddcc49a0cbf0b5a84f93ca7d2a42df | qixuan | 2025-03-18T13:49:24 | feat(es/fast-lexer): Enhance identifier handling with Unicode support (#10226)
**Description:**
- Added support for Unicode characters in identifiers, allowing for a broader range of valid identifiers.
- Introduced methods to handle Unicode escape sequences and UTF-8 characters in identifiers.
- Updated the lexer to ... | diff --git a/Cargo.lock b/Cargo.lock
index a79a738a17..6edffeceda 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5338,6 +5338,7 @@ dependencies = [
"swc_ecma_visit",
"swc_malloc",
"testing",
+ "unicode-id-start",
"walkdir",
"wide",
]
diff --git a/crates/swc_ecma_fast_parser/Cargo.toml b/crates/swc_ecma_fast_pa... | 7 | 154 | 40 |
540bdf868d888a017e90c9badf8bab49e9b485bb | Nick Randall | 2025-03-18T04:51:09 | fix(es/types): Fix broken types (#10224)
Broken in this commit: https://github.com/nicksrandall/swc/commit/e71b000392a01ecb5a35ec8f0faac9cd79ff2cd1 | diff --git a/bindings/binding_core_wasm/src/types.rs b/bindings/binding_core_wasm/src/types.rs
index 05188fc49d..0a406216de 100644
--- a/bindings/binding_core_wasm/src/types.rs
+++ b/bindings/binding_core_wasm/src/types.rs
@@ -853,7 +853,6 @@ export interface ReactConfig {
/**
* Enable fast refresh feature for R... | 1 | 0 | 1 |
80ccd861a280c133f48e6fe01e80814da8f03cc4 | Donny/κ°λμ€ | 2025-03-17T10:14:07 | fix(es/minifier): Do not drop numbers incorrectly (#10211)
**Description:**
Previously, numbers could be dropped wrongly if they were not zero-valued. It's unrealistic in real-world world source code, but it's still a bug. | diff --git a/crates/swc_ecma_minifier/src/compress/pure/misc.rs b/crates/swc_ecma_minifier/src/compress/pure/misc.rs
index c7bed5328a..c7864bcd48 100644
--- a/crates/swc_ecma_minifier/src/compress/pure/misc.rs
+++ b/crates/swc_ecma_minifier/src/compress/pure/misc.rs
@@ -749,7 +749,7 @@ impl Pure<'_> {
... | 2 | 16 | 14 |
c5f1cbe46762b9b9fa1cc27495675ae32e30c9ed | Donny/κ°λμ€ | 2025-03-15T09:31:20 | test(es/minifier): Disable real-world benchmarks on CI (#10205)
**Description:**
Those benchmarks are too slow. | diff --git a/crates/swc_ecma_minifier/benches/full.rs b/crates/swc_ecma_minifier/benches/full.rs
index 2e9fb2ba58..355540bf9c 100644
--- a/crates/swc_ecma_minifier/benches/full.rs
+++ b/crates/swc_ecma_minifier/benches/full.rs
@@ -52,6 +52,10 @@ fn bench_libs(c: &mut Criterion) {
}
fn bench_real(c: &mut Criterion) ... | 1 | 4 | 0 |
ec3ebe78fff5bce29ec780e45427ede56576d7c4 | Donny/κ°λμ€ | 2025-03-14T10:43:51 | doc(es/minifier): Make `minifier` example utilize comments (#10195) | diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs
index e3c7bfe926..96190d72b2 100644
--- a/crates/swc_ecma_minifier/examples/minify-all.rs
+++ b/crates/swc_ecma_minifier/examples/minify-all.rs
@@ -10,7 +10,7 @@ use std::{
use anyhow::Result;
use rayon::p... | 1 | 5 | 3 |
fcc68842422c0a46eee4d47956e77a727f202998 | Donny/κ°λμ€ | 2025-03-14T10:15:15 | refactor(es/minifier): Remove code for infinite loop (#10194)
**Description:**
We don't provide high `passes` these days | diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs
index ef8fd0be68..008cc577a3 100644
--- a/crates/swc_ecma_minifier/src/compress/mod.rs
+++ b/crates/swc_ecma_minifier/src/compress/mod.rs
@@ -2,7 +2,7 @@
use std::fmt::{self, Debug, Display, Formatter};
#[cfg(feat... | 2 | 6 | 31 |
435197cc84f10095063bbc983969449653e1fc90 | qixuan | 2025-03-12T09:00:35 | perf(es/fast-lexer): Optimize SIMD vector initialization with initialing `u8x16` once. (#10183)
**Description:**
Improves performance and reduces repeated allocations by initialing `u8x16` in global to ensure constants u8x16 initial once.
- Simplifies SIMD vector creation using `u8x16::new()`
- Maintains the pre... | diff --git a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
index 3bb5fe0c32..dc1246b7c0 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
@@ -91,22 +91,22 @@ impl<'a> Cursor<'a> {
/// Advance unti... | 3 | 26 | 25 |
56d065ebcbcddd18cc9ea9406fd0de1e716318fc | qixuan | 2025-03-12T03:16:44 | perf(es/fast-lexer): replace PHF with static keyword lookup table (#10181)
**Description:**
Replaces the perfect hash function (PHF) keyword lookup with a more performant static keyword lookup table. The new implementation:
- Removes dependency on `phf` crate
- Adds a custom static keyword lookup mechanism
- Introdu... | diff --git a/Cargo.lock b/Cargo.lock
index 0d2814381d..80ec32361d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5313,7 +5313,6 @@ dependencies = [
"criterion",
"memchr",
"num-bigint",
- "phf",
"pretty_assertions",
"serde_json",
"swc_atoms",
diff --git a/crates/swc_ecma_fast_parser/Cargo.toml b/crates/swc_ecm... | 5 | 198 | 114 |
bccdafc0c394bf3979da3c6a06d974c7d2c9bcee | Donny/κ°λμ€ | 2025-03-11T02:36:49 | perf(es/fast-lexer): Remove bound checks (#10174)
**Description:**
<img width="779" alt="image"
src="https://github.com/user-attachments/assets/fa830f0d-e77b-47c9-8a2f-86697d254217"
/> | diff --git a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
index 86c91369aa..53324c9359 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
@@ -149,16 +149,16 @@ impl<'a> Cursor<'a> {
unsafe { sel... | 8 | 24 | 24 |
aa204949827e7ef0cb83ab1c0ae589270fc1fd2d | Donny/κ°λμ€ | 2025-03-11T02:34:17 | perf(es/fast-lexer): Optimize memory layout of cursor (#10175)
**Description:**
`pos` and `len` are frequently accessed | diff --git a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
index 39426a1acc..86c91369aa 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/cursor.rs
@@ -10,14 +10,14 @@ use crate::util::unlikely;
/// High-performa... | 1 | 3 | 3 |
1f70af842e3d09614c8187685e2fc503ac1f272a | Donny/κ°λμ€ | 2025-03-11T00:59:55 | perf(es/fast-lexer): Add length-based fast path for keywords (#10176) | diff --git a/crates/swc_ecma_fast_parser/src/token.rs b/crates/swc_ecma_fast_parser/src/token.rs
index 2d684e062e..90efa948a8 100644
--- a/crates/swc_ecma_fast_parser/src/token.rs
+++ b/crates/swc_ecma_fast_parser/src/token.rs
@@ -687,8 +687,92 @@ static KEYWORDS: phf::Map<&'static str, TokenType> = phf_map! {
/// C... | 1 | 84 | 0 |
be60338267eb27c0b96c52fb32ddbf8699d4fe91 | Donny/κ°λμ€ | 2025-03-10T17:14:35 | perf(es/fast-lexer): Use SIMD properly for string literals (#10172) | diff --git a/crates/swc_ecma_fast_parser/src/lexer/string.rs b/crates/swc_ecma_fast_parser/src/lexer/string.rs
index 522e9aa474..44c4ed401a 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/string.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/string.rs
@@ -234,25 +234,22 @@ impl Lexer<'_> {
let newline_v... | 1 | 9 | 12 |
35194e30086de55a52ebad32474b6c571cdd0b9f | Donny/κ°λμ€ | 2025-03-10T17:14:12 | perf(es/fast-lexer): Use `memchr` for `skip_line_comments` (#10173) | diff --git a/Cargo.lock b/Cargo.lock
index dbae5b7720..0d2814381d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5311,6 +5311,7 @@ dependencies = [
"assume",
"codspeed-criterion-compat",
"criterion",
+ "memchr",
"num-bigint",
"phf",
"pretty_assertions",
diff --git a/crates/swc_ecma_fast_parser/Cargo.toml b/cr... | 4 | 22 | 85 |
d97f7b233ff88405710cb3281178fd8e035c40ab | Donny/κ°λμ€ | 2025-03-10T15:45:36 | perf(es/fast-lexer): Optimize `read_identifier` (#10170) | diff --git a/crates/swc_ecma_fast_parser/src/lexer/identifier.rs b/crates/swc_ecma_fast_parser/src/lexer/identifier.rs
index d542317ac2..ba8057247d 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/identifier.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/identifier.rs
@@ -35,274 +35,56 @@ static IDENT_CHAR: [u8; 128]... | 2 | 58 | 423 |
6265dc71596499928ce2367373610b00cbb780f8 | κ°λμ€ (Donny) | 2025-03-07T03:25:20 | Revert "cache splat"
This reverts commit 63e2e888d4725e07ca22852adb9d2d317a2cf01c. | diff --git a/crates/swc_ecma_fast_parser/src/lexer/mod.rs b/crates/swc_ecma_fast_parser/src/lexer/mod.rs
index ada470013c..b60330a21c 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/mod.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/mod.rs
@@ -191,17 +191,6 @@ static TOKEN_DISPATCH: [TokenType; 128] = {
table
... | 2 | 82 | 83 |
63e2e888d4725e07ca22852adb9d2d317a2cf01c | κ°λμ€ (Donny) | 2025-03-07T03:22:34 | cache splat | diff --git a/crates/swc_ecma_fast_parser/src/lexer/mod.rs b/crates/swc_ecma_fast_parser/src/lexer/mod.rs
index b60330a21c..ada470013c 100644
--- a/crates/swc_ecma_fast_parser/src/lexer/mod.rs
+++ b/crates/swc_ecma_fast_parser/src/lexer/mod.rs
@@ -191,6 +191,17 @@ static TOKEN_DISPATCH: [TokenType; 128] = {
table
... | 2 | 83 | 82 |
15ea059712f6726d52b6304870f337a93272bb53 | Donny/κ°λμ€ | 2025-03-07T02:36:11 | perf(es/fast-lexer): Make whitespace skipper use SIMD properly (#10158)
**Description:**
Previously the SIMD function processed one byte at a time. | diff --git a/Cargo.lock b/Cargo.lock
index 72e5089553..eb3ac2d2e9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3828,15 +3828,14 @@ dependencies = [
[[package]]
name = "ring"
-version = "0.17.8"
+version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c17fa4cb658e3583423e91... | 2 | 76 | 57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.