Skip to content

Commit 35914b3

Browse files
committed
Use node-prefixed builtin imports
1 parent 8b59156 commit 35914b3

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

core/electron/src/test/backend/ElectronHost.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as path from "path";
7-
import { strict as assert } from "assert";
8-
import { exec } from "child_process";
6+
import * as path from "node:path";
7+
import { strict as assert } from "node:assert";
8+
import { exec } from "node:child_process";
99
import { IModelHost, IpcHandler, NativeHost } from "@itwin/core-backend";
1010
import { BeDuration } from "@itwin/core-bentley";
1111
import { RpcInterface, RpcRegistry } from "@itwin/core-common";

core/electron/src/test/backend/RunElectronBackendTests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { assert, describe, it } from "vitest";
7-
import { spawn, SpawnOptions } from "child_process";
8-
import * as path from "path";
7+
import { spawn, SpawnOptions } from "node:child_process";
8+
import * as path from "node:path";
99
import { TestResult, testSuites } from "./ElectronBackendTests";
1010

1111
/** Spawns new Electron process and executes a single test before terminating newly spawned process. */

core/electron/vitest.frontend.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as path from "path";
6+
import * as path from "node:path";
77
import { defineConfig } from "vitest/config";
88

99
export default defineConfig({

tools/vitest-certa-bridge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Additional package surfaces should be added in later VCB branches only when a co
1414
Use the provider from a Vitest browser-mode config. Vitest still requires each test package to define its own config because test globs, reporters, server filesystem allowlists, backend init modules, and preload modules are package-specific; the bridge cannot infer those safely as global defaults.
1515

1616
```ts
17-
import * as path from "path";
17+
import * as path from "node:path";
1818
import { defineConfig } from "vitest/config";
1919

2020
export default defineConfig({

tools/vitest-certa-bridge/src/electron/provider-session.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
// this process only creates a secure BrowserWindow and navigates it to Vitest's session URL.
99

1010
import { app, BrowserWindow, ipcMain } from "electron";
11-
import * as crypto from "crypto";
12-
import * as fs from "fs";
13-
import * as path from "path";
11+
import * as crypto from "node:crypto";
12+
import * as fs from "node:fs";
13+
import * as path from "node:path";
1414
import { clearCallbacks, dispatchCallback } from "../callbackRegistry.js";
1515

1616
process.stdout.on("error", () => {});

tools/vitest-certa-bridge/src/electron/provider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { type ChildProcess, spawn } from "child_process";
7-
import * as fs from "fs";
8-
import * as os from "os";
9-
import * as path from "path";
10-
import { createRequire } from "module";
6+
import { type ChildProcess, spawn } from "node:child_process";
7+
import * as fs from "node:fs";
8+
import * as os from "node:os";
9+
import * as path from "node:path";
10+
import { createRequire } from "node:module";
1111
import { playwright as PlaywrightBrowserProvider } from "@vitest/browser/providers";
1212
import type { BrowserProviderInitializationOptions, TestProject } from "vitest/node";
1313
import type { ElectronBrowserProviderOptions } from "./types.js";

tools/vitest-certa-bridge/src/test/vitest.electron-provider.config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* See LICENSE.md in the project root for license terms and full copyright notice.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as path from "path";
7-
import { fileURLToPath } from "url";
6+
import * as path from "node:path";
7+
import { fileURLToPath } from "node:url";
88
import { defineConfig } from "vitest/config";
99

1010
const dirname = path.dirname(fileURLToPath(import.meta.url));

0 commit comments

Comments
 (0)