Fedor Indutny
57388d8b2e
[repl] add error handling for async scope fetching
13 years ago
Fedor Indutny
df480e0357
fix syntax error handling for 'throw ...', fix return value assertion
13 years ago
Fedor Indutny
e13ed4a8d0
[repl, readline] refactor async completion and execution
13 years ago
Fedor Indutny
0d4dc3a8b5
[repl] let self.eval be configurable on REPLServer initialization
13 years ago
Fedor Indutny
eab65e214e
[repl] Async global completion
13 years ago
Fedor Indutny
71a9aefa0f
[readline, repl] Fix completion grouping, fix parens eval results
handling
13 years ago
Fedor Indutny
42b8b77d9f
[repl, readline] async interface
Add async completion and execution interface for repl and readline
13 years ago
Nathan Rajlich
cf24f561a3
repl: don't eval twice when an Error is thrown
14 years ago
Nathan Rajlich
8ec31a3362
Use Object.getPrototypeOf() on the object in the REPL tab-completion.
Some people use __proto__ to augment an Object's prototype after it's been created.
This patch helps make the "new" prototype properties visible if necessary.
This is also more consistent with the while logic below.
14 years ago
Robert Mustacchi
de0b8d601c
jslint cleanup: path.js, readline.js, repl.js, tls.js, tty_win32.js, url.js
14 years ago
isaacs
c050d0fa19
Finish removing require.paths
Fix require() completion bug in repl, and correct man output
14 years ago
isaacs
bbffd9e502
Close #983 Better JSON.parse error detection
Previous pattern would only catch ILLEGAL, not { or other
known-but-unexpected JSON tokens.
14 years ago
Tim Baumann
6c7c4aeab6
Don't overwrite an user-specified repl.writer
14 years ago
Wade Simmons
d00739ce56
make it possible to do repl.start('', stream)
14 years ago
isaacs
0b3ecc05a6
Close #955 Change ^C handling in REPL
Press with text on the line: Cancels
Press on a bare line: Print a message
Press again on a bare line: Exit
14 years ago
Ben Weaver
d63a551f86
Update how REPLServer uses contexts
* Always use `this.context` or `self.context`.
* Move `resetContext` to `REPLServer.createContext`.
* Add `REPLServer.resetContext`, memoize `context` here.
* Memoize `exports.repl` in `start`.
Closes GH-851.
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
isaacs
a48f73d0d3
Closes GH-232 Make the repl's global the right thing
14 years ago
isaacs
2cfe7b847d
Closes GH-184 Clear require cache on repl .clear
14 years ago
isaacs
f07041e6cd
Make the repl respect node_modules folders.
This is important so that in the future, this will work:
$ cd ~/dev/js/some-project
$ npm install redis
$ node
> require.resolve('redis')
'/Users/isaacs/dev/js/some-project/node_modules/redis/index.js'
14 years ago
Ryan Dahl
192d2e0803
REPL: disable colors in windows for now
14 years ago
Ryan Dahl
9e976abad9
lint
14 years ago
Ryan Dahl
ba80d4d8a9
Transfer data gathering responsibility to readline
Fixes non-raw REPL/Debugger on Posix.
14 years ago
Bert Belder
4475b76535
Readline: use symbolic key names instead of ascii control codes
14 years ago
Ryan Dahl
5a05992155
Lint
14 years ago
Bert Belder
1ac133ea6f
Replace string magic + path.join by path.resolve
Because path.resolve is more elegant and windows-safe.
14 years ago
Ryan Dahl
b6dafc1a47
Allow for two streams in REPL
Towards windows compatibility.
14 years ago
Ryan Dahl
feb77eab65
Fix REPL for named functions
add some tests.
14 years ago
Ryan Dahl
c82fe30ca1
repl.js style
14 years ago
Ryan Dahl
00974df3e5
Allow for evaling statements in REPL too
14 years ago
Ryan Dahl
b45698e676
Improve how REPL commands are evaled
Before:
> {a: 1}
1
> (function() {
... // foo
... return 1;
... })();
...
Now:
> {a: 1}
{ a : 1 }
> (function() {
... // foo
... return 1;
... })();
1
>
14 years ago
Brian White
6d75c06e64
Add os module to repl's built-in lib list
14 years ago
Brian White
e41e078159
Make sure REPL doesn't get borked when invalid REPL keywords are entered
14 years ago
Ryan Dahl
e232f6e735
more lint
14 years ago
Marco Rogers
118b88e44f
update repl to distinguish JSON.parse SyntaxErrors from the rest
14 years ago
Brian White
5908bdab9a
Make sure raw mode is disabled when exiting a terminal-based REPL.
14 years ago
Ryan Dahl
8e09b1e2e1
Simplify REPL displayPrompt
Now that we insert \r into the stream and aren't switching back and forth
between termios modes, not need to worry about when to display the prompt.
14 years ago
isaacs
bfc6b51d95
The cwdRequire hack is no longer necessary with the require.resolve refactor.
14 years ago
isaacs
226eff5104
Add require.resolve.
Also, hack the repl so that it works as expected there, too.
14 years ago
Sami Samhuri
56df0cbf93
new api for defining repl commands
14 years ago
Micheil Smith
e38eb0c5a4
Soft migration of sys -> util, Removal of deprecated utils module.
14 years ago
Ryan Dahl
783f5019b0
Add flag to disable colors in REPL
14 years ago
Sean Coates
ae87007478
add $ to variable name character matching patterns in repl completer
14 years ago
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
14 years ago
Ryan Dahl
5829716649
Fix REPL crash on tabbing 'this.'
Thanks to Tim Becker for pointing this out.
14 years ago
Ryan Dahl
d2de8ba400
^c to get out of '...' in REPL
14 years ago
Ryan Dahl
42eb5a6898
Simplify REPL
14 years ago
Trent Mick
1d961a6630
add ANSI coloring option to sys.inspect and, by default, to the repl
15 years ago
Trent Mick
293809b8b6
drop obsolete TODO comment
15 years ago
Trent Mick
5c1ffa165f
repl completion: completion for arguments to "require"
15 years ago