2021-12-20 09:03:00 +03:00
|
|
|
[package]
|
2023-01-28 21:32:28 +03:00
|
|
|
authors = ["강동윤 <kdy1997.dev@gmail.com>", "OJ Kwon <kwon.ohjoong@gmail.com>"]
|
2022-02-12 07:48:40 +03:00
|
|
|
description = "Commandline for SWC"
|
2023-01-28 21:32:28 +03:00
|
|
|
edition = "2021"
|
|
|
|
include = ["Cargo.toml", "src/**/*.rs"]
|
|
|
|
license = "Apache-2.0"
|
|
|
|
name = "swc_cli"
|
|
|
|
repository = "https://github.com/swc-project/swc.git"
|
2023-06-19 06:36:16 +03:00
|
|
|
version = "0.91.51"
|
2021-12-20 09:03:00 +03:00
|
|
|
|
|
|
|
[[bin]]
|
2022-04-04 14:12:03 +03:00
|
|
|
bench = false
|
2023-01-28 21:32:28 +03:00
|
|
|
name = "swc"
|
|
|
|
path = "./src/main.rs"
|
2021-12-20 09:03:00 +03:00
|
|
|
|
2022-03-16 01:45:40 +03:00
|
|
|
[features]
|
|
|
|
default = []
|
refactor(plugin/runner): Revise cache, module loading (#7408)
**Description:**
One of the oversight around design of `TransformExecutor` is
encapsulating plugin module logic. It has access to the cache and do its
own loading & storing. This means consumer of plugin runner have tricky
challenge to control its caching system. First, there is no way to
escape how swc_plugin_runner controls cache and cannot synchronize into
their own, also depends on the usecases cannot control the features they
want to opt in: for example, there's no way one interface uses in-memory
cache, and another uses filesystem since it is compile time configured
singleton.
PR revisits overall design of TransformExecutor: now it accepts a tratir
`PluginModuleBytes`, which abstracts any kind of bytes we are dealing
with, such as raw file slice or serialized `wasmer::Module`. Cache
instantiation and managing is now bubbled up to the application level
(`swc` in here), so if someone wants non-singleton caching or integrate
into their own caching system it can be customized.
Lastly, deprecated `memory_cache` feature and only exposes
`filesystem_cache`. Cache implementation uses in-memory is always
available, and can opt in filesystem cache where it's supported.
**BREAKING CHANGE:**
This is clearly breaking changes for the consumers of swc_core. for the
@swc/core, this PR takes care of necessary changes. I'll work on
next-swc changes later once we have new @swc/core version with this
changes.
2023-05-18 10:05:39 +03:00
|
|
|
plugin = [
|
|
|
|
"swc_core/plugin_transform_host_native",
|
|
|
|
"swc_core/plugin_transform_host_native_filesystem_cache",
|
|
|
|
]
|
2022-03-16 01:45:40 +03:00
|
|
|
|
2021-12-20 09:03:00 +03:00
|
|
|
[dependencies]
|
2022-11-02 07:53:22 +03:00
|
|
|
anyhow = "1.0.66"
|
2022-03-11 17:00:55 +03:00
|
|
|
atty = "0.2.14"
|
2023-01-28 21:32:28 +03:00
|
|
|
clap = { version = "3.1.0", features = ["derive", "wrap_help"] }
|
2022-04-04 14:12:03 +03:00
|
|
|
glob = "0.3.0"
|
2022-02-17 14:02:54 +03:00
|
|
|
rayon = "1"
|
|
|
|
relative-path = "1.6.1"
|
2023-01-28 21:32:28 +03:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
serde_json = { version = "1", features = ["unbounded_depth"] }
|
2023-02-27 05:37:32 +03:00
|
|
|
sourcemap = "6.2.2"
|
2023-06-19 06:24:49 +03:00
|
|
|
swc_core = { version = "0.78.8", features = [
|
2022-08-05 08:11:40 +03:00
|
|
|
"trace_macro",
|
|
|
|
"common_concurrent",
|
2022-09-08 10:17:11 +03:00
|
|
|
"base_concurrent",
|
2023-01-28 21:32:28 +03:00
|
|
|
] }
|
2022-11-02 07:53:22 +03:00
|
|
|
tracing = "0.1.37"
|
2022-03-31 10:11:31 +03:00
|
|
|
tracing-chrome = "0.5.0"
|
2022-02-26 06:32:46 +03:00
|
|
|
tracing-futures = "0.2.5"
|
2023-01-28 21:32:28 +03:00
|
|
|
tracing-subscriber = { version = "0.3.9", features = ["env-filter"] }
|
2022-03-11 17:00:55 +03:00
|
|
|
walkdir = "2"
|
2022-02-17 14:02:54 +03:00
|
|
|
|
2023-01-28 21:32:28 +03:00
|
|
|
[dependencies.path-absolutize]
|
|
|
|
features = ["once_cell_cache"]
|
|
|
|
version = "3.0.11"
|