mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00: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:
parent
910a8af2d2
commit
dcfdaab13a
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user