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:
baki gul authored and RafaelGSS committed 2025-06-23 12:22:48 -03:00
1 parent d9c2b7054b
commit d0e42ffa58
1 file changed
+1 -1
+1 -1
View File
@@ -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');