1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
Description: avoid WASM-only crates
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-04-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/crates/binding_macros/Cargo.toml
+++ b/crates/binding_macros/Cargo.toml
@@ -12,24 +12,6 @@
[features]
binding_native = []
-binding_wasm = [
- # SWC features
- "swc",
- "swc_common",
- "swc_ecma_transforms",
- "swc_ecma_ast",
- "swc_ecma_visit",
-
- # Optional packages
- "once_cell",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "js-sys",
- "serde",
- "serde-wasm-bindgen",
- "anyhow",
- "console_error_panic_hook",
-]
[dependencies]
# Common deps for the SWC imports
@@ -38,21 +20,3 @@
swc_ecma_ast = { optional = true, version = "18.0.0", path = "../swc_ecma_ast", default-features = false }
swc_ecma_transforms = { optional = true, version = "39.0.0", path = "../swc_ecma_transforms", default-features = false }
swc_ecma_visit = { optional = true, version = "18.0.1", path = "../swc_ecma_visit", default-features = false }
-
-# Optional deps for the wasm binding macro
-anyhow = { workspace = true, optional = true }
-console_error_panic_hook = { workspace = true, optional = true }
-js-sys = { workspace = true, optional = true }
-once_cell = { workspace = true, optional = true }
-serde = { workspace = true, features = ["derive"], optional = true }
-serde-wasm-bindgen = { workspace = true, optional = true }
-
-
-[dependencies.wasm-bindgen]
-features = ["enable-interning"]
-optional = true
-workspace = true
-
-[dependencies.wasm-bindgen-futures]
-optional = true
-workspace = true
--- a/crates/swc_core/Cargo.toml
+++ b/crates/swc_core/Cargo.toml
@@ -178,7 +178,6 @@
trace_macro = ["swc_trace_macro"]
binding_macro_native = ["__binding_macros", "binding_macros/binding_native"]
-binding_macro_wasm = ["__binding_macros", "binding_macros/binding_wasm"]
## Plugins
# Top level features should be enabled to write plugins for the custom transform.
@@ -205,12 +204,6 @@
# native feature is for the host environment does not have, or cannot access
# to the wasm runtime (i.e cli, or @swc/core node bindings).
# js feature is for the environment can access wasm runtime (i.e @swc/wasm)
-plugin_transform_host_js = [
- # Dependent features
- "__plugin_transform_host",
- "__plugin_transform_host_schema_v1",
- "__plugin_transform_env_js",
-]
plugin_transform_host_native = [
# Dependent features
"__plugin_transform_host",
@@ -294,7 +287,6 @@
]
# Internal flags to control plugin environment
-__plugin_transform_env_js = ["swc/plugin_transform_host_js"]
__plugin_transform_env_native = ["swc/plugin_transform_host_native"]
# Do not use: testing purpose only
--- a/crates/swc_ts_fast_strip/Cargo.toml
+++ b/crates/swc_ts_fast_strip/Cargo.toml
@@ -33,7 +33,6 @@
swc_ecma_transforms_react = { version = "33.0.0", path = "../swc_ecma_transforms_react" }
swc_ecma_transforms_typescript = { version = "33.0.0", path = "../swc_ecma_transforms_typescript" }
swc_ecma_visit = { version = "18.0.1", path = "../swc_ecma_visit" }
-wasm-bindgen = { workspace = true, optional = true }
[dev-dependencies]
testing = { version = "18.0.0", path = "../testing" }
|