| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
I think this is a good feature to have, but we shouldn't be duplicating the code.
Could the parent for the REPL context not just have a filename set to the CWD directory? I think something like that would be best for this code not to need to know about repl at all and instead for it to be a REPL feature entirely. Alternatively, if something like that on the REPL side isn't at all possible, at least use a temporary variable parentPath to not duplicate the code.
Sorry, something went wrong.
|
Thank you @guybedford I'm not quite clear about your parentPath. Could you explain it a little bit more? |
Sorry, something went wrong.
There was a problem hiding this comment.
Could you add a test that; s failing on main and passing with this PR please?
Sorry, something went wrong.
Sure. Done. |
Sorry, something went wrong.
There was a problem hiding this comment.
I take it import() works correctly on the REPL for this same case?
Sorry, something went wrong.
Yes, it works for import() too. I've added necessary test case to ensure this. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: nodejs/node#43450 Fixes: nodejs/node#43410 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Also enable subpath imports in REPL.
fix: #43410