chore: upgrade crates (#9632)

This commit is contained in:
Bartek Iwańczuk 2021-03-02 13:39:56 +01:00 committed by GitHub
parent badc88b78a
commit faf2e80272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 119 additions and 146 deletions

123
Cargo.lock generated
View File

@ -22,6 +22,17 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
[[package]]
name = "ahash"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957"
dependencies = [
"getrandom 0.2.2",
"once_cell",
"version_check",
]
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
version = "0.7.15" version = "0.7.15"
@ -90,9 +101,9 @@ dependencies = [
[[package]] [[package]]
name = "ast_node" name = "ast_node"
version = "0.7.1" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c701db7f0f212e2e3024a1929cdaf9a21815f329c5ef43be951fc163b3cdc567" checksum = "7c84c445d38f7f29c82ed56c2cfae4885e5e6d9fb81b956ab31430757ddad5d7"
dependencies = [ dependencies = [
"darling", "darling",
"pmutil", "pmutil",
@ -589,9 +600,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_doc" name = "deno_doc"
version = "0.1.22" version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cba173771426c420d7ff0f974548dd92cdd421c02282d218bf38685e772ed645" checksum = "91967783675550e9550963c6c0e0309fa2279ad1dd5248cc13380e1f288659e9"
dependencies = [ dependencies = [
"futures", "futures",
"lazy_static", "lazy_static",
@ -618,9 +629,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_lint" name = "deno_lint"
version = "0.2.18" version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9083c32446e541f2096a4e2d317f9b36e026e63e4fc3faaa99947df227ff02c" checksum = "38788fca6127cdf92adb17f3bebee2c33041de45ed4aa685b0a2aa36e463e815"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"derive_more", "derive_more",
@ -794,9 +805,9 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-typescript" name = "dprint-plugin-typescript"
version = "0.40.3" version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d6c29acc5866aaec868aa984678d50b61aac5f81416845e516dc15f40e2418" checksum = "d9ec89eed06671390db8e6d29b98ee97c43caf52e2b481211665837677eb690b"
dependencies = [ dependencies = [
"dprint-core", "dprint-core",
"dprint-swc-ecma-ast-view", "dprint-swc-ecma-ast-view",
@ -808,9 +819,9 @@ dependencies = [
[[package]] [[package]]
name = "dprint-swc-ecma-ast-view" name = "dprint-swc-ecma-ast-view"
version = "0.8.1" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8709b039f9ad8759e6a895d7f853501f1bb0f0bf2e20b1250270ef89ea8ebc" checksum = "4b495385633bb59f360775a5278327c294c42484e5256288c80e591db334227e"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"fnv", "fnv",
@ -855,9 +866,9 @@ dependencies = [
[[package]] [[package]]
name = "enum_kind" name = "enum_kind"
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 = "6e57153e35187d51f08471d5840459ff29093473e7bedd004a1414985aab92f3" checksum = "78b940da354ae81ef0926c5eaa428207b8f4f091d3956c891dfbd124162bed99"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -983,9 +994,9 @@ dependencies = [
[[package]] [[package]]
name = "from_variant" name = "from_variant"
version = "0.1.2" version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "039885ad6579a86b94ad8df696cce8c530da496bf7b07b12fec8d6c4cd654bb9" checksum = "0951635027ca477be98f8774abd6f0345233439d63f307e47101acb40c7cc63d"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -1415,7 +1426,7 @@ version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
dependencies = [ dependencies = [
"ahash", "ahash 0.4.7",
] ]
[[package]] [[package]]
@ -2916,9 +2927,9 @@ dependencies = [
[[package]] [[package]]
name = "string_enum" name = "string_enum"
version = "0.3.0" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94fdb6536756cfd35ee18b9a9972ab2a699d405cc57e0ad0532022960f30d581" checksum = "f584cc881e9e5f1fd6bf827b0444aa94c30d8fe6378cf241071b5f5700b2871f"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -2951,10 +2962,11 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "0.21.0" version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c86e15b52e502354b633ba4826d3a462f93d99b50077327fbf75ff8c8b329932" checksum = "6bb2cadfe6deb2c08bdf9c70e56cac0fd4efae2e9977ce40f1182443260d8a63"
dependencies = [ dependencies = [
"ahash 0.7.2",
"anyhow", "anyhow",
"crc", "crc",
"indexmap", "indexmap",
@ -2977,9 +2989,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_common" name = "swc_common"
version = "0.10.9" version = "0.10.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f8681271be490a61fc0efb2de6897f7a886801b1bd0be021c7d862508bf5147" checksum = "570f4343486251030e61186c144952d1bcc1dc4ac8b334ce450264788603b4e3"
dependencies = [ dependencies = [
"ast_node", "ast_node",
"cfg-if 0.1.10", "cfg-if 0.1.10",
@ -3001,9 +3013,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ast" name = "swc_ecma_ast"
version = "0.38.0" version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efb6a027891bdb66ddddda7bdee43c39be6b7d7861f05fe93177f29183e26738" checksum = "8b73b90f45238ac4b29e264591cfb34b0df32fb336f74a12a369678c7d5e906b"
dependencies = [ dependencies = [
"is-macro", "is-macro",
"num-bigint", "num-bigint",
@ -3015,9 +3027,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
version = "0.44.0" version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673a4d3fafd4ccc5c74b31f5896100a7c1c40a86c7e35d0245ce60ee11d49ac9" checksum = "ed2604a8c27ea2b549ada2f1218a73029a7abb3507ba3b00491884f93e0efd65"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"num-bigint", "num-bigint",
@ -3031,9 +3043,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen_macros" name = "swc_ecma_codegen_macros"
version = "0.5.1" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6505258e3ef526ded22eadaf3e342e2915ff3b3d9e5273e256c62bb8f62b5686" checksum = "51af418026cb4ea588e2b15fa206c44e09a3184b718e12a0919729c7c3ad20d3"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -3044,9 +3056,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_dep_graph" name = "swc_ecma_dep_graph"
version = "0.14.0" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22aa45d4b8a8a42bb08a255f8bbc7fa528a98a017b10bf5ea78ec81960a74cec" checksum = "95be4b111fd000832fb164feb22d0e4d1c7c4f43c458b98a85218da9b90e0cdd"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -3056,9 +3068,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_parser" name = "swc_ecma_parser"
version = "0.46.0" version = "0.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ed2a23928309960edb769e19235ae345442235c6800fdd2c9b12de35b4ae127" checksum = "9070f184ca5724d67325dbc4a9d6e8e18c27a0439c95e088e246a3404ef2f05f"
dependencies = [ dependencies = [
"either", "either",
"enum_kind", "enum_kind",
@ -3076,9 +3088,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
version = "0.34.0" version = "0.38.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca4ef1308184cf7f78ab69e66f2d3f11dc8ab12a26ed400d82a6ddcfa61ab0d3" checksum = "c2fa7fa6a8ab3b65767e01efae34d5079c7e964826074ce7b1f10cb66175d9d3"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -3096,9 +3108,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_base" name = "swc_ecma_transforms_base"
version = "0.3.0" version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e243adb8afc4df741a4cfbf265395b4503acbb16f2bb28eaab482a1ca001b25" checksum = "21db046d7e79ba05a42292c905740a47b1da241e71d55c5adc75a0a5418576b6"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"once_cell", "once_cell",
@ -3115,9 +3127,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_optimization" name = "swc_ecma_transforms_optimization"
version = "0.4.0" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0674d4c1d2a7178dd7a7b0ee747caecc98a7f9013add834fb91b48a213e64f8" checksum = "37075edc6b900b710e8b1776531fcb3d2cae831bcba2667ccd3153115f17e76e"
dependencies = [ dependencies = [
"dashmap", "dashmap",
"fxhash", "fxhash",
@ -3137,9 +3149,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_proposal" name = "swc_ecma_transforms_proposal"
version = "0.4.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0b19284a8f8e9d8007fad66e5efe187ac0870b6c19265a15af485114e9539d5" checksum = "5ff697ca49cff569dccc6e8d405c805163c202c033b9e7213def7ea3aef228b5"
dependencies = [ dependencies = [
"either", "either",
"fxhash", "fxhash",
@ -3156,14 +3168,15 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_react" name = "swc_ecma_transforms_react"
version = "0.4.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa5d1e2183a19c2f1995296703dab06be30219f0989c44aebf50a71155d0f1a" checksum = "4712a2afc3dddc591b2214b329e00312ff6d1f212479ee2942779c32e41d5515"
dependencies = [ dependencies = [
"dashmap", "dashmap",
"once_cell", "once_cell",
"regex", "regex",
"serde", "serde",
"string_enum",
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
@ -3175,9 +3188,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_typescript" name = "swc_ecma_transforms_typescript"
version = "0.4.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2e5292685db7c8db9b9dd98e06248f1d59d9bf46d16b7c220bd3bab6ab8b6f9" checksum = "c0fd91b6d6bc8885d40a5d6f2d54f061d4319a0e337ca29e45c065c69a74c2bb"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"serde", "serde",
@ -3192,9 +3205,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.28.0" version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eff7a1ec3c9374c3e83f1b21846723573dd41419e27e7204349835f5b599efa8" checksum = "80d1e28b7c0c0a463c0b565af98cd1d241313990568e657bb2f1bd4468892d93"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"scoped-tls", "scoped-tls",
@ -3207,9 +3220,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_visit" name = "swc_ecma_visit"
version = "0.24.0" 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 = "169dbafc108be69387475bab48d94e60a786a5959c76e0bd31f6bfb19e81f1b5" checksum = "dd01a0c58d20627f2fa29f44c5c6f68ae7d2ca6e2de0447429f2db65e4482a4e"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"swc_atoms", "swc_atoms",
@ -3220,9 +3233,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecmascript" name = "swc_ecmascript"
version = "0.20.0" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f88857fa61bc18ffdb324e8e66300e0af3bb0ad053eb5c490ca4f8bbf7e195b0" checksum = "e54da8566eb8035ea784b7297e16db45525242a7c955d8b9b3a5895d5694abbe"
dependencies = [ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen",
@ -3247,9 +3260,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_macros_common" name = "swc_macros_common"
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 = "18a9f27d290938370597d363df9a77ba4be8e2bc99f32f69eb5245cdeed3c512" checksum = "bf7c68e78ffbcba3d38abe6d0b76a0e1a37888b5c9301db3426537207090ada3"
dependencies = [ dependencies = [
"pmutil", "pmutil",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -3259,9 +3272,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit" name = "swc_visit"
version = "0.2.2" version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ca9ac0c9177cbc3ae943f7fa1126831b00b68c49c24a0c07f45647e120871d8" checksum = "583cfe83f6002e1118559308b88181f34b5936b403b72548cd0259bfcf0ca39e"
dependencies = [ dependencies = [
"either", "either",
"swc_visit_macros", "swc_visit_macros",
@ -3269,9 +3282,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit_macros" name = "swc_visit_macros"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a544fa1da1a6436b219cb3b47ff3cf140e8eea5b5134d3e21f1c481ca1482186" checksum = "e3b2825fee79f10d0166e8e650e79c7a862fb991db275743083f07555d7641f0"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"pmutil", "pmutil",

View File

@ -35,8 +35,8 @@ winres = "0.1.11"
[dependencies] [dependencies]
deno_core = { path = "../core", version = "0.79.0" } deno_core = { path = "../core", version = "0.79.0" }
deno_doc = "0.1.22" deno_doc = "0.1.23"
deno_lint = "0.2.18" deno_lint = "0.2.19"
deno_runtime = { path = "../runtime", version = "0.9.0" } deno_runtime = { path = "../runtime", version = "0.9.0" }
atty = "0.2.14" atty = "0.2.14"
@ -44,7 +44,7 @@ base64 = "0.13.0"
byteorder = "1.4.2" byteorder = "1.4.2"
clap = "2.33.3" clap = "2.33.3"
dissimilar = "1.0.2" dissimilar = "1.0.2"
dprint-plugin-typescript = "0.40.3" dprint-plugin-typescript = "0.41.0"
dprint-plugin-markdown = "0.5.1" dprint-plugin-markdown = "0.5.1"
dprint-plugin-json = "0.8.0" dprint-plugin-json = "0.8.0"
encoding_rs = "0.8.28" encoding_rs = "0.8.28"
@ -68,9 +68,9 @@ semver-parser = "0.10.2"
serde = { version = "1.0.123", features = ["derive"] } serde = { version = "1.0.123", features = ["derive"] }
shell-escape = "0.1.5" shell-escape = "0.1.5"
sourcemap = "6.0.1" sourcemap = "6.0.1"
swc_bundler = "0.21.0" swc_bundler = "0.25.1"
swc_common = { version = "0.10.9", features = ["sourcemap"] } swc_common = { version = "0.10.12", features = ["sourcemap"] }
swc_ecmascript = { version = "0.20.0", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] } swc_ecmascript = { version = "0.24.1", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] }
tempfile = "3.2.0" tempfile = "3.2.0"
termcolor = "1.1.2" termcolor = "1.1.2"
text-size = "1.1.0" text-size = "1.1.0"

View File

@ -11,17 +11,17 @@ function printHello2() {
function returnsHi1() { function returnsHi1() {
return "Hi"; return "Hi";
} }
export { returnsHi1 as returnsHi };
function returnsFoo21() { function returnsFoo21() {
return returnsFoo(); return returnsFoo();
} }
export { returnsFoo21 as returnsFoo2 };
function printHello31() { function printHello31() {
printHello2(); printHello2();
} }
export { printHello31 as printHello3 };
function throwsError1() { function throwsError1() {
throw Error("exception from mod1"); throw Error("exception from mod1");
} }
export { returnsHi1 as returnsHi };
export { returnsFoo21 as returnsFoo2 };
export { printHello31 as printHello3 };
export { throwsError1 as throwsError }; export { throwsError1 as throwsError };

View File

@ -1,7 +1,7 @@
const a = "a";
const mod = function() { const mod = function() {
const a = "a";
return { return {
a a: a
}; };
}(); }();
console.log(mod); console.log(mod);

View File

@ -1,16 +1,12 @@
const b = "b"; const c = "c";
console.log(b); class C {
}
const mod = function() { const mod = function() {
const c = "c";
const c1 = c;
class C {
}
const __default = C;
const __default1 = C;
return { return {
c: c, c: c,
default: C default: C
}; };
}(); }();
const c = mod; const b = "b";
console.log(b);
console.log(mod); console.log(mod);

View File

@ -1,5 +1,5 @@
const a = "a"; const a = "a";
const d = { const d = {
a: a a
}; };
console.log(d); console.log(d);

View File

@ -1,9 +1,7 @@
const a1 = "a";
const mod = function() { const mod = function() {
const a = "a";
const a1 = a;
return { return {
a: a a: a1
}; };
}(); }();
const a = mod;
export { mod as a }; export { mod as a };

View File

@ -1,20 +1,19 @@
function a3(...d) {
return d.join(" ");
}
const mod = function() { const mod = function() {
function a(...d) {
return d.join(" ");
}
return { return {
a a: a3
}; };
}(); }();
function a1(...d) {
return d.join("/");
}
const mod1 = function() { const mod1 = function() {
function a(...d) {
return d.join("/");
}
return { return {
a a: a1
}; };
}(); }();
const k = globalThis.value ? mod : mod1; const k = globalThis.value ? mod : mod1;
const { a: a2 , } = k; const { a: a2 , } = k;
const a1 = a2; export { a2 as a };
export { a1 as a };

View File

@ -1,6 +1,5 @@
const a = "a"; const a = "a";
const a1 = a;
const o = { const o = {
}; };
const { a: a2 = a1 } = o; const { a: a1 = a } = o;
console.log(a2); console.log(a1);

View File

@ -1,25 +1,21 @@
function a() { function a() {
console.log("a"); console.log("a");
} }
const a1 = a; var O1;
var O3;
(function(O1) { (function(O1) {
O1[O1["A"] = 0] = "A"; O1[O1["A"] = 0] = "A";
O1[O1["B"] = 1] = "B"; O1[O1["B"] = 1] = "B";
O1[O1["C"] = 2] = "C"; O1[O1["C"] = 2] = "C";
})(O3 || (O3 = { })(O1 || (O1 = {
})); }));
const O1 = O3; export { O1 as O };
const a2 = a1;
const O2 = O1;
export { O2 as O };
class A { class A {
#a; #a;
#c; #c;
constructor(o = { constructor(o = {
}){ }){
const { a: a3 = a2 , c , } = o; const { a: a1 = a , c , } = o;
this.#a = a3; this.#a = a1;
this.#c = c; this.#c = c;
} }
a() { a() {
@ -29,6 +25,6 @@ class A {
console.log(this.#c); console.log(this.#c);
} }
} }
const a4 = new A(); const a2 = new A();
a4.a(); a2.a();
a4.c(); a2.c();

View File

@ -1,31 +1,2 @@
const mod = function() { const mod = [];
const mod1 = [];
return {
mod: mod1
};
}();
console.log(mod); console.log(mod);
const mod1 = function() {
const c = [];
const c1 = c;
return {
c: c
};
}();
const c = mod1;
const mod2 = function() {
const b = [];
const b1 = b;
return {
b: b
};
}();
const b = mod2;
const mod3 = function() {
const a = [];
const a1 = a;
return {
a: a
};
}();
const a = mod3;

View File

@ -1473,7 +1473,7 @@ mod integration {
assert!(std::str::from_utf8(&output.stdout) assert!(std::str::from_utf8(&output.stdout)
.unwrap() .unwrap()
.trim() .trim()
.ends_with("f1\nf2")); .ends_with("f2\nf1"));
assert_eq!(output.stderr, b""); assert_eq!(output.stderr, b"");
} }

View File

@ -1,6 +1,3 @@
// TODO(lucacasonato): remove when GPUBufferUsage and friends are added to dlint
// deno-lint-ignore-file no-undef
import { assert, assertEquals, unitTest } from "./test_util.ts"; import { assert, assertEquals, unitTest } from "./test_util.ts";
let isCI: boolean; let isCI: boolean;

View File

@ -22,6 +22,9 @@ use std::path::PathBuf;
use std::pin::Pin; use std::pin::Pin;
use std::sync::Arc; use std::sync::Arc;
use std::sync::Mutex; use std::sync::Mutex;
use swc_ecmascript::parser::Syntax;
type DocResult = Result<(Syntax, String), doc::DocError>;
/// When parsing lib.deno.d.ts, only `DocParser::parse_source` is used, /// When parsing lib.deno.d.ts, only `DocParser::parse_source` is used,
/// which never even references the loader, so this is just a stub for that scenario. /// which never even references the loader, so this is just a stub for that scenario.
@ -41,7 +44,7 @@ impl DocFileLoader for StubDocLoader {
fn load_source_code( fn load_source_code(
&self, &self,
_specifier: &str, _specifier: &str,
) -> Pin<Box<dyn Future<Output = Result<String, doc::DocError>>>> { ) -> Pin<Box<dyn Future<Output = DocResult>>> {
unreachable!() unreachable!()
} }
} }
@ -63,11 +66,14 @@ impl DocFileLoader for module_graph::Graph {
fn load_source_code( fn load_source_code(
&self, &self,
specifier: &str, specifier: &str,
) -> Pin<Box<dyn Future<Output = Result<String, doc::DocError>>>> { ) -> Pin<Box<dyn Future<Output = DocResult>>> {
let specifier = let specifier =
resolve_url_or_path(specifier).expect("Expected valid specifier"); resolve_url_or_path(specifier).expect("Expected valid specifier");
let source = self.get_source(&specifier).expect("Unknown dependency"); let source = self.get_source(&specifier).expect("Unknown dependency");
async move { Ok(source) }.boxed_local() let media_type =
self.get_media_type(&specifier).expect("Unknown media type");
let syntax = ast::get_syntax(&media_type);
async move { Ok((syntax, source)) }.boxed_local()
} }
} }
@ -122,10 +128,7 @@ pub async fn print_docs(
let doc_parser = doc::DocParser::new(Box::new(graph), private); let doc_parser = doc::DocParser::new(Box::new(graph), private);
doc_parser doc_parser
.parse_with_reexports( .parse_with_reexports(root_specifier.as_str())
root_specifier.as_str(),
ast::get_syntax(&MediaType::TypeScript),
)
.await .await
}; };

View File

@ -26,6 +26,7 @@ async function dlint() {
":!:cli/dts/**", ":!:cli/dts/**",
":!:cli/tests/encoding/**", ":!:cli/tests/encoding/**",
":!:cli/tests/error_syntax.js", ":!:cli/tests/error_syntax.js",
":!:cli/tests/unit/**",
":!:cli/tests/lint/**", ":!:cli/tests/lint/**",
":!:cli/tests/tsc/**", ":!:cli/tests/tsc/**",
":!:cli/tsc/*typescript.js", ":!:cli/tsc/*typescript.js",