chore: Update swc (#40832)

This PR update swc crates to
8a5ed1e0ba


Noticeable changes include

 - TS 4.9 support.
 - Huge performance improvement (of every api).
This commit is contained in:
Donny/강동윤 2022-09-24 06:09:41 +09:00 committed by GitHub
parent cc7fd2c247
commit b68f78384e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 193 additions and 189 deletions

View file

@ -162,9 +162,9 @@ dependencies = [
[[package]] [[package]]
name = "binding_macros" name = "binding_macros"
version = "0.14.26" version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82632f8743d0bf30592a4138df625a4d4ebc7f707d1e2bdb0dc319eda18149fb" checksum = "ceea0286ed654e11f014210fbfd23c5d4aac93fc76809275f11062f07b1d09c8"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"console_error_panic_hook", "console_error_panic_hook",
@ -1171,9 +1171,9 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
[[package]] [[package]]
name = "is-macro" name = "is-macro"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94b2c46692aee0d1b3aad44e781ac0f0e7db42ef27adaa0a877b627040019813" checksum = "1c068d4c6b922cd6284c609cfa6dec0e41615c9c5a1a4ba729a970d8daba05fb"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"pmutil", "pmutil",
@ -1531,7 +1531,7 @@ dependencies = [
[[package]] [[package]]
name = "modularize_imports" name = "modularize_imports"
version = "0.18.0" version = "0.19.0"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"handlebars", "handlebars",
@ -2048,9 +2048,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]] [[package]]
name = "preset_env_base" name = "preset_env_base"
version = "0.3.1" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79525f471165bbd66b40e93c54a2c98bb51ebb27497d6c97c5cc3441aaec5508" checksum = "371fa3d5cd3a90724d8e8ad1e3201854dded11e79b5365dabd5e1e389274d001"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -2929,7 +2929,7 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "styled_components" name = "styled_components"
version = "0.43.0" version = "0.44.0"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"once_cell", "once_cell",
@ -2943,7 +2943,7 @@ dependencies = [
[[package]] [[package]]
name = "styled_jsx" name = "styled_jsx"
version = "0.18.0" version = "0.19.0"
dependencies = [ dependencies = [
"easy-error", "easy-error",
"swc_core", "swc_core",
@ -2987,9 +2987,9 @@ dependencies = [
[[package]] [[package]]
name = "swc" name = "swc"
version = "0.226.26" version = "0.228.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f40f9baede7a00006c3bfd4b21a13a7fdb233318fa598e4a2328a9f4f049013" checksum = "9c6a3c9aa6fd3eb25e3e0eaa05ca6dc1705979badbec359fdf93ffa13c7f077e"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3036,9 +3036,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_atoms" name = "swc_atoms"
version = "0.4.14" version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1106fb9b9fde9bd37b9e36ecc05bc1fa9f8ace6f425391ff2ec1141e041e8bd2" checksum = "8c4672abeb1ab4f174fae3928945c3f42776f21f636e0b118b3497c4cd2d6b6e"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"rkyv", "rkyv",
@ -3051,9 +3051,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "0.187.25" version = "0.189.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf7795a2e901fa4da623e6e443bb591bb58e94582f7b133fa2acbc775714f2f" checksum = "a5f3fbf030930093f3a2c5fa81aa5f23de59a35e1a09f433a2b50d6330e76959"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3085,9 +3085,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_cached" name = "swc_cached"
version = "0.3.10" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24852b0f1e451e4a908d85e6bab39ab30a424b80f0b352efb427404d7fbed8de" checksum = "7fd5043a69fd341be7de505912b02537265a61e1b9e63bdef7d7ceec37f2d120"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3100,9 +3100,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_common" name = "swc_common"
version = "0.28.7" version = "0.28.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44e620ded71d80237149d26699daaebf69c14051e5de8104e3a41bd6f1ec3407" checksum = "3926afd43f50edea791744d97d5fa38bde997978531d36ed507b2b908f920695"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3159,9 +3159,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_core" name = "swc_core"
version = "0.23.24" version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "311dc6081c230bd67af4a8f594a79941c7235a52c89063622f26c33f83638d12" checksum = "2690f8c60fae7628d7def61441b48040aaaccfa1e05bbaae25845777cccca48e"
dependencies = [ dependencies = [
"binding_macros", "binding_macros",
"swc", "swc",
@ -3197,9 +3197,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_ast" name = "swc_css_ast"
version = "0.112.6" version = "0.113.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3499462798b2ed0bc9a1fe0c3065bddd99ec8f7b24c929f98622ce87201252a" checksum = "9f131c72ef8d472fc42d646ecfe57fe796a00e9239204faea329810d659436b9"
dependencies = [ dependencies = [
"is-macro", "is-macro",
"serde", "serde",
@ -3210,9 +3210,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_codegen" name = "swc_css_codegen"
version = "0.122.6" version = "0.123.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0a0d2fa1e53aa368ed13810e1ead32cb66ff05c038a3c82296f5418b477916d" checksum = "fd1aaa07d2079f789c258130a89a842f85fee092c8d2571cf7181f004352b863"
dependencies = [ dependencies = [
"auto_impl", "auto_impl",
"bitflags", "bitflags",
@ -3239,9 +3239,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_parser" name = "swc_css_parser"
version = "0.121.6" version = "0.122.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2338251941551e6f33ece4acb071aab80d0b2707fd4738d82f058174a1a022c5" checksum = "04185aba148e49292f5ef767307c6079a79765e55d40c9f2c635068bf3293e37"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"lexical", "lexical",
@ -3253,9 +3253,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_prefixer" name = "swc_css_prefixer"
version = "0.123.6" version = "0.124.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d726bbb0fdc88484f124446b55878a90a9ad194787f198221aa0fc02bf125ca3" checksum = "1ff72bb96537bf8ae56624547fc92f5bbf228ce3fe9582850527099ad4dae3a8"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"preset_env_base", "preset_env_base",
@ -3270,9 +3270,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_utils" name = "swc_css_utils"
version = "0.109.6" version = "0.110.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ec01db14c13c16841a9e7c344ad2943e4e1bdccbdb1742f595bdbbc05ea62a2" checksum = "15bea1364664e6b5e1681ae50b77a854988a3adc620430196cac480c0b388396"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"serde", "serde",
@ -3285,9 +3285,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_css_visit" name = "swc_css_visit"
version = "0.111.6" version = "0.112.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2efe636bdd1c4abbb01ded0b7baa0bdbc871995b77f8c1fc22e276223d6f3dfe" checksum = "2dd2e1949103f672b9f4401feedd2d4ba53a2295997d832e9c89e3a0b1769f00"
dependencies = [ dependencies = [
"serde", "serde",
"swc_atoms", "swc_atoms",
@ -3298,9 +3298,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ast" name = "swc_ecma_ast"
version = "0.91.7" version = "0.93.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40d4074cb9587adb388766095082e383a7b5a1d93dc91efc14ecb5d015bf54c6" checksum = "4d9721a0e1a6a2ff6f0d127a337a5124e88be0429d93bd2833e83bad8d7bf324"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"is-macro", "is-macro",
@ -3316,9 +3316,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
version = "0.124.13" version = "0.126.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d6bae4742619f1ccd730816e1b848a6ef2063f63b298f40fddb4929d6227d8" checksum = "40b63ef4fa9a6ff791c8b43a120e7f7386530e0970a53f69fee494388e2f0fc6"
dependencies = [ dependencies = [
"memchr", "memchr",
"num-bigint", "num-bigint",
@ -3348,9 +3348,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ext_transforms" name = "swc_ecma_ext_transforms"
version = "0.88.12" version = "0.90.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "226827040adb89bb6e6e76b67b265c764e94fcddb89a844058320256507eba42" checksum = "5da0ab1b64fa81f2670e40a122a5ad8416a95bbb0425829c774088155358d45a"
dependencies = [ dependencies = [
"phf", "phf",
"swc_atoms", "swc_atoms",
@ -3362,9 +3362,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_lints" name = "swc_ecma_lints"
version = "0.63.15" version = "0.65.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba1380b92d0561834ea5f8a5eea01306dd0910c938dde41be507385dc10d2130" checksum = "af606e1eebb93f1d9d09cdc5200ff7e6c491cbe0493948cb29ba5f8d3e6327d7"
dependencies = [ dependencies = [
"ahash", "ahash",
"auto_impl", "auto_impl",
@ -3383,9 +3383,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_loader" name = "swc_ecma_loader"
version = "0.40.7" version = "0.40.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20e591fe139afd3d9f5533fac807ab1e28c50e9926777dc325540583b46d1fe9" checksum = "4d4cf15b506bf98839d91d0a5f7f21cd1ced9e3eeaa3be2664991f0b1788e8b9"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3405,9 +3405,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_minifier" name = "swc_ecma_minifier"
version = "0.154.25" version = "0.156.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e9982ddcee47007512c1f748fd1843d2054a024b505cf76546287771d9c518" checksum = "c2a0efeb9a4954a5f2c1201c5ca13706f917fdd41928c412cd74746405aca372"
dependencies = [ dependencies = [
"ahash", "ahash",
"arrayvec", "arrayvec",
@ -3439,9 +3439,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_parser" name = "swc_ecma_parser"
version = "0.119.11" version = "0.121.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b001342009cde5fd7c33a5be294ddedec917b64c6155a88cd1512f5e422b07bd" checksum = "b669d504192a57a6e7fdb801c980fcbd3c7447cd2e3750f21aaeb44092a96665"
dependencies = [ dependencies = [
"either", "either",
"enum_kind", "enum_kind",
@ -3458,9 +3458,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_preset_env" name = "swc_ecma_preset_env"
version = "0.169.21" version = "0.171.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d688dc0a05aba586f9050e76d6a62191c707aee9afe027a8725114d14c410e37" checksum = "a428026cd44fee29c8bb566b610163b27a920ea85d2675d4261348f686657a7f"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3483,9 +3483,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_testing" name = "swc_ecma_testing"
version = "0.17.13" version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a49b9ec1e9e6d8ba3ca308a87388d27f63d921fee57287814ddcee23acbd0bc3" checksum = "3f66dbab0f4e3bdf728d0e60fb83672c52347da018de280868ce07ff53633fc7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"hex", "hex",
@ -3495,13 +3495,14 @@ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen",
"testing", "testing",
"tracing",
] ]
[[package]] [[package]]
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
version = "0.193.21" version = "0.195.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e4666fd39566ba32c8fb92c5edfed12dc959e4a1f24177a708e83f8c8b3c82" checksum = "40ad3638d8e60c57b78cc2b6a5d25c19241ae6f9189ea3b9dd7b4b6eb1f313f3"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -3519,9 +3520,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_base" name = "swc_ecma_transforms_base"
version = "0.108.15" version = "0.110.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3289ef9363bd8b7a752c273fbbb0cf1aa7f7b279d31cb9600d5183851cc48bdb" checksum = "b2066e43ea098251d8cd3bea4115a9139913e27cfbbe91377bee6126e5c54b04"
dependencies = [ dependencies = [
"better_scoped_tls", "better_scoped_tls",
"bitflags", "bitflags",
@ -3542,9 +3543,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_classes" name = "swc_ecma_transforms_classes"
version = "0.97.15" version = "0.99.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad85df65655ed2dbd25fd63340e4033ad24f33a8d1a79e40f005c2322aa6d205" checksum = "1e1c67e13a366caff8c127c960d26494b9a50209c3da23baa53a3651db025b3f"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -3556,9 +3557,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_compat" name = "swc_ecma_transforms_compat"
version = "0.131.17" version = "0.133.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "191aa03cc33e44f73b6f5c73e91c7a5fcad53d30db68286edd2f37879c9d3f59" checksum = "4894b38cec47aecf6b4e2fec852499c8c3577d8af25729146e98233015192576"
dependencies = [ dependencies = [
"ahash", "ahash",
"arrayvec", "arrayvec",
@ -3597,9 +3598,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_module" name = "swc_ecma_transforms_module"
version = "0.148.18" version = "0.150.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb3b4f3cda7a792d50c3a773d0af2c231d66261b0bb79374eae7b444f7994275" checksum = "c1b204d3efdc29c84a0661480cc5d7bc917fa9062623b7fcca008c8efc568a40"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"ahash", "ahash",
@ -3625,9 +3626,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_optimization" name = "swc_ecma_transforms_optimization"
version = "0.162.21" version = "0.164.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ea87f4a566ce605ea6db0a4d3b44655c45f12fc9d18857c45077d119c9c77d5" checksum = "a9dc0c237a127b075942baf0796c788dbe1adfe6dd98a87fe50090aa026a0156"
dependencies = [ dependencies = [
"ahash", "ahash",
"dashmap", "dashmap",
@ -3651,9 +3652,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_proposal" name = "swc_ecma_transforms_proposal"
version = "0.139.17" version = "0.141.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831dab556591a6c0e66055311833bb35d77385174ff43f90d09d5a5d5409f9d2" checksum = "83ed71de103b38f257d962aa2289844011aee572861ff1490c061d2df8cc827c"
dependencies = [ dependencies = [
"either", "either",
"serde", "serde",
@ -3670,9 +3671,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_react" name = "swc_ecma_transforms_react"
version = "0.150.18" version = "0.152.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f43e6234b2ba978a53e7aef83a4248bb25fe12df7a45cbf617c2f9830ee69c" checksum = "4e56ed952dd5a53b57b1b2b3e4bf26347f4af7f152ed621fe820f939678d570e"
dependencies = [ dependencies = [
"ahash", "ahash",
"base64 0.13.0", "base64 0.13.0",
@ -3697,9 +3698,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_testing" name = "swc_ecma_transforms_testing"
version = "0.110.15" version = "0.112.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d7418e5b3b1ebffd9564d621a6e2c51eba2c45e5d52a37d6f42cd9945ac0b78" checksum = "2c5b3d434e5c38eab5ba74a474112c221f571f15acda24cc4b47ded516444b0e"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"anyhow", "anyhow",
@ -3721,9 +3722,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_typescript" name = "swc_ecma_transforms_typescript"
version = "0.154.18" version = "0.156.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1054274f5eec7e11094c8555db387da9ceec80b5f831298ce184118a8e05cd8f" checksum = "180e9cac5e6fb44a735aa5af23187f900fda02f98ee29d21ad88a90e21ec0b3c"
dependencies = [ dependencies = [
"serde", "serde",
"swc_atoms", "swc_atoms",
@ -3737,9 +3738,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.102.12" version = "0.104.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537346086c0b098f57522394487559a794d24bace42056609f636fc00968bf5d" checksum = "98cb804f9c7d09b5bbae3daf0a9dc4d678b70c21b07cbb0c864e50a978a14502"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"num_cpus", "num_cpus",
@ -3755,9 +3756,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_visit" name = "swc_ecma_visit"
version = "0.77.7" version = "0.79.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "938d792bc29246fc2f34fdc6a50eb2967aeac38f05e7b9154196dc599cd30a71" checksum = "d041e63b7034961e52c969e094469fa01b22dbd840c928590e5cac2154f82d0b"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"swc_atoms", "swc_atoms",
@ -3769,7 +3770,7 @@ dependencies = [
[[package]] [[package]]
name = "swc_emotion" name = "swc_emotion"
version = "0.20.0" version = "0.21.0"
dependencies = [ dependencies = [
"base64 0.13.0", "base64 0.13.0",
"byteorder", "byteorder",
@ -3799,9 +3800,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_error_reporters" name = "swc_error_reporters"
version = "0.12.7" version = "0.12.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b8799cd4c7a8ebd9dae4342080cad6d8767bf35979111630fe4f01ef048747" checksum = "4d57d1b1fb0da73e20caadb86755db4d3371849c704c86dbaecd3f3968fc1cb4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"miette", "miette",
@ -3812,9 +3813,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_fast_graph" name = "swc_fast_graph"
version = "0.16.7" version = "0.16.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67bcbaae65561a2a1aaa570e52bc62838c99b6c2f8452c7d81e232c400d9d335" checksum = "97abd88688673d693aec09551783b067f4d4fff82f8e982b91160dd7febad484"
dependencies = [ dependencies = [
"ahash", "ahash",
"indexmap", "indexmap",
@ -3824,9 +3825,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_graph_analyzer" name = "swc_graph_analyzer"
version = "0.17.7" version = "0.17.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdb15d3d4cee185806785ec1e924b06c349f2d86dc0d2102b4b9e50a1bd88ba" checksum = "849c10de6bc42b930d54186137c177bfc5e4c525870ed0dccdd5bf963be1ea10"
dependencies = [ dependencies = [
"ahash", "ahash",
"auto_impl", "auto_impl",
@ -3859,9 +3860,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_node_comments" name = "swc_node_comments"
version = "0.15.7" version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6a25e8d240423106f29375c49c64e11f11e057492542374c9164f58669ece2f" checksum = "03c7e415e35959e8118fd74ffee2d4a18bf459dac1293163735a294cba476cb9"
dependencies = [ dependencies = [
"ahash", "ahash",
"dashmap", "dashmap",
@ -3871,9 +3872,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_plugin_proxy" name = "swc_plugin_proxy"
version = "0.19.8" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2768aef5b294ce2d13e00df46d91939245d2bf4bd7bd4af0890a4209ce4fe06" checksum = "e089036738edc1c1cd8d521226cbdb0235cc6bafde99b04baffb0133e5c238ae"
dependencies = [ dependencies = [
"better_scoped_tls", "better_scoped_tls",
"rkyv", "rkyv",
@ -3885,9 +3886,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_plugin_runner" name = "swc_plugin_runner"
version = "0.74.12" version = "0.76.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0e3b6dee1ad9177f13d7e50b09cbfe36da5c4da9b8461a882da06dd4167275a" checksum = "fd8229d2ed13027ddf59912ca973b8e062b368f32953e877498831e1ac6414bd"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"once_cell", "once_cell",
@ -3905,9 +3906,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_timer" name = "swc_timer"
version = "0.16.7" version = "0.16.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5bc77611a0ef2e513d92c369bd73f766b4f25412648ca03e6b09af841c7c57d" checksum = "9e626e120ae437a135d679de736089493e5ba1c2d9b6e8c726f7105a17867858"
dependencies = [ dependencies = [
"tracing", "tracing",
] ]
@ -3925,9 +3926,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit" name = "swc_visit"
version = "0.5.2" version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b754ef01f2614eb469fd5215789bfd319566a3bf1033056d7a7bfb5a3c9a69f5" checksum = "82f2bcb7223e185c4c7cbf5e0c1207dec6d2bfd5e72e3fb7b3e8d179747e9130"
dependencies = [ dependencies = [
"either", "either",
"swc_visit_macros", "swc_visit_macros",
@ -3935,9 +3936,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit_macros" name = "swc_visit_macros"
version = "0.5.3" version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c230bcd129d1fbcd1decd8b43cccd613fda11c895f7c04d6c966231dbc1959af" checksum = "8fb1f3561674d84947694d41fb6d5737d19539222779baeac1b3a071a2b29428"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"pmutil", "pmutil",
@ -3999,9 +4000,9 @@ dependencies = [
[[package]] [[package]]
name = "testing" name = "testing"
version = "0.30.7" version = "0.30.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccef0049babc0c201b0a0794085b50a2291efbf9cf307ac94cbbcf4429a44534" checksum = "5584041a02f6327d9ec378b4e389dc0b5e748bb99705b765941a8e55f7d83d14"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"difference", "difference",

View file

@ -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.23.24", features = [ swc_core = { version = "0.26.0", features = [
"common_concurrent", "common_concurrent",
"ecma_ast", "ecma_ast",
"ecma_visit", "ecma_visit",
@ -48,6 +48,6 @@ swc_core = { version = "0.23.24", features = [
] } ] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.23.24", features = ["testing_transform"] } swc_core = { version = "0.26.0", features = ["testing_transform"] }
testing = "0.30.7" testing = "0.30.10"
walkdir = "2.3.2" walkdir = "2.3.2"

View file

@ -41,7 +41,7 @@ impl Fold for HookOptimizer {
fn fold_decl(&mut self, node: Decl) -> Decl { fn fold_decl(&mut self, node: Decl) -> Decl {
let node = node.fold_children_with(self); let node = node.fold_children_with(self);
match node { match node {
Decl::Var(VarDecl { Decl::Var(box VarDecl {
decls, decls,
span, span,
kind, kind,
@ -52,12 +52,12 @@ impl Fold for HookOptimizer {
new_decls.push(self.get_decl(decl)); new_decls.push(self.get_decl(decl));
} }
Decl::Var(VarDecl { Decl::Var(Box::new(VarDecl {
decls: new_decls, decls: new_decls,
span, span,
kind, kind,
declare, declare,
}) }))
} }
_ => node, _ => node,
} }

View file

@ -28,6 +28,7 @@ DEALINGS IN THE SOFTWARE.
#![recursion_limit = "2048"] #![recursion_limit = "2048"]
#![deny(clippy::all)] #![deny(clippy::all)]
#![feature(box_patterns)]
use auto_cjs::contains_cjs; use auto_cjs::contains_cjs;
use either::Either; use either::Either;

View file

@ -46,7 +46,7 @@ impl<'a> FontImportsGenerator<'a> {
values.append(&mut json_values); values.append(&mut json_values);
return Some(ImportDecl { return Some(ImportDecl {
src: Str { src: Box::new(Str {
value: JsWord::from(format!( value: JsWord::from(format!(
"{}?{}", "{}?{}",
font_function.loader, font_function.loader,
@ -54,7 +54,7 @@ impl<'a> FontImportsGenerator<'a> {
)), )),
raw: None, raw: None,
span: DUMMY_SP, span: DUMMY_SP,
}, }),
specifiers: vec![], specifiers: vec![],
type_only: false, type_only: false,
asserts: None, asserts: None,

View file

@ -495,12 +495,12 @@ impl Fold for NextSsg {
if let Some(var) = var.take() { if let Some(var) = var.take() {
new.push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { new.push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl {
span: DUMMY_SP, span: DUMMY_SP,
decl: Decl::Var(VarDecl { decl: Decl::Var(Box::new(VarDecl {
span: DUMMY_SP, span: DUMMY_SP,
kind: VarDeclKind::Var, kind: VarDeclKind::Var,
declare: Default::default(), declare: Default::default(),
decls: vec![var], decls: vec![var],
}), })),
}))) })))
} }
} }

View file

@ -43,7 +43,7 @@ impl Fold for PageConfig {
true => String::from("mock_timestamp"), true => String::from("mock_timestamp"),
false => Utc::now().timestamp().to_string(), false => Utc::now().timestamp().to_string(),
}; };
return vec![ModuleItem::Stmt(Stmt::Decl(Decl::Var(VarDecl { return vec![ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {
decls: vec![VarDeclarator { decls: vec![VarDeclarator {
name: Pat::Ident(BindingIdent { name: Pat::Ident(BindingIdent {
id: Ident { id: Ident {
@ -64,7 +64,7 @@ impl Fold for PageConfig {
span: DUMMY_SP, span: DUMMY_SP,
kind: VarDeclKind::Const, kind: VarDeclKind::Const,
declare: false, declare: false,
})))]; }))))];
} }
} }

View file

@ -161,7 +161,7 @@ impl<C: Comments> ReactServerComponents<C> {
prepend_stmts( prepend_stmts(
&mut module.body, &mut module.body,
vec![ vec![
ModuleItem::Stmt(Stmt::Decl(Decl::Var(VarDecl { ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {
span: DUMMY_SP, span: DUMMY_SP,
kind: VarDeclKind::Const, kind: VarDeclKind::Const,
decls: vec![VarDeclarator { decls: vec![VarDeclarator {
@ -185,7 +185,7 @@ impl<C: Comments> ReactServerComponents<C> {
definite: false, definite: false,
}], }],
declare: false, declare: false,
}))), })))),
ModuleItem::Stmt(Stmt::Expr(ExprStmt { ModuleItem::Stmt(Stmt::Expr(ExprStmt {
span: DUMMY_SP, span: DUMMY_SP,
expr: Box::new(Expr::Assign(AssignExpr { expr: Box::new(Expr::Assign(AssignExpr {

View file

@ -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.20.0" version = "0.21.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"
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.23.24", features = ["common", "ecma_ast","ecma_codegen", "ecma_utils", "ecma_visit", "trace_macro"] } swc_core = { version = "0.26.0", features = ["common", "ecma_ast","ecma_codegen", "ecma_utils", "ecma_visit", "trace_macro"] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.23.24", features = ["testing_transform", "ecma_transforms_react"] } swc_core = { version = "0.26.0", features = ["testing_transform", "ecma_transforms_react"] }
testing = "0.30.7" testing = "0.30.10"
serde_json = "1" serde_json = "1"

View file

@ -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.18.0" version = "0.19.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"
once_cell = "1.13.0" once_cell = "1.13.0"
regex = "1.5" regex = "1.5"
serde = "1" serde = "1"
swc_core = { version = "0.23.24", features = ["cached", "ecma_ast", "ecma_visit"] } swc_core = { version = "0.26.0", features = ["cached", "ecma_ast", "ecma_visit"] }
[dev-dependencies] [dev-dependencies]
swc_core = { version = "0.23.24", features = ["testing_transform"] } swc_core = { version = "0.26.0", features = ["testing_transform"] }
testing = "0.30.7" testing = "0.30.10"

View file

@ -91,7 +91,7 @@ impl<'a> Rewriter<'a> {
}; };
out.push(ImportDecl { out.push(ImportDecl {
specifiers: vec![specifier], specifiers: vec![specifier],
src: Str::from(new_path.as_ref()), src: Box::new(Str::from(new_path.as_ref())),
span: old_decl.span, span: old_decl.span,
type_only: false, type_only: false,
asserts: None, asserts: None,

View file

@ -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.23.24", features = [ swc_core = { version = "0.26.0", features = [
"allocator_node", "allocator_node",
"base_concurrent", # concurrent? "base_concurrent", # concurrent?
"common_concurrent", "common_concurrent",

View file

@ -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.43.0" version = "0.44.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"
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.23.24", features = [ swc_core = { version = "0.26.0", features = [
"common", "common",
"ecma_ast", "ecma_ast",
"ecma_utils", "ecma_utils",
@ -25,8 +25,8 @@ swc_core = { version = "0.23.24", features = [
[dev-dependencies] [dev-dependencies]
serde_json = "1" serde_json = "1"
testing = "0.30.7" testing = "0.30.10"
swc_core = { version = "0.23.24", features = [ swc_core = { version = "0.26.0", features = [
"ecma_parser", "ecma_parser",
"ecma_transforms", "ecma_transforms",
"testing_transform" "testing_transform"

View file

@ -314,12 +314,12 @@ impl VisitMut for TranspileCssProp {
}), }),
definite: false, definite: false,
}; };
let stmt = Stmt::Decl(Decl::Var(VarDecl { let stmt = Stmt::Decl(Decl::Var(Box::new(VarDecl {
span: DUMMY_SP, span: DUMMY_SP,
kind: VarDeclKind::Var, kind: VarDeclKind::Var,
declare: false, declare: false,
decls: vec![var], decls: vec![var],
})); })));
match inject_after { match inject_after {
Some(injector) => { Some(injector) => {
let id = injector.to_id(); let id = injector.to_id();
@ -375,11 +375,11 @@ impl VisitMut for TranspileCssProp {
ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {
span: DUMMY_SP, span: DUMMY_SP,
specifiers: vec![specifier], specifiers: vec![specifier],
src: Str { src: Box::new(Str {
span: DUMMY_SP, span: DUMMY_SP,
value: "styled-components".into(), value: "styled-components".into(),
raw: None, raw: None,
}, }),
type_only: Default::default(), type_only: Default::default(),
asserts: Default::default(), asserts: Default::default(),
})), })),

View file

@ -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.18.0" version = "0.19.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.18.0"
easy-error = "1.0.0" easy-error = "1.0.0"
tracing = "0.1.32" tracing = "0.1.32"
swc_core = { version = "0.23.24", features = [ swc_core = { version = "0.26.0", features = [
"common", "common",
"css_ast", "css_ast",
"css_codegen", "css_codegen",
@ -27,7 +27,7 @@ swc_core = { version = "0.23.24", features = [
] } ] }
[dev-dependencies] [dev-dependencies]
testing = "0.30.7" testing = "0.30.10"
swc_core = { version = "0.23.24", features = [ swc_core = { version = "0.26.0", features = [
"testing_transform" "testing_transform"
] } ] }

View file

@ -1,3 +1,5 @@
#![feature(box_patterns)]
use easy_error::{bail, Error}; use easy_error::{bail, Error};
use std::collections::hash_map::DefaultHasher; use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};
@ -320,7 +322,7 @@ impl Fold for StyledJSXTransformer {
for item in items { for item in items {
let new_item = item.fold_children_with(self); let new_item = item.fold_children_with(self);
if let Some((default_ident, default_expr)) = &self.add_default_decl { if let Some((default_ident, default_expr)) = &self.add_default_decl {
new_items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(VarDecl { new_items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {
kind: VarDeclKind::Const, kind: VarDeclKind::Const,
declare: false, declare: false,
decls: vec![VarDeclarator { decls: vec![VarDeclarator {
@ -337,7 +339,7 @@ impl Fold for StyledJSXTransformer {
span: DUMMY_SP, span: DUMMY_SP,
}], }],
span: DUMMY_SP, span: DUMMY_SP,
})))); })))));
self.add_default_decl = None; self.add_default_decl = None;
if let Some(add_hash) = self.add_hash.take() { if let Some(add_hash) = self.add_hash.take() {
new_items.push(ModuleItem::Stmt(add_hash_statement(add_hash))); new_items.push(ModuleItem::Stmt(add_hash_statement(add_hash)));
@ -921,7 +923,7 @@ fn add_hash_statement((id, hash): (Id, String)) -> Stmt {
fn is_styled_css_import(item: &ModuleItem) -> bool { fn is_styled_css_import(item: &ModuleItem) -> bool {
if let ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { if let ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {
src: Str { value, .. }, src: box Str { value, .. },
.. ..
})) = item })) = item
{ {

View file

@ -307,11 +307,11 @@ pub fn styled_jsx_import_decl(style_import_name: &str) -> ModuleItem {
}, },
span: DUMMY_SP, span: DUMMY_SP,
})], })],
src: Str { src: Box::new(Str {
span: DUMMY_SP, span: DUMMY_SP,
value: "styled-jsx/style".into(), value: "styled-jsx/style".into(),
raw: None, raw: None,
}, }),
})) }))
} }

View file

@ -24,7 +24,7 @@ export const Test2 = ()=><div className={"jsx-81a68341e430a972 " + `jsx-${styles
// external and dynamic // external and dynamic
export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([
[ [
"e7486f61219e66af", "f08108daf927b99d",
[ [
color color
] ]
@ -33,14 +33,14 @@ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " "
<p className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([ <p className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([
[ [
"e7486f61219e66af", "f08108daf927b99d",
[ [
color color
] ]
] ]
])}>external and dynamic</p> ])}>external and dynamic</p>
<_JSXStyle id={"e7486f61219e66af"} dynamic={[ <_JSXStyle id={"f08108daf927b99d"} dynamic={[
color color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
@ -50,7 +50,7 @@ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " "
// external, static and dynamic // external, static and dynamic
export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([ export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[ [
"9ef7fdf2e339f135", "9779eebad83219f8",
[ [
color color
] ]
@ -59,7 +59,7 @@ export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " js
<p className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([ <p className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[ [
"9ef7fdf2e339f135", "9779eebad83219f8",
[ [
color color
] ]
@ -68,7 +68,7 @@ export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " js
<_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle> <_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle>
<_JSXStyle id={"9ef7fdf2e339f135"} dynamic={[ <_JSXStyle id={"9779eebad83219f8"} dynamic={[
color color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
@ -88,7 +88,7 @@ export const Test5 = ()=><div className={"jsx-df0159ebd3f9fb6f"}>
// static and dynamic // static and dynamic
export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[ [
"9ef7fdf2e339f135", "9779eebad83219f8",
[ [
color color
] ]
@ -97,7 +97,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
<p className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([ <p className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[ [
"9ef7fdf2e339f135", "9779eebad83219f8",
[ [
color color
] ]
@ -106,7 +106,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
<_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle> <_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle>
<_JSXStyle id={"9ef7fdf2e339f135"} dynamic={[ <_JSXStyle id={"9779eebad83219f8"} dynamic={[
color color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
@ -114,7 +114,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
// dynamic only // dynamic only
export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([ export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
[ [
"e7486f61219e66af", "f08108daf927b99d",
[ [
color color
] ]
@ -123,14 +123,14 @@ export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
<p className={_JSXStyle.dynamic([ <p className={_JSXStyle.dynamic([
[ [
"e7486f61219e66af", "f08108daf927b99d",
[ [
color color
] ]
] ]
])}>dynamic only</p> ])}>dynamic only</p>
<_JSXStyle id={"e7486f61219e66af"} dynamic={[ <_JSXStyle id={"f08108daf927b99d"} dynamic={[
color color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
@ -143,7 +143,7 @@ export const Test8 = ({ color })=>{
}; };
return <div className={_JSXStyle.dynamic([ return <div className={_JSXStyle.dynamic([
[ [
"1f1fbf7e754ca7cb", "62256c563b89bfae",
[ [
innerProps.color innerProps.color
] ]
@ -152,14 +152,14 @@ export const Test8 = ({ color })=>{
<p className={_JSXStyle.dynamic([ <p className={_JSXStyle.dynamic([
[ [
"1f1fbf7e754ca7cb", "62256c563b89bfae",
[ [
innerProps.color innerProps.color
] ]
] ]
])}>dynamic with scoped compound variable</p> ])}>dynamic with scoped compound variable</p>
<_JSXStyle id={"1f1fbf7e754ca7cb"} dynamic={[ <_JSXStyle id={"62256c563b89bfae"} dynamic={[
innerProps.color innerProps.color
]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle>
@ -173,7 +173,7 @@ export const Test9 = ({ color })=>{
}; };
return <div className={_JSXStyle.dynamic([ return <div className={_JSXStyle.dynamic([
[ [
"460abeb3d95fb60d", "708723e452f192e4",
[ [
innerProps.color innerProps.color
] ]
@ -182,14 +182,14 @@ export const Test9 = ({ color })=>{
<p className={_JSXStyle.dynamic([ <p className={_JSXStyle.dynamic([
[ [
"460abeb3d95fb60d", "708723e452f192e4",
[ [
innerProps.color innerProps.color
] ]
] ]
])}>dynamic with compound variable</p> ])}>dynamic with compound variable</p>
<_JSXStyle id={"460abeb3d95fb60d"} dynamic={[ <_JSXStyle id={"708723e452f192e4"} dynamic={[
innerProps.color innerProps.color
]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle>
@ -210,14 +210,14 @@ export const Test11 = ({ color })=>{
length: 5 length: 5
}).map((item, i)=><li key={i} className={_JSXStyle.dynamic([ }).map((item, i)=><li key={i} className={_JSXStyle.dynamic([
[ [
"307a31332e39b502", "a2585dff420632b1",
[ [
color color
] ]
] ]
]) + " " + "item"}> ]) + " " + "item"}>
<_JSXStyle id={"307a31332e39b502"} dynamic={[ <_JSXStyle id={"a2585dff420632b1"} dynamic={[
color color
]}>{`.item.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle> ]}>{`.item.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>

View file

@ -1,11 +1,11 @@
import _JSXStyle from "styled-jsx/style"; import _JSXStyle from "styled-jsx/style";
const color = 'red'; const color = 'red';
const otherColor = 'green'; const otherColor = 'green';
const A = ()=><div className={"jsx-551210e97e875d0e"}> const A = ()=><div className={"jsx-8522d6f4b7f930d2"}>
<p className={"jsx-551210e97e875d0e"}>test</p> <p className={"jsx-8522d6f4b7f930d2"}>test</p>
<_JSXStyle id={"551210e97e875d0e"}>{`p.jsx-551210e97e875d0e{color:${color}}`}</_JSXStyle> <_JSXStyle id={"8522d6f4b7f930d2"}>{`p.jsx-8522d6f4b7f930d2{color:${color}}`}</_JSXStyle>
</div>; </div>;
const B = ()=><div className={"jsx-d1ed441bb35f699d"}> const B = ()=><div className={"jsx-d1ed441bb35f699d"}>

View file

@ -8,79 +8,79 @@ const animationName = 'my-cool-animation';
const obj = { const obj = {
display: 'block' display: 'block'
}; };
export default (({ display })=><div className={"jsx-78f0c8c617eb8e50 " + _JSXStyle.dynamic([ export default (({ display })=><div className={"jsx-b452af554142d27 " + _JSXStyle.dynamic([
[ [
"cf795552a2848e6c", "469c0b1cc43512b8",
[ [
display ? 'block' : 'none' display ? 'block' : 'none'
] ]
], ],
[ [
"e9bc1314d862fde1", "d05e300c372f73ee",
[ [
darken(color) + 2 darken(color) + 2
] ]
], ],
[ [
"97b2dd85b3a5c42d", "72e421eb2017491a",
[ [
darken(color) darken(color)
] ]
] ]
])}> ])}>
<p className={"jsx-78f0c8c617eb8e50 " + _JSXStyle.dynamic([ <p className={"jsx-b452af554142d27 " + _JSXStyle.dynamic([
[ [
"cf795552a2848e6c", "469c0b1cc43512b8",
[ [
display ? 'block' : 'none' display ? 'block' : 'none'
] ]
], ],
[ [
"e9bc1314d862fde1", "d05e300c372f73ee",
[ [
darken(color) + 2 darken(color) + 2
] ]
], ],
[ [
"97b2dd85b3a5c42d", "72e421eb2017491a",
[ [
darken(color) darken(color)
] ]
] ]
])}>test</p> ])}>test</p>
<_JSXStyle id={"95409d3438a768bd"}>{`p.${color}.jsx-78f0c8c617eb8e50{color:${otherColor};display:${obj.display}}`}</_JSXStyle> <_JSXStyle id={"cb56eab0db38d266"}>{`p.${color}.jsx-b452af554142d27{color:${otherColor};display:${obj.display}}`}</_JSXStyle>
<_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-78f0c8c617eb8e50{color:red}"}</_JSXStyle> <_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-b452af554142d27{color:red}"}</_JSXStyle>
<_JSXStyle id={"ecd8dfc6d11e2c5e"}>{`body{background:${color}}`}</_JSXStyle> <_JSXStyle id={"e66306ac259712aa"}>{`body{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"ecd8dfc6d11e2c5e"}>{`body{background:${color}}`}</_JSXStyle> <_JSXStyle id={"e66306ac259712aa"}>{`body{background:${color}}`}</_JSXStyle>
// TODO: the next two should have the same hash // TODO: the next two should have the same hash
<_JSXStyle id={"e7486f61219e66af"}>{`p.jsx-78f0c8c617eb8e50{color:${color}}`}</_JSXStyle> <_JSXStyle id={"f08108daf927b99d"}>{`p.jsx-b452af554142d27{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"e7486f61219e66af"}>{`p.jsx-78f0c8c617eb8e50{color:${color}}`}</_JSXStyle> <_JSXStyle id={"f08108daf927b99d"}>{`p.jsx-b452af554142d27{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"97b2dd85b3a5c42d"} dynamic={[ <_JSXStyle id={"72e421eb2017491a"} dynamic={[
darken(color) darken(color)
]}>{`p.__jsx-style-dynamic-selector{color:${darken(color)}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${darken(color)}}`}</_JSXStyle>
<_JSXStyle id={"e9bc1314d862fde1"} dynamic={[ <_JSXStyle id={"d05e300c372f73ee"} dynamic={[
darken(color) + 2 darken(color) + 2
]}>{`p.__jsx-style-dynamic-selector{color:${darken(color) + 2}}`}</_JSXStyle> ]}>{`p.__jsx-style-dynamic-selector{color:${darken(color) + 2}}`}</_JSXStyle>
<_JSXStyle id={"7c5c5bde49d6c65d"}>{`@media(min-width:${mediumScreen}){p.jsx-78f0c8c617eb8e50{color:green}p.jsx-78f0c8c617eb8e50{color:${`red`}}}p.jsx-78f0c8c617eb8e50{color:red}`}</_JSXStyle> <_JSXStyle id={"7c5c5bde49d6c65d"}>{`@media(min-width:${mediumScreen}){p.jsx-b452af554142d27{color:green}p.jsx-b452af554142d27{color:${`red`}}}p.jsx-b452af554142d27{color:red}`}</_JSXStyle>
<_JSXStyle id={"c5506be0b4762e0b"}>{`p.jsx-78f0c8c617eb8e50{-webkit-animation-duration:${animationDuration};-moz-animation-duration:${animationDuration};-o-animation-duration:${animationDuration};animation-duration:${animationDuration}}`}</_JSXStyle> <_JSXStyle id={"c5506be0b4762e0b"}>{`p.jsx-b452af554142d27{-webkit-animation-duration:${animationDuration};-moz-animation-duration:${animationDuration};-o-animation-duration:${animationDuration};animation-duration:${animationDuration}}`}</_JSXStyle>
<_JSXStyle id={"82f0f2f07692d2e2"}>{`p.jsx-78f0c8c617eb8e50{-webkit-animation:${animationDuration} forwards ${animationName};-moz-animation:${animationDuration} forwards ${animationName};-o-animation:${animationDuration} forwards ${animationName};animation:${animationDuration} forwards ${animationName}}div.jsx-78f0c8c617eb8e50{background:${color}}`}</_JSXStyle> <_JSXStyle id={"ed798aa885be9084"}>{`p.jsx-b452af554142d27{-webkit-animation:${animationDuration} forwards ${animationName};-moz-animation:${animationDuration} forwards ${animationName};-o-animation:${animationDuration} forwards ${animationName};animation:${animationDuration} forwards ${animationName}}div.jsx-b452af554142d27{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"cf795552a2848e6c"} dynamic={[ <_JSXStyle id={"469c0b1cc43512b8"} dynamic={[
display ? 'block' : 'none' display ? 'block' : 'none'
]}>{`span.__jsx-style-dynamic-selector{display:${display ? 'block' : 'none'}}`}</_JSXStyle> ]}>{`span.__jsx-style-dynamic-selector{display:${display ? 'block' : 'none'}}`}</_JSXStyle>

View file

@ -3,7 +3,7 @@ export default class {
render() { render() {
return <div className={_JSXStyle.dynamic([ return <div className={_JSXStyle.dynamic([
[ [
"f6f794581d963a47", "60bda1963c17b640",
[ [
Typography.base.size.default, Typography.base.size.default,
Typography.base.lineHeight, Typography.base.lineHeight,
@ -17,7 +17,7 @@ export default class {
<p className={_JSXStyle.dynamic([ <p className={_JSXStyle.dynamic([
[ [
"f6f794581d963a47", "60bda1963c17b640",
[ [
Typography.base.size.default, Typography.base.size.default,
Typography.base.lineHeight, Typography.base.lineHeight,
@ -29,7 +29,7 @@ export default class {
] ]
])}>test</p> ])}>test</p>
<_JSXStyle id={"f6f794581d963a47"} dynamic={[ <_JSXStyle id={"60bda1963c17b640"} dynamic={[
Typography.base.size.default, Typography.base.size.default,
Typography.base.lineHeight, Typography.base.lineHeight,
Target.mediumPlus, Target.mediumPlus,

View file

@ -6,10 +6,10 @@ bar.__hash = "aaed0341accea8f";
const baz = new String("div{font-size:3em}"); const baz = new String("div{font-size:3em}");
baz.__hash = "aaed0341accea8f"; baz.__hash = "aaed0341accea8f";
const a = new String(`div{font-size:${size}em}`); const a = new String(`div{font-size:${size}em}`);
a.__hash = "b6966e11ccb637f2"; a.__hash = "b4e02b3e84cc50c";
export const uh = bar; export const uh = bar;
export const foo = new String(`div.jsx-dbfc29cedbb5f49b{color:${color}}`); export const foo = new String(`div.jsx-1a001e3709d54ba4{color:${color}}`);
foo.__hash = "dbfc29cedbb5f49b"; foo.__hash = "1a001e3709d54ba4";
({ ({
styles: <_JSXStyle id={"38ae14c4ec5e0907"}>{`div.jsx-38ae14c4ec5e0907{color:${colors.green.light}}a.jsx-38ae14c4ec5e0907{color:red}`}</_JSXStyle>, styles: <_JSXStyle id={"38ae14c4ec5e0907"}>{`div.jsx-38ae14c4ec5e0907{color:${colors.green.light}}a.jsx-38ae14c4ec5e0907{color:red}`}</_JSXStyle>,
className: "jsx-38ae14c4ec5e0907" className: "jsx-38ae14c4ec5e0907"
@ -34,6 +34,6 @@ const dynamic = (colors)=>{
}; };
}; };
export default { export default {
styles: <_JSXStyle id={"a300397bb1f6c7cd"}>{`div.jsx-a300397bb1f6c7cd{font-size:3em}p.jsx-a300397bb1f6c7cd{color:${color}}`}</_JSXStyle>, styles: <_JSXStyle id={"e14aa5a1efa47449"}>{`div.jsx-e14aa5a1efa47449{font-size:3em}p.jsx-e14aa5a1efa47449{color:${color}}`}</_JSXStyle>,
className: "jsx-a300397bb1f6c7cd" className: "jsx-e14aa5a1efa47449"
}; };

View file

@ -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.23.24", features = [ swc_core = { version = "0.26.0", features = [
"common_concurrent", "common_concurrent",
"binding_macro_wasm", "binding_macro_wasm",
"ecma_codegen", "ecma_codegen",