Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: replace deprecated Module reference with CJSModule in REPL …
…completion
  • Loading branch information
gulbaki committed Jun 11, 2025
commit 5cb50796453925b705c2bbea6a9c8c6017d0c38a
3 changes: 1 addition & 2 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ const {
kLastCommandErrored,
} = require('internal/readline/interface');
let nextREPLResourceNumber = 1;
const Module = require('module');
// This prevents v8 code cache from getting confused and using a different
// cache from a resource of the same name
function getREPLResourceName() {
Expand Down Expand Up @@ -1361,7 +1360,7 @@ function complete(line, callback) {
filter = completeOn;
if (this.allowBlockingCompletions) {
const subdir = match[2] || '';
const extensions = ObjectKeys(Module._extensions);
const extensions = ObjectKeys(CJSModule._extensions);
const indexes = ArrayPrototypeMap(extensions,
(extension) => `index${extension}`);
ArrayPrototypePush(indexes, 'package.json', 'index');
Expand Down
Loading