

[package]
authors       = ["강동윤 <kdy1997.dev@gmail.com>"]
description   = "Speedy web compiler"
documentation = "https://rustdoc.swc.rs/swc/"
edition       = "2021"
include       = ["Cargo.toml", "src/**/*.rs"]
license       = "Apache-2.0"
name          = "swc"
repository    = "https://github.com/swc-project/swc.git"
version       = "0.263.20"

[lib]
bench = false
name  = "swc"

[features]
# TODO: This may need reorganization with swc_core - swc_core allows to optionally enable
# each features (minifier, transforms..) but swc includes all of them.
concurrent = [
  "swc_ecma_transforms/concurrent",
  "swc_common/concurrent",
  "swc_ecma_minifier/concurrent",
]

debug = ["swc_ecma_visit/debug"]
default = ["es3"]
es3 = []
node = ["napi", "napi-derive"]
plugin = [
  "swc_plugin_runner/ecma",
  "swc_plugin_runner/rkyv-impl",
  "swc_plugin_proxy/plugin-rt",
]
plugin_transform_schema_v1 = [
  "swc_common/plugin_transform_schema_v1",
  "swc_plugin_runner/plugin_transform_schema_v1",
]
plugin_transform_schema_vtest = [
  "swc_common/plugin_transform_schema_vtest",
  "swc_plugin_runner/plugin_transform_schema_vtest",
]

plugin_transform_host_js = ["swc_plugin_runner/plugin_transform_host_js"]
plugin_transform_host_native = [
  "swc_plugin_runner/plugin_transform_host_native",
]

[dependencies]
ahash        = "0.8.3"
anyhow       = "1"
base64       = "0.13.0"
dashmap      = "5.1.0"
either       = "1"
indexmap     = { version = "1.6.1", features = ["serde"] }
jsonc-parser = { version = "0.21.0", features = ["serde"] }
lru          = "0.7.1"
once_cell    = "1.18.0"
parking_lot  = "0.12.1"
pathdiff     = "0.2.0"
regex        = "1"
rustc-hash   = "1.1.0"
serde        = { version = "1", features = ["derive"] }
serde_json   = "1"
sourcemap    = "6.2"
tracing      = "0.1.37"
url          = "2.3.1"

swc_atoms = { version = "0.5.6", path = "../swc_atoms" }
swc_cached = { version = "0.3.16", path = "../swc_cached" }
swc_common = { version = "0.31.14", path = "../swc_common", features = [
  "sourcemap",
  "parking_lot",
] }
swc_config = { version = "0.1.6", path = "../swc_config" }
swc_ecma_ast = { version = "0.106.4", path = "../swc_ecma_ast" }
swc_ecma_codegen = { version = "0.141.8", path = "../swc_ecma_codegen" }
swc_ecma_ext_transforms = { version = "0.105.7", path = "../swc_ecma_ext_transforms" }
swc_ecma_lints = { version = "0.84.11", path = "../swc_ecma_lints" }
swc_ecma_loader = { version = "0.43.16", path = "../swc_ecma_loader", features = [
  "cache",
  "node",
  "tsc",
] }
swc_ecma_minifier = { version = "0.183.18", path = "../swc_ecma_minifier" }
swc_ecma_parser = { version = "0.136.5", path = "../swc_ecma_parser" }
swc_ecma_preset_env = { version = "0.197.17", path = "../swc_ecma_preset_env" }
swc_ecma_transforms = { version = "0.220.16", path = "../swc_ecma_transforms", features = [
  "compat",
  "module",
  "optimization",
  "proposal",
  "react",
  "typescript",
] }
swc_ecma_transforms_base = { version = "0.129.11", path = "../swc_ecma_transforms_base" }
swc_ecma_transforms_compat = { version = "0.155.14", path = "../swc_ecma_transforms_compat" }
swc_ecma_transforms_optimization = { version = "0.189.16", path = "../swc_ecma_transforms_optimization" }
swc_ecma_utils = { version = "0.119.7", path = "../swc_ecma_utils" }
swc_ecma_visit = { version = "0.92.3", path = "../swc_ecma_visit" }
swc_error_reporters = { version = "0.15.14", path = "../swc_error_reporters" }
swc_node_comments = { version = "0.18.14", path = "../swc_node_comments" }
swc_plugin_proxy = { version = "0.35.3", path = "../swc_plugin_proxy", optional = true }
swc_plugin_runner = { version = "0.97.5", path = "../swc_plugin_runner", optional = true, default-features = false }
swc_timer = { version = "0.19.17", path = "../swc_timer" }
swc_visit = { version = "0.5.7", path = "../swc_visit" }


  [dependencies.napi-derive]
  default-features = false
  features         = ["type-def"]
  optional         = true
  version          = "2.0.0"

  [dependencies.napi]
  default-features = false
  features         = ["napi3"]
  optional         = true
  version          = "2.0.0"

[dev-dependencies]
ansi_term = "0.12"
criterion = "0.5"
rayon = "1.7.0"
swc_ecma_ast = { version = "0.106.4", path = "../swc_ecma_ast", features = [
  "serde-impl",
] }
swc_ecma_lints = { version = "0.84.11", path = "../swc_ecma_lints", features = [
  "non_critical_lints",
] }
swc_ecma_testing = { version = "0.20.11", path = "../swc_ecma_testing" }
swc_node_base = { version = "0.5.8", path = "../swc_node_base" }
testing = { version = "0.33.17", path = "../testing" }
walkdir = "2"

[[example]]
name = "transform"

[[bench]]
harness = false
name    = "bugs"

[[bench]]
harness = false
name    = "minify"

[[bench]]
harness = false
name    = "typescript"
