From 210f17af8c028dd9742a2e0ff46ce3b3869c6064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 22 Feb 2022 17:05:54 +0900 Subject: [PATCH] build(swc): Remove unused dependencies (#3673) --- .husky/pre-push | 7 ++++++- Cargo.lock | 12 ------------ crates/swc_common/Cargo.toml | 1 - crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_preset_env/Cargo.toml | 1 - crates/swc_ecma_preset_env/tests/test.rs | 1 - crates/swc_plugin_runner/Cargo.toml | 9 ++++----- 7 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 773ddb6a000..7708d3fad69 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,4 +3,9 @@ # yarn run cspell "**/src/**/*.rs" cargo fmt --all -- --check -cargo clippy \ No newline at end of file + + +if [ -z ${SWC_SKIP_CLIPPY+x} ]; +then + cargo clippy +fi diff --git a/Cargo.lock b/Cargo.lock index 910833e7869..6c49ec33e16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1663,15 +1663,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "parking_lot" version = "0.11.1" @@ -2761,7 +2752,6 @@ dependencies = [ "from_variant", "num-bigint", "once_cell", - "owning_ref", "parking_lot 0.12.0", "rayon", "rkyv", @@ -3069,7 +3059,6 @@ dependencies = [ "swc_ecma_utils", "swc_ecma_visit", "testing", - "walkdir", ] [[package]] @@ -3504,7 +3493,6 @@ name = "swc_plugin_runner" version = "0.38.0" dependencies = [ "anyhow", - "libloading", "once_cell", "parking_lot 0.12.0", "serde", diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 36cdb3ab97e..e87f7cbe36f 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -39,7 +39,6 @@ either = "1.5" from_variant = {version = "0.1.3", path = "../from_variant"} num-bigint = "0.2" once_cell = "1.9.0" -owning_ref = "0.4" parking_lot = {version = "0.12.0", optional = true} rkyv = {version = "0.7.28", optional = true} rustc-hash = "1.1.0" diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 1f49cbe42d9..592f7d3029f 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -19,10 +19,10 @@ swc_atoms = {version = "0.2", path = "../swc_atoms"} swc_common = {version = "0.17.3", path = "../swc_common"} swc_ecma_ast = {version = "0.68.0", path = "../swc_ecma_ast"} swc_ecma_codegen_macros = {version = "0.6.0", path = "../swc_ecma_codegen_macros"} -swc_ecma_parser = {version = "0.91.0", path = "../swc_ecma_parser"} tracing = "0.1" [dev-dependencies] swc_common = {version = "0.17.3", path = "../swc_common", features = ["sourcemap"]} +swc_ecma_parser = {version = "0.91.0", path = "../swc_ecma_parser"} swc_node_base = {version = "0.5.0", path = "../swc_node_base"} testing = {version = "0.18.0", path = "../testing"} diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index ad872ef04fa..307b39170f1 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -27,7 +27,6 @@ swc_ecma_ast = {version = "0.68.0", path = "../swc_ecma_ast"} swc_ecma_transforms = {version = "0.120.0", path = "../swc_ecma_transforms", features = ["compat", "proposal"]} swc_ecma_utils = {version = "0.68.0", path = "../swc_ecma_utils"} swc_ecma_visit = {version = "0.54.0", path = "../swc_ecma_visit"} -walkdir = "2" [dev-dependencies] pretty_assertions = "0.7.2" diff --git a/crates/swc_ecma_preset_env/tests/test.rs b/crates/swc_ecma_preset_env/tests/test.rs index 7d7a18f67f1..9a0c277498c 100644 --- a/crates/swc_ecma_preset_env/tests/test.rs +++ b/crates/swc_ecma_preset_env/tests/test.rs @@ -112,7 +112,6 @@ impl Default for UseBuiltIns { enum Error { Io(io::Error), Var(env::VarError), - WalkDir(walkdir::Error), Json(serde_json::Error), Msg(String), } diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index 752075a1703..c530a3b8b6b 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -10,22 +10,21 @@ version = "0.38.0" [dependencies] anyhow = "1.0.42" -libloading = "0.7.0" once_cell = "1.9.0" parking_lot = "0.12.0" serde = {version = "1.0.126", features = ["derive"]} serde_json = "1.0.64" -swc_atoms = {version = "0.2.7", path = '../swc_atoms'} swc_common = {version = "0.17.0", path = "../swc_common", features = ["plugin-rt", "concurrent"]} swc_ecma_ast = {version = "0.68.0", path = "../swc_ecma_ast", features = ["rkyv-impl"]} -swc_ecma_loader = { version = "0.28.0", path = "../swc_ecma_loader" } -swc_ecma_parser = {version = "0.91.0", path = "../swc_ecma_parser"} wasmer = "2.1.1" wasmer-cache = "2.1.1" wasmer-wasi = "2.1.1" [dev-dependencies] +swc_atoms = {version = "0.2.7", path = '../swc_atoms'} +swc_ecma_loader = {version = "0.28.0", path = "../swc_ecma_loader"} +swc_ecma_parser = {version = "0.91.0", path = "../swc_ecma_parser"} +swc_ecma_visit = {version = "0.54.0", path = "../swc_ecma_visit"} testing = {version = "0.18.0", path = "../testing"} -swc_ecma_visit = { version = "0.54.0", path = "../swc_ecma_visit" } [features]