Conversation
b608255 to
f524d2d
Compare
f524d2d to
9a7c81e
Compare
|
@nodejs/repl this could use some reviews. PTAL. |
|
This could use some reviews. I am not sure whom to ping though. |
|
This generally LGTM. Maybe @addaleax since she had an opinion on the older repl PR? I'll try checking this out and reviewing it today/tomorrow. |
|
Yeah idk, I’ve seen this PR but I don’t really know how to feel about it? The commit message says what this PR does, but not why, and that might be helpful here. To be honest, I think that’s mostly because I don’t know if this would be more helpful to – the probably very low number of – external REPL module users or not. For other modules I would consider relying on environment variables for config an antipattern, but given that the REPL is probably more often used as the main application than as part of a larger application, it might make sense here? |
|
@addaleax my main goal here is to unify the behavior of our "internal" (standalone) REPL instances and instances created otherwise. The improved color detection could theoretically be handled separately. |
This makes sure all REPL instances check for the NODE_REPL_MODE environment variable in case the `replMode` is not passed through as option. At the same time this simplifies the internal REPL code significantly. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
284f0d7 to
c0e034c
Compare
benjamingr
left a comment
There was a problem hiding this comment.
Actual code LGTM, not sure I understand the use case well enough but I trust you on this
8ae28ff to
2935f72
Compare
|
Running CI again since the last one was 27 days ago |
This makes sure all REPL instances check for the NODE_REPL_MODE environment variable in case the `replMode` is not passed through as option. At the same time this simplifies the internal REPL code significantly. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: #33461 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in b831b08 |
|
Revert PR because this breaks the github actions build: #34058 |
repl: always check for NODE_REPL_MODE environment variable
This makes sure all REPL instances check for the NODE_REPL_MODE
environment variable in case the
replModeis not passed throughas option.
At the same time this simplifies the internal REPL code significantly
and color detection is improved.
##### doc: document the--use-strictflag for the REPLAdd information that this flag is going to evaluate all code in strictmode. Also use the regular
defaultdescription as it's used in otheroptions.
@nodejs/repl @nodejs/documentation PTAL
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes