Skip to content

Commit

Permalink
Merge branch 'master' into hotfix/sidebar_active
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Mar 13, 2024
2 parents bb9d396 + b1bd0c7 commit 385ef05
Show file tree
Hide file tree
Showing 8 changed files with 468 additions and 631 deletions.
935 changes: 377 additions & 558 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/swc_plugin_react_demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
swc_core = { version = "0.79.36", features = [
swc_core = { version = "0.90.14", features = [
"ecma_plugin_transform",
"ecma_visit",
"ecma_ast",
Expand Down
10 changes: 5 additions & 5 deletions crates/swc_plugin_react_demo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::create_return_with_default;
use swc_core::{
common::{Spanned, DUMMY_SP},
ecma::{ast::*, transforms::testing::test, visit::*},
common::{util::take::Take, Spanned, DUMMY_SP},
ecma::{ast::*, transforms::testing::test_inline, visit::*},
plugin::{plugin_transform, proxies::TransformPluginProgramMetadata},
};

Expand Down Expand Up @@ -78,7 +78,7 @@ impl VisitMut for ReactDemoVisitor {
span: DUMMY_SP,
arg: CallExpr {
span: DUMMY_SP,
callee: Callee::Import(Import { span: DUMMY_SP }),
callee: Callee::Import(Import::dummy()),
args: vec![ExprOrSpread {
spread: None,
expr: Box::new(Expr::Lit(Lit::Str(*import_decl.src))),
Expand Down Expand Up @@ -123,7 +123,7 @@ pub fn process_transform(program: Program, _metadata: TransformPluginProgramMeta
program.fold_with(&mut as_folder(ReactDemoVisitor))
}

test!(
test_inline!(
Default::default(),
|_| as_folder(ReactDemoVisitor),
imports,
Expand All @@ -141,7 +141,7 @@ const d = await import('d');
const { default: e , e1: e1 , e2: e3 } = await import('e');"#
);

test!(
test_inline!(
Default::default(),
|_| as_folder(ReactDemoVisitor),
exports,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@ant-design/icons-svg": "^4.2.1",
"@makotot/ghostui": "^2.0.0",
"@stackblitz/sdk": "^1.9.0",
"@swc/core": "1.3.72",
"@swc/core": "1.4.2",
"@types/hast": "^2.3.5",
"@types/mdast": "^3.0.12",
"@umijs/bundler-utils": "^4.0.84",
Expand Down

0 comments on commit 385ef05

Please sign in to comment.