Skip to content

Commit caf94db

Browse files
chore: add eslint rule for requiring node: prefix in node imports (#11411)
1 parent f29e699 commit caf94db

File tree

167 files changed

+361
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+361
-357
lines changed

packages/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exit } from "process";
1+
import { exit } from "node:process";
22
import {
33
bgBlue,
44
bgGreen,

packages/containers-shared/src/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { spawn } from "child_process";
2-
import { readFileSync } from "fs";
1+
import { spawn } from "node:child_process";
2+
import { readFileSync } from "node:fs";
33
import { UserError } from "./error";
44
import type {
55
BuildArgs,

packages/containers-shared/src/inspect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from "child_process";
1+
import { spawn } from "node:child_process";
22
import { UserError } from "./error";
33

44
export async function dockerImageInspect(

packages/containers-shared/src/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { execFileSync, spawn } from "child_process";
2-
import { randomUUID } from "crypto";
3-
import { existsSync, statSync } from "fs";
4-
import path from "path";
1+
import { execFileSync, spawn } from "node:child_process";
2+
import { randomUUID } from "node:crypto";
3+
import { existsSync, statSync } from "node:fs";
4+
import path from "node:path";
55
import { UserError } from "./error";
66
import { dockerImageInspect } from "./inspect";
77
import type { ContainerDevOptions } from "./types";
8-
import type { StdioOptions } from "child_process";
8+
import type { StdioOptions } from "node:child_process";
99

1010
/** helper for simple docker command call that don't require any io handling */
1111
export const runDockerCmd = (

packages/containers-shared/tests/docker-context.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { execFileSync } from "child_process";
1+
import { execFileSync } from "node:child_process";
22
import { afterEach, describe, expect, it, vi } from "vitest";
33
import { UserError } from "../src/error";
44
import { resolveDockerHost } from "../src/utils";

packages/containers-shared/tests/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mkdirSync, writeFileSync } from "fs";
1+
import { mkdirSync, writeFileSync } from "node:fs";
22
import { checkExposedPorts, isDockerfile } from "./../src/utils";
33
import { runInTempDir } from "./helpers/run-in-tmp-dir";
44
import type { ContainerDevOptions } from "../src/types";

packages/create-cloudflare/e2e/helpers/framework-helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import assert from "assert";
2-
import { existsSync } from "fs";
1+
import assert from "node:assert";
2+
import { existsSync } from "node:fs";
3+
import { join } from "node:path";
34
import { setTimeout } from "node:timers/promises";
4-
import { join } from "path";
55
import getPort from "get-port";
66
import { runCommand } from "helpers/command";
77
import {
@@ -29,7 +29,7 @@ import { runC3 } from "./run-c3";
2929
import { kill, spawnWithLogging } from "./spawn";
3030
import type { TemplateConfig } from "../../src/templates";
3131
import type { RunnerConfig } from "./run-c3";
32-
import type { Writable } from "stream";
32+
import type { Writable } from "node:stream";
3333

3434
export type FrameworkTestConfig = RunnerConfig & {
3535
testCommitMessage: boolean;

packages/create-cloudflare/e2e/helpers/to-exist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { existsSync } from "fs";
1+
import { existsSync } from "node:fs";
22
import { expect } from "vitest";
33

44
declare module "vitest" {

packages/create-cloudflare/e2e/helpers/workers-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { isExperimental, runDeployTests } from "./constants";
88
import { runC3 } from "./run-c3";
99
import { kill, spawnWithLogging, waitForExit } from "./spawn";
1010
import type { WorkerTestConfig } from "../tests/workers/test-config";
11-
import type { Writable } from "stream";
11+
import type { Writable } from "node:stream";
1212

1313
const { name: pm } = detectPackageManager();
1414

packages/create-cloudflare/e2e/tests/frameworks/frameworks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { existsSync } from "fs";
2-
import { cp } from "fs/promises";
3-
import { join } from "path";
1+
import { existsSync } from "node:fs";
2+
import { cp } from "node:fs/promises";
3+
import { join } from "node:path";
44
import { beforeAll, describe, expect } from "vitest";
55
import { deleteProject, deleteWorker } from "../../../scripts/common";
66
import {

0 commit comments

Comments
 (0)