Skip to content

Commit 8aeb507

Browse files
authored
refactor: merge binding crates into rspack_binding_values (#8761)
refactor: init
1 parent 27aed6f commit 8aeb507

Some content is hidden

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

60 files changed

+134
-187
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pnpm-lock.yaml
2828
/crates/node_binding
2929
/crates/rspack_ast_viewer
3030
/crates/rspack_base64
31-
/crates/rspack_binding_options
3231
/crates/rspack_core
3332
/crates/rspack_core/src/compiler/make @jerrykingxyz
3433
/crates/rspack_error

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ jobs:
319319
320320
- name: Run test
321321
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
322-
run: cargo test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture
322+
run: cargo test --workspace --exclude rspack_node -- --nocapture
323323

324324
rust_test_miri:
325325
name: Rust test miri
@@ -350,7 +350,7 @@ jobs:
350350
env:
351351
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-disable-isolation
352352
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200
353-
run: cargo miri test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture
353+
run: cargo miri test --workspace --exclude rspack_node -- --nocapture
354354

355355
run_rust_benchmark:
356356
name: Run rust benchmark

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ rspack_allocator = { version = "0.2.0", path = "crates/rsp
110110
rspack_ast = { version = "0.2.0", path = "crates/rspack_ast" }
111111
rspack_base64 = { version = "0.2.0", path = "crates/rspack_base64" }
112112
rspack_binding = { version = "0.2.0", path = "crates/rspack_binding" }
113-
rspack_binding_options = { version = "0.2.0", path = "crates/rspack_binding_options" }
114113
rspack_binding_values = { version = "0.2.0", path = "crates/rspack_binding_values" }
115114
rspack_builtin = { version = "0.2.0", path = "crates/rspack_builtin" }
116115
rspack_cacheable = { version = "0.2.0", path = "crates/rspack_cacheable" }

crates/node_binding/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ version = "0.2.0"
1010
crate-type = ["cdylib"]
1111

1212
[features]
13-
default = []
14-
plugin = ["rspack_binding_options/plugin"]
13+
plugin = ["rspack_binding_values/plugin"]
1514

1615
[dependencies]
1716
ropey = { workspace = true }
1817
rspack_allocator = { workspace = true }
19-
rspack_binding_options = { workspace = true }
2018
rspack_binding_values = { workspace = true }
2119
rspack_collections = { workspace = true }
2220
rspack_core = { workspace = true }

crates/node_binding/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::sync::{Arc, Mutex};
1010

1111
use compiler::{Compiler, CompilerState, CompilerStateGuard};
1212
use napi::bindgen_prelude::*;
13-
use rspack_binding_options::BuiltinPlugin;
1413
use rspack_core::{Compilation, PluginExt};
1514
use rspack_error::Diagnostic;
1615
use rspack_fs::IntermediateFileSystem;
@@ -25,7 +24,6 @@ mod resolver_factory;
2524
pub use diagnostic::*;
2625
use plugins::*;
2726
use resolver_factory::*;
28-
use rspack_binding_options::*;
2927
use rspack_binding_values::*;
3028
use rspack_tracing::chrome::FlushGuard;
3129

@@ -84,7 +82,7 @@ impl Rspack {
8482
compiler_path,
8583
compiler_options,
8684
plugins,
87-
rspack_binding_options::buildtime_plugins::buildtime_plugins(),
85+
rspack_binding_values::buildtime_plugins::buildtime_plugins(),
8886
Some(Arc::new(NodeFileSystem::new(output_filesystem).map_err(
8987
|e| Error::from_reason(format!("Failed to create writable filesystem: {e}",)),
9088
)?)),

crates/rspack_binding_options/Cargo.toml

Lines changed: 0 additions & 83 deletions
This file was deleted.

crates/rspack_binding_options/LICENSE

Lines changed: 0 additions & 22 deletions
This file was deleted.

crates/rspack_binding_options/src/lib.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

crates/rspack_binding_values/Cargo.toml

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,83 @@ license = "MIT"
55
name = "rspack_binding_values"
66
repository = "https://github.com/web-infra-dev/rspack"
77
version = "0.2.0"
8+
9+
[features]
10+
plugin = ["rspack_loader_swc/plugin"]
11+
12+
[package.metadata.cargo-shear]
13+
ignored = ["tracing"]
14+
815
[dependencies]
9-
cow-utils = { workspace = true }
10-
futures = { workspace = true }
11-
heck = { workspace = true }
12-
napi = { workspace = true, features = ["async", "tokio_rt", "serde-json", "anyhow"] }
13-
napi-derive = { workspace = true }
14-
rspack_collections = { workspace = true }
15-
rspack_core = { workspace = true }
16-
rspack_error = { workspace = true }
17-
rspack_napi = { workspace = true }
18-
rspack_plugin_html = { workspace = true }
19-
rspack_plugin_runtime = { workspace = true }
20-
rspack_regex = { workspace = true }
21-
rspack_util = { workspace = true }
22-
rustc-hash = { workspace = true }
23-
serde = { workspace = true }
24-
serde_json = { workspace = true }
16+
async-trait = { workspace = true }
17+
cow-utils = { workspace = true }
18+
derive_more = { workspace = true, features = ["debug"] }
19+
futures = { workspace = true }
20+
glob = { workspace = true }
21+
heck = { workspace = true }
22+
napi = { workspace = true, features = ["async", "tokio_rt", "serde-json", "anyhow"] }
23+
napi-derive = { workspace = true }
24+
pollster = { workspace = true }
25+
rspack_cacheable = { workspace = true }
26+
rspack_collections = { workspace = true }
27+
rspack_core = { workspace = true }
28+
rspack_error = { workspace = true }
29+
rspack_hook = { workspace = true }
30+
rspack_ids = { workspace = true }
31+
rspack_napi = { workspace = true }
32+
rspack_napi_macros = { workspace = true }
33+
rspack_paths = { workspace = true }
34+
rspack_regex = { workspace = true }
35+
rspack_util = { workspace = true }
36+
rustc-hash = { workspace = true }
37+
serde = { workspace = true }
38+
serde_json = { workspace = true }
39+
swc_core = { workspace = true, default-features = false, features = ["ecma_transforms_react"] }
40+
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "test-util", "parking_lot"] }
41+
tracing = { workspace = true }
42+
43+
44+
rspack_loader_lightningcss = { workspace = true }
45+
rspack_loader_preact_refresh = { workspace = true }
46+
rspack_loader_react_refresh = { workspace = true }
47+
rspack_loader_runner = { workspace = true }
48+
rspack_loader_swc = { workspace = true }
49+
rspack_loader_testing = { workspace = true }
50+
rspack_plugin_asset = { workspace = true }
51+
rspack_plugin_banner = { workspace = true }
52+
rspack_plugin_context_replacement = { workspace = true }
53+
rspack_plugin_copy = { workspace = true }
54+
rspack_plugin_css = { workspace = true }
55+
rspack_plugin_devtool = { workspace = true }
56+
rspack_plugin_dll = { workspace = true }
57+
rspack_plugin_dynamic_entry = { workspace = true }
58+
rspack_plugin_ensure_chunk_conditions = { workspace = true }
59+
rspack_plugin_entry = { workspace = true }
60+
rspack_plugin_externals = { workspace = true }
61+
rspack_plugin_extract_css = { workspace = true }
62+
rspack_plugin_hmr = { workspace = true }
63+
rspack_plugin_html = { workspace = true }
64+
rspack_plugin_ignore = { workspace = true }
65+
rspack_plugin_javascript = { workspace = true }
66+
rspack_plugin_json = { workspace = true }
67+
rspack_plugin_lazy_compilation = { workspace = true }
68+
rspack_plugin_library = { workspace = true }
69+
rspack_plugin_lightning_css_minimizer = { workspace = true }
70+
rspack_plugin_limit_chunk_count = { workspace = true }
71+
rspack_plugin_merge_duplicate_chunks = { workspace = true }
72+
rspack_plugin_mf = { workspace = true }
73+
rspack_plugin_no_emit_on_errors = { workspace = true }
74+
rspack_plugin_progress = { workspace = true }
75+
rspack_plugin_real_content_hash = { workspace = true }
76+
rspack_plugin_remove_duplicate_modules = { workspace = true }
77+
rspack_plugin_remove_empty_chunks = { workspace = true }
78+
rspack_plugin_runtime = { workspace = true }
79+
rspack_plugin_runtime_chunk = { workspace = true }
80+
rspack_plugin_schemes = { workspace = true }
81+
rspack_plugin_size_limits = { workspace = true }
82+
rspack_plugin_split_chunks = { workspace = true }
83+
rspack_plugin_swc_js_minimizer = { workspace = true }
84+
rspack_plugin_warn_sensitive_module = { workspace = true }
85+
rspack_plugin_wasm = { workspace = true }
86+
rspack_plugin_web_worker_template = { workspace = true }
87+
rspack_plugin_worker = { workspace = true }

0 commit comments

Comments
 (0)