summaryrefslogtreecommitdiff
path: root/lib/internal/repl/utils.js
AgeCommit message (Collapse)Author
2019-12-10repl: support previews by eager evaluating inputRuben Bridgewater
This adds input previews by using the inspectors eager evaluation functionality. It is implemented as additional line that is not counted towards the actual input. In case no colors are supported, it will be visible as comment. Otherwise it's grey. It will be triggered on any line change. It is heavily tested against edge cases and adheres to "dumb" terminals (previews are deactived in that case). PR-URL: https://github.com/nodejs/node/pull/30811 Fixes: https://github.com/nodejs/node/issues/20977 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-12-08lib: replace Symbol global by the primordials SymbolSebastien Ahkrin
PR-URL: https://github.com/nodejs/node/pull/30737 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-15deps: update acorn to 6.2.0Michaël Zasso
Includes support for bigint syntax so we can remove the acorn-bigint plugin. PR-URL: https://github.com/nodejs/node/pull/28649 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-30repl: handle stage-3 language features properlyRuben Bridgewater
This adds stage-3 language features to acorn so that the REPL is able to parse these features properly. Otherwise these would cause SyntaxErrors. PR-URL: https://github.com/nodejs/node/pull/27400 Fixes: https://github.com/nodejs/node/issues/27391 Fixes: https://github.com/nodejs/node/issues/25835 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-08repl: add replDefaults to customize the writerRuben Bridgewater
So far it was not possible to modify the inspection defaults used by the REPL from the running instance itself. This introduces a new property on `util.inspect` which is only used inside the REPL and which allows to modify the used inspection defaults at any point of time. PR-URL: https://github.com/nodejs/node/pull/26375 Reviewed-By: James M Snell <jasnell@gmail.com>