Unverified Commit ee7648ae authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

Update swc (#37607)

* Update swc

* Update again

* fixup

* Bump

* Update

* fixup

* Update test refs

* Update minifier

* Parser

* Update swc

* Bump version

* Update

* fixup

* Update test refs

* Bump

* Update `@swc/helpers`

* lockfile

* lints

* FIx

* [TRY] Update @swc/core
parent c04a6b04
......@@ -67,8 +67,8 @@
"@next/swc": "workspace:*",
"@svgr/webpack": "5.5.0",
"@swc/cli": "0.1.55",
"@swc/core": "1.2.148",
"@swc/helpers": "0.3.17",
"@swc/core": "1.2.203",
"@swc/helpers": "0.4.2",
"@testing-library/react": "13.0.0",
"@types/cheerio": "0.22.16",
"@types/fs-extra": "8.1.0",
......
This diff is collapsed.
......@@ -26,18 +26,18 @@ swc_emotion = {path="../emotion"}
styled_components = {path="../styled_components"}
styled_jsx = {path="../styled_jsx"}
modularize_imports = {path="../modularize_imports"}
swc = { version = "0.181.2" }
swc_atoms = "0.2.11"
swc_common = { version = "0.18.7", features = ["concurrent", "sourcemap"] }
swc = "0.188.0"
swc_atoms = "0.2.12"
swc_common = { version = "0.18.9", features = ["concurrent", "sourcemap"] }
swc_ecma_loader = { version = "0.30.2", features = ["node", "lru"] }
swc_ecmascript = { version = "0.157.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.55.0", optional = true, default-features = false }
swc_ecmascript = { version = "0.164.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.56.0", optional = true, default-features = false }
swc_cached = "0.1.1"
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
wasmer = {version = "2.2.1", optional = true, default-features = false}
wasmer-wasi = {version = "2.2.1", optional = true, default-features = false}
wasmer = { version = "2.3.0", optional = true, default-features = false }
wasmer-wasi = { version = "2.3.0", optional = true, default-features = false }
[dev-dependencies]
swc_ecma_transforms_testing = "0.87.0"
testing = "0.20.0"
swc_ecma_transforms_testing = "0.91.0"
testing = "0.20.1"
walkdir = "2.3.2"
......@@ -24,7 +24,7 @@ import a from "other";
}
return c;
}
}(a, c) || function(a, d) {
}(a, c) || function e(a, d) {
if (a) {
if ("string" == typeof a) return b(a, d);
var c = Object.prototype.toString.call(a).slice(8, -1);
......
......@@ -5,7 +5,7 @@ description = "AST Transforms for emotion"
license = "Apache-2.0"
name = "swc_emotion"
repository = "https://github.com/vercel/next.js.git"
version = "0.7.0"
version = "0.10.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
......@@ -18,12 +18,12 @@ radix_fmt = "1"
regex = "1.5"
serde = "1"
sourcemap = "6.0.1"
swc_atoms = "0.2.11"
swc_common = { version = "0.18.7", features = ["concurrent", "sourcemap"] }
swc_ecmascript = { version = "0.157.0", features = ["codegen", "utils", "visit"] }
swc_atoms = "0.2.12"
swc_common = { version = "0.18.9", features = ["concurrent", "sourcemap"] }
swc_ecmascript = { version = "0.164.0", features = ["codegen", "utils", "visit"] }
swc_trace_macro = "0.1.1"
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
[dev-dependencies]
swc_ecma_transforms_testing = "0.87.0"
testing = "0.20.0"
swc_ecma_transforms_testing = "0.91.0"
testing = "0.20.1"
......@@ -13,7 +13,7 @@ use swc_common::util::take::Take;
use swc_common::{BytePos, SourceMap, DUMMY_SP};
use swc_ecmascript::ast::{
ArrayLit, CallExpr, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue, JSXElementName,
JSXExpr, JSXExprContainer, JSXObject,
JSXExpr, JSXExprContainer, JSXObject, SourceMapperExt,
};
use swc_ecmascript::utils::ExprFactory;
use swc_ecmascript::{
......@@ -21,7 +21,6 @@ use swc_ecmascript::{
Callee, Expr, ExprOrSpread, Id, Ident, ImportDecl, ImportSpecifier, JSXElement,
KeyValueProp, MemberProp, ObjectLit, Pat, Prop, PropName, PropOrSpread, Tpl, VarDeclarator,
},
codegen::util::SourceMapperExt,
visit::{Fold, FoldWith},
};
use swc_trace_macro::swc_trace;
......
......@@ -5,7 +5,7 @@ edition = "2018"
license = "Apache-2.0"
name = "modularize_imports"
repository = "https://github.com/vercel/next.js.git"
version = "0.6.0"
version = "0.9.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
......@@ -15,8 +15,8 @@ once_cell = "1.8.0"
regex = "1.5"
serde = "1"
swc_cached = "0.1.1"
swc_ecmascript = { version = "0.157.0", features = ["visit"] }
swc_ecmascript = { version = "0.164.0", features = ["visit"] }
[dev-dependencies]
swc_ecma_transforms_testing = "0.87.0"
testing = "0.20.0"
swc_ecma_transforms_testing = "0.91.0"
testing = "0.20.1"
......@@ -30,20 +30,20 @@ next-swc = {version = "0.0.0", path = "../core"}
once_cell = "1.8.0"
serde = "1"
serde_json = "1"
swc = { version = "0.181.2" }
swc_atoms = "0.2.11"
swc_bundler = { version = "0.147.0", features = ["concurrent"] }
swc_common = { version = "0.18.7", features = ["concurrent", "sourcemap"] }
swc = "0.188.0"
swc_atoms = "0.2.12"
swc_bundler = { version = "0.154.0", features = ["concurrent"] }
swc_common = { version = "0.18.9", features = ["concurrent", "sourcemap"] }
swc_ecma_loader = { version = "0.30.2", features = ["node", "lru"] }
swc_ecmascript = { version = "0.157.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.55.0",optional=true }
swc_ecmascript = { version = "0.164.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.56.0", optional = true }
swc_node_base = "0.5.5"
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
tracing-futures = "0.2.5"
tracing-subscriber = "0.3.9"
tracing-chrome = "0.5.0"
wasmer = {version = "2.2.1", optional = true, default-features = false}
wasmer-wasi = {version = "2.2.1", optional = true, default-features = false}
wasmer = { version = "2.3.0", optional = true, default-features = false }
wasmer-wasi = { version = "2.3.0", optional = true, default-features = false }
[build-dependencies]
napi-build = "1"
......@@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0"
name = "styled_components"
repository = "https://github.com/vercel/next.js.git"
version = "0.31.0"
version = "0.34.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
......@@ -15,13 +15,13 @@ Inflector = "0.11.4"
once_cell = "1.10.0"
regex = {version = "1.5.4", features = ["std", "perf"], default-features = false}
serde = {version = "1.0.130", features = ["derive"]}
swc_atoms = "0.2.11"
swc_common = { version = "0.18.7", features = ["concurrent"] }
swc_ecmascript = { version = "0.157.0", features = ["utils", "visit"] }
swc_atoms = "0.2.12"
swc_common = { version = "0.18.9", features = ["concurrent"] }
swc_ecmascript = { version = "0.164.0", features = ["utils", "visit"] }
tracing = "0.1.32"
[dev-dependencies]
serde_json = "1"
swc_ecma_transforms_testing = "0.87.0"
swc_ecmascript = { version = "0.157.0", features = ["parser", "transforms"] }
testing = "0.20.0"
swc_ecma_transforms_testing = "0.91.0"
swc_ecmascript = { version = "0.164.0", features = ["parser", "transforms"] }
testing = "0.20.1"
......@@ -110,8 +110,8 @@ var _StyledThing3 = _styled(Thing3)((p)=>({
}));
var _StyledThing = _styled(Thing3)`color: red;`;
const EarlyUsageComponent2 = (p)=><_StyledThing2 />;
function Thing4(props) {
return <div {...props}/>;
function Thing4(props1) {
return <div {...props1}/>;
}
/* insert before usage for non-local scope styled HOC targets */ const ImportedComponentUsage = (p)=><_StyledSomeComponent />;
const RequiredComponentUsage = (p)=><_StyledSomeOtherComponent />;
......@@ -185,7 +185,7 @@ var _StyledP7 = _styled("p")`
background: ${(p)=>p.$_css2};
`;
var _StyledP8 = _styled("p")`
color: ${(props)=>props.theme.a};
color: ${(props1)=>props1.theme.a};
`;
var _StyledP9 = _styled("p")`
border-radius: ${radius}px;
......@@ -194,7 +194,7 @@ var _StyledP10 = _styled("p")`
color: ${(p)=>p.$_css3};
`;
var _StyledP11 = _styled("p")`
color: ${(props)=>props.theme.color};
color: ${(props1)=>props1.theme.color};
`;
var _StyledButtonGhost = _styled(Button.Ghost)`flex: 1`;
var _StyledButtonGhostNew = _styled(Button.Ghost.New)`flex: 1`;
......
......@@ -146,7 +146,7 @@ var _StyledP7 = _styled("p")`
background: ${(p)=>p.$_css2};
`;
var _StyledP8 = _styled("p")`
color: ${(props)=>props.theme.a};
color: ${(props1)=>props1.theme.a};
`;
var _StyledP9 = _styled("p")`
border-radius: ${radius}px;
......@@ -155,7 +155,7 @@ var _StyledP10 = _styled("p")`
color: ${(p)=>p.$_css3};
`;
var _StyledP11 = _styled("p")`
color: ${(props)=>props.theme.color};
color: ${(props1)=>props1.theme.color};
`;
var _StyledButtonGhost = _styled(Button.Ghost)`flex: 1`;
var _StyledButtonGhostNew = _styled(Button.Ghost.New)`flex: 1`;
......
......@@ -5,18 +5,18 @@ edition = "2018"
license = "Apache-2.0"
name = "styled_jsx"
repository = "https://github.com/vercel/next.js.git"
version = "0.6.0"
version = "0.9.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
easy-error = "1.0.0"
swc_common = { version = "0.18.7", features = ["concurrent", "sourcemap"] }
swc_css = "0.105.0"
swc_common = { version = "0.18.9", features = ["concurrent", "sourcemap"] }
swc_css = "0.106.0"
swc_css_prefixer = "0.101.0"
swc_ecmascript = { version = "0.157.0", features = ["parser", "minifier", "utils", "visit"] }
swc_ecmascript = { version = "0.164.0", features = ["parser", "minifier", "utils", "visit"] }
tracing = "0.1.32"
[dev-dependencies]
swc_ecma_transforms_testing = "0.87.0"
testing = "0.20.0"
swc_ecma_transforms_testing = "0.91.0"
testing = "0.20.1"
......@@ -10,7 +10,6 @@ use swc_css::codegen::{
writer::basic::{BasicCssWriter, BasicCssWriterConfig},
CodeGenerator, CodegenConfig, Emit,
};
use swc_css::parser::parser::input::ParserInput;
use swc_css::parser::{parse_str, parse_tokens, parser::ParserConfig};
use swc_css::visit::{VisitMut, VisitMutWith};
use swc_css_prefixer::prefixer;
......@@ -502,21 +501,15 @@ where
}
let span = node.span();
let mut lexer = swc_css::parser::lexer::Lexer::new(
let lexer = swc_css::parser::lexer::Lexer::new(
StringInput::new(&s, span.lo, span.hi),
ParserConfig {
allow_wrong_line_comments: true,
},
);
let mut tokens = vec![];
while let Ok(t) = lexer.next() {
tokens.push(t);
}
Tokens {
span: Span::new(span.lo, span.hi, Default::default()),
tokens,
tokens: lexer.collect(),
}
}
......@@ -18,16 +18,16 @@ const b = {
styles: <_JSXStyle id={"ef44b0e76b4e59a2"}>{`div.jsx-ef44b0e76b4e59a2{color:${colors.green.light}}a.jsx-ef44b0e76b4e59a2{color:red}`}</_JSXStyle>,
className: "jsx-ef44b0e76b4e59a2"
};
const dynamic = (colors1)=>{
const dynamic = (colors)=>{
const b = {
styles: <_JSXStyle id={"d1249fb76dde6727"} dynamic={[
colors1.green.light
]}>{`div.__jsx-style-dynamic-selector{color:${colors1.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
colors.green.light
]}>{`div.__jsx-style-dynamic-selector{color:${colors.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
className: _JSXStyle.dynamic([
[
"d1249fb76dde6727",
[
colors1.green.light
colors.green.light
]
]
])
......
......@@ -25,13 +25,13 @@ parking_lot_core = "=0.8.0"
path-clean = "0.1"
serde = {version = "1", features = ["derive"]}
serde_json = "1"
swc = "0.181.2"
swc_common = { version = "0.18.7", features = ["concurrent", "sourcemap"] }
swc_ecmascript = { version = "0.157.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.55.0", default-features = false, optional = true }
swc = "0.188.0"
swc_common = { version = "0.18.9", features = ["concurrent", "sourcemap"] }
swc_ecmascript = { version = "0.164.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_plugin_runner = { version = "0.56.0", default-features = false, optional = true }
tracing = { version = "0.1.32", features = ["release_max_level_off"] }
wasm-bindgen = {version = "0.2", features = ["serde-serialize"]}
wasm-bindgen-futures = "0.4.8"
wasmer = {version = "2.2.1", optional = true, default-features = false}
wasmer-wasi = {version = "2.2.1", optional = true, default-features = false}
wasmer = { version = "2.3.0", optional = true, default-features = false }
wasmer-wasi = { version = "2.3.0", optional = true, default-features = false }
getrandom = { version = "0.2.5", optional = true, default-features = false }
......@@ -71,7 +71,7 @@
},
"dependencies": {
"@next/env": "12.1.7-canary.42",
"@swc/helpers": "0.3.17",
"@swc/helpers": "0.4.2",
"caniuse-lite": "^1.0.30001332",
"postcss": "8.4.5",
"styled-jsx": "5.0.2",
......
This diff is collapsed.
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