mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
repl: avoid deprecated require.extensions in tab completion
PR-URL: https://github.com/nodejs/node/pull/58653 Fixes: https://github.com/nodejs/node/issues/58641 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
d9c2b7054b
commit
d0e42ffa58
1 file changed
+1
-1
+1
-1
@@ -1359,7 +1359,7 @@ function complete(line, callback) {
|
||||
filter = completeOn;
|
||||
if (this.allowBlockingCompletions) {
|
||||
const subdir = match[2] || '';
|
||||
const extensions = ObjectKeys(this.context.require.extensions);
|
||||
const extensions = ObjectKeys(CJSModule._extensions);
|
||||
const indexes = ArrayPrototypeMap(extensions,
|
||||
(extension) => `index${extension}`);
|
||||
ArrayPrototypePush(indexes, 'package.json', 'index');
|
||||
|
||||
Reference in new issue
Block a user