From 8d1ee3bfaf9f062356858b6b7113be0ab7fa5ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 5 Jan 2021 22:51:54 +0100 Subject: [PATCH] upgrade: deno_doc, deno_lint, dprint, swc_ecmascript, swc_bundler (#9003) --- Cargo.lock | 255 ++++++++++++++++++--------------- cli/Cargo.toml | 10 +- cli/tests/bundle/fixture03.out | 1 - 3 files changed, 141 insertions(+), 125 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87994f6d9b..09a8e39ddb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,12 +76,6 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" -[[package]] -name = "arrayvec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" - [[package]] name = "ast_node" version = "0.7.0" @@ -398,6 +392,16 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "dashmap" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b937cd1fbd1f194ac842196bd2529f21618088ee6d8bff6a46ece611451c96b" +dependencies = [ + "cfg-if 1.0.0", + "num_cpus", +] + [[package]] name = "deno" version = "1.6.3" @@ -484,9 +488,9 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b5a8d931f83afd08af0ed58a3a95d23d6ed5122934db9fa0625bc15a8bed02" +checksum = "6b6a9a9ab31175ad0fcdacacf0dc02b72a778b2502052ad8c7d6d16544940204" dependencies = [ "futures", "lazy_static", @@ -509,9 +513,9 @@ dependencies = [ [[package]] name = "deno_lint" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fb9a8a07a58414172fdf46eaa88551f238575f52a2fd39bebbfa00626be608" +checksum = "201dc00be199fea9fc4ff0a5f3a92625bb449bae976f61f0a792a769f7bcea31" dependencies = [ "anyhow", "derive_more", @@ -639,9 +643,9 @@ dependencies = [ [[package]] name = "dprint-plugin-typescript" -version = "0.37.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3317ee009e4c09da0500289f6c36c172a4eec14617de13d63f369da135428d" +checksum = "67bb41b131e30df80105eb6b4f183a4bf003ee7dfb20661ac15a2a6f329de5b1" dependencies = [ "dprint-core", "dprint-swc-ecma-ast-view", @@ -653,9 +657,9 @@ dependencies = [ [[package]] name = "dprint-swc-ecma-ast-view" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b7823760fa355f812a031026f69656ba30de0a943f7d252dc5fece03e4f66c" +checksum = "552513c4b96147551a95a01f979c80b828be4ae12e928b3b13fdb7e394a0de0d" dependencies = [ "bumpalo", "fnv", @@ -673,9 +677,9 @@ checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" [[package]] name = "either" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" @@ -1028,9 +1032,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" [[package]] name = "heck" @@ -1157,9 +1161,9 @@ checksum = "c3360c7b59e5ffa2653671fb74b4741a5d343c03f331c0a4aeda42b5c2b0ec7d" [[package]] name = "indexmap" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ "autocfg", "hashbrown", @@ -1246,18 +1250,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsdoc" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd6d090c0140363cb94f672def08187d731ecdf28b84a1fc8e55386a2ca2c77" -dependencies = [ - "nom", - "serde", - "swc_atoms", - "swc_common", -] - [[package]] name = "jsonc-parser" version = "0.14.0" @@ -1286,19 +1278,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "lexical-core" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if 0.1.10", - "ryu", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.80" @@ -1346,7 +1325,7 @@ dependencies = [ "async-trait", "auto_impl", "bytes 0.5.6", - "dashmap", + "dashmap 3.11.10", "futures", "log", "lsp-types", @@ -1539,7 +1518,6 @@ version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ - "lexical-core", "memchr", "version_check", ] @@ -1626,15 +1604,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "ordered-float" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579" -dependencies = [ - "num-traits", -] - [[package]] name = "os_pipe" version = "0.9.2" @@ -2044,9 +2013,9 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e005d658ad26eacc2b6c506dfde519f4e277e328d0eb3379ca61647d70a8f531" +checksum = "53552c6c49e1e13f1a203ef0080ab3bbef0beb570a528993e83df057a9d9bba1" [[package]] name = "ring" @@ -2209,9 +2178,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" dependencies = [ "indexmap", "itoa", @@ -2285,9 +2254,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.4.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" +checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0" [[package]] name = "socket2" @@ -2329,12 +2298,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "string_cache" version = "0.8.1" @@ -2397,9 +2360,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.18.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74f70f2803b7ea5cbe9ad4ec7e1679f8d661fd713b9d0d39f76dae41383bd56" +checksum = "233e7e26004d0421a3db5f4b61bbdc7728bb798cc8ca3c73d8a82e1e22028672" dependencies = [ "anyhow", "crc", @@ -2503,9 +2466,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.44.0" +version = "0.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ec412ebca8caa62ae98f90d5829d3f85d4db4b31c7339cdae72bbc063c42ea" +checksum = "e0b64fe50248ff01fdd2d16904700bc5c64eddd4ecdc821c6231f1133d86068b" dependencies = [ "either", "enum_kind", @@ -2517,77 +2480,131 @@ dependencies = [ "swc_atoms", "swc_common", "swc_ecma_ast", - "swc_ecma_parser_macros", "swc_ecma_visit", "unicode-xid 0.2.1", ] -[[package]] -name = "swc_ecma_parser_macros" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8798810e2c79b884cf238bcb72b4bd12375121ee91724f1ceeb54b6e38a138e7" -dependencies = [ - "pmutil", - "proc-macro2 1.0.24", - "quote 1.0.7", - "swc_macros_common", - "syn 1.0.56", -] - [[package]] name = "swc_ecma_transforms" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc476391a584d3a4f94038f8f09d37686727ff1706ac1247de6de28d677bda61" +checksum = "0d2aad881f470227b9da6ab2d625468a609ad638cbfc8a1268804b1d697fdbdc" dependencies = [ - "Inflector", - "arrayvec", - "dashmap", - "either", - "fxhash", - "indexmap", - "is-macro", - "jsdoc", - "log", - "num-bigint", - "once_cell", - "ordered-float", - "phf", - "regex", - "retain_mut", - "scoped-tls", - "serde", - "serde_json", - "smallvec", "swc_atoms", "swc_common", "swc_ecma_ast", "swc_ecma_parser", - "swc_ecma_transforms_macros", + "swc_ecma_transforms_base", + "swc_ecma_transforms_optimization", + "swc_ecma_transforms_proposal", + "swc_ecma_transforms_react", + "swc_ecma_transforms_typescript", "swc_ecma_utils", "swc_ecma_visit", "unicode-xid 0.2.1", ] [[package]] -name = "swc_ecma_transforms_macros" +name = "swc_ecma_transforms_base" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c0b511705a737ef07d347f0fe5af22ef11ead65f6be58010d897426a60a70d" +checksum = "10b437ee18453dd42e597f03b9b7faf589d3b4e443637934265c94375ed39077" dependencies = [ - "pmutil", - "proc-macro2 1.0.24", - "quote 1.0.7", - "swc_macros_common", - "syn 1.0.56", + "fxhash", + "once_cell", + "phf", + "scoped-tls", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_optimization" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d50aeac71e3b3b7a2b145bfb5d145b9c367d2bc5de184a0f00b94e797751c5e" +dependencies = [ + "dashmap 4.0.1", + "fxhash", + "indexmap", + "log", + "once_cell", + "retain_mut", + "serde_json", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_proposal" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323ef5ee8d6cfa54a541ed93a7aa0bf83895521f35c29c8dd6a9c0a89c32138a" +dependencies = [ + "either", + "fxhash", + "serde", + "smallvec", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_react" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09b2ee4a06a5f884c1d3e3769c1922b492125141997081cf4a3206fd7f49e24" +dependencies = [ + "dashmap 4.0.1", + "once_cell", + "regex", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_transforms_typescript" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f811aec8fa4bcf758f75b6b42c793fabd0f843a5f78cc14647002090d4b9bc83" +dependencies = [ + "fxhash", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] name = "swc_ecma_utils" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37310926374783577b62865546ddccbe6c5f1700586151a8a6d953ef45b5bcb" +checksum = "5ade4fea9e1b99c6072dfb793eed340d55961a33e7dc38fb5102398161e29abb" dependencies = [ "once_cell", "scoped-tls", @@ -2613,9 +2630,9 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a0a8550d9af74d8c9a61a31ffa0efa709f14335fe80f5c51bc747f0265a1756" +checksum = "ab54fd9535fe42b73e6409b360b10472dcfa7239aa22a7da75ab664d3105ab83" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5b715ba9de..7c433e5143 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -32,8 +32,8 @@ winapi = "0.3.9" [dependencies] deno_core = { path = "../core", version = "0.75.0" } -deno_doc = "0.1.19" -deno_lint = "0.2.14" +deno_doc = "0.1.20" +deno_lint = "0.2.15" deno_runtime = { path = "../runtime", version = "0.5.0" } atty = "0.2.14" @@ -41,7 +41,7 @@ base64 = "0.12.3" byteorder = "1.3.4" clap = "2.33.3" dissimilar = "1.0.2" -dprint-plugin-typescript = "0.37.0" +dprint-plugin-typescript = "0.38.1" encoding_rs = "0.8.24" env_logger = "0.7.1" filetime = "0.2.12" @@ -62,9 +62,9 @@ semver-parser = "0.9.0" serde = { version = "1.0.116", features = ["derive"] } shell-escape = "0.1.5" sourcemap = "6.0.1" -swc_bundler = "0.18.2" +swc_bundler = "0.19.1" swc_common = { version = "0.10.8", features = ["sourcemap"] } -swc_ecmascript = { version = "0.16.1", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] } +swc_ecmascript = { version = "0.17.0", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] } tempfile = "3.1.0" termcolor = "1.1.0" tokio = { version = "0.2.22", features = ["full"] } diff --git a/cli/tests/bundle/fixture03.out b/cli/tests/bundle/fixture03.out index 27d0a7a13e..93659f4d95 100644 --- a/cli/tests/bundle/fixture03.out +++ b/cli/tests/bundle/fixture03.out @@ -1,5 +1,4 @@ const a = "a"; -const a1 = a; const d = { a: a };