Skip to content

Commit 9ef1cd1

Browse files
gulbakiaduh95
authored andcommitted
repl: avoid deprecated require.extensions in tab completion
PR-URL: #58653 Fixes: #58641 Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: Dario Piotrowicz <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent a2d2d36 commit 9ef1cd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/repl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ function complete(line, callback) {
13381338
filter = completeOn;
13391339
if (this.allowBlockingCompletions) {
13401340
const subdir = match[2] || '';
1341-
const extensions = ObjectKeys(this.context.require.extensions);
1341+
const extensions = ObjectKeys(CJSModule._extensions);
13421342
const indexes = ArrayPrototypeMap(extensions,
13431343
(extension) => `index${extension}`);
13441344
ArrayPrototypePush(indexes, 'package.json', 'index');

0 commit comments

Comments
 (0)