1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

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

- deno_doc 0.1.14
- deno_lint 0.2.7
- dprint-plugin-typescript 0.32.7
- swc_bundler 0.14.1
- swc_ecmascript 0.13.1
This commit is contained in:
Bartek Iwańczuk 2020-10-30 20:39:53 +01:00 committed by GitHub
parent ce75101e3e
commit 2a36e2f892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 41 deletions

58
Cargo.lock generated
View file

@ -484,9 +484,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_doc" name = "deno_doc"
version = "0.1.13" version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43f2838195edbfc5604bdf668a80921c9d8a3e9be6b913ded856a560353aec65" checksum = "0259b3a74f4551823029c6e711093840b0cc1fa774b1d6be49643af65ba5c5f9"
dependencies = [ dependencies = [
"futures", "futures",
"lazy_static", "lazy_static",
@ -510,12 +510,12 @@ dependencies = [
[[package]] [[package]]
name = "deno_lint" name = "deno_lint"
version = "0.2.5" version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c06a21dfcb8144754fab1165ceb637a3abe13f3d58885976f9b9892be7f5dc0" checksum = "1e8194edfcd2612361b7149f8d79aef5688f1463d76f8b613b517f4537a27ff9"
dependencies = [ dependencies = [
"lazy_static",
"log", "log",
"once_cell",
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
@ -592,9 +592,9 @@ dependencies = [
[[package]] [[package]]
name = "dprint-plugin-typescript" name = "dprint-plugin-typescript"
version = "0.32.6" version = "0.32.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c5b6a8ba5f3aa6e9ae503e8ca19ce1072194282b5b96d5afbd42537c8b68522" checksum = "dca4da0cbd145118f667eee6daa2eb90c2667ca25b0905dba6a7fa1d8ede6530"
dependencies = [ dependencies = [
"dprint-core", "dprint-core",
"serde", "serde",
@ -1140,9 +1140,9 @@ dependencies = [
[[package]] [[package]]
name = "jsdoc" name = "jsdoc"
version = "0.8.0" 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 = "6b7ba145aff1448ead0e6c40841ddcec6e8868ba91895f92b77343f788f54db2" checksum = "02dd0a45f2fca1d284537158260931c58496103224c3780e40508d0c1e6b9f4e"
dependencies = [ dependencies = [
"nom", "nom",
"serde", "serde",
@ -2261,9 +2261,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]] [[package]]
name = "swc_atoms" name = "swc_atoms"
version = "0.2.4" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34d36e046dd23a5b5f7f9d4fd1f9ca0eb07dfd67c87521ecd358dc26c4ad1f42" checksum = "762f5c66bf70e6f96db67808b5ad783c33a72cc3e0022cd04b41349231cdbe6c"
dependencies = [ dependencies = [
"string_cache", "string_cache",
"string_cache_codegen", "string_cache_codegen",
@ -2271,9 +2271,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "0.12.0" version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "901b76ba88dc57267bb7fc6900cd805ad51a2e97588400b1f76eb5a10f9ff464" checksum = "4637a8e92ffe50c39f7aac648f97181bba83206537b998a32b13fac553a6be60"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"crc", "crc",
@ -2318,9 +2318,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_ast" name = "swc_ecma_ast"
version = "0.33.1" 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 = "10bc0dabe4a32a6d76b1a69e9c1063573ad9905c6dc159f2c8e497d64b36b84f" checksum = "4ba29ce355bdfb942c0fb29bd1409197fa1a25ba649f13089129484ad0c83282"
dependencies = [ dependencies = [
"enum_kind", "enum_kind",
"is-macro", "is-macro",
@ -2333,9 +2333,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
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 = "582d052f72df0013ccf4e4fe2077f5c61b918b788ed3b4a1996c30211f535e9b" checksum = "75213b0e41fb3c9370eed8ff69124b885ef140776909f7ee014819c0d5ac7349"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"num-bigint", "num-bigint",
@ -2361,9 +2361,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_dep_graph" name = "swc_ecma_dep_graph"
version = "0.6.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 = "51f954f752db6666090a95e49a7ffcf23c825fe94be9095b0d7bec4fc26e1c4f" checksum = "5998b94a20574227dc19aac1190d951862a6d541a3761bf9245d2c3b3f802452"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -2373,9 +2373,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_parser" name = "swc_ecma_parser"
version = "0.40.0" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9df01dea2cb40f7b242c479ac583353f17f82a0ef30ae3ee89d9a2f503ad596c" checksum = "136f5fddde6d78b5ae532bb0d5a0ce2f1eb1d36caea3e9b9dfcfb70693a7e23d"
dependencies = [ dependencies = [
"either", "either",
"enum_kind", "enum_kind",
@ -2407,9 +2407,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
version = "0.27.0" version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27ecc38cd778c4e5e1b7786ee73d5921e2799a7f3529803f63a75cde936389e7" checksum = "6ee08c5add657ead50136456ae60c0a018d796cc8f1566eb428edc48a061e545"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"arrayvec", "arrayvec",
@ -2454,9 +2454,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.23.0" version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fef3ac4d9ad5f9c9d2e4fa0bc200e08304c4a26c81dd7aba8871c573da33dad3" checksum = "4e09463bb646ed5f33608bd60153b604f3a894162d14dba481f1032e7d28e80d"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"scoped-tls", "scoped-tls",
@ -2469,9 +2469,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_visit" name = "swc_ecma_visit"
version = "0.19.1" version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "221496af0bf3f55ee5bb99d1b776844b6cbbca3fdd574169d5e3a3ab5d4acad9" checksum = "0175b589eaeb5a8e6458592f82efce759c1fa0fb41dfe14f04b74c498f11f50d"
dependencies = [ dependencies = [
"num-bigint", "num-bigint",
"swc_atoms", "swc_atoms",
@ -2482,9 +2482,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecmascript" name = "swc_ecmascript"
version = "0.11.1" version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6daadf581c50c59197b56ba12d6eea8279809cc0b591d7250ffd59e4f18c9580" checksum = "41561a31d6b9fb46c6d7ea3ab4bc1e851d0321d18ae038cd7bbe3ea3f4155e3b"
dependencies = [ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen",

View file

@ -30,8 +30,8 @@ winapi = "0.3.9"
[dependencies] [dependencies]
deno_core = { path = "../core", version = "0.65.0" } deno_core = { path = "../core", version = "0.65.0" }
deno_doc = "0.1.13" deno_doc = "0.1.14"
deno_lint = "0.2.5" deno_lint = "0.2.7"
deno_web = { path = "../op_crates/web", version = "0.16.0" } deno_web = { path = "../op_crates/web", version = "0.16.0" }
deno_fetch = { path = "../op_crates/fetch", version = "0.8.0" } deno_fetch = { path = "../op_crates/fetch", version = "0.8.0" }
@ -43,7 +43,7 @@ clap = "2.33.3"
dissimilar = "1.0.2" dissimilar = "1.0.2"
dlopen = "0.1.8" dlopen = "0.1.8"
encoding_rs = "0.8.24" encoding_rs = "0.8.24"
dprint-plugin-typescript = "0.32.6" dprint-plugin-typescript = "0.32.7"
filetime = "0.2.12" filetime = "0.2.12"
http = "0.2.1" http = "0.2.1"
indexmap = "1.6.0" indexmap = "1.6.0"
@ -61,9 +61,9 @@ rustyline-derive = "0.3.1"
serde = { version = "1.0.116", features = ["derive"] } serde = { version = "1.0.116", features = ["derive"] }
sys-info = "0.7.0" sys-info = "0.7.0"
sourcemap = "6.0.1" sourcemap = "6.0.1"
swc_bundler = "=0.12.0" swc_bundler = "=0.14.1"
swc_common = { version = "=0.10.4", features = ["sourcemap"] } swc_common = { version = "=0.10.4", features = ["sourcemap"] }
swc_ecmascript = { version = "=0.11.1", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] } swc_ecmascript = { version = "=0.13.1", features = ["codegen", "dep_graph", "parser", "react", "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

@ -15,6 +15,7 @@ use crate::media_type::MediaType;
use deno_core::error::{generic_error, AnyError, JsStackFrame}; use deno_core::error::{generic_error, AnyError, JsStackFrame};
use deno_core::serde_json; use deno_core::serde_json;
use deno_lint::diagnostic::LintDiagnostic; use deno_lint::diagnostic::LintDiagnostic;
use deno_lint::linter::FileType;
use deno_lint::linter::Linter; use deno_lint::linter::Linter;
use deno_lint::linter::LinterBuilder; use deno_lint::linter::LinterBuilder;
use deno_lint::rules; use deno_lint::rules;
@ -139,7 +140,8 @@ fn lint_file(
let lint_rules = rules::get_recommended_rules(); let lint_rules = rules::get_recommended_rules();
let mut linter = create_linter(syntax, lint_rules); let mut linter = create_linter(syntax, lint_rules);
let file_diagnostics = linter.lint(file_name, source_code.clone())?; let file_diagnostics =
linter.lint(file_name, source_code.clone(), FileType::Module)?;
Ok((file_diagnostics, source_code)) Ok((file_diagnostics, source_code))
} }
@ -165,7 +167,11 @@ fn lint_stdin(json: bool) -> Result<(), AnyError> {
let mut has_error = false; let mut has_error = false;
let pseudo_file_name = "_stdin.ts"; let pseudo_file_name = "_stdin.ts";
match linter match linter
.lint(pseudo_file_name.to_string(), source.clone()) .lint(
pseudo_file_name.to_string(),
source.clone(),
FileType::Module,
)
.map_err(|e| e.into()) .map_err(|e| e.into())
{ {
Ok(diagnostics) => { Ok(diagnostics) => {

View file

@ -6,9 +6,9 @@ var O;
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";
})((void 0) || (O = { })(O || (O = {
})); }));
const O1 = void 0; const O1 = O;
export { O1 as O }; export { O1 as O };
class A { class A {
#a; #a;

View file

@ -16,7 +16,7 @@
"filename": "_stdin.ts", "filename": "_stdin.ts",
"message": "`any` type is not allowed", "message": "`any` type is not allowed",
"code": "no-explicit-any", "code": "no-explicit-any",
"hint": null "hint": [WILDCARD]
} }
], ],
"errors": [] "errors": []

View file

@ -34,7 +34,7 @@
"filename": "[WILDCARD]file1.js", "filename": "[WILDCARD]file1.js",
"message": "Empty block statement", "message": "Empty block statement",
"code": "no-empty", "code": "no-empty",
"hint": null "hint": [WILDCARD]
}, },
{ {
"range": { "range": {
@ -52,7 +52,7 @@
"filename": "[WILDCARD]file2.ts", "filename": "[WILDCARD]file2.ts",
"message": "Empty block statement", "message": "Empty block statement",
"code": "no-empty", "code": "no-empty",
"hint": null "hint": [WILDCARD]
} }
], ],
"errors": [ "errors": [

View file

@ -10,3 +10,5 @@ while (false) {}
^^ ^^
at [WILDCARD]file1.js:2:14 at [WILDCARD]file1.js:2:14
hint: [WILDCARD]