Skip to content

Commit 167ecc0

Browse files
fixup! repl: move completion logic to internal module
add comment to `getReplBuiltinLibs` and `setReplyBuiltinLibs` functions
1 parent 92fbb83 commit 167ecc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/internal/repl/utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,12 @@ let _builtinLibs = ArrayPrototypeFilter(
823823
(e) => e[0] !== '_' && !StringPrototypeStartsWith(e, 'node:'),
824824
);
825825

826+
// Note: the `getReplBuiltinLibs` and `setReplBuiltinLibs` are functions used to provide getters and
827+
// setters for the `builtinModules` and `_builtinLibs` properties of the repl module and for making
828+
// sure that all internal repl modules share the same value, which can potentially be updated by users.
829+
// Also note that both `repl.builtinModules` and `repl._builtinLibs` are deprecated, once such properties
830+
// are removed these two functions should also be removed as no longer necessary.
831+
826832
function getReplBuiltinLibs() {
827833
return _builtinLibs;
828834
}

0 commit comments

Comments
 (0)