File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function jitiRequire(
1717
1818 // Check for node:, file:, and data: protocols
1919 if ( id . startsWith ( "node:" ) ) {
20- id = id . slice ( 5 ) ;
20+ return nativeImportOrRequire ( ctx , id , opts . async ) ;
2121 } else if ( id . startsWith ( "file:" ) ) {
2222 id = fileURLToPath ( id ) ;
2323 } else if ( id . startsWith ( "data:" ) ) {
Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ exports[`fixtures > mixed > stdout 1`] = `"Mixed works for: <cwd>"`;
8686
8787exports[`fixtures > native > stdout 1`] = `"[Module: null prototype] { default : { hasRequire: false } } "`;
8888
89+ exports[`fixtures > node > stdout 1`] = `"node:test true"`;
90+
8991exports[`fixtures > proto > stdout 1`] = `"exists: true"`;
9092
9193exports[`fixtures > pure-esm-dep > stdout 1`] = `
Original file line number Diff line number Diff line change 1+ import test from "node:test" ;
2+ // import sqlite from "node:sqlite"; // 20+
3+
4+ console . log ( "node:test" , ! ! test . test ) ;
5+ // console.log("node:sqlite", !!sqlite.DatabaseSync);
You can’t perform that action at this time.
0 commit comments