Skip to content

Commit

Permalink
chore: use node protocol prefix for imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Oct 31, 2024
1 parent 298b91a commit 92ec55c
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions electron/listMochaTests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-require-imports */
import * as net from "net";
import * as path from "path";
import * as readline from "readline";
import * as net from "node:net";
import * as path from "node:path";
import * as readline from "node:readline";

import type { default as MochaType, Test, Suite } from "mocha";
import type { Range } from "vscode";
Expand Down
2 changes: 1 addition & 1 deletion electron/mocha-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Modified from upstream https://github.com/mochajs/mocha/blob/v5.2.0/lib/interfaces/bdd.js
// Changes: include `body` property for suites and skipped tests so that range can be extracted

import * as path from "path";
import * as path from "node:path";

import type { Func, Suite, Test as TestType } from "mocha";
import type { CommonFunctions } from "mocha/lib/interfaces/common";
Expand Down
4 changes: 2 additions & 2 deletions electron/mocha-reporter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-require-imports */
import * as net from "net";
import * as path from "path";
import * as net from "node:net";
import * as path from "node:path";

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

Expand Down
6 changes: 3 additions & 3 deletions electron/spec-runner.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-require-imports */

import * as childProcess from "child_process";
import * as crypto from "crypto";
import * as path from "path";
import * as childProcess from "node:child_process";
import * as crypto from "node:crypto";
import * as path from "node:path";

export async function setupSpecRunner(electronRoot: string) {
const fs = require(path.resolve(electronRoot, "node_modules", "fs-extra"));
Expand Down
4 changes: 2 additions & 2 deletions scripts/echo-to-socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as childProcess from "child_process";
import * as net from "net";
import * as childProcess from "node:child_process";
import * as net from "node:net";

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

Expand Down
6 changes: 3 additions & 3 deletions src/commands/configs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as childProcess from "child_process";
import * as path from "path";
import { promisify } from "util";
import * as childProcess from "node:child_process";
import * as path from "node:path";
import { promisify } from "node:util";

import * as vscode from "vscode";

Expand Down
4 changes: 2 additions & 2 deletions src/commands/patches.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as childProcess from "child_process";
import * as path from "path";
import * as childProcess from "node:child_process";
import * as path from "node:path";
import { promisify } from "util";

import * as vscode from "vscode";
Expand Down
2 changes: 1 addition & 1 deletion src/docsLinkCompletionProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import * as path from "node:path";

import * as vscode from "vscode";

Expand Down
2 changes: 1 addition & 1 deletion src/docsLinkablesProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import * as path from "node:path";

import * as vscode from "vscode";

Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as childProcess from "child_process";
import * as path from "path";
import { promisify } from "util";
import * as childProcess from "node:child_process";
import * as path from "node:path";
import { promisify } from "node:util";

import * as vscode from "vscode";

Expand Down
2 changes: 1 addition & 1 deletion src/gnFormattingProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as childProcess from "child_process";
import * as childProcess from "node:child_process";

import * as vscode from "vscode";

Expand Down
6 changes: 3 additions & 3 deletions src/tasks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as net from "net";
import * as readline from "readline";
import { PassThrough } from "stream";
import * as net from "node:net";
import * as readline from "node:readline";
import { PassThrough } from "node:stream";

import * as vscode from "vscode";

Expand Down
2 changes: 1 addition & 1 deletion src/tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as net from "net";
import * as net from "node:net";

import * as vscode from "vscode";

Expand Down
10 changes: 5 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as childProcess from "child_process";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { promisify } from "util";
import * as childProcess from "node:child_process";
import * as fs from "node:fs";
import * as os from "node:os";
import * as path from "node:path";
import { promisify } from "node:util";

import * as vscode from "vscode";

Expand Down
2 changes: 1 addition & 1 deletion src/views/patches.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import * as path from "node:path";

import * as vscode from "vscode";

Expand Down

0 comments on commit 92ec55c

Please sign in to comment.