mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: upgrade dlint to 0.60.0 (#24041)
Factoring out `dlint` upgrade from https://github.com/denoland/deno/pull/24034 as it requires us to change the lint step on mac to use ARM runners. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
This commit is contained in:
parent
29a075de2b
commit
eb218c0f33
20 changed files with 40 additions and 17 deletions
|
@ -46,6 +46,7 @@ Deno.bench("b64_rt_short", { n: 1e6 }, () => {
|
|||
const buf = new Uint8Array(100);
|
||||
const file = Deno.openSync("/dev/zero");
|
||||
Deno.bench("read_zero", { n: 5e5 }, () => {
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
Deno.readSync(file.rid, buf);
|
||||
});
|
||||
}
|
||||
|
|
1
ext/net/lib.deno_net.d.ts
vendored
1
ext/net/lib.deno_net.d.ts
vendored
|
@ -149,7 +149,6 @@ declare namespace Deno {
|
|||
}
|
||||
|
||||
/** @category Network */
|
||||
// deno-lint-ignore no-empty-interface
|
||||
export interface TcpListenOptions extends ListenOptions {
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const data1 = await import("./data.json", { with: { type: "json" } });
|
||||
// deno-lint-ignore no-import-assertions
|
||||
const data2 = await import("./data.json", { assert: { type: "json" } });
|
||||
|
||||
console.log(data1);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// deno-lint-ignore no-import-assertions
|
||||
import json from "./json_with_shebang.json" assert { type: "json" };
|
||||
|
||||
console.log(json);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import data1 from "./data.json" with { type: "json" };
|
||||
// deno-lint-ignore no-import-assertions
|
||||
import data2 from "./data.json" assert { type: "json" };
|
||||
|
||||
console.log(data1);
|
||||
|
|
|
@ -2,11 +2,11 @@ Check file:///[WILDCARD]/type_check.ts
|
|||
error: TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'.
|
||||
console.log(data1.foo);
|
||||
~~~
|
||||
at [WILDCARD]type_check.ts:4:19
|
||||
at [WILDCARD]type_check.ts:5:19
|
||||
|
||||
TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'.
|
||||
console.log(data2.foo);
|
||||
~~~
|
||||
at [WILDCARD]type_check.ts:5:19
|
||||
at [WILDCARD]type_check.ts:6:19
|
||||
|
||||
Found 2 errors.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import data1 from "./data.json" with { type: "json" };
|
||||
// deno-lint-ignore no-import-assertions
|
||||
import data2 from "./data.json" assert { type: "json" };
|
||||
|
||||
console.log(data1.foo);
|
||||
|
|
3
tests/testdata/workers/http_worker.js
vendored
3
tests/testdata/workers/http_worker.js
vendored
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
const listener = Deno.listen({ hostname: "127.0.0.1", port: 4506 });
|
||||
postMessage("ready");
|
||||
for await (const conn of listener) {
|
||||
|
|
|
@ -269,8 +269,6 @@ Deno.test(
|
|||
|
||||
Deno.test(
|
||||
{ permissions: { run: true, read: true } },
|
||||
// deno lint bug, see https://github.com/denoland/deno_lint/issues/1206
|
||||
// deno-lint-ignore require-await
|
||||
async function childProcessExplicitResourceManagement() {
|
||||
let dead = undefined;
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
// deno-lint-ignore-file no-window-prefix
|
||||
|
||||
import { assertEquals, assertThrows } from "./test_util.ts";
|
||||
|
||||
Deno.test(function addEventListenerTest() {
|
||||
|
@ -134,18 +134,18 @@ Deno.test(function eventTargetThisShouldDefaultToWindow() {
|
|||
};
|
||||
|
||||
addEventListener("hello", listener);
|
||||
window.dispatchEvent(event);
|
||||
globalThis.dispatchEvent(event);
|
||||
assertEquals(n, 2);
|
||||
n = 1;
|
||||
removeEventListener("hello", listener);
|
||||
window.dispatchEvent(event);
|
||||
globalThis.dispatchEvent(event);
|
||||
assertEquals(n, 1);
|
||||
|
||||
window.addEventListener("hello", listener);
|
||||
globalThis.addEventListener("hello", listener);
|
||||
dispatchEvent(event);
|
||||
assertEquals(n, 2);
|
||||
n = 1;
|
||||
window.removeEventListener("hello", listener);
|
||||
globalThis.removeEventListener("hello", listener);
|
||||
dispatchEvent(event);
|
||||
assertEquals(n, 1);
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
// deno-lint-ignore-file no-window-prefix
|
||||
|
||||
// deno-lint-ignore-file no-window-prefix no-window
|
||||
import { assert, assertEquals, assertRejects } from "./test_util.ts";
|
||||
|
||||
Deno.test(function globalThisExists() {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
|
||||
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
||||
import {
|
||||
|
@ -2094,7 +2097,6 @@ Deno.test({
|
|||
"--header",
|
||||
"Accept-Encoding: deflate, gzip",
|
||||
];
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
const proc = Deno.run({ cmd, stdout: "piped", stderr: "null" });
|
||||
const status = await proc.status();
|
||||
assert(status.success);
|
||||
|
@ -2157,7 +2159,6 @@ Deno.test({
|
|||
"--header",
|
||||
"Accept-Encoding: deflate, gzip",
|
||||
];
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
const proc = Deno.run({ cmd, stdout: "piped", stderr: "null" });
|
||||
const status = await proc.status();
|
||||
assert(status.success);
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import { assert, assertEquals, assertThrows } from "./test_util.ts";
|
||||
|
||||
const listenPort = 4505;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import {
|
||||
assert,
|
||||
assertEquals,
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import { assert } from "./test_util.ts";
|
||||
|
||||
// Note tests for Deno.stdin.setRaw is in integration tests.
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import {
|
||||
assertEquals,
|
||||
assertRejects,
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
// deno-lint-ignore-file no-deprecated-deno-api
|
||||
|
||||
import { fstat, fstatSync } from "node:fs";
|
||||
import { fail } from "@std/assert/mod.ts";
|
||||
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
import crypto from "node:crypto";
|
||||
import { Buffer } from "node:buffer";
|
||||
import testVectors128 from "./gcmEncryptExtIV128.json" assert { type: "json" };
|
||||
import testVectors256 from "./gcmEncryptExtIV256.json" assert { type: "json" };
|
||||
import testVectors128 from "./gcmEncryptExtIV128.json" with { type: "json" };
|
||||
import testVectors256 from "./gcmEncryptExtIV256.json" with { type: "json" };
|
||||
import { assertEquals } from "@std/assert/mod.ts";
|
||||
|
||||
const aesGcm = (bits: string, key: Uint8Array) => {
|
||||
|
|
|
@ -66,6 +66,7 @@ async function dlint() {
|
|||
":!:cli/tsc/*typescript.js",
|
||||
":!:cli/tsc/compiler.d.ts",
|
||||
":!:tests/wpt/suite/**",
|
||||
":!:tests/wpt/runner/**",
|
||||
]);
|
||||
|
||||
if (!sourceFiles.length) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export { delay } from "../tests/util/std/async/delay.ts";
|
|||
|
||||
// [toolName] --version output
|
||||
const versions = {
|
||||
"dlint": "dlint 0.52.2",
|
||||
"dlint": "dlint 0.60.0",
|
||||
};
|
||||
|
||||
const compressed = new Set(["ld64.lld", "rcodesign"]);
|
||||
|
@ -175,7 +175,7 @@ export function getPrebuiltToolPath(toolName) {
|
|||
return join(PREBUILT_TOOL_DIR, toolName + executableSuffix);
|
||||
}
|
||||
|
||||
const commitId = "5f2097d8247c7fbe30ba227f894d70ae5c1524c7";
|
||||
const commitId = "b8aac22e0cd7c1c6557a56a813fe0c25486fafee";
|
||||
const downloadUrl =
|
||||
`https://raw.githubusercontent.com/denoland/deno_third_party/${commitId}/prebuilt/${platformDirName}`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue