| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
When writing multiline input, one can't chain function calls as if the
lines begin with a period, since those are treated as REPL commands.
Before:
> ([0, 1, 2]
... .map(x => x + 1))
Invalid REPL keyword
After:
> ([0, 1, 2]
... .map(x => x + 1))
[ 1, 2, 3 ]
|
Actually, this is intentional. Let's say user types in something invalid, they can always type .break. |
Sorry, something went wrong.
|
Oh yes, this preserves the current behaviour, just additionally allowing for chaining. So the following still works: > ([0, 1, 2]
... .break
> |
Sorry, something went wrong.
|
Oh, that's right. REPL command check happens before this. LGTM then. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
marked semver-minor since this represents a new capability in the REPL as opposed to a fix. |
Sorry, something went wrong.
|
@jasnell We can argue that its a bug fix, as ([0, 1, 2]\n .map(x => x + 1)) will throw Invalid REPL command right now. But, as 5.1.0 is around the corner, semver-minor is okay I guess. |
Sorry, something went wrong.
|
It's a... ahem.. minor... point ;-) It'll land in v5.x soon either way. It's just not likely to be something that would land in v4.x. |
Sorry, something went wrong.
|
@nodejs/collaborators ... some additional review on this one would be appreciated. thank you! |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/846/ Our repl tests are pretty good, Rubber-Stamp LGTM if it works. |
Sorry, something went wrong.
|
failing tests look unrelated. gtg. |
Sorry, something went wrong.
|
@Zirak your git info is Author: Zirak <zirakertan@gmail.com> Are you ok with that? I can't tell if that's just a username or not. Usually we use full names, but you are not required to if you'd rather be known as something else. :) |
Sorry, something went wrong.
|
@Fishrock123 On this part of the internet I go as Zirak. |
Sorry, something went wrong.
|
Ok, sounds good. Merging. :) |
Sorry, something went wrong.
When writing multiline input, one can't chain function calls as if the
lines begin with a period, since those are treated as REPL commands.
Before:
> ([0, 1, 2]
... .map(x => x + 1))
Invalid REPL keyword
After:
> ([0, 1, 2]
... .map(x => x + 1))
[ 1, 2, 3 ]
PR-URL: #3835
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
When writing multiline input, one can't chain function calls as if the
lines begin with a period, since those are treated as REPL commands.
Before:
> ([0, 1, 2]
... .map(x => x + 1))
Invalid REPL keyword
After:
> ([0, 1, 2]
... .map(x => x + 1))
[ 1, 2, 3 ]
PR-URL: #3835
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
When writing multiline input, one can't chain function calls as if the
lines begin with a period, since those are treated as REPL commands.
Before:
> ([0, 1, 2]
... .map(x => x + 1))
Invalid REPL keyword
After:
> ([0, 1, 2]
... .map(x => x + 1))
[ 1, 2, 3 ]
PR-URL: nodejs#3835
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
| Back | FazBrowse Home | New Git URL |
When writing multiline input, one can't chain function calls as if the
lines begin with a period, since those are treated as REPL commands.
Before:
After: