Skip to content

Commit a12ec00

Browse files
authored
fix(mocker): include more modules to prefix-only module list (#7524)
1 parent f71004f commit a12ec00

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/mocker/src/node/redirect.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ const builtins = new Set([
7171
'wasi',
7272
])
7373

74-
const prefixedBuiltins = new Set(['node:test', 'node:sqlite'])
74+
// https://nodejs.org/api/modules.html#built-in-modules-with-mandatory-node-prefix
75+
const prefixedBuiltins = new Set([
76+
'node:sea',
77+
'node:sqlite',
78+
'node:test',
79+
'node:test/reporters',
80+
])
7581
const NODE_BUILTIN_NAMESPACE = 'node:'
7682
function isNodeBuiltin(id: string): boolean {
7783
if (prefixedBuiltins.has(id)) {

0 commit comments

Comments
 (0)