-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL .load multiline arrow function expressions #14022
Labels
feature request
Issues that request new features to be added to Node.js.
repl
Issues and PRs related to the REPL subsystem.
Comments
vsemozhetbyt
added
feature request
Issues that request new features to be added to Node.js.
repl
Issues and PRs related to the REPL subsystem.
labels
Jul 1, 2017
This was referenced Jul 26, 2017
Closed
robbinhan
added a commit
to robbinhan/node
that referenced
this issue
Aug 15, 2017
robbinhan
added a commit
to robbinhan/node
that referenced
this issue
Aug 15, 2017
robbinhan
added a commit
to robbinhan/node
that referenced
this issue
Aug 15, 2017
robbinhan
added a commit
to robbinhan/node
that referenced
this issue
Aug 15, 2017
This was referenced Aug 16, 2017
addaleax
pushed a commit
to addaleax/ayo
that referenced
this issue
Sep 5, 2017
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: nodejs/node#14022 PR-URL: nodejs/node#14861 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Sep 10, 2017
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: #14022 PR-URL: #14861 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Sep 12, 2017
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: #14022 PR-URL: #14861 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Oct 10, 2017
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: #14022 Backport-PR-URL: #15775 PR-URL: #14861 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Oct 25, 2017
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: #14022 Backport-PR-URL: #15775 PR-URL: #14861 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature request
Issues that request new features to be added to Node.js.
repl
Issues and PRs related to the REPL subsystem.
There is no documented way of doing a
.load
in.editor
style, causing multiline expressions (and JavaScript's implicit semicolons within a REPL) to break functions such as this:(After getFile(file), the single line REPL will assume that the expression is done)
Proposal:
Combine
.editor
and.load
into.load-editor
or.load-multiline
that loads the entire file before executing it. Possible workarounds - requiring the file and using exports, but that's reinventing.load
. Alternatively, I'll attempt to minify the output, as that should reduce whitespace that has a special meaning in REPL single-line mode.The text was updated successfully, but these errors were encountered: