Files
Donny/강동윤andGitHub 717ea8a9a2 refactor: Remove production tracing hooks (#11945)
**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
2026-06-18 17:24:12 +09:00

47 lines
1.4 KiB
TOML

[package]
authors = ["강동윤 <[email protected]>"]
build = "build.rs"
edition = "2021"
exclude = ["artifacts.json", "index.node"]
license = "Apache-2.0"
name = "binding_minifier_node"
publish = false
version = "0.2.0"
[lib]
bench = false
crate-type = ["cdylib"]
[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"] }
serde = { workspace = true, features = ["derive"] }
tracing = { workspace = true, features = ["release_max_level_info"] }
swc_compiler_base = { path = "../../crates/swc_compiler_base", features = [
"node",
] }
swc_config = { path = "../../crates/swc_config", features = ["regex"] }
swc_core = { path = "../../crates/swc_core", features = [
"allocator_node",
"common_concurrent",
"common_sourcemap",
"ecma_ast",
"ecma_codegen",
"ecma_parser",
"ecma_minifier",
"ecma_minifier_concurrent",
"ecma_transforms",
"ecma_visit",
] }
swc_error_reporters = { path = "../../crates/swc_error_reporters" }
swc_malloc = { path = "../../crates/swc_malloc" }
swc_nodejs_common = { path = "../../crates/swc_nodejs_common" }