Skip to content

Commit cc01766

Browse files
authored
chore: update import statements to use node prefix (#57)
1 parent 9218a1e commit cc01766

47 files changed

Lines changed: 54 additions & 54 deletions

Some content is hidden

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

src/formatter/code-frame-formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os from 'os';
1+
import os from 'node:os';
22

33
import { codeFrameColumns } from '@babel/code-frame';
44
import fs from 'node:fs';

src/formatter/rspack-formatter.ts

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

44
import pc from 'picocolors';
55

src/issue/issue-match.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path from 'path';
1+
import path from 'node:path';
22
import { minimatch } from 'minimatch';
33

44
import { forwardSlash } from '../utils/path/forward-slash';

src/issue/issue-rspack-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path from 'path';
1+
import path from 'node:path';
22
import type { FormatterPathType } from '../formatter';
33
import { forwardSlash } from '../utils/path/forward-slash';
44
import { relativeToContext } from '../utils/path/relative-to-context';

src/plugin-pools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as os from 'os';
1+
import * as os from 'node:os';
22

33
import type { Pool } from './utils/async/pool';
44
import { createPool } from './utils/async/pool';

src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
import * as path from 'node:path';
22

33
import type * as rspack from '@rspack/core';
44

src/rpc/rpc-worker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as child_process from 'child_process';
2-
import type { ChildProcess, ForkOptions } from 'child_process';
3-
import * as process from 'process';
1+
import * as child_process from 'node:child_process';
2+
import type { ChildProcess, ForkOptions } from 'node:child_process';
3+
import * as process from 'node:process';
44

55
import type { RpcMethod, RpcRemoteMethod } from './types';
66
import { wrapRpc } from './wrap-rpc';

src/rpc/wrap-rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ChildProcess } from 'child_process';
1+
import type { ChildProcess } from 'node:child_process';
22

33
import { createControlledPromise } from '../utils/async/controlled-promise';
44

src/typescript/type-script-support.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os from 'os';
1+
import os from 'node:os';
22
import fs from 'node:fs';
33

44
import type { TypeScriptWorkerConfig } from './type-script-worker-config';

src/typescript/type-script-worker-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path from 'path';
1+
import path from 'node:path';
22

33
import type * as rspack from '@rspack/core';
44

0 commit comments

Comments
 (0)