Skip to content
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

Node REPL preprocessing input string for custom eval functions #9743

Closed
YarnSphere opened this issue Nov 22, 2016 · 2 comments
Closed

Node REPL preprocessing input string for custom eval functions #9743

YarnSphere opened this issue Nov 22, 2016 · 2 comments
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@YarnSphere
Copy link

  • Version: 7.1.0
  • Platform: Linux 4.8.8-2-ARCH
  • Subsystem: REPL

Run the following:

require('repl').start({
  eval: function(input, context, filename, cb) {
    console.log(input);
    cb(null);
  }
});

When inside the REPL write function f() {}. The REPL will log var f = function f() {}.
This sort of preprocessing should only happen for the default eval function.

The line where the preprocessing occurs: repl.js#L503
This should probably be moved to inside the defaultEval function.

@princejwesley princejwesley added the repl Issues and PRs related to the REPL subsystem. label Nov 22, 2016
@princejwesley
Copy link
Contributor

Working on it!

princejwesley added a commit to princejwesley/node that referenced this issue Dec 3, 2016
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: nodejs#9743
PR-URL: nodejs#9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@princejwesley
Copy link
Contributor

Landed in 9366b8

Fishrock123 pushed a commit that referenced this issue Dec 5, 2016
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: #9743
PR-URL: #9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jmdarling pushed a commit to jmdarling/node that referenced this issue Dec 8, 2016
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: nodejs#9743
PR-URL: nodejs#9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this issue Dec 20, 2016
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: #9743
PR-URL: #9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this issue Dec 21, 2016
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: #9743
PR-URL: #9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants