Skip to content

Commit 92ec55c

Browse files
committed
chore: use node protocol prefix for imports
1 parent 298b91a commit 92ec55c

15 files changed

+32
-32
lines changed

electron/listMochaTests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable @typescript-eslint/ban-ts-comment */
22
/* eslint-disable @typescript-eslint/no-require-imports */
3-
import * as net from "net";
4-
import * as path from "path";
5-
import * as readline from "readline";
3+
import * as net from "node:net";
4+
import * as path from "node:path";
5+
import * as readline from "node:readline";
66

77
import type { default as MochaType, Test, Suite } from "mocha";
88
import type { Range } from "vscode";

electron/mocha-interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Modified from upstream https://github.com/mochajs/mocha/blob/v5.2.0/lib/interfaces/bdd.js
55
// Changes: include `body` property for suites and skipped tests so that range can be extracted
66

7-
import * as path from "path";
7+
import * as path from "node:path";
88

99
import type { Func, Suite, Test as TestType } from "mocha";
1010
import type { CommonFunctions } from "mocha/lib/interfaces/common";

electron/mocha-reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/ban-ts-comment */
22
/* eslint-disable @typescript-eslint/no-require-imports */
3-
import * as net from "net";
4-
import * as path from "path";
3+
import * as net from "node:net";
4+
import * as path from "node:path";
55

66
import type { reporters, Runner, Test } from "mocha";
77

electron/spec-runner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22
/* eslint-disable @typescript-eslint/no-require-imports */
33

4-
import * as childProcess from "child_process";
5-
import * as crypto from "crypto";
6-
import * as path from "path";
4+
import * as childProcess from "node:child_process";
5+
import * as crypto from "node:crypto";
6+
import * as path from "node:path";
77

88
export async function setupSpecRunner(electronRoot: string) {
99
const fs = require(path.resolve(electronRoot, "node_modules", "fs-extra"));

scripts/echo-to-socket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as childProcess from "child_process";
2-
import * as net from "net";
1+
import * as childProcess from "node:child_process";
2+
import * as net from "node:net";
33

44
import type { IpcMessage } from "../src/common";
55

src/commands/configs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as childProcess from "child_process";
2-
import * as path from "path";
3-
import { promisify } from "util";
1+
import * as childProcess from "node:child_process";
2+
import * as path from "node:path";
3+
import { promisify } from "node:util";
44

55
import * as vscode from "vscode";
66

src/commands/patches.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as childProcess from "child_process";
2-
import * as path from "path";
1+
import * as childProcess from "node:child_process";
2+
import * as path from "node:path";
33
import { promisify } from "util";
44

55
import * as vscode from "vscode";

src/docsLinkCompletionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import * as path from "node:path";
22

33
import * as vscode from "vscode";
44

src/docsLinkablesProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import * as path from "node:path";
22

33
import * as vscode from "vscode";
44

src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as childProcess from "child_process";
2-
import * as path from "path";
3-
import { promisify } from "util";
1+
import * as childProcess from "node:child_process";
2+
import * as path from "node:path";
3+
import { promisify } from "node:util";
44

55
import * as vscode from "vscode";
66

src/gnFormattingProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as childProcess from "child_process";
1+
import * as childProcess from "node:child_process";
22

33
import * as vscode from "vscode";
44

src/tasks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as net from "net";
2-
import * as readline from "readline";
3-
import { PassThrough } from "stream";
1+
import * as net from "node:net";
2+
import * as readline from "node:readline";
3+
import { PassThrough } from "node:stream";
44

55
import * as vscode from "vscode";
66

src/tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as net from "net";
1+
import * as net from "node:net";
22

33
import * as vscode from "vscode";
44

src/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as childProcess from "child_process";
2-
import * as fs from "fs";
3-
import * as os from "os";
4-
import * as path from "path";
5-
import { promisify } from "util";
1+
import * as childProcess from "node:child_process";
2+
import * as fs from "node:fs";
3+
import * as os from "node:os";
4+
import * as path from "node:path";
5+
import { promisify } from "node:util";
66

77
import * as vscode from "vscode";
88

src/views/patches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import * as path from "node:path";
22

33
import * as vscode from "vscode";
44

0 commit comments

Comments
 (0)