Skip to content

Commit

Permalink
build: Update swc_core to 0.99.x (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Jul 18, 2024
1 parent e602dd7 commit 83d5fd1
Show file tree
Hide file tree
Showing 128 changed files with 759 additions and 732 deletions.
347 changes: 136 additions & 211 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions packages/emotion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-emotion

## 3.0.10

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 3.0.9

### Patch Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/emotion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
serde = "1"
serde_json = "1.0.117"
swc_common = { version = "0.34.3", features = ["concurrent"] }
swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.115.1"
swc_ecma_utils = "0.130.1"
swc_ecma_visit = "0.101.0"
swc_common = { version = "0.36.0", features = ["concurrent"] }
swc_core = { version = "0.99.2", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.117.0"
swc_ecma_utils = "0.133.1"
swc_ecma_visit = "0.103.1"
swc_emotion = { path = "./transform" }
swc_plugin_macro = "0.9.16"
swc_plugin_proxy = "0.44.0"
swc_plugin_proxy = "0.46.0"
tracing = { version = "0.1.40", features = ["release_max_level_off"] }
6 changes: 6 additions & 0 deletions packages/emotion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Source code for plugin itself (not transforms) are copied from https://github.co
# @swc/plugin-emotion
## 3.0.10
### Patch Changes
- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)
## 3.0.9
### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-emotion",
"version": "3.0.9",
"version": "3.0.10",
"description": "SWC plugin for emotion css-in-js library",
"main": "swc_plugin_emotion.wasm",
"scripts": {
Expand Down
20 changes: 10 additions & 10 deletions packages/emotion/transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = { workspace = true }
name = "swc_emotion"
repository = { workspace = true }
rust-version = { workspace = true }
version = "0.72.16"
version = "0.72.17"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -22,17 +22,17 @@ regex = "1.10"
serde = "1"
sourcemap = "8.0.1"
swc_atoms = "0.6.7"
swc_common = "0.34.3"
swc_ecma_ast = "0.115.1"
swc_ecma_codegen = "0.151.1"
swc_ecma_utils = "0.130.1"
swc_ecma_visit = "0.101.0"
swc_common = "0.36.0"
swc_ecma_ast = "0.117.0"
swc_ecma_codegen = "0.154.0"
swc_ecma_utils = "0.133.1"
swc_ecma_visit = "0.103.1"
swc_trace_macro = "0.1.3"
tracing = { version = "0.1.40" }

[dev-dependencies]
serde_json = "1"
swc_ecma_parser = "0.146.7"
swc_ecma_transforms_react = "0.186.2"
swc_ecma_transforms_testing = "0.143.1"
testing = "0.36.0"
swc_ecma_parser = "0.148.0"
swc_ecma_transforms_react = "0.189.0"
swc_ecma_transforms_testing = "0.146.0"
testing = "0.38.0"
38 changes: 17 additions & 21 deletions packages/emotion/transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use swc_atoms::JsWord;
use swc_common::{comments::Comments, util::take::Take, BytePos, SourceMapperDyn, DUMMY_SP};
use swc_ecma_ast::{
ArrayLit, CallExpr, Callee, ClassDecl, ClassMethod, ClassProp, Expr, ExprOrSpread, FnDecl, Id,
Ident, ImportDecl, ImportSpecifier, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue,
JSXElement, JSXElementName, JSXExpr, JSXExprContainer, JSXObject, KeyValueProp, MemberProp,
MethodProp, ModuleExportName, ObjectLit, Pat, Prop, PropName, PropOrSpread, SourceMapperExt,
SpreadElement, Tpl, VarDeclarator,
Ident, IdentName, ImportDecl, ImportSpecifier, JSXAttr, JSXAttrName, JSXAttrOrSpread,
JSXAttrValue, JSXElement, JSXElementName, JSXExpr, JSXExprContainer, JSXObject, KeyValueProp,
MemberProp, MethodProp, ModuleExportName, ObjectLit, Pat, Prop, PropName, PropOrSpread,
SourceMapperExt, SpreadElement, Tpl, VarDeclarator,
};
use swc_ecma_utils::ExprFactory;
use swc_ecma_visit::{Fold, FoldWith};
Expand Down Expand Up @@ -350,7 +350,7 @@ impl<C: Comments> EmotionTransformer<C> {
);
self.emotion_target_class_name_count += 1;
PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(key.into(), DUMMY_SP)),
key: PropName::Ident(IdentName::new(key.into(), DUMMY_SP)),
value: stable_class_name.into(),
})))
}
Expand Down Expand Up @@ -494,7 +494,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
if self.options.auto_label.unwrap_or(false) {
args_props.push(PropOrSpread::Prop(Box::new(
Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(
key: PropName::Ident(IdentName::new(
"label".into(),
DUMMY_SP,
)),
Expand Down Expand Up @@ -563,7 +563,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
if self.options.auto_label.unwrap_or(false) {
args_props.push(PropOrSpread::Prop(Box::new(
Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(
key: PropName::Ident(IdentName::new(
"label".into(),
DUMMY_SP,
)),
Expand All @@ -585,16 +585,16 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
}
return CallExpr {
span: expr.span,
type_args: expr.type_args,
args: expr.args,
callee: CallExpr {
span: DUMMY_SP,
type_args: None,
callee: Ident::new(i.sym.clone(), i.span)
callee: Ident::new(i.sym.clone(), i.span, i.ctxt)
.as_callee(),
args,
..Default::default()
}
.as_callee(),
..Default::default()
};
}
}
Expand Down Expand Up @@ -671,7 +671,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
if self.options.auto_label.unwrap_or(false) {
object_props.push(PropOrSpread::Prop(Box::new(
Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(
key: PropName::Ident(IdentName::new(
"label".into(),
DUMMY_SP,
)),
Expand Down Expand Up @@ -732,7 +732,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
}
args
},
type_args: None,
..Default::default()
});
}
}
Expand All @@ -754,10 +754,9 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
}
}
return Expr::Call(CallExpr {
span: DUMMY_SP,
callee: i.take().as_callee(),
args,
type_args: None,
..Default::default()
});
}
}
Expand All @@ -774,7 +773,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
if self.options.auto_label.unwrap_or(false) {
object_props.push(PropOrSpread::Prop(Box::new(
Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(
key: PropName::Ident(IdentName::new(
"label".into(),
DUMMY_SP,
)),
Expand All @@ -793,11 +792,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {

self.comments.add_pure_comment(member_expr.span.lo());
return Expr::Call(CallExpr {
span: DUMMY_SP,
type_args: None,
callee: CallExpr {
type_args: None,
span: DUMMY_SP,
callee: i.take().as_callee(),
args: vec![
prop.take().sym.as_arg(),
Expand All @@ -807,9 +802,11 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
})
.as_arg(),
],
..Default::default()
}
.as_callee(),
args,
..Default::default()
});
}
}
Expand All @@ -820,7 +817,6 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
{
self.comments.add_pure_comment(member_expr.span.lo());
return Expr::Call(CallExpr {
span: DUMMY_SP,
callee: member_expr.take().as_callee(),
args: {
let mut args = self.create_args_from_tagged_tpl(
Expand All @@ -836,7 +832,7 @@ impl<C: Comments> Fold for EmotionTransformer<C> {
}
args
},
type_args: None,
..Default::default()
});
}
}
Expand Down
6 changes: 6 additions & 0 deletions packages/jest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-jest

## 2.0.8

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 2.0.7

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/jest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
phf = { version = "0.11.2", features = ["macros"] }
serde = { version = "1.0.201", features = ["derive"] }
swc_common = { version = "0.34.3", features = ["concurrent"] }
swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.115.1"
swc_ecma_utils = "0.130.1"
swc_ecma_visit = "0.101.0"
swc_common = { version = "0.36.0", features = ["concurrent"] }
swc_core = { version = "0.99.2", features = ["ecma_plugin_transform"] }
swc_ecma_ast = "0.117.0"
swc_ecma_utils = "0.133.1"
swc_ecma_visit = "0.103.1"
swc_plugin_macro = "0.9.16"
tracing = { version = "0.1.40", features = ["release_max_level_off"] }
6 changes: 6 additions & 0 deletions packages/jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# @swc/plugin-jest

## 2.0.8

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 2.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-jest",
"version": "2.0.7",
"version": "2.0.8",
"description": "SWC plugin for jest",
"main": "swc_plugin_jest.wasm",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions packages/jest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ impl Jest {
) => match &*callee.obj {
Expr::Ident(i) if i.sym == *"jest" => match prop {
_ if HOIST_METHODS.contains(&*prop.sym) => {
hoisted.push(T::from_stmt(stmt));
hoisted.push(T::from(stmt));
}
_ => new.push(T::from_stmt(stmt)),
_ => new.push(T::from(stmt)),
},
_ => new.push(T::from_stmt(stmt)),
_ => new.push(T::from(stmt)),
},
_ => new.push(T::from_stmt(stmt)),
_ => new.push(T::from(stmt)),
},
_ => new.push(T::from_stmt(stmt)),
_ => new.push(T::from(stmt)),
},

_ => new.push(T::from_stmt(stmt)),
_ => new.push(T::from(stmt)),
},
Err(node) => new.push(node),
};
Expand Down
6 changes: 6 additions & 0 deletions packages/loadable-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-loadable-components

## 1.0.10

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 1.0.9

### Patch Changes
Expand Down
14 changes: 7 additions & 7 deletions packages/loadable-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ once_cell = "1.19.0"
regex = "1.10.4"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
swc_common = { version = "0.34.3", features = ["concurrent"] }
swc_core = { version = "0.96.0", features = [
swc_common = { version = "0.36.0", features = ["concurrent"] }
swc_core = { version = "0.99.2", features = [
"ecma_quote",
"ecma_plugin_transform",
] }
swc_ecma_ast = "0.115.1"
swc_ecma_utils = "0.130.1"
swc_ecma_visit = "0.101.0"
swc_ecma_ast = "0.117.0"
swc_ecma_utils = "0.133.1"
swc_ecma_visit = "0.103.1"
swc_plugin_macro = "0.9.16"
swc_plugin_proxy = "0.44.0"
swc_plugin_proxy = "0.46.0"
tracing = { version = "0.1.40", features = ["release_max_level_off"] }

[dev-dependencies]
testing = "0.36.0"
testing = "0.38.0"
6 changes: 6 additions & 0 deletions packages/loadable-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ By default `loadable-components` are configured to transform dynamic imports use

# @swc/plugin-loadable-components

## 1.0.10

### Patch Changes

- 9c28afb: Update swc_core to 0.99.x (@swc/core 1.7.0)

## 1.0.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/loadable-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-loadable-components",
"version": "1.0.9",
"version": "1.0.10",
"description": "SWC plugin for `@loadable/components`",
"main": "swc_plugin_loadable_components.wasm",
"scripts": {
Expand Down
Loading

0 comments on commit 83d5fd1

Please sign in to comment.