0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 01:44:26 -05:00

fix: upgrade swc via deno_ast 0.16 (#14930)

This commit is contained in:
David Sherret 2022-06-22 15:42:08 -04:00 committed by GitHub
parent efaa149819
commit ca4385ad68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 118 deletions

View file

@ -45,7 +45,7 @@
"tools/wpt/manifest.json" "tools/wpt/manifest.json"
], ],
"plugins": [ "plugins": [
"https://plugins.dprint.dev/typescript-0.69.1.wasm", "https://plugins.dprint.dev/typescript-0.69.5.wasm",
"https://plugins.dprint.dev/json-0.15.3.wasm", "https://plugins.dprint.dev/json-0.15.3.wasm",
"https://plugins.dprint.dev/markdown-0.13.3.wasm", "https://plugins.dprint.dev/markdown-0.13.3.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm", "https://plugins.dprint.dev/toml-0.5.4.wasm",

164
Cargo.lock generated
View file

@ -789,14 +789,6 @@ dependencies = [
"serde", "serde",
"serde_repr", "serde_repr",
"shell-escape", "shell-escape",
"swc_common",
"swc_ecma_codegen",
"swc_ecma_codegen_macros",
"swc_ecma_loader",
"swc_ecma_parser",
"swc_ecma_transforms_base",
"swc_ecma_transforms_typescript",
"swc_ecma_utils",
"tempfile", "tempfile",
"test_util", "test_util",
"text-size", "text-size",
@ -817,17 +809,32 @@ dependencies = [
[[package]] [[package]]
name = "deno_ast" name = "deno_ast"
version = "0.15.0" 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 = "a2989afff97ba7da10f186e9a45e946b4ef943b9d4babd2ee7b4b24cc9906b69" checksum = "4ea41a91147a29a7fcd201af38db548dc22aa6ea5e5e13deff5d57dbf678133c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.13.0", "base64 0.13.0",
"data-url", "data-url",
"dprint-swc-ext", "dprint-swc-ext",
"serde", "serde",
"swc_atoms",
"swc_bundler", "swc_bundler",
"swc_ecmascript", "swc_common",
"swc_ecma_ast",
"swc_ecma_codegen",
"swc_ecma_codegen_macros",
"swc_ecma_dep_graph",
"swc_ecma_loader",
"swc_ecma_parser",
"swc_ecma_transforms_base",
"swc_ecma_transforms_classes",
"swc_ecma_transforms_macros",
"swc_ecma_transforms_proposal",
"swc_ecma_transforms_react",
"swc_ecma_transforms_typescript",
"swc_ecma_utils",
"swc_ecma_visit",
"text_lines", "text_lines",
"url", "url",
] ]
@ -915,9 +922,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_doc" name = "deno_doc"
version = "0.35.0" version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb498c0dcc46a195f565b19eeef5593a6cdbd387ae1ef278ebf7eca2be55128b" checksum = "0dd24201d19b8468a98872f9a724aae68ac0645251424464544ac4d09775ea95"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"deno_ast", "deno_ast",
@ -932,9 +939,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_emit" name = "deno_emit"
version = "0.2.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d43a724dec6898f53984acc966d4ccf24d4d4c0a568db8e4429055166e3c86d" checksum = "a6f71a3f35dad86ef202c4c07ccfc1fc7f288cdbf857c8cfc3e20c443f67ad01"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.13.0", "base64 0.13.0",
@ -975,9 +982,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_graph" name = "deno_graph"
version = "0.27.0" version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99110bbe6cc90fc653a6bd51cf56d8545cd210f3da913aab63d7e362ab9dbaa4" checksum = "8deca521e5c0bfeb3c8f4f646f790f33cd5516610128a4396283d01b32d9d9de"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cfg-if", "cfg-if",
@ -1021,9 +1028,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_lint" name = "deno_lint"
version = "0.30.0" version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a550a14b0b175707c116ab26dd97d96424f238a8c562a719971376d3d75529be" checksum = "5b6d9527e70da7349dc8d05258fc1abf9132fdc83edd66afbbf34c30ad6ba2a4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"deno_ast", "deno_ast",
@ -1327,9 +1334,9 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-typescript" name = "dprint-plugin-typescript"
version = "0.69.1" version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a3335a6c34b00acd97034963c626f55b3481f250b539663841353cd36a7c976" checksum = "9d1cfbfdc39f18e489c56d0f8c46e1efae73bdfdff5cbe56cb31b3885028fe5c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"deno_ast", "deno_ast",
@ -1340,16 +1347,17 @@ dependencies = [
[[package]] [[package]]
name = "dprint-swc-ext" name = "dprint-swc-ext"
version = "0.1.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3df529037ff02f1c43ae8c6cce54d9ad85546ff89cb5c1988f56130c16e16a48" checksum = "9f31482d7839d23d2df252d84a7ba82bd012e338109e9c851793a9d46722d6c6"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"num-bigint", "num-bigint",
"rustc-hash", "rustc-hash",
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
"swc_ecmascript", "swc_ecma_ast",
"swc_ecma_parser",
"text_lines", "text_lines",
] ]
@ -1495,9 +1503,9 @@ dependencies = [
[[package]] [[package]]
name = "eszip" name = "eszip"
version = "0.20.0" 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 = "9c2a7e3d40eb2f779d30d68f5b3605584d79533d5b314ece9cdbb9c14358cb80" checksum = "89cf0b3f30bcebe65df47eb82553a45599ff57c86f5c20170d8d5f1d38cae8c7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.13.0", "base64 0.13.0",
@ -3919,9 +3927,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "0.147.0" version = "0.155.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21cb7497dc98ccc6b677b6c0be2890c5ee827e4763f5151ef6d60a82e9b93bb8" checksum = "5ac5963141bf30d0cf13d77ffe96f73f4febcd2644984cdbce288d656d4e214a"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -3951,9 +3959,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_common" name = "swc_common"
version = "0.18.5" version = "0.18.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "269446a3916d32071ca4c1adb39761fd067bc352ba40e40fca11de881ece8007" checksum = "a7fd4917e5f1f563e475d7adf1cb343f9275ffa602f168b896b0ea8f35d70895"
dependencies = [ dependencies = [
"ahash", "ahash",
"ast_node", "ast_node",
@ -4004,10 +4012,11 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ast" name = "swc_ecma_ast"
version = "0.78.1" 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 = "21f40169fe465e9a93cda5fe397c3afcb69be5ba2f76c4ab22137af6effaebcc" checksum = "f559057f0a573fe3575605cdb5f6d6523b090995e0022444c24e4d206eb4bd57"
dependencies = [ dependencies = [
"bitflags",
"is-macro", "is-macro",
"num-bigint", "num-bigint",
"scoped-tls", "scoped-tls",
@ -4020,11 +4029,10 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
version = "0.108.2" version = "0.109.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "012de8d3583c4cce8ce08891dc6317136730f87ba53937d5f0eb3b86bca31048" checksum = "305da34eaf4d8ec3f908003304d6305fbb455053df9a538c8a491872d167483d"
dependencies = [ dependencies = [
"bitflags",
"memchr", "memchr",
"num-bigint", "num-bigint",
"once_cell", "once_cell",
@ -4039,9 +4047,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen_macros" name = "swc_ecma_codegen_macros"
version = "0.7.0" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59949619b2ef45eedb6c399d05f2c3c7bc678b5074b3103bb670f9e05bb99042" checksum = "0159c99f81f52e48fe692ef7af1b0990b45d3006b14c6629be0b1ffee1b23aea"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.39", "proc-macro2 1.0.39",
@ -4052,9 +4060,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_dep_graph" name = "swc_ecma_dep_graph"
version = "0.76.0" 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 = "553628795fd79a45f3e23b1a732684d887356f9177128cd8c3e90c3631075116" checksum = "713bf2fd11a92c6ad3cd8a75d89bbc4df6269d35c92f998d1b91cc8e4ae5cdd4"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -4064,9 +4072,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_loader" name = "swc_ecma_loader"
version = "0.30.1" version = "0.30.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f7baaa5b99cdf49e830caf54b837891c5c38275ac94c31d555859be95f6479c" checksum = "917dcd19c429254113981e746e3f6b46446145c8e4d353a8727f92bc8fa307cc"
dependencies = [ dependencies = [
"ahash", "ahash",
"anyhow", "anyhow",
@ -4078,9 +4086,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_parser" name = "swc_ecma_parser"
version = "0.104.0" version = "0.105.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efb97dc6efc95313dedc5158055cc811da77395ef7b54be61948b5ad097a3671" checksum = "30288866d2daf61a05bfb8fefdf53abb9028775c89ffda999bd572c9f885ab69"
dependencies = [ dependencies = [
"either", "either",
"enum_kind", "enum_kind",
@ -4093,33 +4101,16 @@ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"tracing", "tracing",
"typed-arena", "typed-arena",
"unicode-id",
]
[[package]]
name = "swc_ecma_transforms"
version = "0.154.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bce21d9e8ff785aaf9b4ac11375d9f5767630fcaf882f72e6af0516224085a6"
dependencies = [
"swc_atoms",
"swc_common",
"swc_ecma_ast",
"swc_ecma_transforms_base",
"swc_ecma_transforms_proposal",
"swc_ecma_transforms_react",
"swc_ecma_transforms_typescript",
"swc_ecma_utils",
"swc_ecma_visit",
] ]
[[package]] [[package]]
name = "swc_ecma_transforms_base" name = "swc_ecma_transforms_base"
version = "0.85.0" version = "0.89.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8262876d5387887776f23c4894fbddff26e5f184edadf2375f3dc19fca2b42a4" checksum = "347cd727977929ef2c6a0e9461a9bcd8e86563a9eacffb15192771fcc7a88a12"
dependencies = [ dependencies = [
"better_scoped_tls", "better_scoped_tls",
"num_cpus",
"once_cell", "once_cell",
"phf", "phf",
"rustc-hash", "rustc-hash",
@ -4136,9 +4127,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_classes" name = "swc_ecma_transforms_classes"
version = "0.73.0" 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 = "e74a27c29def9db5ff03db4d3ab3d37701fb6d100951162223b71132908451eb" checksum = "a44cc21dcecfa8d566ef4b7daf77c4e11087d5799dada6592fcdb414f05d9474"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -4150,9 +4141,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_macros" name = "swc_ecma_transforms_macros"
version = "0.3.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18712e4aab969c6508dff3540ade6358f1e013464aa58b3d30da2ab2d9fcbbed" checksum = "ebf907935ec5492256b523ae7935a824d9fdc0368dcadc41375bad0dca91cd8b"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.39", "proc-macro2 1.0.39",
@ -4163,9 +4154,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_optimization" name = "swc_ecma_transforms_optimization"
version = "0.124.1" version = "0.131.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c995fb0565ace6368253af588cb848a92f0347dd74aef39e64af3c56466206d5" checksum = "1a7a002deafd2d1af5b46e95e5b137742e86e9f8525ad4dcc4564ef05eaea2be"
dependencies = [ dependencies = [
"ahash", "ahash",
"dashmap", "dashmap",
@ -4186,9 +4177,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_proposal" name = "swc_ecma_transforms_proposal"
version = "0.107.0" 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 = "47fc0f3b336764f89adf1899830321c3f5a7e845ede3ad5949eeb7468aa260ab" checksum = "101817a33d344ab1e8afe898743972324b4d0641aca46a124b5d4620d561244c"
dependencies = [ dependencies = [
"either", "either",
"serde", "serde",
@ -4205,9 +4196,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_react" name = "swc_ecma_transforms_react"
version = "0.114.1" version = "0.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fbfcd197ebeb0547b59dee39a164633bcf4fb0edbae886f8046e471e6a10502" checksum = "eae89d33f52f9d0a6ca30d3ff1151c69a97793a2847c5ed5642f75ac8da2af30"
dependencies = [ dependencies = [
"ahash", "ahash",
"base64 0.13.0", "base64 0.13.0",
@ -4231,9 +4222,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_typescript" name = "swc_ecma_transforms_typescript"
version = "0.117.0" version = "0.124.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa8f32954c5a7c6bdead39c8a8a1580127a1759f33ef8b87d00f754882e6090a" checksum = "141d7663429b7c6e7f68fd005a5500f97e6e62ab8ceb63450b100756b199e7d4"
dependencies = [ dependencies = [
"serde", "serde",
"swc_atoms", "swc_atoms",
@ -4247,9 +4238,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.85.0" version = "0.86.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff9d469b284a48317a695a81346a9609d04ce3a31da4493aac508e0d48a4257" checksum = "978a609c13b5d3fe9afe31c065bfb40e1bf6e974961e2e2fef959ee9ce668bf3"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"once_cell", "once_cell",
@ -4262,9 +4253,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_visit" name = "swc_ecma_visit"
version = "0.64.0" 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 = "f2d3783a0dd1e301ae2945ab1241405f913427f9512ec62756d3d2072f7c21bb" checksum = "066077ce3279b593cbdbbb379735e230a794df7aef7206ba142850eb7197e91f"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"swc_atoms", "swc_atoms",
@ -4274,21 +4265,6 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "swc_ecmascript"
version = "0.157.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd35679e1dc392f776b691b125692d90a7bebd5d23ec96699cfe37d8ae8633b1"
dependencies = [
"swc_ecma_ast",
"swc_ecma_codegen",
"swc_ecma_dep_graph",
"swc_ecma_parser",
"swc_ecma_transforms",
"swc_ecma_utils",
"swc_ecma_visit",
]
[[package]] [[package]]
name = "swc_eq_ignore_macros" name = "swc_eq_ignore_macros"
version = "0.1.0" version = "0.1.0"

View file

@ -45,12 +45,12 @@ winapi = "=0.3.9"
winres = "=0.1.12" winres = "=0.1.12"
[dependencies] [dependencies]
deno_ast = { version = "0.15.0", features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "transpiling", "typescript", "view", "visit"] } deno_ast = { version = "0.16.0", features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "transpiling", "typescript", "view", "visit"] }
deno_core = { version = "0.139.0", path = "../core" } deno_core = { version = "0.139.0", path = "../core" }
deno_doc = "0.35.0" deno_doc = "0.36.0"
deno_emit = "0.2.0" deno_emit = "0.3.0"
deno_graph = "0.27.0" deno_graph = "0.28.0"
deno_lint = { version = "0.30.0", features = ["docs"] } deno_lint = { version = "0.31.0", features = ["docs"] }
deno_runtime = { version = "0.65.0", path = "../runtime" } deno_runtime = { version = "0.65.0", path = "../runtime" }
deno_task_shell = "0.4.0" deno_task_shell = "0.4.0"
@ -65,10 +65,10 @@ data-url = "=0.1.1"
dissimilar = "=1.0.3" dissimilar = "=1.0.3"
dprint-plugin-json = "=0.15.3" dprint-plugin-json = "=0.15.3"
dprint-plugin-markdown = "=0.13.3" dprint-plugin-markdown = "=0.13.3"
dprint-plugin-typescript = "=0.69.1" dprint-plugin-typescript = "=0.69.5"
encoding_rs = "=0.8.31" encoding_rs = "=0.8.31"
env_logger = "=0.9.0" env_logger = "=0.9.0"
eszip = "=0.20.0" eszip = "=0.21.0"
fancy-regex = "=0.9.0" fancy-regex = "=0.9.0"
http = "=0.2.6" http = "=0.2.6"
import_map = "=0.11.0" import_map = "=0.11.0"
@ -93,15 +93,6 @@ semver-parser = "=0.10.2"
serde = { version = "=1.0.136", features = ["derive"] } serde = { version = "=1.0.136", features = ["derive"] }
serde_repr = "=0.1.8" serde_repr = "=0.1.8"
shell-escape = "=0.1.5" shell-escape = "=0.1.5"
# temporary pins because swc did a broken publish
swc_common = "=0.18.5"
swc_ecma_codegen = "=0.108.2"
swc_ecma_codegen_macros = "=0.7.0"
swc_ecma_loader = "=0.30.1"
swc_ecma_parser = "=0.104.0"
swc_ecma_transforms_base = "=0.85.0"
swc_ecma_transforms_typescript = "=0.117.0"
swc_ecma_utils = "=0.85.0"
text-size = "=1.1.0" text-size = "=1.1.0"
text_lines = "=0.4.1" text_lines = "=0.4.1"
tokio = { version = "=1.19", features = ["full"] } tokio = { version = "=1.19", features = ["full"] }

View file

@ -35,5 +35,5 @@ path = "examples/http_bench_json_ops.rs"
# These dependencies are only used for the 'http_bench_*_ops' examples. # These dependencies are only used for the 'http_bench_*_ops' examples.
[dev-dependencies] [dev-dependencies]
deno_ast = { version = "0.15.0", features = ["transpiling"] } deno_ast = { version = "0.16.0", features = ["transpiling"] }
tokio = { version = "1.19", features = ["full"] } tokio = { version = "1.19", features = ["full"] }