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

Update swc (#30127)

Co-authored-by: 's avatarkdy1 <kdy1@users.noreply.github.com>
parent 282c1c9d
...@@ -119,9 +119,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" ...@@ -119,9 +119,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]] [[package]]
name = "backtrace" name = "backtrace"
version = "0.3.61" version = "0.3.62"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" checksum = "091bcdf2da9950f96aa522681ce805e6857f6ca8df73833d35736ab2dc78e152"
dependencies = [ dependencies = [
"addr2line", "addr2line",
"cc", "cc",
...@@ -793,9 +793,9 @@ dependencies = [ ...@@ -793,9 +793,9 @@ dependencies = [
[[package]] [[package]]
name = "object" name = "object"
version = "0.26.2" version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39f37e50073ccad23b6d09bcb5b263f4e76d3bb6038e4a3c08e52162ffa8abc2" checksum = "c821014c18301591b89b843809ef953af9e3df0496c232d5c0611b0a52aac363"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
...@@ -1576,9 +1576,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" ...@@ -1576,9 +1576,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]] [[package]]
name = "swc" name = "swc"
version = "0.76.1" version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea3932ebdcad1f5c6507858af1cf8fe53a905761194c9bcaf268c4c308edf69" checksum = "fe683a5da5b4930cdcf47a5002127d5db24a583ec20f3d98b7321d2f34bc0f4b"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
...@@ -1625,9 +1625,9 @@ dependencies = [ ...@@ -1625,9 +1625,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_common" name = "swc_common"
version = "0.14.1" version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de8be830f71f62908dae13fd9db66522e77dbf9188bd07d0b86d15f48557b219" checksum = "7d0ebf30bbbc54bd2e2115f9bf9f3226b8e6039ed1a076992af4c09c49de7947"
dependencies = [ dependencies = [
"ahash", "ahash",
"ast_node", "ast_node",
...@@ -1759,9 +1759,9 @@ dependencies = [ ...@@ -1759,9 +1759,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
version = "0.77.0" version = "0.77.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9679c138f4cfe98c86e0947bdc089c4402b372db064f6aca2636a86c93898052" checksum = "84bc14c5b5ba303bf0bcb6ace52d7ae321bf7e1ead9e90a1dc9f90e0e7f5eeb7"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"memchr", "memchr",
...@@ -1923,9 +1923,9 @@ dependencies = [ ...@@ -1923,9 +1923,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_base" name = "swc_ecma_transforms_base"
version = "0.40.0" version = "0.40.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1ce842ee29a2e96647950dba48dddd757ad7e5b392b1902191a16c3e8be22ae" checksum = "9c6eddb77633192d66e77eba1adc6ee27f8624f5d175360d323b02e2ebee7133"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"phf", "phf",
...@@ -1937,6 +1937,7 @@ dependencies = [ ...@@ -1937,6 +1937,7 @@ dependencies = [
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_utils", "swc_ecma_utils",
"swc_ecma_visit", "swc_ecma_visit",
"tracing",
] ]
[[package]] [[package]]
...@@ -2120,9 +2121,9 @@ dependencies = [ ...@@ -2120,9 +2121,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.48.0" version = "0.48.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc932d46dabd2250f4bb690cf5eb14a672c6c054caee1a1a9ff3ecf77b472606" checksum = "7da7efcb8e643863ab3588b515c6290f8a7a6538ee3a1ac856820cf43aada4ba"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"scoped-tls", "scoped-tls",
......
...@@ -16,9 +16,9 @@ path-clean = "0.1" ...@@ -16,9 +16,9 @@ path-clean = "0.1"
regex = "1.5" regex = "1.5"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
swc = "0.76.0" swc = "0.77.0"
swc_atoms = "0.2.7" swc_atoms = "0.2.7"
swc_common = { version = "0.14.1", features = ["concurrent", "sourcemap"] } swc_common = { version = "0.14.2", features = ["concurrent", "sourcemap"] }
swc_css = "0.20.0" swc_css = "0.20.0"
swc_ecmascript = { version = "0.80.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] } swc_ecmascript = { version = "0.80.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_ecma_preset_env = "0.59.0" swc_ecma_preset_env = "0.59.0"
......
...@@ -76,7 +76,7 @@ impl Task for MinifyTask { ...@@ -76,7 +76,7 @@ impl Task for MinifyTask {
type JsValue = JsObject; type JsValue = JsObject;
fn compute(&mut self) -> napi::Result<Self::Output> { fn compute(&mut self) -> napi::Result<Self::Output> {
try_with_handler(self.c.cm.clone(), |handler| { try_with_handler(self.c.cm.clone(), true, |handler| {
let fm = self.code.to_file(self.c.cm.clone()); let fm = self.code.to_file(self.c.cm.clone());
self.c.minify(fm, &handler, &self.opts) self.c.minify(fm, &handler, &self.opts)
...@@ -110,8 +110,8 @@ pub fn minify_sync(cx: CallContext) -> napi::Result<JsObject> { ...@@ -110,8 +110,8 @@ pub fn minify_sync(cx: CallContext) -> napi::Result<JsObject> {
let fm = code.to_file(c.cm.clone()); let fm = code.to_file(c.cm.clone());
let output = let output = try_with_handler(c.cm.clone(), true, |handler| c.minify(fm, &handler, &opts))
try_with_handler(c.cm.clone(), |handler| c.minify(fm, &handler, &opts)).convert_err()?; .convert_err()?;
complete_output(&cx.env, output) complete_output(&cx.env, output)
} }
...@@ -61,7 +61,7 @@ impl Task for TransformTask { ...@@ -61,7 +61,7 @@ impl Task for TransformTask {
fn compute(&mut self) -> napi::Result<Self::Output> { fn compute(&mut self) -> napi::Result<Self::Output> {
let res = catch_unwind(AssertUnwindSafe(|| { let res = catch_unwind(AssertUnwindSafe(|| {
try_with_handler(self.c.cm.clone(), |handler| { try_with_handler(self.c.cm.clone(), true, |handler| {
self.c.run(|| match self.input { self.c.run(|| match self.input {
Input::Source(ref s) => { Input::Source(ref s) => {
let before_pass = custom_before_pass(&s.name, &self.options); let before_pass = custom_before_pass(&s.name, &self.options);
...@@ -124,7 +124,7 @@ where ...@@ -124,7 +124,7 @@ where
let is_module = cx.get::<JsBoolean>(1)?; let is_module = cx.get::<JsBoolean>(1)?;
let options: TransformOptions = cx.get_deserialized(2)?; let options: TransformOptions = cx.get_deserialized(2)?;
let output = try_with_handler(c.cm.clone(), |handler| { let output = try_with_handler(c.cm.clone(), true, |handler| {
c.run(|| { c.run(|| {
if is_module.get_value()? { if is_module.get_value()? {
let program: Program = let program: Program =
......
import _JSXStyle from "styled-jsx/style"; import _JSXStyle from "styled-jsx/style";
function NavigationItem({ active , className: className1 }) { function NavigationItem({ active , className }) {
return <span className={"jsx-2342aae4628612c6" + " " + (cn({ return <span className={"jsx-2342aae4628612c6" + " " + (cn({
active active
}, className1, "navigation-item") || "")}> }, className, "navigation-item") || "")}>
<_JSXStyle id={"2342aae4628612c6"}>{".navigation-item.jsx-2342aae4628612c6 a::after {content:attr(data-text);\ncontent: attr(data-text) / ''}"}</_JSXStyle> <_JSXStyle id={"2342aae4628612c6"}>{".navigation-item.jsx-2342aae4628612c6 a::after {content:attr(data-text);\ncontent: attr(data-text) / ''}"}</_JSXStyle>
......
import _JSXStyle from "styled-jsx/style"; import _JSXStyle from "styled-jsx/style";
import colors, { size } from "./constants"; import colors1, { size } from "./constants";
const color = "red"; const color = "red";
const bar = new String("div.jsx-aaed0341accea8f {font-size:3em}"); const bar = new String("div.jsx-aaed0341accea8f {font-size:3em}");
bar.__hash = "aaed0341accea8f"; bar.__hash = "aaed0341accea8f";
...@@ -12,33 +12,33 @@ export const foo = new String(`div.jsx-a0d126276b085021 {color:${color}}`); ...@@ -12,33 +12,33 @@ export const foo = new String(`div.jsx-a0d126276b085021 {color:${color}}`);
foo.__hash = "a0d126276b085021"; foo.__hash = "a0d126276b085021";
({ ({
styles: <_JSXStyle id={"47e08c293b53f262"} dynamic={[ styles: <_JSXStyle id={"47e08c293b53f262"} dynamic={[
colors.green.light colors1.green.light
]}>{`div.__jsx-style-dynamic-selector {color:${colors.green.light}} ]}>{`div.__jsx-style-dynamic-selector {color:${colors1.green.light}}
a.__jsx-style-dynamic-selector {color:red}`}</_JSXStyle>, a.__jsx-style-dynamic-selector {color:red}`}</_JSXStyle>,
className: _JSXStyle.dynamic([ className: _JSXStyle.dynamic([
[ [
"47e08c293b53f262", "47e08c293b53f262",
[ [
colors.green.light colors1.green.light
] ]
] ]
]) ])
}); });
const b = { const b = {
styles: <_JSXStyle id={"47e08c293b53f262"} dynamic={[ styles: <_JSXStyle id={"47e08c293b53f262"} dynamic={[
colors.green.light colors1.green.light
]}>{`div.__jsx-style-dynamic-selector {color:${colors.green.light}} ]}>{`div.__jsx-style-dynamic-selector {color:${colors1.green.light}}
a.__jsx-style-dynamic-selector {color:red}`}</_JSXStyle>, a.__jsx-style-dynamic-selector {color:red}`}</_JSXStyle>,
className: _JSXStyle.dynamic([ className: _JSXStyle.dynamic([
[ [
"47e08c293b53f262", "47e08c293b53f262",
[ [
colors.green.light colors1.green.light
] ]
] ]
]) ])
}; };
const dynamic1 = (colors)=>{ const dynamic = (colors)=>{
const b = { const b = {
styles: <_JSXStyle id={"79d79305fa1611e"} dynamic={[ styles: <_JSXStyle id={"79d79305fa1611e"} dynamic={[
colors.green.light colors.green.light
......
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