Unverified Commit 4f70f3af authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub
parent 83f89c4f
...@@ -9,7 +9,7 @@ name: Build, test, and deploy ...@@ -9,7 +9,7 @@ name: Build, test, and deploy
env: env:
NAPI_CLI_VERSION: 2.7.0 NAPI_CLI_VERSION: 2.7.0
TURBO_VERSION: 1.3.2-canary.1 TURBO_VERSION: 1.3.2-canary.1
RUST_TOOLCHAIN: nightly-2022-06-12 RUST_TOOLCHAIN: nightly-2022-09-14
PNPM_VERSION: 7.2.1 PNPM_VERSION: 7.2.1
jobs: jobs:
......
This diff is collapsed.
...@@ -28,7 +28,7 @@ styled_jsx = {path="../styled_jsx"} ...@@ -28,7 +28,7 @@ styled_jsx = {path="../styled_jsx"}
modularize_imports = {path="../modularize_imports"} modularize_imports = {path="../modularize_imports"}
tracing = { version = "0.1.32", features = ["release_max_level_info"] } tracing = { version = "0.1.32", features = ["release_max_level_info"] }
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"common_concurrent", "common_concurrent",
"ecma_ast", "ecma_ast",
"ecma_visit", "ecma_visit",
...@@ -48,6 +48,6 @@ swc_core = { version = "0.26.0", features = [ ...@@ -48,6 +48,6 @@ swc_core = { version = "0.26.0", features = [
] } ] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.26.0", features = ["testing_transform"] } swc_core = { version = "0.27.4", features = ["testing_transform"] }
testing = "0.30.10" testing = "0.31.1"
walkdir = "2.3.2" walkdir = "2.3.2"
...@@ -319,7 +319,7 @@ fn rel_filename(base: Option<&Path>, file: &FileName) -> String { ...@@ -319,7 +319,7 @@ fn rel_filename(base: Option<&Path>, file: &FileName) -> String {
} }
}; };
let rel_path = diff_paths(&file, base); let rel_path = diff_paths(file, base);
let rel_path = match rel_path { let rel_path = match rel_path {
Some(v) => v, Some(v) => v,
......
...@@ -31,7 +31,7 @@ impl<'a> FontImportsGenerator<'a> { ...@@ -31,7 +31,7 @@ impl<'a> FontImportsGenerator<'a> {
}); });
} }
expr_to_json(&*expr_or_spread.expr) expr_to_json(&expr_or_spread.expr)
}) })
.collect(); .collect();
...@@ -182,7 +182,7 @@ fn object_lit_to_json(object_lit: &ObjectLit) -> Value { ...@@ -182,7 +182,7 @@ fn object_lit_to_json(object_lit: &ObjectLit) -> Value {
Err(()) Err(())
} }
}; };
let val = expr_to_json(&*key_val.value); let val = expr_to_json(&key_val.value);
if let (Ok(key), Ok(val)) = (key, val) { if let (Ok(key), Ok(val)) = (key, val) {
values.insert(key, val); values.insert(key, val);
} }
...@@ -226,7 +226,7 @@ fn expr_to_json(expr: &Expr) -> Result<Value, ()> { ...@@ -226,7 +226,7 @@ fn expr_to_json(expr: &Expr) -> Result<Value, ()> {
.emit(); .emit();
Err(()) Err(())
}), }),
None => expr_to_json(&*expr.expr), None => expr_to_json(&expr.expr),
} }
} else { } else {
HANDLER.with(|handler| { HANDLER.with(|handler| {
......
...@@ -173,11 +173,7 @@ impl<'a> Relay<'a> { ...@@ -173,11 +173,7 @@ impl<'a> Relay<'a> {
} }
} }
pub fn relay<'a>( pub fn relay(config: &Config, file_name: FileName, pages_dir: Option<PathBuf>) -> impl Fold + '_ {
config: &'a Config,
file_name: FileName,
pages_dir: Option<PathBuf>,
) -> impl Fold + '_ {
Relay { Relay {
root_dir: std::env::current_dir().unwrap(), root_dir: std::env::current_dir().unwrap(),
file_name, file_name,
......
...@@ -5,7 +5,7 @@ description = "AST Transforms for emotion" ...@@ -5,7 +5,7 @@ description = "AST Transforms for emotion"
license = "Apache-2.0" license = "Apache-2.0"
name = "swc_emotion" name = "swc_emotion"
repository = "https://github.com/vercel/next.js.git" repository = "https://github.com/vercel/next.js.git"
version = "0.21.0" version = "0.22.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
...@@ -19,9 +19,9 @@ regex = "1.5" ...@@ -19,9 +19,9 @@ regex = "1.5"
serde = "1" serde = "1"
sourcemap = "6.0.1" sourcemap = "6.0.1"
tracing = { version = "0.1.32", features = ["release_max_level_info"] } tracing = { version = "0.1.32", features = ["release_max_level_info"] }
swc_core = { version = "0.26.0", features = ["common", "ecma_ast","ecma_codegen", "ecma_utils", "ecma_visit", "trace_macro"] } swc_core = { version = "0.27.4", features = ["common", "ecma_ast","ecma_codegen", "ecma_utils", "ecma_visit", "trace_macro"] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.26.0", features = ["testing_transform", "ecma_transforms_react"] } swc_core = { version = "0.27.4", features = ["testing_transform", "ecma_transforms_react"] }
testing = "0.30.10" testing = "0.31.1"
serde_json = "1" serde_json = "1"
...@@ -5,7 +5,7 @@ edition = "2018" ...@@ -5,7 +5,7 @@ edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
name = "modularize_imports" name = "modularize_imports"
repository = "https://github.com/vercel/next.js.git" repository = "https://github.com/vercel/next.js.git"
version = "0.19.0" version = "0.20.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
...@@ -15,8 +15,8 @@ handlebars = "4.2.1" ...@@ -15,8 +15,8 @@ handlebars = "4.2.1"
once_cell = "1.13.0" once_cell = "1.13.0"
regex = "1.5" regex = "1.5"
serde = "1" serde = "1"
swc_core = { version = "0.26.0", features = ["cached", "ecma_ast", "ecma_visit"] } swc_core = { version = "0.27.4", features = ["cached", "ecma_ast", "ecma_visit"] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.26.0", features = ["testing_transform"] } swc_core = { version = "0.27.4", features = ["testing_transform"] }
testing = "0.30.10" testing = "0.31.1"
...@@ -30,7 +30,7 @@ next-swc = {version = "0.0.0", path = "../core"} ...@@ -30,7 +30,7 @@ next-swc = {version = "0.0.0", path = "../core"}
once_cell = "1.13.0" once_cell = "1.13.0"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"allocator_node", "allocator_node",
"base_concurrent", # concurrent? "base_concurrent", # concurrent?
"common_concurrent", "common_concurrent",
......
...@@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] ...@@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0" license = "Apache-2.0"
name = "styled_components" name = "styled_components"
repository = "https://github.com/vercel/next.js.git" repository = "https://github.com/vercel/next.js.git"
version = "0.44.0" version = "0.45.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
...@@ -16,7 +16,7 @@ once_cell = "1.13.0" ...@@ -16,7 +16,7 @@ once_cell = "1.13.0"
regex = {version = "1.5.4", features = ["std", "perf"], default-features = false} regex = {version = "1.5.4", features = ["std", "perf"], default-features = false}
serde = {version = "1.0.130", features = ["derive"]} serde = {version = "1.0.130", features = ["derive"]}
tracing = "0.1.32" tracing = "0.1.32"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"common", "common",
"ecma_ast", "ecma_ast",
"ecma_utils", "ecma_utils",
...@@ -25,8 +25,8 @@ swc_core = { version = "0.26.0", features = [ ...@@ -25,8 +25,8 @@ swc_core = { version = "0.26.0", features = [
[dev-dependencies] [dev-dependencies]
serde_json = "1" serde_json = "1"
testing = "0.30.10" testing = "0.31.1"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"ecma_parser", "ecma_parser",
"ecma_transforms", "ecma_transforms",
"testing_transform" "testing_transform"
......
...@@ -23,7 +23,7 @@ impl VisitMut for AsAnalyzer { ...@@ -23,7 +23,7 @@ impl VisitMut for AsAnalyzer {
fn visit_mut_module(&mut self, p: &mut Module) { fn visit_mut_module(&mut self, p: &mut Module) {
let mut v = Analyzer { let mut v = Analyzer {
config: &self.config, config: &self.config,
state: &mut *self.state.borrow_mut(), state: &mut self.state.borrow_mut(),
}; };
p.visit_with(&mut v); p.visit_with(&mut v);
...@@ -32,7 +32,7 @@ impl VisitMut for AsAnalyzer { ...@@ -32,7 +32,7 @@ impl VisitMut for AsAnalyzer {
fn visit_mut_script(&mut self, p: &mut Script) { fn visit_mut_script(&mut self, p: &mut Script) {
let mut v = Analyzer { let mut v = Analyzer {
config: &self.config, config: &self.config,
state: &mut *self.state.borrow_mut(), state: &mut self.state.borrow_mut(),
}; };
p.visit_with(&mut v); p.visit_with(&mut v);
......
...@@ -309,12 +309,10 @@ impl VisitMut for DisplayNameAndId { ...@@ -309,12 +309,10 @@ impl VisitMut for DisplayNameAndId {
PropOrSpread::Prop(prop) => { PropOrSpread::Prop(prop) => {
match get_prop_name(prop) { match get_prop_name(prop) {
Some(PropName::Ident(prop_name)) => { Some(PropName::Ident(prop_name)) => {
match &*prop_name.sym { matches!(
"componentId" | "displayName" => { &*prop_name.sym,
true "componentId" | "displayName"
} )
_ => false,
}
} }
_ => false, _ => false,
} }
...@@ -354,7 +352,7 @@ impl VisitMut for DisplayNameAndId { ...@@ -354,7 +352,7 @@ impl VisitMut for DisplayNameAndId {
self.add_config( self.add_config(
expr, expr,
display_name.map(|s| DISPLAY_NAME_REGEX.replace_all(&*s, "").into()), display_name.map(|s| DISPLAY_NAME_REGEX.replace_all(&s, "").into()),
component_id, component_id,
) )
} }
......
...@@ -251,7 +251,7 @@ impl VisitMut for TranspileCssProp { ...@@ -251,7 +251,7 @@ impl VisitMut for TranspileCssProp {
if expr.is_fn_expr() || expr.is_arrow() { if expr.is_fn_expr() || expr.is_arrow() {
acc.push(expr); acc.push(expr);
return acc; return acc;
} else if let Some(root) = trace_root_value(&mut *expr) { } else if let Some(root) = trace_root_value(&mut expr) {
let direct_access = match root { let direct_access = match root {
Expr::Lit(_) => true, Expr::Lit(_) => true,
Expr::Ident(id) if self.is_top_level_ident(id) => true, Expr::Ident(id) if self.is_top_level_ident(id) => true,
...@@ -643,7 +643,7 @@ fn trace_root_value(e: &mut Expr) -> Option<&mut Expr> { ...@@ -643,7 +643,7 @@ fn trace_root_value(e: &mut Expr) -> Option<&mut Expr> {
match e { match e {
Expr::Member(e) => trace_root_value(&mut e.obj), Expr::Member(e) => trace_root_value(&mut e.obj),
Expr::Call(e) => match &mut e.callee { Expr::Call(e) => match &mut e.callee {
Callee::Expr(e) => trace_root_value(&mut **e), Callee::Expr(e) => trace_root_value(e),
_ => None, _ => None,
}, },
Expr::Ident(_) => Some(e), Expr::Ident(_) => Some(e),
......
...@@ -5,7 +5,7 @@ edition = "2018" ...@@ -5,7 +5,7 @@ edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
name = "styled_jsx" name = "styled_jsx"
repository = "https://github.com/vercel/next.js.git" repository = "https://github.com/vercel/next.js.git"
version = "0.19.0" version = "0.20.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
...@@ -13,7 +13,7 @@ version = "0.19.0" ...@@ -13,7 +13,7 @@ version = "0.19.0"
easy-error = "1.0.0" easy-error = "1.0.0"
tracing = "0.1.32" tracing = "0.1.32"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"common", "common",
"css_ast", "css_ast",
"css_codegen", "css_codegen",
...@@ -27,7 +27,7 @@ swc_core = { version = "0.26.0", features = [ ...@@ -27,7 +27,7 @@ swc_core = { version = "0.26.0", features = [
] } ] }
[dev-dependencies] [dev-dependencies]
testing = "0.30.10" testing = "0.31.1"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"testing_transform" "testing_transform"
] } ] }
...@@ -176,7 +176,7 @@ impl Fold for StyledJSXTransformer { ...@@ -176,7 +176,7 @@ impl Fold for StyledJSXTransformer {
if let JSXElementName::Ident(Ident { sym, span, .. }) = &el.name { if let JSXElementName::Ident(Ident { sym, span, .. }) = &el.name {
if sym != "style" if sym != "style"
&& sym != self.style_import_name.as_ref().unwrap() && sym != self.style_import_name.as_ref().unwrap()
&& (!is_capitalized(&**sym) && (!is_capitalized(sym)
|| self || self
.nearest_scope_bindings .nearest_scope_bindings
.contains(&(sym.clone(), span.ctxt))) .contains(&(sym.clone(), span.ctxt)))
...@@ -750,7 +750,7 @@ fn get_style_expr(el: &JSXElement) -> Result<StyleExpr, Error> { ...@@ -750,7 +750,7 @@ fn get_style_expr(el: &JSXElement) -> Result<StyleExpr, Error> {
{ {
return Ok(match &**expr { return Ok(match &**expr {
Expr::Lit(Lit::Str(str)) => StyleExpr::Str(str), Expr::Lit(Lit::Str(str)) => StyleExpr::Str(str),
Expr::Tpl(tpl) => StyleExpr::Tpl(tpl, &**expr), Expr::Tpl(tpl) => StyleExpr::Tpl(tpl, expr),
Expr::Ident(ident) => StyleExpr::Ident(ident), Expr::Ident(ident) => StyleExpr::Ident(ident),
_ => { _ => {
HANDLER.with(|handler| { HANDLER.with(|handler| {
......
...@@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8" ...@@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8"
getrandom = { version = "0.2.5", optional = true, default-features = false } getrandom = { version = "0.2.5", optional = true, default-features = false }
js-sys = "0.3.59" js-sys = "0.3.59"
swc_core = { version = "0.26.0", features = [ swc_core = { version = "0.27.4", features = [
"common_concurrent", "common_concurrent",
"binding_macro_wasm", "binding_macro_wasm",
"ecma_codegen", "ecma_codegen",
......
nightly-2022-06-12 nightly-2022-09-14
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment