repl: Fix debugger / require bugs #1605
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey all – found some (embarrassing) bugs I introduced while poking at the v2.0.0 nightly.
The first commit fixes the debugger – it started getting the new internal repl module, which did not expose the same interface as the public repl module. This is a quick fix, intended to be removed in the future – I'd like to spend some time on the debugger to bring it to parity with the new internal repl features.
The second commit fixes node_modules resolution support. This slipped past me the first time around, because I misread the purpose of the preamble (
hack for require.resolve("./relative") to work properly.
, from the source) and moved it to the internal module. I thought that it addressedrequire('./local-file.js')
from the repl; it actually addressedrequire('dependency-from-node-modules')
, and needed to be available to the repl eval function. This fixes that breakage. (And I also am heaping a ton of apologies on this one!)These should block v2.0.0 (or the repl improvements should be backed out.)