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

repl: deprecate unused function convertToContext #7829

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ function regexpEscape(s) {
* @param {String} cmd The cmd to convert.
* @return {String} The converted command.
*/
REPLServer.prototype.convertToContext = function(cmd) {
REPLServer.prototype.convertToContext = util.deprecate(function(cmd) {
const scopeVar = /^\s*var\s*([_\w\$]+)(.*)$/m;
const scopeFunc = /^\s*function\s*([_\w\$]+)/;
var matches;
Expand All @@ -1222,7 +1222,7 @@ REPLServer.prototype.convertToContext = function(cmd) {
}

return cmd;
};
}, 'replServer.convertToContext will be removed in v8.0.0');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use "after", that represents a range, instead of the precise word "in" would be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yorkie removed after v7 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly what I mean :-) @princejwesley


function bailOnIllegalToken(parser) {
return parser._literal === null &&
Expand Down