Skip to content

Commit

Permalink
fix(es): Move TargetEnv to loader from ast (#2719)
Browse files Browse the repository at this point in the history
swc_ecma_ast:
 - Move `TargetEnv` to `swc_ecma_loader`.

swc_ecma_loader:
 - Drop unused dependencies.
  • Loading branch information
kdy1 authored Nov 11, 2021
1 parent 1d028fe commit 665c8e0
Show file tree
Hide file tree
Showing 37 changed files with 242 additions and 242 deletions.
58 changes: 28 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/jsdoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/jsdoc/"
edition = "2018"
license = "Apache-2.0/MIT"
name = "jsdoc"
version = "0.46.0"
version = "0.47.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -18,7 +18,7 @@ swc_common = {version = "0.14.0", path = "../swc_common"}
[dev-dependencies]
anyhow = "1"
dashmap = "4.0.2"
swc_ecma_ast = {version = "0.57.0", path = "../swc_ecma_ast"}
swc_ecma_parser = {version = "0.77.0", path = "../swc_ecma_parser"}
swc_ecma_ast = {version = "0.58.0", path = "../swc_ecma_ast"}
swc_ecma_parser = {version = "0.78.0", path = "../swc_ecma_parser"}
testing = {version = "0.15.0", path = "../testing"}
walkdir = "2"
3 changes: 1 addition & 2 deletions crates/node/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ use swc_bundler::{BundleKind, Bundler, Load, ModuleRecord, Resolve};
use swc_common::{collections::AHashMap, Span};
use swc_ecma_ast::{
Bool, Expr, ExprOrSuper, Ident, KeyValueProp, Lit, MemberExpr, MetaPropExpr, PropName, Str,
TargetEnv,
};
use swc_ecma_loader::NODE_BUILTINS;
use swc_ecma_loader::{TargetEnv, NODE_BUILTINS};

struct ConfigItem {
loader: Box<dyn Load>,
Expand Down
28 changes: 14 additions & 14 deletions crates/swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0/MIT"
name = "swc"
repository = "https://github.com/swc-project/swc.git"
version = "0.83.2"
version = "0.84.0"

[lib]
name = "swc"
Expand Down Expand Up @@ -49,27 +49,27 @@ serde_json = "1"
sourcemap = "6"
swc_atoms = {version = "0.2", path = "../swc_atoms"}
swc_common = {version = "0.14.0", path = "../swc_common", features = ["sourcemap", "concurrent"]}
swc_ecma_ast = {version = "0.57.0", path = "../swc_ecma_ast"}
swc_ecma_codegen = {version = "0.79.0", path = "../swc_ecma_codegen"}
swc_ecma_ext_transforms = {version = "0.37.0", path = "../swc_ecma_ext_transforms"}
swc_ecma_ast = {version = "0.58.0", path = "../swc_ecma_ast"}
swc_ecma_codegen = {version = "0.80.0", path = "../swc_ecma_codegen"}
swc_ecma_ext_transforms = {version = "0.38.0", path = "../swc_ecma_ext_transforms"}
swc_ecma_loader = {version = "0.24.1", path = "../swc_ecma_loader", features = ["lru", "node", "tsc"]}
swc_ecma_minifier = {version = "0.49.0", path = "../swc_ecma_minifier"}
swc_ecma_parser = {version = "0.77.0", path = "../swc_ecma_parser"}
swc_ecma_preset_env = {version = "0.64.0", path = "../swc_ecma_preset_env"}
swc_ecma_transforms = {version = "0.93.0", path = "../swc_ecma_transforms", features = [
swc_ecma_minifier = {version = "0.50.0", path = "../swc_ecma_minifier"}
swc_ecma_parser = {version = "0.78.0", path = "../swc_ecma_parser"}
swc_ecma_preset_env = {version = "0.65.0", path = "../swc_ecma_preset_env"}
swc_ecma_transforms = {version = "0.94.0", path = "../swc_ecma_transforms", features = [
"compat",
"module",
"optimization",
"proposal",
"react",
"typescript",
]}
swc_ecma_transforms_base = {version = "0.43.0", path = "../swc_ecma_transforms_base"}
swc_ecma_transforms_compat = {version = "0.50.0", path = "../swc_ecma_transforms_compat"}
swc_ecma_transforms_optimization = {version = "0.63.0", path = "../swc_ecma_transforms_optimization"}
swc_ecma_utils = {version = "0.51.0", path = "../swc_ecma_utils"}
swc_ecma_visit = {version = "0.43.0", path = "../swc_ecma_visit"}
swc_ecmascript = {version = "0.85.0", path = "../swc_ecmascript"}
swc_ecma_transforms_base = {version = "0.44.0", path = "../swc_ecma_transforms_base"}
swc_ecma_transforms_compat = {version = "0.51.0", path = "../swc_ecma_transforms_compat"}
swc_ecma_transforms_optimization = {version = "0.64.0", path = "../swc_ecma_transforms_optimization"}
swc_ecma_utils = {version = "0.52.0", path = "../swc_ecma_utils"}
swc_ecma_visit = {version = "0.44.0", path = "../swc_ecma_visit"}
swc_ecmascript = {version = "0.86.0", path = "../swc_ecmascript"}
swc_visit = {version = "0.2.3", path = "../swc_visit"}
tracing = "0.1.28"

Expand Down
6 changes: 3 additions & 3 deletions crates/swc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ pub mod resolver {
use crate::config::CompiledPaths;
use std::path::PathBuf;
use swc_common::collections::AHashMap;
use swc_ecma_ast::TargetEnv;
use swc_ecma_loader::resolvers::{
lru::CachingResolver, node::NodeModulesResolver, tsc::TsConfigResolver,
use swc_ecma_loader::{
resolvers::{lru::CachingResolver, node::NodeModulesResolver, tsc::TsConfigResolver},
TargetEnv,
};

pub type NodeResolver = CachingResolver<NodeModulesResolver>;
Expand Down
22 changes: 11 additions & 11 deletions crates/swc_bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"]
license = "Apache-2.0/MIT"
name = "swc_bundler"
repository = "https://github.com/swc-project/swc.git"
version = "0.80.0"
version = "0.81.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
Expand Down Expand Up @@ -38,14 +38,14 @@ relative-path = "1.2"
retain_mut = "0.1.2"
swc_atoms = {version = "0.2.4", path = "../swc_atoms"}
swc_common = {version = "0.14.0", path = "../swc_common"}
swc_ecma_ast = {version = "0.57.0", path = "../swc_ecma_ast"}
swc_ecma_codegen = {version = "0.79.0", path = "../swc_ecma_codegen"}
swc_ecma_ast = {version = "0.58.0", path = "../swc_ecma_ast"}
swc_ecma_codegen = {version = "0.80.0", path = "../swc_ecma_codegen"}
swc_ecma_loader = {version = "0.24.0", path = "../swc_ecma_loader"}
swc_ecma_parser = {version = "0.77.0", path = "../swc_ecma_parser"}
swc_ecma_transforms_base = {version = "0.43.0", path = "../swc_ecma_transforms_base"}
swc_ecma_transforms_optimization = {version = "0.63.0", path = "../swc_ecma_transforms_optimization"}
swc_ecma_utils = {version = "0.51.0", path = "../swc_ecma_utils"}
swc_ecma_visit = {version = "0.43.0", path = "../swc_ecma_visit"}
swc_ecma_parser = {version = "0.78.0", path = "../swc_ecma_parser"}
swc_ecma_transforms_base = {version = "0.44.0", path = "../swc_ecma_transforms_base"}
swc_ecma_transforms_optimization = {version = "0.64.0", path = "../swc_ecma_transforms_optimization"}
swc_ecma_utils = {version = "0.52.0", path = "../swc_ecma_utils"}
swc_ecma_visit = {version = "0.44.0", path = "../swc_ecma_visit"}
tracing = "0.1.28"

[dev-dependencies]
Expand All @@ -55,9 +55,9 @@ path-clean = "=0.1.0"
reqwest = {version = "0.11.4", features = ["blocking"]}
sha-1 = "0.9"
swc_ecma_loader = {version = "0.24.0", path = "../swc_ecma_loader", features = ["node", "lru"]}
swc_ecma_minifier = {version = "0.49.0", path = "../swc_ecma_minifier"}
swc_ecma_transforms_react = {version = "0.58.0", path = "../swc_ecma_transforms_react"}
swc_ecma_transforms_typescript = {version = "0.59.0", path = "../swc_ecma_transforms_typescript"}
swc_ecma_minifier = {version = "0.50.0", path = "../swc_ecma_minifier"}
swc_ecma_transforms_react = {version = "0.59.0", path = "../swc_ecma_transforms_react"}
swc_ecma_transforms_typescript = {version = "0.60.0", path = "../swc_ecma_transforms_typescript"}
swc_node_base = {version = "0.5.0", path = "../swc_node_base"}
tempfile = "3.1.0"
testing = {version = "0.15.0", path = "../testing"}
Expand Down
Loading

0 comments on commit 665c8e0

Please sign in to comment.