Commit Graph

4959 Commits

Author SHA1 Message Date
Vladimir Kurchatkin
628845b816 util: introduce printDeprecationMessage function
`printDeprecationMessage` is used to deprecate modules
and execution branches.

PR-URL: https://github.com/nodejs/io.js/pull/1822
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-04 10:59:43 +03:00
Evan Lucas
a77c330c32 child_process: expose ChildProcess constructor
Creates two new internal modules (child_process and socket_list) for
better readability.

Exposes the ChildProcess constructor from the child_process module so
one can now `require(‘child_process’).ChildProcess`

Fixes: https://github.com/nodejs/io.js/issues/1751
PR-URL: https://github.com/nodejs/io.js/pull/1760
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-05-28 09:38:29 -05:00
Chris Dickinson
ca219b00d1 repl: fix for a+ fd clearing the file on read
The second step of augmenting the internal REPL with persistent
history was to re-open the history file with a 'w' handle. This
truncated the file. If a user did not enter a new line before
closing the REPL, their history would be deleted.

PR-URL: https://github.com/iojs/io.js/pull/1605
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-04 10:45:14 -07:00
Chris Dickinson
051d482b15 repl: fix _debugger by properly proxying repl
The _debugger module uses the internal REPL module, but expects
to receive the userland REPL module. This fixes the breakage that
occurs by proxying the userland REPL module through the internal
module.

It also fixes an unintended in-REPL bug, where require(node-module)
was not resolving correctly.

PR-URL: https://github.com/iojs/io.js/pull/1605
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-04 10:42:42 -07:00
Roman Reiss
2e2fce0502 repl: fix persistent history and env variable name
Issue #1575 did introduce a check for options.terminal but this variable
wasn't able to get truthy, which in turn broke persistent history
completely. This changes the variable to get truthy on true terminals.

Additionally, the docs and the code did differ on which environment
variable was used for history. This changes the code to use
NODE_REPL_HISTORY_FILE.

PR-URL: https://github.com/iojs/io.js/pull/1593
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-05-03 00:41:14 +02:00
Fedor Indutny
ea5195ccaf repl: do not save history for non-terminal repl
When running in non-TTY mode - the `repl.history` is `undefined` and
is not actually populated. Saving it will result in a crashes of
subsequent repl runs.

Fix: https://github.com/iojs/io.js/issues/1574
PR-URL: https://github.com/iojs/io.js/pull/1575
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-05-02 03:11:07 +02:00
Chris Dickinson
0450ce7db2 repl: add mode detection, cli persistent history
this creates a new internal module responsible for providing
the repl created via "iojs" or "iojs -i," and adds the following
options to the readline and repl subsystems:

* "repl mode" - determine whether a repl is strict mode, sloppy mode,
  or auto-detect mode.
* historySize - determine the maximum number of lines a repl will store
  as history.

The built-in repl gains persistent history support when the
NODE_REPL_HISTORY_FILE environment variable is set. This functionality
is not exposed to userland repl instances.

PR-URL: https://github.com/iojs/io.js/pull/1513
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-04-30 19:33:05 -07:00
Ben Noordhuis
d5ce47e433 lib: deprecate the smalloc module
Upcoming V8 changes will make it impossible to keep supporting the
smalloc module so deprecate it now and tell people to switch to
typed arrays.

The module is used in core in a few places so this commit makes the
public module private and replaces the public part with wrappers that
print deprecation notices.

PR-URL: https://github.com/iojs/io.js/pull/1564
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-04-29 19:33:43 +02:00
Vladimir Kurchatkin
2db758c562 iojs: introduce internal modules
Internal modules can be used to share private code between
public modules without risk to expose private APIs to the
user.

PR-URL: https://github.com/iojs/io.js/pull/848
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-25 22:12:18 +03:00