Don't use a separate context for the repl.
authorisaacs <i@izs.me>
Tue, 18 Oct 2011 01:24:12 +0000 (18:24 -0700)
committerisaacs <i@izs.me>
Wed, 19 Oct 2011 01:18:32 +0000 (18:18 -0700)
commitb70fed48a7fb0ac884e6574253a89db6158b2f60
treee3e9acd3b36df1892133a6211ef867267e330e4c
parent200df8641b43902adc73cce6b89d3e84a91dd3e6
Don't use a separate context for the repl.

Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
doc/api/repl.markdown
lib/repl.js
test/common.js