Skip to content

Commit ac6eb0b

Browse files
committed
chore: use explicit node: prefix for node imports
This makes it easier for us to enumerate modules that have node dependencies. There may be others I have not yet picked up.
1 parent 8e8d769 commit ac6eb0b

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

common/tools/hextobin/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as fs from 'fs';
2-
import * as rd from 'readline';
1+
import * as fs from 'node:fs';
2+
import * as rd from 'node:readline';
33

44
export default async function hextobin(inputFilename: string, outputFilename?: string, options?: {silent?: boolean}): Promise<Uint8Array> {
55

common/tools/sourcemap-path-remapper/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as fs from 'fs';
2-
import path from 'path';
1+
import * as fs from 'node:fs';
2+
import path from 'node:path';
33
import convertSourceMap from 'convert-source-map'; // Transforms sourcemaps among various common formats.
44
// Base64, stringified-JSON, end-of-file comment...
55

core/tools/api-header-extractor/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as fs from 'fs';
2-
import * as path from 'path';
1+
import * as fs from 'node:fs';
2+
import * as path from 'node:path';
33

44
// TODO: support multiple infiles to generate from multiple headers
55

developer/src/common/web/test-helpers/TestCompilerCallbacks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as fs from 'fs';
2-
import * as path from 'path';
1+
import * as fs from 'node:fs';
2+
import * as path from 'node:path';
33
import { CompilerEvent, CompilerCallbacks, CompilerPathCallbacks, CompilerFileSystemCallbacks,
44
CompilerError, CompilerNetAsyncCallbacks, DefaultCompilerFileSystemAsyncCallbacks,
55
CompilerFileSystemAsyncCallbacks,

developer/src/common/web/utils/test/helpers/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* Helpers and utilities for the Mocha tests.
33
*/
4-
import * as path from 'path';
5-
import * as fs from "fs";
6-
import { fileURLToPath } from 'url';
4+
import * as path from 'node:path';
5+
import * as fs from "node:fs";
6+
import { fileURLToPath } from 'node:url';
77

88
/**
99
* Builds a path to the fixture with the given path components.

developer/src/kmc-model/tools/create-override-script-regexp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* If you need to add more Unicode blocks, customize SPACELESS_SCRIPT_BLOCKS.
1010
*/
1111

12-
import {readFileSync} from "fs";
13-
import * as path from "path";
12+
import {readFileSync} from "node:fs";
13+
import * as path from "node:path";
1414

1515
// Where to find UnicodeData.txt and Blocks.txt
1616
const UCD_DIR = path.join("..", "..", "..", "..", "resources", "standards-data", "unicode-character-database");

0 commit comments

Comments
 (0)