repl: fix declaring a variable with the name `util` · nodejs/node@d666964 · GitHub
Skip to content

Commit d666964

Browse files
eladkishonaduh95
authored andcommitted
repl: fix declaring a variable with the name util
The REPL no longer relies on `util` being a reference to the `util` core module. It still relies on `globalThis` refering to the global object, but no longer emits warnings when it's overwritten by the user. PR-URL: #38141 Fixes: #38139 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent b87f1be commit d666964

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

lib/internal/repl/utils.js

Lines changed: 6 additions & 2 deletions

test/parallel/test-repl-history-navigation.js

Lines changed: 37 additions & 0 deletions

0 commit comments

Comments
 (0)