0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

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.
This commit is contained in:
Bartek Iwańczuk 2020-09-13 14:15:38 +02:00 committed by GitHub
parent bf70442b08
commit b216d48e5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 51 additions and 22 deletions

36
Cargo.lock generated
View file

@ -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",

View file

@ -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"] }

View file

@ -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()

View file

@ -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}`);

View file

@ -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";

View file

@ -1,3 +1,4 @@
// deno-lint-ignore-file no-undef
/* eslint-disable */
const { helloB } = require("./cjs_b.js");
const C = require("./subdir/cjs_c");

View file

@ -2,4 +2,5 @@ function helloB() {
return "B";
}
// deno-lint-ignore no-undef
module.exports = { helloB };

View file

@ -1,3 +1,4 @@
// deno-lint-ignore-file no-undef
/* eslint-disable */
const fs = require("fs");
const util = require("util");

View file

@ -1,3 +1,4 @@
// deno-lint-ignore-file no-undef
module.exports = false;
require("./cjs_cycle_a");
module.exports = true;

View file

@ -1,3 +1,4 @@
// deno-lint-ignore-file no-undef
module.exports = false;
require("./cjs_cycle_b");
module.exports = true;

View file

@ -2,4 +2,5 @@ function hello() {
throw new Error("bye");
}
// deno-lint-ignore no-undef
module.exports = { hello };

View file

@ -1 +1,2 @@
// deno-lint-ignore no-undef
module.exports = { isIndex: true };

View file

@ -1 +1,2 @@
// deno-lint-ignore no-undef
module.exports = "C";