diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-13 14:15:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-13 14:15:38 +0200 |
commit | b216d48e5f179260fea247d4a1b9fce76f240e7d (patch) | |
tree | 66fb54d1e573f84d4dec92af8c465e60a998902e | |
parent | bf70442b08eb54b2959b32977aa0a245c530248b (diff) |
upgrade: deno_doc, deno_lint, dprint, swc (#7434)
upgrades:
- swc_ecmascript 0.7.7
- dprint-plugin-typescript 0.31.3
- deno_lint 0.2.0
- deno_doc 0.1.9
Split std_lint test into std_lint and unit_test_lint.
Added lint ignores to CommonJS files in std/node.
-rw-r--r-- | Cargo.lock | 36 | ||||
-rw-r--r-- | cli/Cargo.toml | 8 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 16 | ||||
-rw-r--r-- | std/node/_fs/_fs_common.ts | 3 | ||||
-rw-r--r-- | std/node/process_test.ts | 2 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_a.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_b.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_builtin.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_cycle_a.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_cycle_b.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/cjs_throw.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/index.js | 1 | ||||
-rw-r--r-- | std/node/tests/cjs/subdir/cjs_c.js | 1 |
13 files changed, 51 insertions, 22 deletions
diff --git a/Cargo.lock b/Cargo.lock index f58d69eea..5bdbd8689 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -465,9 +465,9 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc65cff38f291c38eeeb5ab46acd2d8f9ef66b8fe7e88af37c49b80353789f60" +checksum = "f531da1fd9965ab82bf278d5cc3e7b6aee4457a5d8bef992f74cde6d1d8b9bb1" dependencies = [ "futures", "lazy_static", @@ -482,9 +482,9 @@ dependencies = [ [[package]] name = "deno_lint" -version = "0.1.29" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4163bad03364c85793edf50e1f57c409d25d1484a2605e5d25481626a571bd0" +checksum = "455138ead4a28b64b28973f21ed0293f1e10da3ef7d517fa55515d4efdb930b5" dependencies = [ "lazy_static", "log", @@ -568,9 +568,9 @@ dependencies = [ [[package]] name = "dprint-plugin-typescript" -version = "0.31.1" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd4877d65ac075587221b7e72f86f16647db268641f77ab13a76da0906d711f" +checksum = "a846ca33bcd5d4adfa4c1beac0ab426ae01c7f4fcecb5542b465aef96b92fa77" dependencies = [ "dprint-core", "serde", @@ -2242,9 +2242,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.35.0" +version = "0.35.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b765da439d3908c680de8e0aadf7f049d18755f0d5eedef8fb0dddbbc7f461" +checksum = "8e4943896dce982a640d29380a31b83279cea39a9277dba5323c0f54e929f60e" dependencies = [ "bitflags", "num-bigint", @@ -2282,9 +2282,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.37.0" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11b0d3f9f4acd485f2cb4fab74159c079b2d47795adfb63f23a213a03783b5c" +checksum = "5130c8fcb77aebc02ab482776fe0d712e35d9faab4ae40faee1b51e3ec985473" dependencies = [ "either", "enum_kind", @@ -2316,9 +2316,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.23.5" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4685c51a3cd944e2610a8f48387a71005caec333c04700e4fac4e8b71f6a849" +checksum = "3551422506d4059cdb33212a098403954539b7030cd54439edfa5d77e128c1ed" dependencies = [ "Inflector", "arrayvec", @@ -2350,9 +2350,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf4c3e63bf0996e06ba1013cf2df5cca60ef649a4e63a3cb3b95d534c370a42" +checksum = "38c0b511705a737ef07d347f0fe5af22ef11ead65f6be58010d897426a60a70d" dependencies = [ "pmutil", "proc-macro2 1.0.20", @@ -2378,9 +2378,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.17.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52333de0bd51168fb818b3c769bc8adcb343d8c1ea6114c72fde3d2a0af493b" +checksum = "917e033f2b61389800a0d3fb1ff668e629a819f99cc293d5f53f3d972e9410f6" dependencies = [ "num-bigint", "swc_atoms", @@ -2391,9 +2391,9 @@ dependencies = [ [[package]] name = "swc_ecmascript" -version = "0.7.3" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98805f69402e0f8c22695c0288873c95d8a00b903f824f918a76eabfef8b6ccc" +checksum = "8cabf817a5072e0b11806d84876f74fb3f7701a29208027df97d937e5d6f5ebc" dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5a969b785..9381ce37e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -29,8 +29,8 @@ winapi = "0.3.9" [dependencies] deno_core = { path = "../core", version = "0.56.0" } -deno_doc = { version = "0.1.6" } -deno_lint = { version = "0.1.29", features = ["json"] } +deno_doc = { version = "0.1.9" } +deno_lint = { version = "0.2.0", features = ["json"] } atty = "0.2.14" base64 = "0.12.3" @@ -40,7 +40,7 @@ clap = "2.33.2" dissimilar = "1.0.2" dlopen = "0.1.8" encoding_rs = "0.8.23" -dprint-plugin-typescript = "0.31.1" +dprint-plugin-typescript = "0.31.3" futures = "0.3.5" filetime = "0.2.12" http = "0.2.1" @@ -63,7 +63,7 @@ serde_json = { version = "1.0.57", features = [ "preserve_order" ] } sys-info = "0.7.0" sourcemap = "6.0.1" swc_common = { version = "=0.10.2", features = ["sourcemap"] } -swc_ecmascript = { version = "=0.7.3", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] } +swc_ecmascript = { version = "=0.7.7", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] } tempfile = "3.1.0" termcolor = "1.1.0" tokio = { version = "0.2.22", features = ["full"] } diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index dce0ce1b8..402268dd1 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -37,7 +37,23 @@ fn std_lint() { let status = util::deno_cmd() .arg("lint") .arg("--unstable") + .arg(format!( + "--ignore={}", + util::root_path().join("std/node/tests").to_string_lossy() + )) .arg(util::root_path().join("std")) + .spawn() + .unwrap() + .wait() + .unwrap(); + assert!(status.success()); +} + +#[test] +fn unit_test_lint() { + let status = util::deno_cmd() + .arg("lint") + .arg("--unstable") .arg(util::root_path().join("cli/tests/unit")) .spawn() .unwrap() diff --git a/std/node/_fs/_fs_common.ts b/std/node/_fs/_fs_common.ts index 5d3f02a5d..ec0c2caef 100644 --- a/std/node/_fs/_fs_common.ts +++ b/std/node/_fs/_fs_common.ts @@ -150,14 +150,17 @@ export function getOpenOptions(flag: string | undefined): Deno.OpenOptions { case "as": { // 'as': Open file for appending in synchronous mode. The file is created if it does not exist. openOptions = { create: true, append: true }; + break; } case "as+": { // 'as+': Open file for reading and appending in synchronous mode. The file is created if it does not exist. openOptions = { create: true, read: true, append: true }; + break; } case "rs+": { // 'rs+': Open file for reading and writing in synchronous mode. Instructs the operating system to bypass the local file system cache. openOptions = { create: true, read: true, write: true }; + break; } default: { throw new Error(`Unrecognized file system flag: ${flag}`); diff --git a/std/node/process_test.ts b/std/node/process_test.ts index 489a112f3..d83a9dca7 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -1,3 +1,5 @@ +// deno-lint-ignore-file no-undef + import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; import * as all from "./process.ts"; diff --git a/std/node/tests/cjs/cjs_a.js b/std/node/tests/cjs/cjs_a.js index b8f69c857..6295f3a14 100644 --- a/std/node/tests/cjs/cjs_a.js +++ b/std/node/tests/cjs/cjs_a.js @@ -1,3 +1,4 @@ +// deno-lint-ignore-file no-undef /* eslint-disable */ const { helloB } = require("./cjs_b.js"); const C = require("./subdir/cjs_c"); diff --git a/std/node/tests/cjs/cjs_b.js b/std/node/tests/cjs/cjs_b.js index 17499012c..2bbf75809 100644 --- a/std/node/tests/cjs/cjs_b.js +++ b/std/node/tests/cjs/cjs_b.js @@ -2,4 +2,5 @@ function helloB() { return "B"; } +// deno-lint-ignore no-undef module.exports = { helloB }; diff --git a/std/node/tests/cjs/cjs_builtin.js b/std/node/tests/cjs/cjs_builtin.js index d821d2558..3eae5dc59 100644 --- a/std/node/tests/cjs/cjs_builtin.js +++ b/std/node/tests/cjs/cjs_builtin.js @@ -1,3 +1,4 @@ +// deno-lint-ignore-file no-undef /* eslint-disable */ const fs = require("fs"); const util = require("util"); diff --git a/std/node/tests/cjs/cjs_cycle_a.js b/std/node/tests/cjs/cjs_cycle_a.js index 7a4e5a5f6..d73da20b9 100644 --- a/std/node/tests/cjs/cjs_cycle_a.js +++ b/std/node/tests/cjs/cjs_cycle_a.js @@ -1,3 +1,4 @@ +// deno-lint-ignore-file no-undef module.exports = false; require("./cjs_cycle_a"); module.exports = true; diff --git a/std/node/tests/cjs/cjs_cycle_b.js b/std/node/tests/cjs/cjs_cycle_b.js index d85a1fc84..bd18094ce 100644 --- a/std/node/tests/cjs/cjs_cycle_b.js +++ b/std/node/tests/cjs/cjs_cycle_b.js @@ -1,3 +1,4 @@ +// deno-lint-ignore-file no-undef module.exports = false; require("./cjs_cycle_b"); module.exports = true; diff --git a/std/node/tests/cjs/cjs_throw.js b/std/node/tests/cjs/cjs_throw.js index a636f406b..3def8cc85 100644 --- a/std/node/tests/cjs/cjs_throw.js +++ b/std/node/tests/cjs/cjs_throw.js @@ -2,4 +2,5 @@ function hello() { throw new Error("bye"); } +// deno-lint-ignore no-undef module.exports = { hello }; diff --git a/std/node/tests/cjs/index.js b/std/node/tests/cjs/index.js index 5dea52db2..d55928a89 100644 --- a/std/node/tests/cjs/index.js +++ b/std/node/tests/cjs/index.js @@ -1 +1,2 @@ +// deno-lint-ignore no-undef module.exports = { isIndex: true }; diff --git a/std/node/tests/cjs/subdir/cjs_c.js b/std/node/tests/cjs/subdir/cjs_c.js index 4e7d7ebe5..b24caa0c4 100644 --- a/std/node/tests/cjs/subdir/cjs_c.js +++ b/std/node/tests/cjs/subdir/cjs_c.js @@ -1 +1,2 @@ +// deno-lint-ignore no-undef module.exports = "C"; |