Skip to content

Commit abe327f

Browse files
committed
Modern syntax to import built-in node modules
1 parent c0af53a commit abe327f

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
"mocha": "~11.7",
8989
"rimraf": "~6.1",
9090
"run-scripts-util": "~1.3",
91-
"typescript": "~5.9",
92-
"typescript-eslint": "~8.57",
91+
"typescript": "~6.0",
92+
"typescript-eslint": "~8.58",
9393
"uglify-js": "~3.19"
9494
}
9595
}

spec/cli.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Imports
55
import { assertDeepStrictEqual, fixEolGitDiff } from 'assert-deep-strict-equal';
66
import { cliArgvUtil } from 'cli-argv-util';
7-
import fs from 'fs';
7+
import fs from 'node:fs';
88

99
// Setup
1010
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));

spec/errors.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Error Handling Specification Suite
33

44
// Imports
5-
import assert from 'assert';
5+
import assert from 'node:assert';
66

77
// Setup
88
import { recursiveExec } from '../dist/recursive-exec.js';

spec/package.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Imports
55
import { assertDeepStrictEqual } from 'assert-deep-strict-equal';
6-
import fs from 'fs';
6+
import fs from 'node:fs';
77

88
// Setup
99
import { recursiveExec } from '../dist/recursive-exec.js';

src/recursive-exec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import { cliArgvUtil } from 'cli-argv-util';
2323
import { globSync } from 'glob';
2424
import { spawnSync } from 'node:child_process';
2525
import chalk from 'chalk';
26-
import fs from 'fs';
26+
import fs from 'node:fs';
2727
import log from 'fancy-log';
28-
import path from 'path';
28+
import path from 'node:path';
2929
import slash from 'slash';
3030

3131
// Types

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"target": "ES2022",
1111
"module": "nodenext",
1212
"moduleResolution": "nodenext",
13+
"types": ["node"],
1314
"exactOptionalPropertyTypes": true,
1415
"forceConsistentCasingInFileNames": true,
1516
"noFallthroughCasesInSwitch": true,

0 commit comments

Comments
 (0)