mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
**Description:** This removes the production tracing implementation paths from SWC while preserving the JS and CLI compatibility surfaces as deprecated no-ops. - Delete the `swc_timer` and `swc_trace_macro` crates. - Remove `swc_core`'s `trace_macro` feature and re-export. - Remove timer and `#[swc_trace]` usages from Rust crates. - Gate remaining tracing spans/events/instrumentation so they do not run in release builds. - Keep JS, Node binding, and CLI trace APIs available as deprecated no-ops. - Remove unused tracing subscriber/chrome dependencies and refresh committed lockfiles. **BREAKING CHANGE:** The Rust crates `swc_timer` and `swc_trace_macro` are removed. The `swc_core/trace_macro` feature is removed instead of being kept as a compatibility alias. JS and CLI trace entrypoints remain available but are deprecated no-ops and no trace output files are produced. **Validation:** - `git submodule update --init --recursive` - `cargo fmt --all` - `cargo check --all --all-targets` - `cargo check --release --all --all-targets` - `cargo clippy --all --all-targets -- -D warnings` - `pnpm install --frozen-lockfile` - `(cd packages/core && pnpm build:dev && pnpm test)` - `(cd packages/minifier && pnpm build:dev && pnpm test)` - Verified no remaining `swc_timer`, `swc_trace_macro`, `trace_macro`, `timer!`, or `#[swc_trace]` references in source/manifests/lockfiles. Broad `cargo test` was attempted and stopped on unrelated/environment issues: an existing Flow fixture failure in `swc`, missing local `deno` for `swc_bundler`, and a helper fixture diff in `swc_ecma_transforms_base`. **Related issue (if exists):** N/A
67 lines
1.9 KiB
TOML
67 lines
1.9 KiB
TOML
[package]
|
|
authors = ["강동윤 <[email protected]>"]
|
|
build = "build.rs"
|
|
edition = "2021"
|
|
exclude = ["artifacts.json", "index.node"]
|
|
license = "Apache-2.0"
|
|
name = "binding_core_node"
|
|
publish = false
|
|
version = "0.2.0"
|
|
|
|
[lib]
|
|
bench = false
|
|
crate-type = ["cdylib"]
|
|
|
|
[features]
|
|
default = ["swc_v1", "plugin"]
|
|
plugin = [
|
|
"swc_core/plugin_backend_wasmer",
|
|
"swc_core/plugin_transform_host_native",
|
|
"swc_core/plugin_transform_host_native_filesystem_cache",
|
|
]
|
|
swc_v1 = ["swc_core/bundler_node_v1"]
|
|
swc_v2 = ["swc_core/bundler_node_v2"]
|
|
|
|
# Internal flag for testing purpose only.
|
|
__plugin_transform_vtest = [
|
|
# We know what we're doing - enable internal features for testing fixture setup.
|
|
"swc_core/__plugin_transform_host",
|
|
"swc_core/__plugin_transform_host_schema_vtest",
|
|
"swc_core/__plugin_transform_env_native",
|
|
]
|
|
|
|
[build-dependencies]
|
|
napi-build = { workspace = true }
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
backtrace = { workspace = true }
|
|
napi = { workspace = true, features = ["napi3", "serde-json"] }
|
|
napi-derive = { workspace = true, features = ["type-def"] }
|
|
par-core = { workspace = true, features = ["chili"] }
|
|
path-clean = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["unbounded_depth"] }
|
|
tracing = { workspace = true, features = ["release_max_level_info"] }
|
|
|
|
swc_core = { path = "../../crates/swc_core", features = [
|
|
"allocator_node",
|
|
"ecma_ast",
|
|
"ecma_minifier",
|
|
"ecma_codegen",
|
|
"ecma_ast_serde",
|
|
"common_concurrent",
|
|
"bundler",
|
|
"ecma_loader",
|
|
"ecma_helpers_inline",
|
|
"ecma_transforms",
|
|
"ecma_visit",
|
|
"base_node",
|
|
"base_concurrent",
|
|
"base_flow",
|
|
"base_module",
|
|
"base_react_compiler",
|
|
] }
|
|
swc_malloc = { path = "../../crates/swc_malloc" }
|