From d0e42ffa58f973471e452f91bdc18469da005d7f Mon Sep 17 00:00:00 2001 From: baki gul <76937950+gulbaki@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:21:47 +0300 Subject: [PATCH] repl: avoid deprecated `require.extensions` in tab completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/58653 Fixes: https://github.com/nodejs/node/issues/58641 Reviewed-By: Ethan Arrowood Reviewed-By: Dario Piotrowicz Reviewed-By: Marco Ippolito Reviewed-By: Juan José Arboleda Reviewed-By: Luigi Pinca --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index d598de3f519..5c3d0747697 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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');