1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

upgrade: swc, deno_doc, deno_lint, dprint (#7194)

This commit is contained in:
Bartek Iwańczuk 2020-08-26 20:43:24 +02:00 committed by GitHub
parent 80111e57e6
commit 4a0bc747dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 39 deletions

81
Cargo.lock generated
View file

@ -395,9 +395,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_doc" name = "deno_doc"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3ee3c1b4b40ed04881bf9c005504fc52dbb2bef879922b1c6ed31119449489d" checksum = "44d7ebc8c4d2ba7c97c0057e92a863a7736de01c05fc5552350c6eb5e7d9c476"
dependencies = [ dependencies = [
"futures", "futures",
"lazy_static", "lazy_static",
@ -412,15 +412,16 @@ dependencies = [
[[package]] [[package]]
name = "deno_lint" name = "deno_lint"
version = "0.1.24" version = "0.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40d72410d84bb82ec20204e4a3ca4de3031edb89090cb6eca84fd1fc798b87d5" checksum = "709950667ff05e9be477dd3a9b8540effa55a59389c7a13fede12b3e500c3d2b"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"log 0.4.11", "log 0.4.11",
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
"swc_atoms",
"swc_common", "swc_common",
"swc_ecmascript", "swc_ecmascript",
] ]
@ -488,9 +489,9 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-typescript" name = "dprint-plugin-typescript"
version = "0.30.0" version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf2fc659dd444679f15976518fe29866b493ff131f5fd49d1600211559d0201" checksum = "4cb16ed7784b34414c4d463b9d318a99ad8ca275576f3e8fed3d9e436b117069"
dependencies = [ dependencies = [
"dprint-core", "dprint-core",
"serde", "serde",
@ -1001,9 +1002,9 @@ dependencies = [
[[package]] [[package]]
name = "jsdoc" name = "jsdoc"
version = "0.3.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4e7d036004e0fd899c705945f16a1ad6c1d45e52fbdeeea054ad60e8db152c4" checksum = "d2b681c0ecd27f4dc55a4a3c4f618b3cb0c5237f01a81800a03e4401f000c4bf"
dependencies = [ dependencies = [
"nom", "nom",
"serde", "serde",
@ -1789,6 +1790,12 @@ dependencies = [
"winreg", "winreg",
] ]
[[package]]
name = "retain_mut"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e005d658ad26eacc2b6c506dfde519f4e277e328d0eb3379ca61647d70a8f531"
[[package]] [[package]]
name = "ring" name = "ring"
version = "0.16.15" version = "0.16.15"
@ -2132,9 +2139,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_common" name = "swc_common"
version = "0.9.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 = "458740fb57fe3f2b748819c1db0f448d920d4a64b00e802a485bd41290ef6790" checksum = "9232f0ab7a9ed371ef9bb7307d4726a7f952b253b6a0662001d9582e87be9b29"
dependencies = [ dependencies = [
"ast_node", "ast_node",
"cfg-if", "cfg-if",
@ -2153,9 +2160,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ast" name = "swc_ecma_ast"
version = "0.29.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 = "809a1fc3a64d853be83a2b7b389ccacf3c17e221393722550b0af631650e600e" checksum = "3159067b05b6ecab961c54a89dbd2e2eaa892c00071f6cff4da452d582a24b49"
dependencies = [ dependencies = [
"enum_kind", "enum_kind",
"is-macro", "is-macro",
@ -2168,9 +2175,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
version = "0.33.0" version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcee2cebe6f06eaf2ff1819d3c16c31cf5530ef9f6832ee37d2f8d2b5907a38b" checksum = "a31f240721f77a56be0be535f004cf8d8c27510f11cb245c23e57239394ddc65"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"num-bigint", "num-bigint",
@ -2196,9 +2203,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_parser" name = "swc_ecma_parser"
version = "0.35.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "504dbc87d7222f01ca57d3572b3b281956b3bda59b80ab3b5125c8f522f6b729" checksum = "99d84ff32ac5969d9d26354b9aeac21db3346927c7752af4b07ad124390c7c2b"
dependencies = [ dependencies = [
"either", "either",
"enum_kind", "enum_kind",
@ -2230,9 +2237,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
version = "0.21.0" version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ead6107d1d3a8d6c208007cf010c4dbd4fffbd483171b1a64056458647737e" checksum = "c3e99fc5c5b87871fa19036fd8a622ecf6b2a29b30b4d632e48f6a1923e393ea"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"arrayvec", "arrayvec",
@ -2245,6 +2252,7 @@ dependencies = [
"once_cell", "once_cell",
"ordered-float", "ordered-float",
"regex", "regex",
"retain_mut",
"scoped-tls", "scoped-tls",
"serde", "serde",
"serde_json", "serde_json",
@ -2253,16 +2261,30 @@ dependencies = [
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_transforms_macros",
"swc_ecma_utils", "swc_ecma_utils",
"swc_ecma_visit", "swc_ecma_visit",
"unicode-xid 0.2.1", "unicode-xid 0.2.1",
] ]
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_transforms_macros"
version = "0.19.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "955c573b290af6880cf465c350a9058f1302640ed67f3230b0affebf1558b7c1" checksum = "faf4c3e63bf0996e06ba1013cf2df5cca60ef649a4e63a3cb3b95d534c370a42"
dependencies = [
"pmutil",
"proc-macro2 1.0.19",
"quote 1.0.7",
"swc_macros_common",
"syn 1.0.36",
]
[[package]]
name = "swc_ecma_utils"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c1fa08910729be47932200a737acb080ed53ca5371b2a5a4a6f52db351b49ea"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"scoped-tls", "scoped-tls",
@ -2275,9 +2297,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_visit" name = "swc_ecma_visit"
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 = "6d15e3550f565b81fd414162f49ec9cc708d1e561f8ca2fd29b1828b328aa062" checksum = "195bd781f518653e1f8deff6826348e120c9c4081bd3587a4defe1b34fbe7b98"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"swc_atoms", "swc_atoms",
@ -2288,14 +2310,15 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecmascript" name = "swc_ecmascript"
version = "0.5.0" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7e45832f8a90fa87a1244cd0d3c9c0fbac0fc55c4e2a0b810e9b7bfc0b5819" checksum = "f97d57d9e297640d12d96dcc4e275f97a0f4233cfa967132d817c6951e592715"
dependencies = [ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_transforms", "swc_ecma_transforms",
"swc_ecma_utils",
"swc_ecma_visit", "swc_ecma_visit",
] ]
@ -2313,9 +2336,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit" name = "swc_visit"
version = "0.1.0" 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 = "6683cd5f6b97498e887e0d4da4c44ddafb755dfb0d950c52af99344fad23fec9" checksum = "b95ece564c6d6bf980140cedd960697226098800f2de07dad6a140c2dbdcc742"
dependencies = [ dependencies = [
"either", "either",
"swc_visit_macros", "swc_visit_macros",
@ -2323,9 +2346,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_visit_macros" name = "swc_visit_macros"
version = "0.1.0" 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 = "1802720b0826a2ae6fac5be1305b1277cf1e83418549f465edf075d8016a1548" checksum = "59a75265aea70df7a405e2aafb104c976017fe9a54e7b770017d0583873a3cff"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"pmutil", "pmutil",

View file

@ -24,8 +24,8 @@ winapi = "0.3.9"
[dependencies] [dependencies]
deno_core = { path = "../core", version = "0.54.0" } deno_core = { path = "../core", version = "0.54.0" }
deno_doc = { version = "0.1.1" } deno_doc = { version = "0.1.2" }
deno_lint = { version = "0.1.24", features = ["json"] } deno_lint = { version = "0.1.25", features = ["json"] }
atty = "0.2.14" atty = "0.2.14"
base64 = "0.12.3" base64 = "0.12.3"
@ -35,7 +35,7 @@ clap = "2.33.2"
dissimilar = "1.0.2" dissimilar = "1.0.2"
dlopen = "0.1.8" dlopen = "0.1.8"
encoding_rs = "0.8.23" encoding_rs = "0.8.23"
dprint-plugin-typescript = "0.30.0" dprint-plugin-typescript = "0.30.1"
futures = "0.3.5" futures = "0.3.5"
http = "0.2.1" http = "0.2.1"
idna = "0.2.0" idna = "0.2.0"
@ -54,8 +54,8 @@ serde_derive = "1.0.115"
serde_json = { version = "1.0.57", features = [ "preserve_order" ] } serde_json = { version = "1.0.57", features = [ "preserve_order" ] }
sys-info = "0.7.0" sys-info = "0.7.0"
sourcemap = "6.0.1" sourcemap = "6.0.1"
swc_common = { version = "=0.9.1", features = ["sourcemap"] } swc_common = { version = "=0.10.0", features = ["sourcemap"] }
swc_ecmascript = { version = "=0.5.0", features = ["codegen", "parser", "transforms", "visit"] } swc_ecmascript = { version = "=0.6.1", features = ["codegen", "parser", "transforms", "visit"] }
tempfile = "3.1.0" tempfile = "3.1.0"
termcolor = "1.1.0" termcolor = "1.1.0"
tokio = { version = "0.2.22", features = ["full"] } tokio = { version = "0.2.22", features = ["full"] }

View file

@ -225,7 +225,7 @@ impl LintReporter for PrettyLintReporter {
Some(d.location.col as i64), Some(d.location.col as i64),
Some((d.location.col + d.snippet_length) as i64), Some((d.location.col + d.snippet_length) as i64),
&[fmt_errors::format_location( &[fmt_errors::format_location(
&d.location.filename, &d.filename,
d.location.line as i64, d.location.line as i64,
d.location.col as i64, d.location.col as i64,
)], )],
@ -288,5 +288,5 @@ impl LintReporter for JsonLintReporter {
pub fn get_sort_key(a: &LintDiagnostic) -> String { pub fn get_sort_key(a: &LintDiagnostic) -> String {
let location = &a.location; let location = &a.location;
return format!("{}:{}:{}", location.filename, location.line, location.col); return format!("{}:{}:{}", a.filename, location.line, location.col);
} }

View file

@ -2,10 +2,10 @@
"diagnostics": [ "diagnostics": [
{ {
"location": { "location": {
"filename": "[WILDCARD]",
"line": 1, "line": 1,
"col": 0 "col": 0
}, },
"filename": "[WILDCARD]",
"message": "Ignore directive requires lint rule code", "message": "Ignore directive requires lint rule code",
"code": "ban-untagged-ignore", "code": "ban-untagged-ignore",
"line_src": "// deno-lint-ignore", "line_src": "// deno-lint-ignore",
@ -13,10 +13,10 @@
}, },
{ {
"location": { "location": {
"filename": "[WILDCARD]",
"line": 2, "line": 2,
"col": 14 "col": 14
}, },
"filename": "[WILDCARD]",
"message": "Empty block statement", "message": "Empty block statement",
"code": "no-empty", "code": "no-empty",
"line_src": "while (false) {}", "line_src": "while (false) {}",
@ -24,10 +24,10 @@
}, },
{ {
"location": { "location": {
"filename": "[WILDCARD]",
"line": 3, "line": 3,
"col": 12 "col": 12
}, },
"filename": "[WILDCARD]",
"message": "Empty block statement", "message": "Empty block statement",
"code": "no-empty", "code": "no-empty",
"line_src": "} catch (e) {}", "line_src": "} catch (e) {}",