summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl.js
AgeCommit message (Collapse)Author
2019-12-06repl: use better uncaught exceptions indicatorRuben Bridgewater
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: https://github.com/nodejs/node/pull/29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-02util: improve function inspectionRuben Bridgewater
This commit contains the following changes: 1) Add null prototype support for functions. 2) Safely detect async and generator functions. 3) Mark anonymous functions as such instead of just leaving out the name. PR-URL: https://github.com/nodejs/node/pull/27227 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-30test: add tests for new language featuresRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/27400 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-04-10util: change inspect compact and breakLength defaultRuben Bridgewater
This changes the `compact` default from `true` to `3`. That mode changes arrays to be grouped together, it alignes multiple small entries on a single line in similar to `compact` true but only for the most inner three depth levels and the closing brackets are always on the same indentation as the openeing of the object instead of at the same line as another property. Big strings will be naturally broken into multiple lines instead of having one huge line that is not well readable. The output size mainly stays the same that way while it will be smaller in case of big arrays. Increasing the `breakLength` to 80 adjusts for most terminals that support at least 80 characters in a single line and improves the general output that way. A lot of calculations use the `breakLength` to determine the concrete behavior. PR-URL: https://github.com/nodejs/node/pull/27109 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-03util: improve error property inspectionRuben Bridgewater
This makes sure that errors that contain extra properties show those properties on a separate line. PR-URL: https://github.com/nodejs/node/pull/26984 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-27benchmark,doc,lib: capitalize more commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-10benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-02-28benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28repl: hide editor mode if not used in a terminalRuben Bridgewater
The editor mode is only useable when used as terminal. Hide it from the user in case the repl terminal option is not set. PR-URL: https://github.com/nodejs/node/pull/26240 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-02-28repl: add more informationRuben Bridgewater
This adds information about how to close the repl. PR-URL: https://github.com/nodejs/node/pull/26240 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-02-15lib: improve error message for MODULE_NOT_FOUNDAli Ijaz Sheikh
Include the require stack in the reported error message. PR-URL: https://github.com/nodejs/node/pull/25690 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-17test: fix test-repl timeout and tmpdir refreshBrian White
PR-URL: https://github.com/nodejs/node/pull/25425 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-01-02repl: indicate if errors are thrown or notRuben Bridgewater
Currently an error is printed identical, no matter if it is just inspected or if the error is thrown inside of the REPL. This makes sure we are able to distinguish these cases. PR-URL: https://github.com/nodejs/node/pull/25253 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-17doc,lib,test: capitalize comment sentencesRuben Bridgewater
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-10tools: capitalize sentencesRuben Bridgewater
This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-15test: fix parameters in test-repl.jsIsrael Ortiz
fixed order of parameters in assert.strictEqual() assertion functions, first argument provided was the expected value and the second value was the actual value. this is backwards from the documentation for assertions like assert.strictEqual() where the first value being tested and the second value is the expected value PR-URL: https://github.com/nodejs/node/pull/23609 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-08-27repl: improve error outputRuben Bridgewater
1) Currently extra properties on an error will be ignored, if thrown. This information will from now on be visible. 2) In case someone threw a non error object it would have resulted in `[object Object]`. Instead, the full object will now be visible. 3) Some cases were not detected properly as error before and "Thrown: " was visible before. That is now fixed. PR-URL: https://github.com/nodejs/node/pull/22436 Refs: https://github.com/nodejs/node/issues/20253 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-03repl: support mult-line string-keyed objectsSam Ruby
isRecoverableError is completely reimplemented using acorn and an acorn plugin that examines the state of the parser at the time of the error to determine if the code could be completed on a subsequent line. PR-URL: https://github.com/nodejs/node/pull/21805 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-19test: make crashOnUnhandleRejection opt-outMichaël Zasso
This commit removes `common.crashOnUnhandledRejection()` and adds `common.disableCrashOnUnhandledRejection()`. To reduce the risk of mistakes and make writing tests that involve promises simpler, always install the unhandledRejection hook in tests and provide a way to disable it for the rare cases where it's needed. PR-URL: https://github.com/nodejs/node/pull/21849 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-28Revert "repl: add friendly tips about how to exit repl"cjihrig
This reverts commit 9aa4ec43fce7fd9166459c98f347760cf450a350. This commit in question introduced a regression in repl.eval(), as the context argument is no longer passed to runInContext(). PR-URL: https://github.com/nodejs/node/pull/20972 Fixes: https://github.com/nodejs/node/issues/20965 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-05-19test: remove common.globalCheckRuben Bridgewater
This flag is partially used in tests where it was not necessary and it is always possible to replace this flag with `common.allowGlobals`. This makes sure all globals are truly tested for. PR-URL: https://github.com/nodejs/node/pull/20717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-18repl: add friendly tips about how to exit replmonkingxue
Imitate python repl, when the user enters 'exit' or 'quit', no longer prompt 'Reference Error', but prompts 'To exit, press ^D or type .exit'. If the user defines variables named 'exit' or 'quit' , only the value of the variables are output PR-URL: https://github.com/nodejs/node/pull/20617 Fixes: https://github.com/nodejs/node/issues/19021 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-11repl: better handling of recoverable errorsPrince J Wesley
Below syntax errors are handled without force .break/clear - Unexpected Token (prefix errors) - missing ) after argument list In the multiline expression, recoverable errors are truly recoverable, otherwise syntax error will be thrown. PR-URL: https://github.com/nodejs/node/pull/18915 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-11test: fix spelling in test case commentsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-01-06test: refactor test-replAnna Henningsen
- Switch over to async tracking through promises/async fns - Remove an unused temp dir refresh - Inline the multiline/npm text prompts into expectations - Unify handling prompts/stripping prompts out - Make sure no unexpected data is received by requireing all *lines* to be matched, rather than chunks received from the REPL. This made the test too loose in terms of matched lines and too strict in terms of stream chunking requirements. - Some general cleanup PR-URL: https://github.com/nodejs/node/pull/17926 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-11test: make test-repl engine agnosticRich Trott
Remove reliance on V8-specific error messages in test-repl. Test should pass whether V8 is the engine, or V8 changes error message strings, or ChakraCore is the engine, or some other valid JavaScript engine is used in the future. PR-URL: https://github.com/nodejs/node/pull/16272 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-11-07repl: show proxies as Proxy objectsBen Noordhuis
Before this commit they transparently invoked their magic methods but that sometimes throws confusing exceptions with misbehaving proxies. This change is not wholly uncontroversial but we can always change the default if necessary. Let's see how it goes. Fixes: https://github.com/nodejs/node/issues/16483 PR-URL: https://github.com/nodejs/node/pull/16485 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-07test: use fixtures module in test-replMaring, Damian Lion
PR-URL: https://github.com/nodejs/node/pull/16809 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-11repl: remove internal frames from runtime errorsLance Ball
When a user executes code in the REPLServer which generates an exception, there is no need to display the REPLServer internal stack frames. PR-URL: https://github.com/nodejs/node/pull/15351 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Refs: https://github.com/nodejs/node/pull/9601
2017-08-07test: mitigate RegEx exceeding 80 charsAditya Anand
Format commit wrapping lines containing RegEx and exceeding 80 chars. PR-URL: https://github.com/nodejs/node/pull/14607 Fixes: https://github.com/nodejs/node/issues/14586 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-07-29repl: do not consider `...` as a REPL commandShivanth MP
This fix makes ... in REPL to be considered as a javascript construct rather than a REPL keyword. Fixes: https://github.com/nodejs/node/issues/14426 PR-URL: https://github.com/nodejs/node/pull/14467 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-07-27test: adjust indentation for stricter lintingRich Trott
ESLint 4.x has stricter linting than previous versions. We are currently using the legacy indentation rules in the test directory. This commit changes the indentation of files to comply with the stricter 4.x linting and enable stricter linting in the test directory. PR-URL: https://github.com/nodejs/node/pull/14431 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-07-21lib,src: fix consistent spacing inside bracesSebastiaan Deckers
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-21test: fix RegExp nitsVse Mozhet Byt
* Remove needless RegExp flag In fixed case, `/g` flag is needless in the boolean context. * Remove needless RegExp capturing Use non-capturing grouping or remove capturing completely when: * capturing is useless per se, e.g. in test() check; * captured groups are not used afterward at all; * some of the later captured groups are not used afterward. * Use test, not match/exec in boolean context match() and exec() return a complicated object, unneeded in a boolean context. * Do not needlessly repeat RegExp creation This commit takes RegExp creation out of cycles and other repetitions. As long as the RegExp does not use /g flag and match indices, we are safe here. In tests, this fix hardly gives a significant performance gain, but it increases clarity and maintainability, reassuring some RegExps to be identical. RegExp in functions are not taken out of their functions: while these functions are called many times and their RegExps are recreated with each call, the performance gain in test cases does not seem to be worth decreasing function self-dependency. PR-URL: https://github.com/nodejs/node/pull/13770 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-09test: remove obsolete lint config commentsRich Trott
The `max-len` ESLint rule is configured to be forgiving for lines that contain a regular expression literal. Remove disabling comments that are no longer required in test-repl.js PR-URL: https://github.com/nodejs/node/pull/12868 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: David Cai <davidcai1993@yahoo.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-05test: reduce string concatenationsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/12735 Refs: https://github.com/nodejs/node/pull/12455 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-30test: replace indexOf with includesgwer
Start the transition to Array.prototype.includes() and String.prototype.includes(). This commit refactors most of the comparisons of Array.prototype.indexOf() and String.prototype.indexOf() return values with -1 to the former methods in tests. PR-URL: https://github.com/nodejs/node/pull/12604 Refs: https://github.com/nodejs/node/issues/12586 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-26test: remove obsolete lint commentRich Trott
The eslint-disable comment in test-repl.js appears to have been restored by accident while restoring other comments. Remove it. PR-URL: https://github.com/nodejs/node/pull/12659 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-25tools: use no-useless-concat ESLint ruleVse Mozhet Byt
* Add `no-useless-concat: error` to .eslintrc.yaml. * Apply no-useless-concat rule to tests. PR-URL: https://github.com/nodejs/node/pull/12613 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-29tools: add unescaped regexp dot rule to linterBrian White
PR-URL: https://github.com/nodejs/node/pull/11834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-14repl: refactor `LineParser` implementationBlake Embrey
Move the core logic from `LineParser` should fail handling into the recoverable error check for the REPL default eval. PR-URL: https://github.com/nodejs/node/pull/6171 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2017-03-02test: enable max-len for test-replRich Trott
Instead of disabling max-len (ESLint's line-length rule) for the entire file, reformat to avoid exceeding length restrictions in most cases and disable the rule only on specific lines where exceeding the length restriction may be a better choice than conforming to it. PR-URL: https://github.com/nodejs/node/pull/11559 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-03-01test: apply strict mode in test-replRich Trott
Strict mode for the test will not automatically enable strict mode in the REPL object. Enable strict mode in the test. PR-URL: https://github.com/nodejs/node/pull/11575 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-12-06repl: avoid parsing division operator as regexTeddy Katz
This improves the heuristic used in multiline-prompt mode to determine whether a given slash character is at the beginning of a regular expression. PR-URL: https://github.com/nodejs/node/pull/10103 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@keybase.io> Fixes: https://github.com/nodejs/node/issues/9300
2016-12-05test: update repl testsmakenova
change var to const or let change assert.equal to assert.strictEqual PR-URL: https://github.com/nodejs/node/pull/9991 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-02repl: fix generator function preprocessingTeddy Katz
Function declarations in the REPL are preprocessed into variable declarations before being evaluated. However, the preprocessing logic did not account for the star in a generator function declaration, which caused the preprocessor to output invalid syntax in some circumstances. PR-URL: https://github.com/nodejs/node/pull/9852 Fixes: https://github.com/nodejs/node/issues/9850 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-11-06benchmark,lib,test,tools: remove unneeded . escapeRich Trott
The `.` character does not need to be escaped when it appears inside a regular expression character class. This removes instances of unnecessary escapes of the `.` character. This also removes a few unnecessary escapes of the `(` and `)` characters within character classes too. PR-URL: https://github.com/nodejs/node/pull/9449 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com>
2016-09-20tools: add additional ESLint rulesTeddy Katz
PR-URL: https://github.com/nodejs/node/pull/8643 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@keybase.io>
2016-08-19Revert "repl,util: insert carriage returns in output"Evan Lucas
This reverts commit fce4b981eacbce0b85a2418d042f1f67d40e9834. This was a breaking change and should have been marked semver-major. The change that was made altered the output of util.format() and util.inspect(). With how much those are used in the wild, this type of change deserves more justification. Fixes: https://github.com/nodejs/node/issues/8138 PR-URL: https://github.com/nodejs/node/pull/8143 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>