Skip to content

Commit f4e4974

Browse files
authored
chore(deps): Remove unused deps with cargo-shear (#10765)
**Description:** This could be helpful to the binary size
1 parent 7986c3b commit f4e4974

File tree

75 files changed

+45
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+45
-434
lines changed

Cargo.lock

Lines changed: 0 additions & 187 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ resolver = "2"
2424
ascii = "1.1.0"
2525
assert_cmd = "2.0.12"
2626
assert_fs = "1.0.13"
27-
assume = "0.5.0"
2827
auto_impl = "1.2.0"
29-
backtrace = "0.3.61"
3028
base64 = "0.22.1"
3129
bitflags = "2.5.0"
3230
browserslist-rs = "0.19.0"
3331
bumpalo = "3.16.0"
3432
bytes-str = "0.2.5"
3533
cargo_metadata = "0.18.1"
36-
cfg-if = "1.0.0"
3734
changesets = "0.2.2"
38-
chili = "0.2.1"
3935
chrono = "0.4.38"
4036
codspeed-criterion-compat = "2.6.0"
4137
compact_str = "0.7.1"
@@ -44,7 +40,6 @@ resolver = "2"
4440
cow-replace = "0.1.1"
4541
crc = "2.1.0"
4642
criterion = "0.5.1"
47-
crossbeam-queue = "0.3.11"
4843
dashmap = "5.5.3"
4944
dialoguer = "0.10.2"
5045
difference = "2"
@@ -73,7 +68,6 @@ resolver = "2"
7368
nom = "7.1.3"
7469
ntest = "0.7.2"
7570
num-bigint = "0.4.3"
76-
num-traits = "0.2.15"
7771
num_cpus = "1.13.1"
7872
once_cell = "1.19.0"
7973
par-core = { version = "2.0.0", default-features = false }
@@ -85,7 +79,6 @@ resolver = "2"
8579
phf = "0.11.2"
8680
pretty_assertions = "1.3"
8781
proc-macro2 = "1.0.24"
88-
ptr_meta = "0.3.0"
8982
quote = "1.0.7"
9083
radix_fmt = "1.0.0"
9184
rand = "0.8.5"
@@ -121,22 +114,32 @@ resolver = "2"
121114
toml = "0.8.2"
122115
tracing = "0.1.40"
123116
tracing-chrome = "0.5.0"
124-
tracing-futures = "0.2.5"
125117
tracing-subscriber = "0.3.18"
126118
triomphe = "0.1.13"
127-
typed-arena = "2.0.1"
128-
unicode-id = "0.3"
129119
unicode-id-start = "1.2.0"
130120
unicode-width = "0.1.4"
131121
url = "2.5.4"
132122
vergen = { version = "9.0.0", default-features = false }
133-
virtual-fs = { version = "0.600.0", default-features = false }
134123
walkdir = "2.4.0"
135124
wasm-bindgen = "0.2.91"
136125
wasm-bindgen-futures = "0.4.41"
137126
wasmer = { version = "6.0.0", default-features = false }
138127
wasmer-wasix = { version = "0.600.0", default-features = false }
139-
wide = "0.7.32"
128+
129+
[workspace.metadata.cargo-shear]
130+
# `serde` is used when #[ast_node] is expanded
131+
# the rests are used for enabling features
132+
ignored = [
133+
"par-core",
134+
"serde",
135+
"napi",
136+
"napi-derive",
137+
"indexmap",
138+
"tracing",
139+
"num-bigint",
140+
"swc_ecma_utils",
141+
]
142+
140143

141144
[profile.release]
142145
lto = true

crates/ast_node/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ bench = false
1313
proc-macro = true
1414

1515
[dependencies]
16-
proc-macro2 = { workspace = true }
1716
quote = { workspace = true }
1817

1918
swc_macros_common = { version = "1.0.1", path = "../swc_macros_common" }

crates/dbg-swc/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ sha1 = { workspace = true }
2525
tempfile = { workspace = true }
2626
tracing = { workspace = true }
2727
tracing-subscriber = { workspace = true, features = ["fmt", "env-filter"] }
28-
url = { workspace = true }
29-
30-
swc_atoms = { version = "6.0.0", path = "../swc_atoms" }
3128
swc_common = { version = "13.0.3", features = [
3229
"concurrent",
3330
"tty-emitter",

crates/from_variant/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ bench = false
1313
proc-macro = true
1414

1515
[dependencies]
16-
proc-macro2 = { workspace = true }
1716

1817
swc_macros_common = { version = "1.0.1", path = "../swc_macros_common" }
1918
[dependencies.syn]

crates/hstr/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ serde = ["dep:serde"]
2121
hashbrown = { workspace = true }
2222
new_debug_unreachable = { workspace = true }
2323
once_cell = { workspace = true }
24-
phf = { workspace = true }
2524
rkyv = { workspace = true, optional = true }
2625
rustc-hash = { workspace = true }
2726
serde = { workspace = true, optional = true }

crates/jsdoc/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ swc_atoms = { version = "6.0.0", path = "../swc_atoms" }
2323
swc_common = { version = "13.0.3", path = "../swc_common" }
2424

2525
[dev-dependencies]
26-
anyhow = { workspace = true }
27-
dashmap = { workspace = true }
28-
29-
swc_ecma_ast = { version = "13.0.0", path = "../swc_ecma_ast" }
26+
dashmap = { workspace = true }
3027
swc_ecma_parser = { version = "18.0.1", path = "../swc_ecma_parser" }
3128
testing = { version = "14.0.0", path = "../testing" }

crates/string_enum/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ bench = false
1313
proc-macro = true
1414

1515
[dependencies]
16-
proc-macro2 = { workspace = true }
1716
quote = { workspace = true }
1817
swc_macros_common = { version = "1.0.1", path = "../swc_macros_common" }
1918
[dependencies.syn]

crates/swc/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ dashmap = { workspace = true }
6060
either = { workspace = true }
6161
indexmap = { workspace = true, features = ["serde"] }
6262
jsonc-parser = { workspace = true, features = ["serde"] }
63-
lru = { workspace = true }
6463
once_cell = { workspace = true }
6564
par-core = { workspace = true }
6665
par-iter = { workspace = true }
6766
parking_lot = { workspace = true }
68-
pathdiff = { workspace = true }
6967
regex = { workspace = true }
7068
rustc-hash = { workspace = true }
7169
serde = { workspace = true, features = ["derive"] }
@@ -121,7 +119,6 @@ swc_visit = { version = "2.0.1", path = "../swc_visit" }
121119
optional = true
122120
workspace = true
123121

124-
125122
[dependencies.napi]
126123
features = ["napi3"]
127124
optional = true
@@ -135,8 +132,6 @@ swc_visit = { version = "2.0.1", path = "../swc_visit" }
135132
[dev-dependencies]
136133
ansi_term = { workspace = true }
137134
criterion = { workspace = true }
138-
flate2 = { workspace = true }
139-
humansize = { workspace = true }
140135
walkdir = { workspace = true }
141136

142137

crates/swc_allocator/Cargo.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ nightly = [
2121
"bumpalo/allocator_api",
2222
"hashbrown/nightly",
2323
]
24-
rkyv = ["dep:rkyv", "dep:rancor"]
25-
serde = ["dep:serde"]
24+
# This two features are actually useless
25+
rkyv = []
26+
serde = []
2627
# This feature is used to suppress warnings about slowness caused by stable rustc.
2728
# It's recommended to use nightly rustc until the allocator APIs are stabilized.
2829
skip-warning = []
@@ -32,12 +33,7 @@ skip-warning = []
3233
allocator-api2 = { workspace = true }
3334
bumpalo = { workspace = true, features = ["allocator-api2"] }
3435
hashbrown = { workspace = true, optional = true }
35-
ptr_meta = { workspace = true }
36-
rancor = { workspace = true, optional = true }
37-
rkyv = { workspace = true, optional = true }
3836
rustc-hash = { workspace = true }
39-
serde = { workspace = true, optional = true }
40-
triomphe = { workspace = true }
4137

4238

4339
[dev-dependencies]

0 commit comments

Comments
 (0)