2022-08-02 10:25:59 +03:00
|
|
|
[package]
|
2022-12-06 15:24:55 +03:00
|
|
|
authors = ["강동윤 <kdy1997.dev@gmail.com>", "OJ Kwon <kwon.ohjoong@gmail.com>"]
|
|
|
|
description = "TBD"
|
2022-08-11 13:00:43 +03:00
|
|
|
documentation = "https://rustdoc.swc.rs/swc_core/"
|
2022-12-06 15:24:55 +03:00
|
|
|
edition = "2021"
|
|
|
|
license = "Apache-2.0"
|
|
|
|
name = "swc_core"
|
|
|
|
repository = "https://github.com/swc-project/swc.git"
|
2023-07-13 05:09:23 +03:00
|
|
|
version = "0.79.15"
|
2022-12-06 15:24:55 +03:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
features = [
|
|
|
|
"common_perf",
|
|
|
|
"allocator_node",
|
|
|
|
"base",
|
|
|
|
"base_node",
|
|
|
|
"common",
|
|
|
|
"ecma_visit",
|
|
|
|
"quote",
|
|
|
|
"utils",
|
|
|
|
"ecma_transforms",
|
|
|
|
"bundler",
|
|
|
|
"ecma_loader",
|
|
|
|
"ecma_ast",
|
|
|
|
"trace_macro",
|
|
|
|
"plugin_transform",
|
|
|
|
]
|
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2022-08-03 05:30:17 +03:00
|
|
|
|
2022-08-05 10:37:42 +03:00
|
|
|
[lib]
|
2022-12-06 15:24:55 +03:00
|
|
|
bench = false
|
2022-08-05 10:37:42 +03:00
|
|
|
doctest = false
|
2022-08-03 06:38:05 +03:00
|
|
|
|
2022-08-02 10:25:59 +03:00
|
|
|
[features]
|
|
|
|
### Public features
|
|
|
|
### Users should opt in necessary features explicitly
|
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
## Flags to opt into certain optimizations. In most cases this won't expose new interfaces,
|
|
|
|
## but changes internal logics to perform differently. These flag should be turned on in combination with
|
|
|
|
## actual features. Refer build.rs for more details.
|
2022-08-05 08:11:40 +03:00
|
|
|
|
|
|
|
# swc_common/perf
|
|
|
|
common_perf = ["swc_common/perf"]
|
|
|
|
|
2022-08-23 06:43:01 +03:00
|
|
|
# swc_ecma_loader/cache*
|
2022-12-06 15:24:55 +03:00
|
|
|
ecma_loader_lru = ["swc_ecma_loader/lru"]
|
2023-04-04 05:22:47 +03:00
|
|
|
ecma_loader_parking_lot = ["swc_ecma_loader/parking_lot"]
|
2022-08-23 06:43:01 +03:00
|
|
|
|
|
|
|
# swc_ecma_minifier/concurrent
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_minifier_concurrent = ["swc_ecma_minifier/concurrent"]
|
2022-08-23 06:43:01 +03:00
|
|
|
|
2022-08-24 04:23:20 +03:00
|
|
|
# swc_bundler/concurrent
|
|
|
|
bundler_concurrent = ["swc_bundler/concurrent"]
|
|
|
|
|
2022-08-05 08:11:40 +03:00
|
|
|
# configures specific memory allocator.
|
|
|
|
# node.js binding should depend on this.
|
|
|
|
allocator_node = ["swc_node_base"]
|
2022-08-03 06:38:05 +03:00
|
|
|
|
2022-08-02 10:25:59 +03:00
|
|
|
## General
|
2022-08-05 08:11:40 +03:00
|
|
|
# Enable swc reexports. To avoid confusion between swc_core namespace,
|
|
|
|
# it is named as 'base' instead.
|
2022-12-06 15:24:55 +03:00
|
|
|
base = ["__base"]
|
2022-08-05 08:11:40 +03:00
|
|
|
base_concurrent = ["__base", "swc/concurrent"]
|
2022-08-14 04:15:56 +03:00
|
|
|
# Enables n-api related features.
|
|
|
|
base_node = [
|
|
|
|
"__base",
|
2022-12-06 15:24:55 +03:00
|
|
|
"swc/node", # Assume if anyone enables n-api related codes, they may would like to use # some utility functions as well.
|
2022-08-14 04:15:56 +03:00
|
|
|
"swc_nodejs_common",
|
|
|
|
]
|
2022-08-05 08:11:40 +03:00
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Enable swc_common reexports.
|
|
|
|
#
|
|
|
|
# In most cases, top-level features (i.e plugin, or plugin_host) will include this, so no need to
|
|
|
|
# explicitly opt in. However, if top-level feature should be controlled by feature as opt-in
|
|
|
|
# and some other dependent feature need this, can be manually selected.
|
|
|
|
# refer binding_core_wasm for example: it has plugin_transform_host feature, but
|
|
|
|
# it has to be a feature to be enabled by compile time flag to avoid cargo's feature collision,
|
|
|
|
# while it also need to access 'common' exports by default for cargo check / or clippy.
|
2022-12-06 15:24:55 +03:00
|
|
|
common = ["__common"]
|
2022-09-11 05:04:15 +03:00
|
|
|
common_sourcemap = ["__common", "swc_common/sourcemap"]
|
2022-08-05 08:11:40 +03:00
|
|
|
# TODO: internally concurrent / perf refers to the same feature (`parking_lot`)
|
|
|
|
# - can we consolidate them?
|
|
|
|
common_concurrent = ["__common", "swc_common/concurrent"]
|
|
|
|
|
2022-09-21 10:37:08 +03:00
|
|
|
common_tty = ["__common", "swc_common/tty-emitter"]
|
|
|
|
|
2022-08-05 08:11:40 +03:00
|
|
|
# Enable swc_ecma_visit
|
2022-12-06 15:24:55 +03:00
|
|
|
ecma_visit = ["__visit"]
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_visit_path = ["__visit", "swc_ecma_visit/path"]
|
2022-08-03 06:38:05 +03:00
|
|
|
|
2022-08-02 10:25:59 +03:00
|
|
|
# Enable `quote!` macro support.
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_quote = [
|
2022-08-05 10:37:42 +03:00
|
|
|
# Dependent features
|
|
|
|
"__common",
|
2022-12-06 15:24:55 +03:00
|
|
|
"ecma_ast", # Enable optional package
|
2022-08-05 10:37:42 +03:00
|
|
|
"swc_ecma_quote_macros",
|
|
|
|
]
|
2022-08-02 10:25:59 +03:00
|
|
|
|
2022-08-05 08:11:40 +03:00
|
|
|
# Enable swc_ecma_utils
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_utils = ["__utils", "__common"]
|
2022-08-05 08:11:40 +03:00
|
|
|
|
|
|
|
# Enable swc_ecma_transforms base features
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_transforms = ["__ecma_transforms"]
|
2022-11-30 12:30:02 +03:00
|
|
|
ecma_transforms_compat = ["__ecma_transforms", "swc_ecma_transforms_compat"]
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_transforms_module = ["__ecma_transforms", "swc_ecma_transforms_module"]
|
|
|
|
ecma_transforms_optimization = [
|
|
|
|
"__ecma_transforms",
|
|
|
|
"swc_ecma_transforms_optimization",
|
|
|
|
]
|
2022-11-30 12:30:02 +03:00
|
|
|
ecma_transforms_proposal = ["__ecma_transforms", "swc_ecma_transforms_proposal"]
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_transforms_react = ["__ecma_transforms", "swc_ecma_transforms_react"]
|
|
|
|
ecma_transforms_typescript = [
|
|
|
|
"__ecma_transforms",
|
|
|
|
"swc_ecma_transforms_typescript",
|
|
|
|
]
|
2022-08-05 08:11:40 +03:00
|
|
|
|
|
|
|
# Enable swc_bundler
|
2022-12-06 15:24:55 +03:00
|
|
|
bundler = ["__bundler"]
|
2022-08-14 04:15:56 +03:00
|
|
|
bundler_node_v1 = ["__bundler", "swc_node_bundler/swc_v1"]
|
|
|
|
bundler_node_v2 = ["__bundler", "swc_node_bundler/swc_v2"]
|
2022-08-05 08:11:40 +03:00
|
|
|
|
|
|
|
# Enable swc_ecma_loader
|
2022-12-06 15:24:55 +03:00
|
|
|
ecma_loader = ["__ecma_loader"]
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_loader_node = ["__ecma_loader", "swc_ecma_loader/node"]
|
2022-12-06 15:24:55 +03:00
|
|
|
ecma_loader_tsc = ["__ecma_loader", "swc_ecma_loader/tsc"]
|
2022-08-05 08:11:40 +03:00
|
|
|
|
2022-08-09 04:49:06 +03:00
|
|
|
# Enable swc_ecma_transforms_testing
|
2022-09-02 04:24:27 +03:00
|
|
|
testing_transform = ["__ecma", "__testing_transform"]
|
2022-08-09 04:49:06 +03:00
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Enable swc_ecma_ast / swc_atoms support.
|
|
|
|
# TODO: currently both are enabled at once, we may want to separate them.
|
2023-03-27 07:28:42 +03:00
|
|
|
ecma_ast = ["__ecma", "swc_ecma_ast", "swc_atoms"]
|
|
|
|
ecma_ast_serde = ["ecma_ast", "swc_ecma_ast/serde-impl"]
|
2022-08-03 06:38:05 +03:00
|
|
|
|
2022-08-23 06:43:01 +03:00
|
|
|
# Enable swc_ecma_parser support.
|
2022-12-06 15:24:55 +03:00
|
|
|
ecma_parser = ["__parser"]
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_parser_typescript = ["__parser", "swc_ecma_parser/typescript"]
|
2022-08-23 06:43:01 +03:00
|
|
|
|
|
|
|
# Enable swc_cached support
|
|
|
|
cached = ["__cached"]
|
|
|
|
|
|
|
|
# Enable swc_ecma_codegen
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_codegen = ["__ecma", "swc_ecma_codegen"]
|
2022-08-23 06:43:01 +03:00
|
|
|
|
|
|
|
# Enable swc_ecma_minifier
|
2022-09-02 04:24:27 +03:00
|
|
|
ecma_minifier = ["__ecma", "swc_ecma_minifier"]
|
2022-08-23 06:43:01 +03:00
|
|
|
|
2022-10-08 03:51:18 +03:00
|
|
|
# Enable swc_ecma_preset_env
|
|
|
|
ecma_preset_env = ["__ecma", "swc_ecma_preset_env"]
|
|
|
|
|
2022-12-07 14:53:49 +03:00
|
|
|
# Enable swc_ecma_usage_analyzer
|
|
|
|
ecma_usage_analyzer = ["__ecma", "swc_ecma_usage_analyzer"]
|
|
|
|
|
2022-08-24 04:23:20 +03:00
|
|
|
# Enable swc_css
|
2022-12-06 15:24:55 +03:00
|
|
|
css_ast = ["__css", "swc_css_ast"]
|
2023-03-27 07:28:42 +03:00
|
|
|
css_ast_serde = ["css_ast", "swc_css_ast/serde-impl"]
|
2022-12-06 15:24:55 +03:00
|
|
|
css_codegen = ["__css", "swc_css_codegen"]
|
|
|
|
css_compat = ["__css", "swc_css_compat"]
|
|
|
|
css_minifier = ["__css", "swc_css_minifier"]
|
|
|
|
css_modules = ["__css", "swc_css_modules"]
|
|
|
|
css_parser = ["__css", "swc_css_parser"]
|
|
|
|
css_prefixer = ["__css", "swc_css_prefixer"]
|
|
|
|
css_utils = ["__css", "swc_css_utils"]
|
|
|
|
css_visit = ["__css", "swc_css_visit"]
|
2022-09-02 04:24:27 +03:00
|
|
|
css_visit_path = ["__css", "swc_css_visit/path"]
|
2022-08-24 04:23:20 +03:00
|
|
|
|
2022-09-13 01:31:26 +03:00
|
|
|
# Utilities for testing.
|
|
|
|
testing = ["dep:testing"]
|
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Enable trace macro support.
|
|
|
|
# TODO: Once all top-level package (node, wasm, cli..) imports swc_core,
|
|
|
|
# we may encapsulate `tracing` package into swc_core.
|
|
|
|
trace_macro = ["swc_trace_macro"]
|
|
|
|
|
2022-08-10 06:10:19 +03:00
|
|
|
binding_macro_native = ["__binding_macros", "binding_macros/binding_native"]
|
2022-12-06 15:24:55 +03:00
|
|
|
binding_macro_wasm = ["__binding_macros", "binding_macros/binding_wasm"]
|
2022-08-10 06:10:19 +03:00
|
|
|
|
2022-08-02 10:25:59 +03:00
|
|
|
## Plugins
|
|
|
|
# Top level features should be enabled to write plugins for the custom transform.
|
2022-12-02 15:45:17 +03:00
|
|
|
common_plugin_transform = [
|
|
|
|
"__common_plugin_transform",
|
2022-08-09 04:49:06 +03:00
|
|
|
"__plugin_transform_schema_v1",
|
|
|
|
"__testing_transform",
|
|
|
|
]
|
2022-08-03 06:38:05 +03:00
|
|
|
|
2022-12-06 15:24:55 +03:00
|
|
|
css_plugin_transform = ["common_plugin_transform", "__css_plugin_transform"]
|
2022-12-02 15:45:17 +03:00
|
|
|
ecma_plugin_transform = ["common_plugin_transform", "__ecma_plugin_transform"]
|
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Host features to enable plugin `runner` runtime.
|
|
|
|
# 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)
|
2022-08-05 08:11:40 +03:00
|
|
|
plugin_transform_host_js = [
|
2022-08-02 10:25:59 +03:00
|
|
|
# Dependent features
|
2022-08-03 06:38:05 +03:00
|
|
|
"__plugin_transform_host",
|
|
|
|
"__plugin_transform_host_schema_v1",
|
2022-08-05 08:11:40 +03:00
|
|
|
"__plugin_transform_env_js",
|
2022-08-03 06:38:05 +03:00
|
|
|
]
|
2022-08-05 08:11:40 +03:00
|
|
|
plugin_transform_host_native = [
|
2022-08-03 06:38:05 +03:00
|
|
|
# Dependent features
|
|
|
|
"__plugin_transform_host",
|
|
|
|
"__plugin_transform_host_schema_v1",
|
2022-08-05 08:11:40 +03:00
|
|
|
"__plugin_transform_env_native",
|
2023-05-14 09:06:24 +03:00
|
|
|
]
|
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
|
|
|
# Enables FileSystemCache support for the plugin runner.
|
|
|
|
plugin_transform_host_native_filesystem_cache = [
|
|
|
|
"swc_plugin_runner/filesystem_cache",
|
2022-08-02 10:25:59 +03:00
|
|
|
]
|
|
|
|
|
2023-06-08 05:19:07 +03:00
|
|
|
plugin_transform_host_native_shared_runtime = [
|
|
|
|
"swc_plugin_runner/plugin_transform_host_native_shared_runtime",
|
|
|
|
]
|
2022-08-02 10:25:59 +03:00
|
|
|
### Internal features that public features are relying on.
|
|
|
|
### This is not supposed to be used directly, and does not gaurantee
|
|
|
|
### stability across each versions.
|
|
|
|
|
|
|
|
# Specify version of AST schema will be used.
|
|
|
|
# This'll be automatically selected via transform_plugin features,
|
|
|
|
# SWC upstream decides which version to be used for specific version of
|
|
|
|
# swc_core.
|
2022-08-03 06:38:05 +03:00
|
|
|
__plugin_transform_host_schema_v1 = [
|
2022-08-05 08:11:40 +03:00
|
|
|
# Dependent features
|
2022-12-06 15:24:55 +03:00
|
|
|
"__plugin_transform_schema_v1", # Enable optional features
|
2022-08-05 08:11:40 +03:00
|
|
|
"swc/plugin_transform_schema_v1",
|
2022-08-03 06:38:05 +03:00
|
|
|
"swc_plugin_runner/plugin_transform_schema_v1",
|
|
|
|
]
|
2022-08-05 08:11:40 +03:00
|
|
|
__plugin_transform_schema_v1 = ["swc_common/plugin_transform_schema_v1"]
|
2022-08-02 10:25:59 +03:00
|
|
|
|
|
|
|
# Do not use: testing purpose only
|
2022-08-03 06:38:05 +03:00
|
|
|
__plugin_transform_host_schema_vtest = [
|
2022-08-05 08:11:40 +03:00
|
|
|
# Dependent features
|
2022-12-06 15:24:55 +03:00
|
|
|
"__plugin_transform_schema_vtest", # Enable optional features
|
2022-08-05 08:11:40 +03:00
|
|
|
"swc/plugin_transform_schema_vtest",
|
2022-08-03 06:38:05 +03:00
|
|
|
"swc_plugin_runner/plugin_transform_schema_vtest",
|
|
|
|
]
|
2022-08-05 08:11:40 +03:00
|
|
|
__plugin_transform_schema_vtest = ["swc_common/plugin_transform_schema_vtest"]
|
2022-08-02 10:25:59 +03:00
|
|
|
|
|
|
|
## Plugins
|
|
|
|
|
2022-09-09 11:05:51 +03:00
|
|
|
# Internal flags for any transform plugin feature
|
2022-12-02 15:45:17 +03:00
|
|
|
__common_plugin_transform = [
|
2022-08-02 10:25:59 +03:00
|
|
|
# Dependent features
|
2022-09-02 04:24:27 +03:00
|
|
|
"ecma_visit",
|
2022-08-05 08:11:40 +03:00
|
|
|
"__common",
|
2022-08-12 07:36:52 +03:00
|
|
|
"swc_atoms/rkyv-impl",
|
2022-09-16 05:43:59 +03:00
|
|
|
"swc_plugin_macro",
|
|
|
|
"once_cell",
|
2022-12-02 15:45:17 +03:00
|
|
|
"swc_plugin",
|
|
|
|
]
|
|
|
|
|
|
|
|
__css_plugin_transform = [
|
2023-05-22 07:07:55 +03:00
|
|
|
"swc_common/plugin-mode",
|
|
|
|
"swc_plugin_proxy/plugin-mode",
|
|
|
|
|
2022-12-02 15:45:17 +03:00
|
|
|
# Dependent features
|
|
|
|
"__common_plugin_transform",
|
|
|
|
"css_visit",
|
2022-12-06 15:24:55 +03:00
|
|
|
"css_ast", # Enable optional packages
|
2022-12-02 15:45:17 +03:00
|
|
|
"swc_css_ast/rkyv-impl",
|
|
|
|
]
|
|
|
|
__ecma_plugin_transform = [
|
2023-05-22 07:07:55 +03:00
|
|
|
"swc_common/plugin-mode",
|
|
|
|
"swc_plugin_proxy/plugin-mode",
|
|
|
|
|
2022-12-02 15:45:17 +03:00
|
|
|
# Dependent features
|
|
|
|
"__common_plugin_transform",
|
|
|
|
"ecma_visit",
|
2022-12-06 15:24:55 +03:00
|
|
|
"ecma_ast", # Enable optional packages
|
2022-12-02 15:45:17 +03:00
|
|
|
"swc_ecma_ast/rkyv-impl",
|
2022-09-16 05:43:59 +03:00
|
|
|
]
|
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Internal flags for any transform plugin host feature
|
2022-08-05 08:11:40 +03:00
|
|
|
__plugin_transform_host = [
|
|
|
|
# Dependent features
|
2022-12-06 15:24:55 +03:00
|
|
|
"__common", # Enable optional packages
|
2022-08-12 07:36:52 +03:00
|
|
|
"swc_ecma_ast/rkyv-impl",
|
|
|
|
"swc_atoms/rkyv-impl",
|
|
|
|
"swc_common/plugin-rt",
|
2022-10-10 12:05:43 +03:00
|
|
|
"swc_plugin_runner/rkyv-impl", # TODO: we may simply flag around downlevel plugin feature
|
2022-08-05 08:11:40 +03:00
|
|
|
"swc_plugin_proxy/plugin-rt",
|
|
|
|
"swc/plugin",
|
|
|
|
]
|
2022-09-09 11:05:51 +03:00
|
|
|
|
2022-08-05 08:11:40 +03:00
|
|
|
# Internal flags to control plugin environment
|
|
|
|
__plugin_transform_env_native = [
|
2023-04-10 06:40:25 +03:00
|
|
|
"swc/plugin_transform_host_native",
|
|
|
|
"swc_plugin_runner/plugin_transform_host_native",
|
2022-08-05 08:11:40 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
__plugin_transform_env_js = [
|
2023-04-10 06:40:25 +03:00
|
|
|
"swc/plugin_transform_host_js",
|
|
|
|
"swc_plugin_runner/plugin_transform_host_js",
|
2022-08-05 08:11:40 +03:00
|
|
|
]
|
2022-08-02 10:25:59 +03:00
|
|
|
|
2022-08-03 06:38:05 +03:00
|
|
|
# Do not use: testing purpose only
|
|
|
|
# Force enable different version of AST schema
|
|
|
|
__plugin_transform_schema_test = [
|
2022-12-02 15:45:17 +03:00
|
|
|
"__common_plugin_transform",
|
2022-08-03 06:38:05 +03:00
|
|
|
"__plugin_transform_schema_vtest",
|
|
|
|
]
|
|
|
|
|
|
|
|
## Common
|
2022-09-02 04:24:27 +03:00
|
|
|
__base = ["swc"]
|
|
|
|
__binding_macros = [
|
|
|
|
"__ecma",
|
|
|
|
"common",
|
|
|
|
"__base",
|
|
|
|
"__ecma_transforms",
|
|
|
|
"ecma_ast",
|
|
|
|
"binding_macros",
|
|
|
|
]
|
|
|
|
__bundler = ["swc_bundler"]
|
|
|
|
__cached = ["swc_cached"]
|
|
|
|
__common = ["swc_common"]
|
|
|
|
__css = []
|
2022-09-04 06:19:42 +03:00
|
|
|
__ecma = ["swc_ecma_transforms_base"]
|
2022-09-02 04:24:27 +03:00
|
|
|
__ecma_loader = ["__ecma", "swc_ecma_loader"]
|
|
|
|
__ecma_transforms = ["__ecma"]
|
|
|
|
__parser = ["__ecma", "swc_ecma_parser"]
|
|
|
|
__testing_transform = ["__ecma", "swc_ecma_transforms_testing"]
|
|
|
|
__utils = ["__ecma", "swc_ecma_utils"]
|
|
|
|
__visit = ["__ecma", "swc_ecma_visit"]
|
2022-08-02 10:25:59 +03:00
|
|
|
|
|
|
|
[dependencies]
|
2022-08-03 06:38:05 +03:00
|
|
|
# 3rd party dependencies
|
2023-06-22 10:40:41 +03:00
|
|
|
once_cell = { optional = true, version = "1.18.0" }
|
2022-08-03 06:38:05 +03:00
|
|
|
|
|
|
|
# swc_* dependencies
|
2023-07-13 05:09:23 +03:00
|
|
|
binding_macros = { optional = true, version = "0.53.14", path = "../binding_macros" }
|
|
|
|
swc = { optional = true, version = "0.264.14", path = "../swc" }
|
2023-07-05 06:52:51 +03:00
|
|
|
swc_atoms = { optional = true, version = "0.5.7", path = "../swc_atoms" }
|
2023-07-13 05:09:23 +03:00
|
|
|
swc_bundler = { optional = true, version = "0.217.12", path = "../swc_bundler" }
|
2023-06-22 16:40:52 +03:00
|
|
|
swc_cached = { optional = true, version = "0.3.17", path = "../swc_cached" }
|
2023-07-05 06:52:51 +03:00
|
|
|
swc_common = { optional = true, version = "0.31.17", path = "../swc_common" }
|
|
|
|
swc_css_ast = { optional = true, version = "0.137.17", path = "../swc_css_ast" }
|
|
|
|
swc_css_codegen = { optional = true, version = "0.147.20", path = "../swc_css_codegen" }
|
|
|
|
swc_css_compat = { optional = true, version = "0.23.20", path = "../swc_css_compat" }
|
|
|
|
swc_css_minifier = { optional = true, version = "0.112.20", path = "../swc_css_minifier" }
|
|
|
|
swc_css_modules = { optional = true, version = "0.25.22", path = "../swc_css_modules" }
|
|
|
|
swc_css_parser = { optional = true, version = "0.146.20", path = "../swc_css_parser" }
|
|
|
|
swc_css_prefixer = { optional = true, version = "0.149.22", path = "../swc_css_prefixer" }
|
|
|
|
swc_css_utils = { optional = true, version = "0.134.17", path = "../swc_css_utils/" }
|
|
|
|
swc_css_visit = { optional = true, version = "0.136.17", path = "../swc_css_visit" }
|
|
|
|
swc_ecma_ast = { optional = true, version = "0.107.1", path = "../swc_ecma_ast" }
|
2023-07-13 05:09:23 +03:00
|
|
|
swc_ecma_codegen = { optional = true, version = "0.142.3", path = "../swc_ecma_codegen" }
|
2023-07-05 06:52:51 +03:00
|
|
|
swc_ecma_loader = { optional = true, version = "0.43.19", path = "../swc_ecma_loader" }
|
2023-07-13 05:09:23 +03:00
|
|
|
swc_ecma_minifier = { optional = true, version = "0.184.12", path = "../swc_ecma_minifier" }
|
|
|
|
swc_ecma_parser = { optional = true, version = "0.137.3", path = "../swc_ecma_parser" }
|
|
|
|
swc_ecma_preset_env = { optional = true, version = "0.198.9", path = "../swc_ecma_preset_env" }
|
|
|
|
swc_ecma_quote_macros = { optional = true, version = "0.48.3", path = "../swc_ecma_quote_macros" }
|
|
|
|
swc_ecma_transforms_base = { optional = true, version = "0.130.3", path = "../swc_ecma_transforms_base" }
|
|
|
|
swc_ecma_transforms_compat = { optional = true, version = "0.156.7", path = "../swc_ecma_transforms_compat" }
|
|
|
|
swc_ecma_transforms_module = { optional = true, version = "0.173.7", path = "../swc_ecma_transforms_module" }
|
|
|
|
swc_ecma_transforms_optimization = { optional = true, version = "0.190.8", path = "../swc_ecma_transforms_optimization" }
|
|
|
|
swc_ecma_transforms_proposal = { optional = true, version = "0.164.7", path = "../swc_ecma_transforms_proposal" }
|
|
|
|
swc_ecma_transforms_react = { optional = true, version = "0.176.7", path = "../swc_ecma_transforms_react" }
|
|
|
|
swc_ecma_transforms_testing = { optional = true, version = "0.133.3", path = "../swc_ecma_transforms_testing" }
|
|
|
|
swc_ecma_transforms_typescript = { optional = true, version = "0.180.7", path = "../swc_ecma_transforms_typescript" }
|
|
|
|
swc_ecma_usage_analyzer = { optional = true, version = "0.16.4", path = "../swc_ecma_usage_analyzer" }
|
|
|
|
swc_ecma_utils = { optional = true, version = "0.120.3", path = "../swc_ecma_utils" }
|
2023-07-05 06:52:51 +03:00
|
|
|
swc_ecma_visit = { optional = true, version = "0.93.1", path = "../swc_ecma_visit" }
|
2022-12-06 15:24:55 +03:00
|
|
|
swc_node_base = { optional = true, version = "0.5.8", path = "../swc_node_base" }
|
2023-07-13 05:09:23 +03:00
|
|
|
swc_node_bundler = { optional = true, version = "0.51.14", path = "../swc_node_bundler" }
|
2023-06-22 16:40:52 +03:00
|
|
|
swc_nodejs_common = { optional = true, version = "0.0.8", path = "../swc_nodejs_common" }
|
2022-12-06 15:24:55 +03:00
|
|
|
swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" }
|
2023-06-21 18:44:11 +03:00
|
|
|
swc_plugin_macro = { optional = true, version = "0.9.15", path = "../swc_plugin_macro" }
|
2023-07-05 06:52:51 +03:00
|
|
|
swc_plugin_proxy = { optional = true, version = "0.36.1", path = "../swc_plugin_proxy" }
|
2023-06-21 18:44:11 +03:00
|
|
|
swc_trace_macro = { optional = true, version = "0.1.3", path = "../swc_trace_macro" }
|
2023-07-05 06:52:51 +03:00
|
|
|
testing = { optional = true, version = "0.33.20", path = "../testing" }
|
2022-08-03 06:38:05 +03:00
|
|
|
# TODO: eventually swc_plugin_runner needs to remove default features
|
2023-07-13 05:09:23 +03:00
|
|
|
swc_plugin_runner = { optional = true, version = "0.98.4", path = "../swc_plugin_runner", default-features = false }
|
2022-08-05 10:37:42 +03:00
|
|
|
|
2022-08-18 07:29:19 +03:00
|
|
|
[build-dependencies]
|
2022-12-06 15:24:55 +03:00
|
|
|
vergen = { version = "7.3.2", default-features = false, features = ["cargo"] }
|
2022-11-18 04:21:23 +03:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-06-22 10:40:41 +03:00
|
|
|
anyhow = "1.0.71"
|