Skip to content

repl: doc-deprecate instantiating `node:repl` classes without `new`

Building on the approach taken in #54708:

In the past, I've submitted several PRs aimed at refactoring and modernizing the Node.js REPL with significant changes. Throughout that process, I’ve learned that progress often starts with smaller steps before larger changes can happen.

This is one of those small steps.

I propose deprecating the instantiation of repl.REPLServer (and repl.Recoverable) without the new keyword. This change would pave the way for these classes to be migrated to ECMAScript classes, helping Node.js move closer to fully using ECMAScript's potential.

Merge request reports

Loading