From 631c95428c5a69a845980d1e386a6ec49fe24a43 Mon Sep 17 00:00:00 2001 From: Andrew de Andrade Date: Wed, 3 Jun 2015 15:35:36 -0700 Subject: [PATCH 1/2] Change io.js to node.js in ./doc/ --- doc/api/addons.markdown | 12 +- doc/api/buffer.markdown | 8 +- doc/api/child_process.markdown | 22 +- doc/api/cluster.markdown | 16 +- doc/api/crypto.markdown | 4 +- doc/api/debugger.markdown | 20 +- doc/api/dgram.markdown | 2 +- doc/api/dns.markdown | 4 +- doc/api/documentation.markdown | 6 +- doc/api/domain.markdown | 2 +- doc/api/errors.markdown | 24 +- doc/api/events.markdown | 4 +- doc/api/fs.markdown | 4 +- doc/api/globals.markdown | 12 +- doc/api/http.markdown | 28 +- doc/api/https.markdown | 2 +- doc/api/modules.markdown | 38 +- doc/api/net.markdown | 6 +- doc/api/path.markdown | 8 +- doc/api/process.markdown | 92 ++--- doc/api/punycode.markdown | 2 +- doc/api/readline.markdown | 8 +- doc/api/repl.markdown | 26 +- doc/api/stream.markdown | 16 +- doc/api/synopsis.markdown | 6 +- doc/api/timers.markdown | 2 +- doc/api/tls.markdown | 6 +- doc/api/tty.markdown | 10 +- doc/api/util.markdown | 4 +- doc/api/v8.markdown | 6 +- doc/api/zlib.markdown | 4 +- doc/node.1 | 731 +++++++++++++++++++++++++++++++++ doc/releases.md | 34 +- doc/template.html | 8 +- 34 files changed, 954 insertions(+), 223 deletions(-) create mode 100644 doc/node.1 diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 0609084e1..81fc70ee1 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -6,7 +6,7 @@ knowledge of several libraries: - V8 JavaScript, a C++ library. Used for interfacing with JavaScript: creating objects, calling functions, etc. Documented mostly in the - `v8.h` header file (`deps/v8/include/v8.h` in the io.js source + `v8.h` header file (`deps/v8/include/v8.h` in the Node.js source tree), which is also available [online](http://izs.me/v8-docs/main.html). @@ -16,12 +16,12 @@ knowledge of several libraries: to interface with libuv. That is, if you perform any I/O, libuv will need to be used. - - Internal io.js libraries. Most importantly is the `node::ObjectWrap` + - Internal Node.js libraries. Most importantly is the `node::ObjectWrap` class which you will likely want to derive from. - Others. Look in `deps/` for what else is available. -io.js statically compiles all its dependencies into the executable. +Node.js statically compiles all its dependencies into the executable. When compiling your module, you don't need to worry about linking to any of these libraries. @@ -64,7 +64,7 @@ First we create a file `hello.cc`: } // namespace demo -Note that all io.js addons must export an initialization function: +Note that all Node.js addons must export an initialization function: void Initialize(Local exports); NODE_MODULE(module_name, Initialize) @@ -99,7 +99,7 @@ command. Now you have your compiled `.node` bindings file! The compiled bindings end up in `build/Release/`. -You can now use the binary addon in an io.js project `hello.js` by pointing +You can now use the binary addon in an Node.js project `hello.js` by pointing `require` to the recently built `hello.node` module: // hello.js @@ -656,7 +656,7 @@ Test it with: ### Passing wrapped objects around In addition to wrapping and returning C++ objects, you can pass them around -by unwrapping them with io.js's `node::ObjectWrap::Unwrap` helper function. +by unwrapping them with Node.js's `node::ObjectWrap::Unwrap` helper function. In the following `addon.cc` we introduce a function `add()` that can take on two `MyObject` objects: diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 106097451..17d7c0754 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -4,7 +4,7 @@ Pure JavaScript is Unicode friendly but not nice to binary data. When dealing with TCP streams or the file system, it's necessary to handle octet -streams. io.js has several strategies for manipulating, creating, and +streams. Node.js has several strategies for manipulating, creating, and consuming octet streams. Raw data is stored in instances of the `Buffer` class. A `Buffer` is similar @@ -33,7 +33,7 @@ encoding method. Here are the different string encodings. * `'binary'` - A way of encoding raw binary data into strings by using only the first 8 bits of each character. This encoding method is deprecated and should be avoided in favor of `Buffer` objects where possible. This encoding - will be removed in future versions of io.js. + will be removed in future versions of Node.js. * `'hex'` - Encode each byte as two hexadecimal characters. @@ -295,7 +295,7 @@ so the legal range is between `0x00` and `0xFF` hex or `0` and `255`. Example: copy an ASCII string into a buffer, one byte at a time: - str = "io.js"; + str = "Node.js"; buf = new Buffer(str.length); for (var i = 0; i < str.length ; i++) { @@ -304,7 +304,7 @@ Example: copy an ASCII string into a buffer, one byte at a time: console.log(buf); - // io.js + // Node.js ### buf.equals(otherBuffer) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 1082bf050..329d04b13 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -2,12 +2,12 @@ Stability: 2 - Stable -io.js provides a tri-directional `popen(3)` facility through the +Node.js provides a tri-directional `popen(3)` facility through the `child_process` module. It is possible to stream data through a child's `stdin`, `stdout`, and `stderr` in a fully non-blocking way. (Note that some programs use -line-buffered I/O internally. That doesn't affect io.js but it means +line-buffered I/O internally. That doesn't affect Node.js but it means data you send to the child process may not be immediately consumed.) To create a child process use `require('child_process').spawn()` or @@ -61,7 +61,7 @@ of the signal, otherwise `null`. Note that the child process stdio streams might still be open. -Also, note that io.js establishes signal handlers for `'SIGINT'` and +Also, note that Node.js establishes signal handlers for `'SIGINT'` and `'SIGTERM`', so it will not terminate due to receipt of those signals, it will exit. @@ -253,7 +253,7 @@ instead, see There is a special case when sending a `{cmd: 'NODE_foo'}` message. All messages containing a `NODE_` prefix in its `cmd` property will not be emitted in -the `message` event, since they are internal messages used by io.js core. +the `message` event, since they are internal messages used by Node.js core. Messages containing the prefix are emitted in the `internalMessage` event, you should by all means avoid using this feature, it is subject to change without notice. @@ -463,12 +463,12 @@ index corresponds to a fd in the child. The value is one of the following: between parent and child. A ChildProcess may have at most *one* IPC stdio file descriptor. Setting this option enables the ChildProcess.send() method. If the child writes JSON messages to this file descriptor, then this will - trigger ChildProcess.on('message'). If the child is an io.js program, then + trigger ChildProcess.on('message'). If the child is an Node.js program, then the presence of an IPC channel will enable process.send() and process.on('message'). -3. `'ignore'` - Do not set this file descriptor in the child. Note that io.js +3. `'ignore'` - Do not set this file descriptor in the child. Note that Node.js will always open fd 0 - 2 for the processes it spawns. When any of these is - ignored io.js will open `/dev/null` and attach it to the child's fd. + ignored Node.js will open `/dev/null` and attach it to the child's fd. 4. `Stream` object - Share a readable or writable stream that refers to a tty, file, socket, or a pipe with the child process. The stream's underlying file descriptor is duplicated in the child process to the fd that @@ -632,17 +632,17 @@ leaner than `child_process.exec`. It has the same options. * `gid` {Number} Sets the group identity of the process. (See setgid(2).) * Return: ChildProcess object -This is a special case of the `spawn()` functionality for spawning io.js +This is a special case of the `spawn()` functionality for spawning Node.js processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in. See `child.send(message, [sendHandle])` for details. -These child io.js processes are still whole new instances of V8. Assume at -least 30ms startup and 10mb memory for each new io.js. That is, you cannot +These child Node.js processes are still whole new instances of V8. Assume at +least 30ms startup and 10mb memory for each new Node.js. That is, you cannot create many thousands of them. The `execPath` property in the `options` object allows for a process to be -created for the child rather than the current `iojs` executable. This should be +created for the child rather than the current `node` executable. This should be done with care and by default will talk over the fd represented an environmental variable `NODE_CHANNEL_FD` on the child process. The input and output on this fd is expected to be line delimited JSON objects. diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 6a923b45c..5f720dd68 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -2,8 +2,8 @@ Stability: 2 - Stable -A single instance of io.js runs in a single thread. To take advantage of -multi-core systems the user will sometimes want to launch a cluster of io.js +A single instance of Node.js runs in a single thread. To take advantage of +multi-core systems the user will sometimes want to launch a cluster of Node.js processes to handle the load. The cluster module allows you to easily create child processes that @@ -31,9 +31,9 @@ all share server ports. }).listen(8000); } -Running io.js will now share port 8000 between the workers: +Running Node.js will now share port 8000 between the workers: - % NODE_DEBUG=cluster iojs server.js + % NODE_DEBUG=cluster node server.js 23521,Master Worker 23524 online 23521,Master Worker 23526 online 23521,Master Worker 23523 online @@ -74,7 +74,7 @@ out of a total of eight. Because `server.listen()` hands off most of the work to the master process, there are three cases where the behavior between a normal -io.js process and a cluster worker differs: +Node.js process and a cluster worker differs: 1. `server.listen({fd: 7})` Because the message is passed to the master, file descriptor 7 **in the parent** will be listened on, and the @@ -91,7 +91,7 @@ io.js process and a cluster worker differs: want to listen on a unique port, generate a port number based on the cluster worker ID. -There is no routing logic in io.js, or in your program, and no shared +There is no routing logic in Node.js, or in your program, and no shared state between the workers. Therefore, it is important to design your program such that it does not rely too heavily on in-memory data objects for things like sessions and login. @@ -99,7 +99,7 @@ for things like sessions and login. Because workers are all separate processes, they can be killed or re-spawned depending on your program's needs, without affecting other workers. As long as there are some workers still alive, the server will -continue to accept connections. io.js does not automatically manage the +continue to accept connections. Node.js does not automatically manage the number of workers for you, however. It is your responsibility to manage the worker pool for your application's needs. @@ -121,7 +121,7 @@ values are `"rr"` and `"none"`. ## cluster.settings * {Object} - * `execArgv` {Array} list of string arguments passed to the io.js executable. + * `execArgv` {Array} list of string arguments passed to the Node.js executable. (Default=`process.execArgv`) * `exec` {String} file path to worker file. (Default=`process.argv[1]`) * `args` {Array} string arguments passed to worker. diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 1a181e7e6..41c9a8435 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -76,7 +76,7 @@ dictionary with keys: for details on the format. -If no 'ca' details are given, then io.js will use the default +If no 'ca' details are given, then Node.js will use the default publicly trusted list of CAs as given in . @@ -737,7 +737,7 @@ unified Stream API, and before there were Buffer objects for handling binary data. As such, the streaming classes don't have the typical methods found on -other io.js classes, and many methods accepted and returned +other Node.js classes, and many methods accepted and returned Binary-encoded strings by default rather than Buffers. This was changed to use Buffers by default instead. diff --git a/doc/api/debugger.markdown b/doc/api/debugger.markdown index 9b33eb7d4..d535bfd8e 100644 --- a/doc/api/debugger.markdown +++ b/doc/api/debugger.markdown @@ -6,10 +6,10 @@ V8 comes with an extensive debugger which is accessible out-of-process via a simple [TCP protocol](http://code.google.com/p/v8/wiki/DebuggerProtocol). -io.js has a built-in client for this debugger. To use this, start io.js with the +Node.js has a built-in client for this debugger. To use this, start Node.js with the `debug` argument; a prompt will appear: - % iojs debug myscript.js + % node debug myscript.js < debugger listening on port 5858 connecting... ok break in /home/indutny/Code/git/indutny/myscript.js:1 @@ -18,7 +18,7 @@ io.js has a built-in client for this debugger. To use this, start io.js with the 3 debugger; debug> -io.js's debugger client doesn't support the full range of commands, but +Node.js's debugger client doesn't support the full range of commands, but simple step and inspection is possible. By putting the statement `debugger;` into the source code of your script, you will enable a breakpoint. @@ -34,7 +34,7 @@ For example, suppose `myscript.js` looked like this: Then once the debugger is run, it will break on line 4. - % iojs debug myscript.js + % node debug myscript.js < debugger listening on port 5858 connecting... ok break in /home/indutny/Code/git/indutny/myscript.js:1 @@ -113,7 +113,7 @@ on line 1 It is also possible to set a breakpoint in a file (module) that isn't loaded yet: - % ./iojs debug test/fixtures/break-in-module/main.js + % ./node debug test/fixtures/break-in-module/main.js < debugger listening on port 5858 connecting to port 5858... ok break in test/fixtures/break-in-module/main.js:1 @@ -158,13 +158,13 @@ breakpoint) ## Advanced Usage -The V8 debugger can be enabled and accessed either by starting io.js with -the `--debug` command-line flag or by signaling an existing io.js process +The V8 debugger can be enabled and accessed either by starting Node.js with +the `--debug` command-line flag or by signaling an existing Node.js process with `SIGUSR1`. Once a process has been set in debug mode with this it can be connected to -with the io.js debugger. Either connect to the `pid` or the URI to the debugger. +with the Node.js debugger. Either connect to the `pid` or the URI to the debugger. The syntax is: -* `iojs debug -p ` - Connects to the process via the `pid` -* `iojs debug ` - Connects to the process via the URI such as localhost:5858 +* `node debug -p ` - Connects to the process via the `pid` +* `node debug ` - Connects to the process via the URI such as localhost:5858 diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 7c13d1746..18422fd26 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -170,7 +170,7 @@ and the `callback`(if specified) is called. Specifying both a "listening" event listener and `callback` is not harmful but not very useful. -A bound datagram socket keeps the io.js process running to receive +A bound datagram socket keeps the Node.js process running to receive datagrams. If binding fails, an "error" event is generated. In rare case (e.g. diff --git a/doc/api/dns.markdown b/doc/api/dns.markdown index a30af870e..f8d9d8239 100644 --- a/doc/api/dns.markdown +++ b/doc/api/dns.markdown @@ -103,7 +103,7 @@ It's only an operating system facility that can associate name with addresses, and vice versa. Its implementation can have subtle but important consequences on the behavior -of any io.js program. Please take some time to consult the [Implementation +of any Node.js program. Please take some time to consult the [Implementation considerations section](#dns_implementation_considerations) before using it. ## dns.lookupService(address, port, callback) @@ -275,7 +275,7 @@ were found, then return IPv4 mapped IPv6 addresses. Although `dns.lookup` and `dns.resolve*/dns.reverse` functions have the same goal of associating a network name with a network address (or vice versa), their behavior is quite different. These differences can have subtle but -significant consequences on the behavior of io.js programs. +significant consequences on the behavior of Node.js programs. ### dns.lookup diff --git a/doc/api/documentation.markdown b/doc/api/documentation.markdown index 2cb03c8f8..269b844ef 100644 --- a/doc/api/documentation.markdown +++ b/doc/api/documentation.markdown @@ -2,7 +2,7 @@ -The goal of this documentation is to comprehensively explain the io.js +The goal of this documentation is to comprehensively explain the Node.js API, both from a reference as well as a conceptual point of view. Each section describes a built-in module or high-level concept. @@ -16,7 +16,7 @@ experimental, and added for the benefit of IDEs and other utilities that wish to do programmatic things with the documentation. Every `.html` and `.json` file is generated based on the corresponding -`.markdown` file in the `doc/api/` folder in io.js's source tree. The +`.markdown` file in the `doc/api/` folder in Node.js's source tree. The documentation is generated using the `tools/doc/generate.js` program. The HTML template is located at `doc/template.html`. @@ -25,7 +25,7 @@ The HTML template is located at `doc/template.html`. Throughout the documentation, you will see indications of a section's -stability. The io.js API is still somewhat changing, and as it +stability. The Node.js API is still somewhat changing, and as it matures, certain parts are more reliable than others. Some are so proven, and so relied upon, that they are unlikely to ever change at all. Others are brand new and experimental, or known to be hazardous diff --git a/doc/api/domain.markdown b/doc/api/domain.markdown index 56e8f0650..f2b5d3a55 100644 --- a/doc/api/domain.markdown +++ b/doc/api/domain.markdown @@ -38,7 +38,7 @@ time, and stop listening for new requests in that worker. In this way, `domain` usage goes hand-in-hand with the cluster module, since the master process can fork a new worker when a worker -encounters an error. For io.js programs that scale to multiple +encounters an error. For Node.js programs that scale to multiple machines, the terminating proxy or service registry can take note of the failure, and react accordingly. diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index df5f2d74a..6d117931e 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -2,8 +2,8 @@ -Errors generated by io.js fall into two categories: JavaScript errors and system -errors. All errors inherit from or are instances of JavaScript's [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) +Errors generated by Node.js fall into two categories: JavaScript errors and +system errors. All errors inherit from or are instances of JavaScript's [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) class and are guaranteed to provide *at least* the attributes available on that class. @@ -34,7 +34,7 @@ denote any specific circumstance of why the error occurred. Errors capture a "stack trace" detailing the point in the program at which they were instantiated, and may provide a description of the error. -**Note**: io.js will generate this class of error to encapsulate system +**Note**: Node.js will generate this class of error to encapsulate system errors as well as plain JavaScript errors. #### new Error(message) @@ -106,7 +106,7 @@ makeFaster(); // will throw: The location information will be one of: * `native`, if the frame represents a call internal to V8 (as in `[].forEach`). -* `plain-filename.js:line:column`, if the frame represents a call internal to io.js. +* `plain-filename.js:line:column`, if the frame represents a call internal to Node.js. * `/absolute/path/to/file.js:line:column`, if the frame represents a call in a user program, or its dependencies. It is important to note that the string representing the stacktrace is only @@ -177,7 +177,7 @@ range, or outside the set of options for a given function parameter. An example: require('net').connect(-1); // throws RangeError, port should be > 0 && < 65536 ``` -io.js will generate and throw RangeError instances *immediately* -- they are a form +Node.js will generate and throw RangeError instances *immediately* -- they are a form of argument validation. ### Class: TypeError @@ -190,7 +190,7 @@ be considered a TypeError. require('url').parse(function() { }); // throws TypeError, since it expected a string ``` -io.js will generate and throw TypeError instances *immediately* -- they are a form +Node.js will generate and throw TypeError instances *immediately* -- they are a form of argument validation. ### Class: ReferenceError @@ -244,7 +244,7 @@ by other contexts. A JavaScript "exception" is a value that is thrown as a result of an invalid operation or as the target of a `throw` statement. While it is not required that these values inherit from -`Error`, all exceptions thrown by io.js or the JavaScript runtime *will* be instances of Error. +`Error`, all exceptions thrown by Node.js or the JavaScript runtime *will* be instances of Error. Some exceptions are *unrecoverable* at the JavaScript layer. These exceptions will always bring down the process. These are usually failed `assert()` checks or `abort()` calls in the C++ layer. @@ -257,7 +257,7 @@ react to. They are generated at the syscall level: an exhaustive list of error codes and their meanings is available by running `man 2 intro` or `man 3 errno` on most Unices; or [online](http://man7.org/linux/man-pages/man3/errno.3.html). -In io.js, system errors are represented as augmented Error objects -- not full +In Node.js, system errors are represented as augmented Error objects -- not full subclasses, but instead an error instance with added members. ### Class: System Error @@ -275,7 +275,7 @@ letters, and may be referenced in `man 2 intro`. ### Common System Errors This list is **not exhaustive**, but enumerates many of the common system errors when -writing a io.js program. An exhaustive list may be found [here](http://man7.org/linux/man-pages/man3/errno.3.html). +writing a Node.js program. An exhaustive list may be found [here](http://man7.org/linux/man-pages/man3/errno.3.html). #### EPERM: Operation not permitted @@ -315,7 +315,7 @@ at least one has been closed. Commonly encountered when opening many files at once in parallel, especially on systems (in particular, OS X) where there is a low file descriptor limit for processes. To remedy a low limit, run `ulimit -n 2048` in the same shell -that will run the io.js process. +that will run the Node.js process. #### EPIPE: Broken pipe @@ -356,7 +356,7 @@ often a sign that a connected socket was not `.end()`'d appropriately. -All io.js APIs will treat invalid arguments as exceptional -- that is, if passed +All Node.js APIs will treat invalid arguments as exceptional -- that is, if passed invalid arguments, they will *immediately* generate and throw the error as an exception, even if they are an otherwise asynchronous API. @@ -450,7 +450,7 @@ connection.pipe(process.stdout); ``` The "throw when no error handlers are attached behavior" is not limited to APIs -provided by io.js -- even user created event emitters and streams will throw +provided by Node.js -- even user created event emitters and streams will throw errors when no error handlers are attached. An example: ```javascript diff --git a/doc/api/events.markdown b/doc/api/events.markdown index e7470f37a..b34630169 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -4,7 +4,7 @@ -Many objects in io.js emit events: a `net.Server` emits an event each time +Many objects in Node.js emit events: a `net.Server` emits an event each time a peer connects to it, a `fs.readStream` emits an event when the file is opened. All objects which emit events are instances of `events.EventEmitter`. You can access this module by doing: `require("events");` @@ -28,7 +28,7 @@ var EventEmitter = require('events'); When an `EventEmitter` instance experiences an error, the typical action is to emit an `'error'` event. Error events are treated as a special case in -io.js. If there is no listener for it, then the default action is to print +Node.js. If there is no listener for it, then the default action is to print a stack trace and exit the program. All EventEmitters emit the event `'newListener'` when new listeners are diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index b9eca2f91..3b2c83f4a 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -72,7 +72,7 @@ site, set the NODE_DEBUG environment variable: } bad(); - $ env NODE_DEBUG=fs iojs script.js + $ env NODE_DEBUG=fs node script.js fs.js:66 throw err; ^ @@ -511,7 +511,7 @@ to `'utf8'`. Example: - fs.writeFile('message.txt', 'Hello io.js', function (err) { + fs.writeFile('message.txt', 'Hello Node.js', function (err) { if (err) throw err; console.log('It\'s saved!'); }); diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index 5b0ed2d3f..ab5a59289 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -13,8 +13,8 @@ actually in the global scope but in the module scope - this will be noted. In browsers, the top-level scope is the global scope. That means that in browsers if you're in the global scope `var something` will define a global -variable. In io.js this is different. The top-level scope is not the global -scope; `var something` inside an io.js module will be local to that module. +variable. In Node.js this is different. The top-level scope is not the global +scope; `var something` inside an Node.js module will be local to that module. ## process @@ -74,9 +74,9 @@ Process files with the extension `.sjs` as `.js`: require.extensions['.sjs'] = require.extensions['.js']; **Deprecated** In the past, this list has been used to load -non-JavaScript modules into io.js by compiling them on-demand. +non-JavaScript modules into Node.js by compiling them on-demand. However, in practice, there are much better ways to do this, such as -loading modules via some other io.js program, or compiling them to +loading modules via some other Node.js program, or compiling them to JavaScript ahead of time. Since the Module system is locked, this feature will probably never go @@ -94,7 +94,7 @@ of this code file. For a main program this is not necessarily the same filename used in the command line. The value inside a module is the path to that module file. -Example: running `iojs example.js` from `/Users/mjr` +Example: running `node example.js` from `/Users/mjr` console.log(__filename); // /Users/mjr/example.js @@ -109,7 +109,7 @@ Example: running `iojs example.js` from `/Users/mjr` The name of the directory that the currently executing script resides in. -Example: running `iojs example.js` from `/Users/mjr` +Example: running `node example.js` from `/Users/mjr` console.log(__dirname); // /Users/mjr diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 5cf3b07a9..f0051d0de 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -4,7 +4,7 @@ To use the HTTP server and client one must `require('http')`. -The HTTP interfaces in io.js are designed to support many features +The HTTP interfaces in Node.js are designed to support many features of the protocol which have been traditionally difficult to use. In particular, large, possibly chunk-encoded, messages. The interface is careful to never buffer entire requests or responses--the @@ -20,7 +20,7 @@ HTTP message headers are represented by an object like this: Keys are lowercased. Values are not modified. -In order to support the full spectrum of possible HTTP applications, io.js's +In order to support the full spectrum of possible HTTP applications, Node.js's HTTP API is very low-level. It deals with stream handling and message parsing only. It parses a message into headers and body but it does not parse the actual headers or the body. @@ -302,7 +302,7 @@ Note that Content-Length is given in bytes not characters. The above example works because the string `'hello world'` contains only single byte characters. If the body contains higher coded characters then `Buffer.byteLength()` should be used to determine the number of bytes in a given encoding. -And io.js does not check whether Content-Length and the length of the body +And Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. ### response.setTimeout(msecs, callback) @@ -412,7 +412,7 @@ higher-level multi-part body encodings that may be used. The first time `response.write()` is called, it will send the buffered header information and the first body to the client. The second time -`response.write()` is called, io.js assumes you're going to be streaming +`response.write()` is called, Node.js assumes you're going to be streaming data, and sends that separately. That is, the response is buffered up to the first chunk of body. @@ -454,7 +454,7 @@ is finished. ## http.request(options[, callback]) -io.js maintains several connections per server to make HTTP requests. +Node.js maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests. `options` can be an object or a string. If `options` is a string, it is @@ -541,7 +541,7 @@ on the returned request object. There are a few special headers that should be noted. -* Sending a 'Connection: keep-alive' will notify io.js that the connection to +* Sending a 'Connection: keep-alive' will notify Node.js that the connection to the server should be persisted until the next request. * Sending a 'Content-length' header will disable the default chunked encoding. @@ -556,7 +556,7 @@ There are a few special headers that should be noted. ## http.get(options[, callback]) -Since most requests are GET requests without bodies, io.js provides this +Since most requests are GET requests without bodies, Node.js provides this convenience method. The only difference between this method and `http.request()` is that it sets the method to GET and calls `req.end()` automatically. @@ -576,7 +576,7 @@ requests. The HTTP Agent also defaults client requests to using Connection:keep-alive. If no pending HTTP requests are waiting on a -socket to become free the socket is closed. This means that io.js's +socket to become free the socket is closed. This means that Node.js's pool has the benefit of keep-alive when under load but still does not require developers to manually close the HTTP clients using KeepAlive. @@ -585,7 +585,7 @@ If you opt into using HTTP KeepAlive, you can create an Agent object with that flag set to `true`. (See the [constructor options](#http_new_agent_options) below.) Then, the Agent will keep unused sockets in a pool for later use. They will be explicitly -marked so as to not keep the io.js process running. However, it is +marked so as to not keep the Node.js process running. However, it is still a good idea to explicitly [`destroy()`](#http_agent_destroy) KeepAlive agents when they are no longer in use, so that the Sockets will be shut down. @@ -717,7 +717,7 @@ Until the data is consumed, the `'end'` event will not fire. Also, until the data is read it will consume memory that can eventually lead to a 'process out of memory' error. -Note: io.js does not check whether Content-Length and the length of the body +Note: Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. The request implements the [Writable Stream][] interface. This is an @@ -766,7 +766,7 @@ A client server pair that show you how to listen for the `connect` event. var srvUrl = url.parse('http://' + req.url); var srvSocket = net.connect(srvUrl.port, srvUrl.hostname, function() { cltSocket.write('HTTP/1.1 200 Connection Established\r\n' + - 'Proxy-agent: io.js-Proxy\r\n' + + 'Proxy-agent: Node.js-Proxy\r\n' + '\r\n'); srvSocket.write(head); srvSocket.pipe(cltSocket); @@ -873,7 +873,7 @@ emitted on the first call to `abort()`. Flush the request headers. -For efficiency reasons, io.js normally buffers the request headers until you +For efficiency reasons, Node.js normally buffers the request headers until you call `request.end()` or write the first chunk of request data. It then tries hard to pack the request headers and data into a single TCP packet. @@ -1036,7 +1036,7 @@ Then `request.url` will be: If you would like to parse the URL into its parts, you can use `require('url').parse(request.url)`. Example: - iojs> require('url').parse('/status?name=ryan') + node> require('url').parse('/status?name=ryan') { href: '/status?name=ryan', search: '?name=ryan', query: 'name=ryan', @@ -1046,7 +1046,7 @@ If you would like to extract the params from the query string, you can use the `require('querystring').parse` function, or pass `true` as the second argument to `require('url').parse`. Example: - iojs> require('url').parse('/status?name=ryan', true) + node> require('url').parse('/status?name=ryan', true) { href: '/status?name=ryan', search: '?name=ryan', query: { name: 'ryan' }, diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 4a46760b0..05617e042 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -2,7 +2,7 @@ Stability: 2 - Stable -HTTPS is the HTTP protocol over TLS/SSL. In io.js this is implemented as a +HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module. ## Class: https.Server diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index a5b921705..0e107e8dc 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -4,7 +4,7 @@ -io.js has a simple module loading system. In io.js, files and modules are in +Node.js has a simple module loading system. In Node.js, files and modules are in one-to-one correspondence. As an example, `foo.js` loads the module `circle.js` in the same directory. @@ -100,7 +100,7 @@ provided to the `a.js` module. By the time `main.js` has loaded both modules, they're both finished. The output of this program would thus be: - $ iojs main.js + $ node main.js main starting a starting b starting @@ -117,10 +117,10 @@ plan accordingly. -io.js has several modules compiled into the binary. These modules are +Node.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation. -The core modules are defined in io.js's source in the `lib/` folder. +The core modules are defined in Node.js's source in the `lib/` folder. Core modules are always preferentially loaded if their identifier is passed to `require()`. For instance, `require('http')` will always @@ -130,7 +130,7 @@ return the built in HTTP module, even if there is a file by that name. -If the exact filename is not found, then io.js will attempt to load the +If the exact filename is not found, then Node.js will attempt to load the required filename with the added extension of `.js`, `.json`, and then `.node`. `.js` files are interpreted as JavaScript text files, and `.json` files are @@ -156,7 +156,7 @@ If the given path does not exist, `require()` will throw an Error with its If the module identifier passed to `require()` is not a native module, -and does not begin with `'/'`, `'../'`, or `'./'`, then io.js starts at the +and does not begin with `'/'`, `'../'`, or `'./'`, then Node.js starts at the parent directory of the current module, and adds `/node_modules`, and attempts to load the module from that location. @@ -164,7 +164,7 @@ If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached. For example, if the file at `'/home/ry/projects/foo.js'` called -`require('bar.js')`, then io.js would look in the following locations, in +`require('bar.js')`, then Node.js would look in the following locations, in this order: * `/home/ry/projects/node_modules/bar.js` @@ -201,9 +201,9 @@ If this was in a folder at `./some-library`, then `require('./some-library')` would attempt to load `./some-library/lib/some-library.js`. -This is the extent of io.js's awareness of package.json files. +This is the extent of Node.js's awareness of package.json files. -If there is no package.json file present in the directory, then io.js +If there is no package.json file present in the directory, then Node.js will attempt to load an `index.js` or `index.node` file out of that directory. For example, if there was no package.json file in the above example, then `require('./some-library')` would attempt to load: @@ -425,7 +425,7 @@ in pseudocode of what require.resolve does: If the `NODE_PATH` environment variable is set to a colon-delimited list -of absolute paths, then io.js will search those paths for modules if they +of absolute paths, then Node.js will search those paths for modules if they are not found elsewhere. (Note: On Windows, `NODE_PATH` is delimited by semicolons instead of colons.) @@ -441,13 +441,13 @@ when people are unaware that `NODE_PATH` must be set. Sometimes a module's dependencies change, causing a different version (or even a different module) to be loaded as the `NODE_PATH` is searched. -Additionally, io.js will search in the following locations: +Additionally, Node.js will search in the following locations: * 1: `$HOME/.node_modules` * 2: `$HOME/.node_libraries` * 3: `$PREFIX/lib/node` -Where `$HOME` is the user's home directory, and `$PREFIX` is io.js's +Where `$HOME` is the user's home directory, and `$PREFIX` is Node.js's configured `node_prefix`. These are mostly for historic reasons. **You are highly encouraged @@ -458,13 +458,13 @@ will be loaded faster, and more reliably. -When a file is run directly from io.js, `require.main` is set to its +When a file is run directly from Node.js, `require.main` is set to its `module`. That means that you can determine whether a file has been run directly by testing require.main === module -For a file `foo.js`, this will be `true` if run via `iojs foo.js`, but +For a file `foo.js`, this will be `true` if run via `node foo.js`, but `false` if run by `require('./foo')`. Because `module` provides a `filename` property (normally equivalent to @@ -475,10 +475,10 @@ by checking `require.main.filename`. -The semantics of io.js's `require()` function were designed to be general +The semantics of Node.js's `require()` function were designed to be general enough to support a number of sane directory structures. Package manager programs such as `dpkg`, `rpm`, and `npm` will hopefully find it possible to -build native packages from io.js modules without modification. +build native packages from Node.js modules without modification. Below we give a suggested directory structure that could work: @@ -491,7 +491,7 @@ may have to install a specific version of package `bar`. The `bar` package may itself have dependencies, and in some cases, these dependencies may even collide or form cycles. -Since io.js looks up the `realpath` of any modules it loads (that is, +Since Node.js looks up the `realpath` of any modules it loads (that is, resolves symlinks), and then looks for their dependencies in the `node_modules` folders as described above, this situation is very simple to resolve with the following architecture: @@ -516,10 +516,10 @@ the version that is symlinked into Furthermore, to make the module lookup process even more optimal, rather than putting packages directly in `/usr/lib/node`, we could put them in -`/usr/lib/node_modules//`. Then io.js will not bother +`/usr/lib/node_modules//`. Then Node.js will not bother looking for missing dependencies in `/usr/node_modules` or `/node_modules`. -In order to make modules available to the io.js REPL, it might be useful to +In order to make modules available to the Node.js REPL, it might be useful to also add the `/usr/lib/node_modules` folder to the `$NODE_PATH` environment variable. Since the module lookups using `node_modules` folders are all relative, and based on the real path of the files making the calls to diff --git a/doc/api/net.markdown b/doc/api/net.markdown index c4631bef1..9e2dec1cf 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -147,7 +147,7 @@ would be to wait a second and then try again. This can be done with } }); -(Note: All sockets in io.js set `SO_REUSEADDR` already) +(Note: All sockets in Node.js set `SO_REUSEADDR` already) ### server.listen(path[, callback]) @@ -324,7 +324,7 @@ following this event. See example in discussion of `server.listen`. This object is an abstraction of a TCP or local socket. `net.Socket` instances implement a duplex Stream interface. They can be created by the -user and used as a client (with `connect()`) or they can be created by io.js +user and used as a client (with `connect()`) or they can be created by Node.js and passed to the user through the `'connection'` event of a server. ### new net.Socket([options]) @@ -388,7 +388,7 @@ with options either as either `{port: port, host: host}` or `{path: path}`. `net.Socket` has the property that `socket.write()` always works. This is to help users get up and running quickly. The computer cannot always keep up with the amount of data that is written to a socket - the network connection -simply might be too slow. io.js will internally queue up the data written to a +simply might be too slow. Node.js will internally queue up the data written to a socket and send it out over the wire when it is possible. (Internally it is polling on the socket's file descriptor for being writable). diff --git a/doc/api/path.markdown b/doc/api/path.markdown index 08495a79e..0de988fb1 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -75,8 +75,8 @@ Examples: '/tmp/file' path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif') - // if currently in /home/myself/iojs, it returns - '/home/myself/iojs/wwwroot/static_files/gif/image.gif' + // if currently in /home/myself/node, it returns + '/home/myself/node/wwwroot/static_files/gif/image.gif' ## path.isAbsolute(path) @@ -196,11 +196,11 @@ An example on *nix: An example on Windows: console.log(process.env.PATH) - // 'C:\Windows\system32;C:\Windows;C:\Program Files\iojs\' + // 'C:\Windows\system32;C:\Windows;C:\Program Files\node\' process.env.PATH.split(path.delimiter) // returns - ['C:\\Windows\\system32', 'C:\\Windows', 'C:\\Program Files\\iojs\\'] + ['C:\\Windows\\system32', 'C:\\Windows', 'C:\\Program Files\\node\\'] ## path.parse(pathString) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index ebff3d649..62b6d7bb1 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -7,7 +7,7 @@ It is an instance of [EventEmitter][]. ## Exit Codes -io.js will normally exit with a `0` status code when no more async +Node.js will normally exit with a `0` status code when no more async operations are pending. The following status codes are used in other cases: @@ -16,13 +16,13 @@ cases: handler. * `2` - Unused (reserved by Bash for builtin misuse) * `3` **Internal JavaScript Parse Error** - The JavaScript source code - internal in io.js's bootstrapping process caused a parse error. This + internal in Node.js's bootstrapping process caused a parse error. This is extremely rare, and generally can only happen during development - of io.js itself. + of Node.js itself. * `4` **Internal JavaScript Evaluation Failure** - The JavaScript - source code internal in io.js's bootstrapping process failed to + source code internal in Node.js's bootstrapping process failed to return a function value when evaluated. This is extremely rare, and - generally can only happen during development of io.js itself. + generally can only happen during development of Node.js itself. * `5` **Fatal Error** - There was a fatal unrecoverable error in V8. Typically a message will be printed to stderr with the prefix `FATAL ERROR`. @@ -34,17 +34,17 @@ cases: function itself threw an error while attempting to handle it. This can happen, for example, if a `process.on('uncaughtException')` or `domain.on('error')` handler throws an error. -* `8` - Unused. In previous versions of io.js, exit code 8 sometimes +* `8` - Unused. In previous versions of Node.js, exit code 8 sometimes indicated an uncaught exception. * `9` - **Invalid Argument** - Either an unknown option was specified, or an option requiring a value was provided without a value. * `10` **Internal JavaScript Run-Time Failure** - The JavaScript - source code internal in io.js's bootstrapping process threw an error + source code internal in Node.js's bootstrapping process threw an error when the bootstrapping function was called. This is extremely rare, - and generally can only happen during development of io.js itself. + and generally can only happen during development of Node.js itself. * `12` **Invalid Debug Argument** - The `--debug` and/or `--debug-brk` options were set, but an invalid port number was chosen. -* `>128` **Signal Exits** - If io.js receives a fatal signal such as +* `>128` **Signal Exits** - If Node.js receives a fatal signal such as `SIGKILL` or `SIGHUP`, then its exit code will be `128` plus the value of the signal code. This is a standard Unix practice, since exit codes are defined to be 7-bit integers, and signal exits set @@ -72,9 +72,9 @@ Example of listening for `exit`: ## Event: 'beforeExit' -This event is emitted when io.js empties its event loop and has nothing else to -schedule. Normally, io.js exits when there is no work scheduled, but a listener -for 'beforeExit' can make asynchronous calls, and cause io.js to continue. +This event is emitted when Node.js empties its event loop and has nothing else to +schedule. Normally, Node.js exits when there is no work scheduled, but a listener +for 'beforeExit' can make asynchronous calls, and cause Node.js to continue. 'beforeExit' is not emitted for conditions causing explicit termination, such as `process.exit()` or uncaught exceptions, and should not be used as an @@ -107,8 +107,8 @@ handling. Don't use it, use [domains](domain.html) instead. If you do use it, restart your application after every unhandled exception! -Do *not* use it as the io.js equivalent of `On Error Resume Next`. An -unhandled exception means your application - and by extension io.js itself - +Do *not* use it as the Node.js equivalent of `On Error Resume Next`. An +unhandled exception means your application - and by extension Node.js itself - is in an undefined state. Blindly resuming means *anything* could happen. Think of resuming as pulling the power cord when you are upgrading your system. @@ -200,18 +200,18 @@ programs. Note: -- `SIGUSR1` is reserved by io.js to start the debugger. It's possible to +- `SIGUSR1` is reserved by Node.js to start the debugger. It's possible to install a listener but that won't stop the debugger from starting. - `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that resets the terminal mode before exiting with code `128 + signal number`. If one of these signals has a listener installed, its default behaviour will be removed - (io.js will no longer exit). + (Node.js will no longer exit). - `SIGPIPE` is ignored by default, it can have a listener installed. - `SIGHUP` is generated on Windows when the console window is closed, and on other platforms under various similar conditions, see signal(7). It can have a - listener installed, however io.js will be unconditionally terminated by + listener installed, however Node.js will be unconditionally terminated by Windows about 10 seconds later. On non-Windows platforms, the default - behaviour of `SIGHUP` is to terminate io.js, but once a listener has been + behaviour of `SIGHUP` is to terminate Node.js, but once a listener has been installed its default behaviour will be removed. - `SIGTERM` is not supported on Windows, it can be listened on. - `SIGINT` from the terminal is supported on all platforms, and can usually be @@ -223,10 +223,10 @@ Note: only happen on write to the console when the cursor is being moved, or when a readable tty is used in raw mode. - `SIGKILL` cannot have a listener installed, it will unconditionally terminate - io.js on all platforms. + Node.js on all platforms. - `SIGSTOP` cannot have a listener installed. -Note that Windows does not support sending Signals, but io.js offers some +Note that Windows does not support sending Signals, but Node.js offers some emulation with `process.kill()`, and `child_process.kill()`: - Sending signal `0` can be used to search for the existence of a process - Sending `SIGINT`, `SIGTERM`, and `SIGKILL` cause the unconditional exit of the @@ -242,7 +242,7 @@ For example, a `console.log` equivalent could look like this: process.stdout.write(msg + '\n'); }; -`process.stderr` and `process.stdout` are unlike other streams in io.js in +`process.stderr` and `process.stdout` are unlike other streams in Node.js in that they cannot be closed (`end()` will throw), they never emit the `finish` event and that writes are usually blocking. @@ -252,17 +252,17 @@ event and that writes are usually blocking. - They are blocking in Linux/Unix. - They are non-blocking like other streams in Windows. -To check if io.js is being run in a TTY context, read the `isTTY` property +To check if Node.js is being run in a TTY context, read the `isTTY` property on `process.stderr`, `process.stdout`, or `process.stdin`: - $ iojs -p "Boolean(process.stdin.isTTY)" + $ node -p "Boolean(process.stdin.isTTY)" true - $ echo "foo" | iojs -p "Boolean(process.stdin.isTTY)" + $ echo "foo" | node -p "Boolean(process.stdin.isTTY)" false - $ iojs -p "Boolean(process.stdout.isTTY)" + $ node -p "Boolean(process.stdout.isTTY)" true - $ iojs -p "Boolean(process.stdout.isTTY)" | cat + $ node -p "Boolean(process.stdout.isTTY)" | cat false See [the tty docs](tty.html#tty_tty) for more information. @@ -271,7 +271,7 @@ See [the tty docs](tty.html#tty_tty) for more information. A writable stream to stderr (on fd `2`). -`process.stderr` and `process.stdout` are unlike other streams in io.js in +`process.stderr` and `process.stdout` are unlike other streams in Node.js in that they cannot be closed (`end()` will throw), they never emit the `finish` event and that writes are usually blocking. @@ -316,7 +316,7 @@ mode over "old" one. ## process.argv An array containing the command line arguments. The first element will be -'iojs', the second element will be the name of the JavaScript file. The +'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments. // print process.argv @@ -326,9 +326,9 @@ next elements will be any additional command line arguments. This will generate: - $ iojs process-2.js one two=three four - 0: iojs - 1: /Users/mjr/work/iojs/process-2.js + $ node process-2.js one two=three four + 0: node + 1: /Users/mjr/work/node/process-2.js 2: one 3: two=three 4: four @@ -340,21 +340,21 @@ This is the absolute pathname of the executable that started the process. Example: - /usr/local/bin/iojs + /usr/local/bin/node ## process.execArgv -This is the set of io.js-specific command line options from the +This is the set of Node.js-specific command line options from the executable that started the process. These options do not show up in -`process.argv`, and do not include the io.js executable, the name of +`process.argv`, and do not include the Node.js executable, the name of the script, or any options following the script name. These options are useful in order to spawn child processes with the same execution environment as the parent. Example: - $ iojs --harmony script.js --version + $ node --harmony script.js --version results in process.execArgv: @@ -362,12 +362,12 @@ results in process.execArgv: and process.argv: - ['/usr/local/bin/iojs', 'script.js', '--version'] + ['/usr/local/bin/node', 'script.js', '--version'] ## process.abort() -This causes io.js to emit an abort. This will cause io.js to exit and +This causes Node.js to emit an abort. This will cause Node.js to exit and generate a core file. ## process.chdir(directory) @@ -407,12 +407,12 @@ An example of this object looks like: SHLVL: '1', HOME: '/Users/maciej', LOGNAME: 'maciej', - _: '/usr/local/bin/iojs' } + _: '/usr/local/bin/node' } You can write to this object, but changes won't be reflected outside of your process. That means that the following won't work: - $ iojs -e 'process.env.foo = "bar"' && echo $foo + $ node -e 'process.env.foo = "bar"' && echo $foo But this will: @@ -429,7 +429,7 @@ To exit with a 'failure' code: process.exit(1); -The shell that executed io.js should see the exit code as 1. +The shell that executed Node.js should see the exit code as 1. ## process.exitCode @@ -584,7 +584,7 @@ Note: this function is only available on POSIX platforms (i.e. not Windows, Android) Returns an array with the supplementary group IDs. POSIX leaves it unspecified -if the effective group ID is included but io.js ensures it always is. +if the effective group ID is included but Node.js ensures it always is. ## process.setgroups(groups) @@ -626,7 +626,7 @@ A compiled-in property that exposes `NODE_VERSION`. ## process.versions -A property exposing version strings of io.js and its dependencies. +A property exposing version strings of Node.js and its dependencies. console.log(process.versions); @@ -644,7 +644,7 @@ Will print something like: ## process.config An Object containing the JavaScript representation of the configure options -that were used to compile the current io.js executable. This is the same as +that were used to compile the current Node.js executable. This is the same as the "config.gypi" file that was produced when running the `./configure` script. An example of the possible output looks like: @@ -697,7 +697,7 @@ Example of sending a signal to yourself: process.kill(process.pid, 'SIGHUP'); -Note: When SIGUSR1 is received by io.js it starts the debugger, see +Note: When SIGUSR1 is received by Node.js it starts the debugger, see [Signal Events](#process_signal_events). ## process.pid @@ -739,7 +739,7 @@ What platform you're running on: ## process.memoryUsage() -Returns an object describing the memory usage of the io.js process +Returns an object describing the memory usage of the Node.js process measured in bytes. var util = require('util'); @@ -846,7 +846,7 @@ given, otherwise returns the current mask. ## process.uptime() -Number of seconds io.js has been running. +Number of seconds Node.js has been running. ## process.hrtime() diff --git a/doc/api/punycode.markdown b/doc/api/punycode.markdown index f633e3ccd..2f4a9f723 100644 --- a/doc/api/punycode.markdown +++ b/doc/api/punycode.markdown @@ -4,7 +4,7 @@ [Punycode.js](https://mths.be/punycode) is bundled with io.js v1.0.0+ and Node.js v0.6.2+. Use `require('punycode')` to access it. (To use it with -other io.js versions, use npm to install the `punycode` module first.) +other Node.js versions, use npm to install the `punycode` module first.) ## punycode.decode(string) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index 6f9675a11..b556f00c3 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -5,7 +5,7 @@ To use this module, do `require('readline')`. Readline allows reading of a stream (such as `process.stdin`) on a line-by-line basis. -Note that once you've invoked this module, your io.js program will not +Note that once you've invoked this module, your Node.js program will not terminate until you've closed the interface. Here's how to allow your program to gracefully exit: @@ -16,7 +16,7 @@ program to gracefully exit: output: process.stdout }); - rl.question("What do you think of io.js? ", function(answer) { + rl.question("What do you think of Node.js? ", function(answer) { // TODO: Log the answer in a database console.log("Thank you for your valuable feedback:", answer); @@ -90,8 +90,8 @@ stream. ### rl.setPrompt(prompt) -Sets the prompt, for example when you run `iojs` on the command line, you see -`> `, which is io.js's prompt. +Sets the prompt, for example when you run `node` on the command line, you see +`> `, which is Node.js's prompt. ### rl.prompt([preserveCursor]) diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 99cef9fcc..d02ad9322 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -7,10 +7,10 @@ easily includable in other programs. The REPL provides a way to interactively run JavaScript and see the results. It can be used for debugging, testing, or just trying things out. -By executing `iojs` without any arguments from the command-line you will be +By executing `node` without any arguments from the command-line you will be dropped into the REPL. It has simplistic emacs line-editing. - mjr:~$ iojs + mjr:~$ node Type '.help' for options. > a = [ 1, 2, 3]; [ 1, 2, 3 ] @@ -21,20 +21,20 @@ dropped into the REPL. It has simplistic emacs line-editing. 2 3 -For advanced line-editors, start io.js with the environmental variable +For advanced line-editors, start Node.js with the environmental variable `NODE_NO_READLINE=1`. This will start the main and debugger REPL in canonical terminal settings which will allow you to use with `rlwrap`. For example, you could add this to your bashrc file: - alias iojs="env NODE_NO_READLINE=1 rlwrap iojs" + alias node="env NODE_NO_READLINE=1 rlwrap node" -The built-in repl (invoked by running `iojs` or `iojs -i`) may be controlled +The built-in repl (invoked by running `node` or `node -i`) may be controlled via the following environment variables: - `NODE_REPL_HISTORY_FILE` - if given, must be a path to a user-writable, user-readable file. When a valid path is given, persistent history support - is enabled: REPL history will persist across `iojs` repl sessions. + is enabled: REPL history will persist across `node` repl sessions. - `NODE_REPL_HISTORY_SIZE` - defaults to `1000`. In conjunction with `NODE_REPL_HISTORY_FILE`, controls how many lines of history will be persisted. Must be a positive number. @@ -93,7 +93,7 @@ You can use your own `eval` function if it has following signature: On tab completion - `eval` will be called with `.scope` as an input string. It is expected to return an array of scope names to be used for the auto-completion. -Multiple REPLs may be started against the same running instance of io.js. Each +Multiple REPLs may be started against the same running instance of Node.js. Each will share the same global object but will have unique I/O. Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: @@ -104,7 +104,7 @@ Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: connections = 0; repl.start({ - prompt: "io.js via stdin> ", + prompt: "Node.js via stdin> ", input: process.stdin, output: process.stdout }); @@ -112,18 +112,18 @@ Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: net.createServer(function (socket) { connections += 1; repl.start({ - prompt: "io.js via Unix socket> ", + prompt: "Node.js via Unix socket> ", input: socket, output: socket }).on('exit', function() { socket.end(); }) - }).listen("/tmp/iojs-repl-sock"); + }).listen("/tmp/node-repl-sock"); net.createServer(function (socket) { connections += 1; repl.start({ - prompt: "io.js via TCP socket> ", + prompt: "Node.js via TCP socket> ", input: socket, output: socket }).on('exit', function() { @@ -137,7 +137,7 @@ for connecting to TCP sockets, and `socat` can be used to connect to both Unix a TCP sockets. By starting a REPL from a Unix socket-based server instead of stdin, you can -connect to a long-running io.js process without restarting it. +connect to a long-running Node.js process without restarting it. For an example of running a "full-featured" (`terminal`) REPL over a `net.Server` and `net.Socket` instance, see: https://gist.github.com/2209310 @@ -213,7 +213,7 @@ associated with each `REPLServer`. For example: Things in the `context` object appear as local within the REPL: - mjr:~$ iojs repl_test.js + mjr:~$ node repl_test.js > m 'message' diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 12f99078a..f14ac752e 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -3,7 +3,7 @@ Stability: 2 - Stable A stream is an abstract interface implemented by various objects in -io.js. For example a [request to an HTTP +Node.js. For example a [request to an HTTP server](http.html#http_http_incomingmessage) is a stream, as is [stdout][]. Streams are readable, writable, or both. All streams are instances of [EventEmitter][] @@ -47,8 +47,8 @@ streams in your programs. If you **are** implementing streaming interfaces in your own program, please also refer to [API for Stream Implementors][] below. -Almost all io.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an io.js program: +Almost all Node.js programs, no matter how simple, use Streams in some +way. Here is an example of using Streams in an Node.js program: ```javascript var http = require('http'); @@ -461,13 +461,13 @@ Versions of Node.js prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.) -If you are using an older io.js library that emits `'data'` events and +If you are using an older Node.js library that emits `'data'` events and has a [`pause()`][] method that is advisory only, then you can use the `wrap()` method to create a [Readable][] stream that uses the old stream as its data source. You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old io.js programs and libraries. +as a convenience for interacting with old Node.js programs and libraries. For example: @@ -1235,7 +1235,7 @@ simply by using the higher level [Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol v1` examples above. In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic io.js stream +would be piped into the parser, which is a more idiomatic Node.js stream approach. ```javascript @@ -1425,7 +1425,7 @@ stream is not currently reading, then calling `read(0)` will trigger a low-level `_read` call. There is almost never a need to do this. However, you will see some -cases in io.js's internals where this is done, particularly in the +cases in Node.js's internals where this is done, particularly in the Readable stream class internals. ### `stream.push('')` @@ -1539,7 +1539,7 @@ return value from `stream.read()` indicates that there is no more data, and [`stream.push(null)`][] will signal the end of stream data (`EOF`). -No streams in io.js core are object mode streams. This pattern is only +No streams in Node.js core are object mode streams. This pattern is only used by userland streaming libraries. You should set `objectMode` in your stream child class constructor on diff --git a/doc/api/synopsis.markdown b/doc/api/synopsis.markdown index 10f4f0213..a69273f78 100644 --- a/doc/api/synopsis.markdown +++ b/doc/api/synopsis.markdown @@ -2,7 +2,7 @@ -An example of a [web server](http.html) written with io.js which responds with +An example of a [web server](http.html) written with Node.js which responds with 'Hello World': var http = require('http'); @@ -15,9 +15,9 @@ An example of a [web server](http.html) written with io.js which responds with console.log('Server running at http://127.0.0.1:8124/'); To run the server, put the code into a file called `example.js` and execute -it with the iojs program +it with the node program - > iojs example.js + > node example.js Server running at http://127.0.0.1:8124/ All of the examples in the documentation can be run similarly. diff --git a/doc/api/timers.markdown b/doc/api/timers.markdown index 7df72641c..fd788cd58 100644 --- a/doc/api/timers.markdown +++ b/doc/api/timers.markdown @@ -12,7 +12,7 @@ To schedule execution of a one-time `callback` after `delay` milliseconds. Retur also pass arguments to the callback. It is important to note that your callback will probably not be called in exactly -`delay` milliseconds - io.js makes no guarantees about the exact timing of when +`delay` milliseconds - Node.js makes no guarantees about the exact timing of when the callback will fire, nor of the ordering things will fire in. The callback will be called as close as possible to the time specified. diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index a00b27dab..15a778020 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -460,7 +460,7 @@ dictionary with keys: instead of the client preferences. For further details see `tls` module documentation. -If no 'ca' details are given, then io.js will use the default +If no 'ca' details are given, then Node.js will use the default publicly trusted list of CAs as given in . @@ -711,14 +711,14 @@ Example: { C: 'UK', ST: 'Acknack Ltd', L: 'Rhys Jones', - O: 'io.js', + O: 'Node.js', OU: 'Test TLS Certificate', CN: 'localhost' }, issuerInfo: { C: 'UK', ST: 'Acknack Ltd', L: 'Rhys Jones', - O: 'io.js', + O: 'Node.js', OU: 'Test TLS Certificate', CN: 'localhost' }, issuer: diff --git a/doc/api/tty.markdown b/doc/api/tty.markdown index 60012f306..928d814d9 100644 --- a/doc/api/tty.markdown +++ b/doc/api/tty.markdown @@ -5,14 +5,14 @@ The `tty` module houses the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, you will not need to use this module directly. -When io.js detects that it is being run inside a TTY context, then `process.stdin` +When Node.js detects that it is being run inside a TTY context, then `process.stdin` will be a `tty.ReadStream` instance and `process.stdout` will be -a `tty.WriteStream` instance. The preferred way to check if io.js is being run +a `tty.WriteStream` instance. The preferred way to check if Node.js is being run in a TTY context is to check `process.stdout.isTTY`: - $ iojs -p -e "Boolean(process.stdout.isTTY)" + $ node -p -e "Boolean(process.stdout.isTTY)" true - $ iojs -p -e "Boolean(process.stdout.isTTY)" | cat + $ node -p -e "Boolean(process.stdout.isTTY)" | cat false @@ -32,7 +32,7 @@ Deprecated. Use `tty.ReadStream#setRawMode()` A `net.Socket` subclass that represents the readable portion of a tty. In normal circumstances, `process.stdin` will be the only `tty.ReadStream` instance in any -io.js program (only when `isatty(0)` is true). +Node.js program (only when `isatty(0)` is true). ### rs.isRaw diff --git a/doc/api/util.markdown b/doc/api/util.markdown index 8ac158269..bc5a5e1a5 100644 --- a/doc/api/util.markdown +++ b/doc/api/util.markdown @@ -5,12 +5,12 @@ These functions are in the module `'util'`. Use `require('util')` to access them. -The `util` module is primarily designed to support the needs of io.js's +The `util` module is primarily designed to support the needs of Node.js's internal APIs. Many of these utilities are useful for your own programs. If you find that these functions are lacking for your purposes, however, you are encouraged to write your own utilities. We are not interested in any future additions to the `util` module that -are unnecessary for io.js's internal functionality. +are unnecessary for Node.js's internal functionality. ## util.debuglog(section) diff --git a/doc/api/v8.markdown b/doc/api/v8.markdown index cedd5c86d..3f01ce665 100644 --- a/doc/api/v8.markdown +++ b/doc/api/v8.markdown @@ -3,7 +3,7 @@ Stability: 2 - Stable This module exposes events and interfaces specific to the version of [V8][] -built with io.js. These interfaces are subject to change by upstream and are +built with Node.js. These interfaces are subject to change by upstream and are therefore not covered under the stability index. ## getHeapStatistics() @@ -26,8 +26,8 @@ Set additional V8 command line flags. Use with care; changing settings after the VM has started may result in unpredictable behavior, including crashes and data loss. Or it may simply do nothing. -The V8 options available for a version of io.js may be determined by running -`iojs --v8-options`. An unofficial, community-maintained list of options +The V8 options available for a version of Node.js may be determined by running +`node --v8-options`. An unofficial, community-maintained list of options and their effects is available [here](https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md). diff --git a/doc/api/zlib.markdown b/doc/api/zlib.markdown index a9ceb314e..93a155808 100644 --- a/doc/api/zlib.markdown +++ b/doc/api/zlib.markdown @@ -260,7 +260,7 @@ See the description of `deflateInit2` and `inflateInit2` at -From `zlib/zconf.h`, modified to io.js's usage: +From `zlib/zconf.h`, modified to Node.js's usage: The memory requirements for deflate are (in bytes): @@ -291,7 +291,7 @@ The speed of zlib compression is affected most dramatically by the will take longer to complete. A lower level will result in less compression, but will be much faster. -In general, greater memory usage options will mean that io.js has to make +In general, greater memory usage options will mean that Node.js has to make fewer calls to zlib, since it'll be able to process more data in a single `write` operation. So, this is another factor that affects the speed, at the cost of memory usage. diff --git a/doc/node.1 b/doc/node.1 new file mode 100644 index 000000000..addc2d8c3 --- /dev/null +++ b/doc/node.1 @@ -0,0 +1,731 @@ +.TH NODE.JS "1" "2010" "" "" + + +.SH "NAME" +node \- Server-side JavaScript + +.SH SYNOPSIS + + +.B node +[ +.B \-v +] +[ +.B \-\-debug +| +.B \-\-debug-brk +] +[ +.B \-\-v8-options +] +.br + [ +.B \-e +.I command +| +.I script.js +] +[ +.I arguments +] + +Execute without arguments to start the REPL. + + +.SH DESCRIPTION + +Node.js is a set of libraries for javascript which allows +it to be used outside of the browser. It is primarily +focused on creating simple, easy to build network clients +and servers. + + +.SH OPTIONS + + -v, --version print node's version + + -e, --eval script evaluate script + + -p, --print print result of --eval + + -i, --interactive always enter the REPL even if stdin + does not appear to be a terminal + + -r, --require module to preload at startup + + --no-deprecation silence deprecation warnings + + --trace-deprecation show stack traces on deprecations + + --throw-deprecation throw errors on deprecations + + --v8-options print v8 command line options + + +.SH ENVIRONMENT VARIABLES + +.IP NODE_PATH +\':\'\-separated list of directories prefixed to the module search path. + +.IP NODE_DISABLE_COLORS +If set to 1 then colors will not be used in the REPL. + +.SH V8 OPTIONS + + --use_strict (enforce strict mode) + type: bool default: false + --es_staging (enable all completed harmony features) + type: bool default: false + --harmony (enable all completed harmony features) + type: bool default: false + --harmony_shipping (enable all shipped harmony features) + type: bool default: true + --harmony_modules (enable "harmony modules (implies block scoping)" (in progress)) + type: bool default: false + --harmony_arrays (enable "harmony array methods" (in progress)) + type: bool default: false + --harmony_array_includes (enable "harmony Array.prototype.includes" (in progress)) + type: bool default: false + --harmony_regexps (enable "harmony regular expression extensions" (in progress)) + type: bool default: false + --harmony_arrow_functions (enable "harmony arrow functions" (in progress)) + type: bool default: false + --harmony_proxies (enable "harmony proxies" (in progress)) + type: bool default: false + --harmony_sloppy (enable "harmony features in sloppy mode" (in progress)) + type: bool default: false + --harmony_unicode (enable "harmony unicode escapes" (in progress)) + type: bool default: false + --harmony_tostring (enable "harmony toString") + type: bool default: false + --harmony_numeric_literals (enable "harmony numeric literals") + type: bool default: true + --harmony_strings (enable "harmony string methods") + type: bool default: true + --harmony_scoping (enable "harmony block scoping") + type: bool default: true + --harmony_classes (enable "harmony classes (implies block scoping & object literal extension)") + type: bool default: true + --harmony_object_literals (enable "harmony object literal extensions") + type: bool default: true + --harmony_templates (enable "harmony template literals") + type: bool default: true + --compiled_keyed_generic_loads (use optimizing compiler to generate keyed generic load stubs) + type: bool default: false + --pretenuring_call_new (pretenure call new) + type: bool default: false + --allocation_site_pretenuring (pretenure with allocation sites) + type: bool default: true + --trace_pretenuring (trace pretenuring decisions of HAllocate instructions) + type: bool default: false + --trace_pretenuring_statistics (trace allocation site pretenuring statistics) + type: bool default: false + --track_fields (track fields with only smi values) + type: bool default: true + --track_double_fields (track fields with double values) + type: bool default: true + --track_heap_object_fields (track fields with heap values) + type: bool default: true + --track_computed_fields (track computed boilerplate fields) + type: bool default: true + --track_field_types (track field types) + type: bool default: true + --smi_binop (support smi representation in binary operations) + type: bool default: true + --vector_ics (support vector-based ics) + type: bool default: false + --optimize_for_size (Enables optimizations which favor memory size over execution speed.) + type: bool default: false + --unbox_double_arrays (automatically unbox arrays of doubles) + type: bool default: true + --string_slices (use string slices) + type: bool default: true + --crankshaft (use crankshaft) + type: bool default: true + --hydrogen_filter (optimization filter) + type: string default: * + --use_gvn (use hydrogen global value numbering) + type: bool default: true + --gvn_iterations (maximum number of GVN fix-point iterations) + type: int default: 3 + --use_canonicalizing (use hydrogen instruction canonicalizing) + type: bool default: true + --use_inlining (use function inlining) + type: bool default: true + --use_escape_analysis (use hydrogen escape analysis) + type: bool default: true + --use_allocation_folding (use allocation folding) + type: bool default: true + --use_local_allocation_folding (only fold in basic blocks) + type: bool default: false + --use_write_barrier_elimination (eliminate write barriers targeting allocations in optimized code) + type: bool default: true + --max_inlining_levels (maximum number of inlining levels) + type: int default: 5 + --max_inlined_source_size (maximum source size in bytes considered for a single inlining) + type: int default: 600 + --max_inlined_nodes (maximum number of AST nodes considered for a single inlining) + type: int default: 196 + --max_inlined_nodes_cumulative (maximum cumulative number of AST nodes considered for inlining) + type: int default: 400 + --loop_invariant_code_motion (loop invariant code motion) + type: bool default: true + --fast_math (faster (but maybe less accurate) math functions) + type: bool default: true + --collect_megamorphic_maps_from_stub_cache (crankshaft harvests type feedback from stub cache) + type: bool default: true + --hydrogen_stats (print statistics for hydrogen) + type: bool default: false + --trace_check_elimination (trace check elimination phase) + type: bool default: false + --trace_hydrogen (trace generated hydrogen to file) + type: bool default: false + --trace_hydrogen_filter (hydrogen tracing filter) + type: string default: * + --trace_hydrogen_stubs (trace generated hydrogen for stubs) + type: bool default: false + --trace_hydrogen_file (trace hydrogen to given file name) + type: string default: NULL + --trace_phase (trace generated IR for specified phases) + type: string default: HLZ + --trace_inlining (trace inlining decisions) + type: bool default: false + --trace_load_elimination (trace load elimination) + type: bool default: false + --trace_store_elimination (trace store elimination) + type: bool default: false + --trace_alloc (trace register allocator) + type: bool default: false + --trace_all_uses (trace all use positions) + type: bool default: false + --trace_range (trace range analysis) + type: bool default: false + --trace_gvn (trace global value numbering) + type: bool default: false + --trace_representation (trace representation types) + type: bool default: false + --trace_removable_simulates (trace removable simulates) + type: bool default: false + --trace_escape_analysis (trace hydrogen escape analysis) + type: bool default: false + --trace_allocation_folding (trace allocation folding) + type: bool default: false + --trace_track_allocation_sites (trace the tracking of allocation sites) + type: bool default: false + --trace_migration (trace object migration) + type: bool default: false + --trace_generalization (trace map generalization) + type: bool default: false + --stress_pointer_maps (pointer map for every instruction) + type: bool default: false + --stress_environments (environment for every instruction) + type: bool default: false + --deopt_every_n_times (deoptimize every n times a deopt point is passed) + type: int default: 0 + --deopt_every_n_garbage_collections (deoptimize every n garbage collections) + type: int default: 0 + --print_deopt_stress (print number of possible deopt points) + type: bool default: false + --trap_on_deopt (put a break point before deoptimizing) + type: bool default: false + --trap_on_stub_deopt (put a break point before deoptimizing a stub) + type: bool default: false + --deoptimize_uncommon_cases (deoptimize uncommon cases) + type: bool default: true + --polymorphic_inlining (polymorphic inlining) + type: bool default: true + --use_osr (use on-stack replacement) + type: bool default: true + --array_bounds_checks_elimination (perform array bounds checks elimination) + type: bool default: true + --trace_bce (trace array bounds check elimination) + type: bool default: false + --array_bounds_checks_hoisting (perform array bounds checks hoisting) + type: bool default: false + --array_index_dehoisting (perform array index dehoisting) + type: bool default: true + --analyze_environment_liveness (analyze liveness of environment slots and zap dead values) + type: bool default: true + --load_elimination (use load elimination) + type: bool default: true + --check_elimination (use check elimination) + type: bool default: true + --store_elimination (use store elimination) + type: bool default: false + --dead_code_elimination (use dead code elimination) + type: bool default: true + --fold_constants (use constant folding) + type: bool default: true + --trace_dead_code_elimination (trace dead code elimination) + type: bool default: false + --unreachable_code_elimination (eliminate unreachable code) + type: bool default: true + --trace_osr (trace on-stack replacement) + type: bool default: false + --stress_runs (number of stress runs) + type: int default: 0 + --lookup_sample_by_shared (when picking a function to optimize, watch for shared function info, not JSFunction itself) + type: bool default: true + --cache_optimized_code (cache optimized code for closures) + type: bool default: true + --flush_optimized_code_cache (flushes the cache of optimized code for closures on every GC) + type: bool default: true + --inline_construct (inline constructor calls) + type: bool default: true + --inline_arguments (inline functions with arguments object) + type: bool default: true + --inline_accessors (inline JavaScript accessors) + type: bool default: true + --escape_analysis_iterations (maximum number of escape analysis fix-point iterations) + type: int default: 2 + --optimize_for_in (optimize functions containing for-in loops) + type: bool default: true + --concurrent_recompilation (optimizing hot functions asynchronously on a separate thread) + type: bool default: true + --job_based_recompilation (post tasks to v8::Platform instead of using a thread for concurrent recompilation) + type: bool default: false + --trace_concurrent_recompilation (track concurrent recompilation) + type: bool default: false + --concurrent_recompilation_queue_length (the length of the concurrent compilation queue) + type: int default: 8 + --concurrent_recompilation_delay (artificial compilation delay in ms) + type: int default: 0 + --block_concurrent_recompilation (block queued jobs until released) + type: bool default: false + --concurrent_osr (concurrent on-stack replacement) + type: bool default: true + --omit_map_checks_for_leaf_maps (do not emit check maps for constant values that have a leaf map, deoptimize the optimized code if the layout of the maps changes.) + type: bool default: true + --turbo_filter (optimization filter for TurboFan compiler) + type: string default: ~ + --trace_turbo (trace generated TurboFan IR) + type: bool default: false + --trace_turbo_graph (trace generated TurboFan graphs) + type: bool default: false + --trace_turbo_cfg_file (trace turbo cfg graph (for C1 visualizer) to a given file name) + type: string default: NULL + --trace_turbo_types (trace TurboFan's types) + type: bool default: true + --trace_turbo_scheduler (trace TurboFan's scheduler) + type: bool default: false + --trace_turbo_reduction (trace TurboFan's various reducers) + type: bool default: false + --trace_turbo_jt (trace TurboFan's jump threading) + type: bool default: false + --turbo_asm (enable TurboFan for asm.js code) + type: bool default: true + --turbo_verify (verify TurboFan graphs at each phase) + type: bool default: false + --turbo_stats (print TurboFan statistics) + type: bool default: false + --turbo_types (use typed lowering in TurboFan) + type: bool default: true + --turbo_source_positions (track source code positions when building TurboFan IR) + type: bool default: false + --context_specialization (enable context specialization in TurboFan) + type: bool default: false + --turbo_deoptimization (enable deoptimization in TurboFan) + type: bool default: false + --turbo_inlining (enable inlining in TurboFan) + type: bool default: false + --turbo_inlining_intrinsics (enable inlining of intrinsics in TurboFan) + type: bool default: false + --trace_turbo_inlining (trace TurboFan inlining) + type: bool default: false + --loop_assignment_analysis (perform loop assignment analysis) + type: bool default: true + --turbo_profiling (enable profiling in TurboFan) + type: bool default: false + --turbo_reuse_spill_slots (reuse spill slots in TurboFan) + type: bool default: true + --turbo_delay_ssa_decon (delay ssa deconstruction in TurboFan register allocator) + type: bool default: false + --turbo_move_optimization (optimize gap moves in TurboFan) + type: bool default: true + --turbo_jt (enable jump threading) + type: bool default: true + --typed_array_max_size_in_heap (threshold for in-heap typed array) + type: int default: 64 + --frame_count (number of stack frames inspected by the profiler) + type: int default: 1 + --interrupt_budget (execution budget before interrupt is triggered) + type: int default: 6144 + --type_info_threshold (percentage of ICs that must have type info to allow optimization) + type: int default: 25 + --generic_ic_threshold (max percentage of megamorphic/generic ICs to allow optimization) + type: int default: 30 + --self_opt_count (call count before self-optimization) + type: int default: 130 + --trace_opt_verbose (extra verbose compilation tracing) + type: bool default: false + --debug_code (generate extra code (assertions) for debugging) + type: bool default: false + --code_comments (emit comments in code disassembly) + type: bool default: false + --enable_sse3 (enable use of SSE3 instructions if available) + type: bool default: true + --enable_sse4_1 (enable use of SSE4.1 instructions if available) + type: bool default: true + --enable_sahf (enable use of SAHF instruction if available (X64 only)) + type: bool default: true + --enable_avx (enable use of AVX instructions if available) + type: bool default: true + --enable_fma3 (enable use of FMA3 instructions if available) + type: bool default: true + --enable_vfp3 (enable use of VFP3 instructions if available) + type: bool default: true + --enable_armv7 (enable use of ARMv7 instructions if available (ARM only)) + type: bool default: true + --enable_armv8 (enable use of ARMv8 instructions if available (ARM 32-bit only)) + type: bool default: true + --enable_neon (enable use of NEON instructions if available (ARM only)) + type: bool default: true + --enable_sudiv (enable use of SDIV and UDIV instructions if available (ARM only)) + type: bool default: true + --enable_mls (enable use of MLS instructions if available (ARM only)) + type: bool default: true + --enable_movw_movt (enable loading 32-bit constant by means of movw/movt instruction pairs (ARM only)) + type: bool default: false + --enable_unaligned_accesses (enable unaligned accesses for ARMv7 (ARM only)) + type: bool default: true + --enable_32dregs (enable use of d16-d31 registers on ARM - this requires VFP3) + type: bool default: true + --enable_vldr_imm (enable use of constant pools for double immediate (ARM only)) + type: bool default: false + --force_long_branches (force all emitted branches to be in long mode (MIPS only)) + type: bool default: false + --expose_natives_as (expose natives in global object) + type: string default: NULL + --expose_debug_as (expose debug in global object) + type: string default: NULL + --expose_free_buffer (expose freeBuffer extension) + type: bool default: false + --expose_gc (expose gc extension) + type: bool default: false + --expose_gc_as (expose gc extension under the specified name) + type: string default: NULL + --expose_externalize_string (expose externalize string extension) + type: bool default: false + --expose_trigger_failure (expose trigger-failure extension) + type: bool default: false + --stack_trace_limit (number of stack frames to capture) + type: int default: 10 + --builtins_in_stack_traces (show built-in functions in stack traces) + type: bool default: false + --disable_native_files (disable builtin natives files) + type: bool default: false + --inline_new (use fast inline allocation) + type: bool default: true + --trace_codegen (print name of functions for which code is generated) + type: bool default: false + --trace (trace function calls) + type: bool default: false + --mask_constants_with_cookie (use random jit cookie to mask large constants) + type: bool default: true + --lazy (use lazy compilation) + type: bool default: true + --trace_opt (trace lazy optimization) + type: bool default: false + --trace_opt_stats (trace lazy optimization statistics) + type: bool default: false + --opt (use adaptive optimizations) + type: bool default: true + --always_opt (always try to optimize functions) + type: bool default: false + --always_osr (always try to OSR functions) + type: bool default: false + --prepare_always_opt (prepare for turning on always opt) + type: bool default: false + --trace_deopt (trace optimize function deoptimization) + type: bool default: false + --trace_stub_failures (trace deoptimization of generated code stubs) + type: bool default: false + --serialize_toplevel (enable caching of toplevel scripts) + type: bool default: true + --serialize_inner (enable caching of inner functions) + type: bool default: false + --trace_serializer (print code serializer trace) + type: bool default: false + --min_preparse_length (minimum length for automatic enable preparsing) + type: int default: 1024 + --max_opt_count (maximum number of optimization attempts before giving up.) + type: int default: 10 + --compilation_cache (enable compilation cache) + type: bool default: true + --cache_prototype_transitions (cache prototype transitions) + type: bool default: true + --cpu_profiler_sampling_interval (CPU profiler sampling interval in microseconds) + type: int default: 1000 + --trace_debug_json (trace debugging JSON request/response) + type: bool default: false + --trace_js_array_abuse (trace out-of-bounds accesses to JS arrays) + type: bool default: false + --trace_external_array_abuse (trace out-of-bounds-accesses to external arrays) + type: bool default: false + --trace_array_abuse (trace out-of-bounds accesses to all arrays) + type: bool default: false + --enable_liveedit (enable liveedit experimental feature) + type: bool default: true + --hard_abort (abort by crashing) + type: bool default: true + --stack_size (default size of stack region v8 is allowed to use (in kBytes)) + type: int default: 984 + --max_stack_trace_source_length (maximum length of function source code printed in a stack trace.) + type: int default: 300 + --always_inline_smi_code (always inline smi code in non-opt code) + type: bool default: false + --min_semi_space_size (min size of a semi-space (in MBytes), the new space consists of twosemi-spaces) + type: int default: 0 + --target_semi_space_size (target size of a semi-space (in MBytes) before triggering a GC) + type: int default: 0 + --max_semi_space_size (max size of a semi-space (in MBytes), the new space consists of twosemi-spaces) + type: int default: 0 + --semi_space_growth_factor (factor by which to grow the new space) + type: int default: 2 + --experimental_new_space_growth_heuristic (Grow the new space based on the percentage of survivors instead of their absolute value.) + type: bool default: false + --max_old_space_size (max size of the old space (in Mbytes)) + type: int default: 0 + --initial_old_space_size (initial old space size (in Mbytes)) + type: int default: 0 + --max_executable_size (max size of executable memory (in Mbytes)) + type: int default: 0 + --gc_global (always perform global GCs) + type: bool default: false + --gc_interval (garbage collect after allocations) + type: int default: -1 + --trace_gc (print one trace line following each garbage collection) + type: bool default: false + --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection) + type: bool default: false + --trace_gc_ignore_scavenger (do not print trace line after scavenger collection) + type: bool default: false + --trace_idle_notification (print one trace line following each idle notification) + type: bool default: false + --trace_idle_notification_verbose (prints the heap state used by the idle notification) + type: bool default: false + --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit) + type: bool default: false + --print_max_heap_committed (print statistics of the maximum memory committed for the heap in name=value format on exit) + type: bool default: false + --trace_gc_verbose (print more details following each garbage collection) + type: bool default: false + --trace_fragmentation (report fragmentation for old pointer and data pages) + type: bool default: false + --collect_maps (garbage collect maps from which no objects can be reached) + type: bool default: true + --weak_embedded_maps_in_optimized_code (make maps embedded in optimized code weak) + type: bool default: true + --weak_embedded_objects_in_optimized_code (make objects embedded in optimized code weak) + type: bool default: true + --flush_code (flush code that we expect not to use again (during full gc)) + type: bool default: true + --flush_code_incrementally (flush code that we expect not to use again (incrementally)) + type: bool default: true + --trace_code_flushing (trace code flushing progress) + type: bool default: false + --age_code (track un-executed functions to age code and flush only old code (required for code flushing)) + type: bool default: true + --incremental_marking (use incremental marking) + type: bool default: true + --incremental_marking_steps (do incremental marking steps) + type: bool default: true + --concurrent_sweeping (use concurrent sweeping) + type: bool default: true + --trace_incremental_marking (trace progress of the incremental marking) + type: bool default: false + --track_gc_object_stats (track object counts and memory usage) + type: bool default: false + --heap_profiler_trace_objects (Dump heap object allocations/movements/size_updates) + type: bool default: false + --use_idle_notification (Use idle notification to reduce memory footprint.) + type: bool default: true + --use_ic (use inline caching) + type: bool default: true + --trace_ic (trace inline cache state transitions) + type: bool default: false + --native_code_counters (generate extra code for manipulating stats counters) + type: bool default: false + --always_compact (Perform compaction on every full GC) + type: bool default: false + --never_compact (Never perform compaction on full GC - testing only) + type: bool default: false + --compact_code_space (Compact code space on full non-incremental collections) + type: bool default: true + --incremental_code_compaction (Compact code space on full incremental collections) + type: bool default: true + --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.) + type: bool default: true + --use_marking_progress_bar (Use a progress bar to scan large objects in increments when incremental marking is active.) + type: bool default: true + --zap_code_space (Zap free memory in code space with 0xCC while sweeping.) + type: bool default: true + --random_seed (Default seed for initializing random generator (0, the default, means to use system random).) + type: int default: 0 + --trace_weak_arrays (trace WeakFixedArray usage) + type: bool default: false + --track_prototype_users (keep track of which maps refer to a given prototype object) + type: bool default: false + --use_verbose_printer (allows verbose printing) + type: bool default: true + --allow_natives_syntax (allow natives syntax) + type: bool default: false + --trace_parse (trace parsing and preparsing) + type: bool default: false + --trace_sim (Trace simulator execution) + type: bool default: false + --debug_sim (Enable debugging the simulator) + type: bool default: false + --check_icache (Check icache flushes in ARM and MIPS simulator) + type: bool default: false + --stop_sim_at (Simulator stop after x number of instructions) + type: int default: 0 + --sim_stack_alignment (Stack alingment in bytes in simulator (4 or 8, 8 is default)) + type: int default: 8 + --sim_stack_size (Stack size of the ARM64 and MIPS64 simulator in kBytes (default is 2 MB)) + type: int default: 2048 + --log_regs_modified (When logging register values, only print modified registers.) + type: bool default: true + --log_colour (When logging, try to use coloured output.) + type: bool default: true + --ignore_asm_unimplemented_break (Don't break for ASM_UNIMPLEMENTED_BREAK macros.) + type: bool default: false + --trace_sim_messages (Trace simulator debug messages. Implied by --trace-sim.) + type: bool default: false + --stack_trace_on_illegal (print stack trace when an illegal exception is thrown) + type: bool default: false + --abort_on_uncaught_exception (abort program (dump core) when an uncaught exception is thrown) + type: bool default: false + --randomize_hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed)) + type: bool default: true + --hash_seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed)) + type: int default: 0 + --profile_deserialization (Print the time it takes to deserialize the snapshot.) + type: bool default: false + --regexp_optimization (generate optimized regexp code) + type: bool default: true + --testing_bool_flag (testing_bool_flag) + type: bool default: true + --testing_maybe_bool_flag (testing_maybe_bool_flag) + type: maybe_bool default: unset + --testing_int_flag (testing_int_flag) + type: int default: 13 + --testing_float_flag (float-flag) + type: float default: 2.5 + --testing_string_flag (string-flag) + type: string default: Hello, world! + --testing_prng_seed (Seed used for threading test randomness) + type: int default: 42 + --testing_serialization_file (file in which to serialize heap) + type: string default: /tmp/serdes + --startup_blob (Write V8 startup blob file. (mksnapshot only)) + type: string default: NULL + --profile_hydrogen_code_stub_compilation (Print the time it takes to lazily compile hydrogen code stubs.) + type: bool default: false + --predictable (enable predictable mode) + type: bool default: false + --help (Print usage message, including flags, on console) + type: bool default: true + --dump_counters (Dump counters on exit) + type: bool default: false + --debugger (Enable JavaScript debugger) + type: bool default: false + --map_counters (Map counters to a file) + type: string default: + --js_arguments (Pass all remaining arguments to the script. Alias for "--".) + type: arguments default: + --gdbjit (enable GDBJIT interface (disables compacting GC)) + type: bool default: false + --gdbjit_full (enable GDBJIT interface for all code objects) + type: bool default: false + --gdbjit_dump (dump elf objects with debug info to disk) + type: bool default: false + --gdbjit_dump_filter (dump only objects containing this substring) + type: string default: + --force_marking_deque_overflows (force overflows of marking deque by reducing it's size to 64 words) + type: bool default: false + --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows)) + type: bool default: false + --log (Minimal logging (no API, code, GC, suspect, or handles samples).) + type: bool default: false + --log_all (Log all events to the log file.) + type: bool default: false + --log_api (Log API events to the log file.) + type: bool default: false + --log_code (Log code events to the log file without profiling.) + type: bool default: false + --log_gc (Log heap samples on garbage collection for the hp2ps tool.) + type: bool default: false + --log_handles (Log global handle events.) + type: bool default: false + --log_snapshot_positions (log positions of (de)serialized objects in the snapshot.) + type: bool default: false + --log_suspect (Log suspect operations.) + type: bool default: false + --prof (Log statistical profiling information (implies --log-code).) + type: bool default: false + --prof_browser_mode (Used with --prof, turns on browser-compatible mode for profiling.) + type: bool default: true + --log_regexp (Log regular expression execution.) + type: bool default: false + --logfile (Specify the name of the log file.) + type: string default: v8.log + --logfile_per_isolate (Separate log files for each isolate.) + type: bool default: true + --ll_prof (Enable low-level linux profiler.) + type: bool default: false + --perf_basic_prof (Enable perf linux profiler (basic support).) + type: bool default: false + --perf_jit_prof (Enable perf linux profiler (experimental annotate support).) + type: bool default: false + --gc_fake_mmap (Specify the name of the file for fake gc mmap used in ll_prof) + type: string default: /tmp/__v8_gc__ + --log_internal_timer_events (Time internal events.) + type: bool default: false + --log_timer_events (Time events including external callbacks.) + type: bool default: false + --log_instruction_stats (Log AArch64 instruction statistics.) + type: bool default: false + --log_instruction_file (AArch64 instruction statistics log file.) + type: string default: arm64_inst.csv + --log_instruction_period (AArch64 instruction statistics logging period.) + type: int default: 4194304 + --redirect_code_traces (output deopt information and disassembly into file code--.asm) + type: bool default: false + --redirect_code_traces_to (output deopt information and disassembly into the given file) + type: string default: NULL + --hydrogen_track_positions (track source code positions when building IR) + type: bool default: false + --trace_elements_transitions (trace elements transitions) + type: bool default: false + --trace_creation_allocation_sites (trace the creation of allocation sites) + type: bool default: false + --print_code_stubs (print code stubs) + type: bool default: false + --test_secondary_stub_cache (test secondary stub cache by disabling the primary one) + type: bool default: false + --test_primary_stub_cache (test primary stub cache by disabling the secondary one) + type: bool default: false + --print_code (print generated code) + type: bool default: false + --print_opt_code (print optimized code) + type: bool default: false + --print_unopt_code (print unoptimized code before printing optimized code based on it) + type: bool default: false + --print_code_verbose (print more information for code) + type: bool default: false + --print_builtin_code (print generated code for builtins) + type: bool default: false + --sodium (print generated code output suitable for use with the Sodium code viewer) + type: bool default: false + --print_all_code (enable all flags related to printing code) + type: bool default: false + +.SH RESOURCES AND DOCUMENTATION + +See the website for documentation http://nodejs.org/ + +Mailing list: http://groups.google.com/group/nodejs + +IRC: irc.freenode.net #node.js diff --git a/doc/releases.md b/doc/releases.md index 5d72e4fb0..7b4f77f5f 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -1,33 +1,33 @@ -io.js Release Process +Node.js Release Process ===================== -This document describes the technical aspects of the io.js release process. The intended audience is those who have been authorized by the Technical Committee (TC) to create, promote and sign official release builds for io.js, hosted on . +This document describes the technical aspects of the Node.js release process. The intended audience is those who have been authorized by the Technical Committee (TC) to create, promote and sign official release builds for Node.js, hosted on . ## Who can make a release? -Release authorization is given by the io.js TC. Once authorized, an individual must be have the following: +Release authorization is given by the Node.js TC. Once authorized, an individual must be have the following: ### 1. Jenkins Release Access There are three relevant Jenkins jobs that should be used for a release flow: -**a.** **[iojs+any-pr+multi](https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/)** is used for a final full-test run to ensure that the current *HEAD* is stable. +**a.** **[node+any-pr+multi](https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/)** is used for a final full-test run to ensure that the current *HEAD* is stable. -**b.** (optional) **[iojs+release+nightly](https://jenkins-iojs.nodesource.com/job/iojs+release+nightly/)** can be used to create a nightly release for the current *HEAD* if public test releases are required. Builds triggered with this job are published straight to and are available for public download. +**b.** (optional) **[node+release+nightly](https://jenkins-iojs.nodesource.com/job/iojs+release+nightly/)** can be used to create a nightly release for the current *HEAD* if public test releases are required. Builds triggered with this job are published straight to and are available for public download. -**c.** **[iojs+release](https://jenkins-iojs.nodesource.com/job/iojs+release/)** does all of the work to build all required release assets. Promotion of the release files is a manual step once they are ready (see below). +**c.** **[node+release](https://jenkins-iojs.nodesource.com/job/iojs+release/)** does all of the work to build all required release assets. Promotion of the release files is a manual step once they are ready (see below). -The [io.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. +The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. -### 2. Access +### 2. Access -The _dist_ user on iojs.org controls the assets available in (note that is an alias for ). +The _dist_ user on nodejs.org controls the assets available in (note that is an alias for ). The Jenkins release build slaves upload their artefacts to the web server as the _staging_ user, the _dist_ user has access to move these assets to public access (the _staging_ user does not, for security purposes). Nightly builds are promoted automatically on the server by a cron task for the _dist_ user. -Release builds require manual promotion by an individual with SSH access to the server as the _dist_ user. The [io.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. +Release builds require manual promotion by an individual with SSH access to the server as the _dist_ user. The [Node.js build team](https://github.com/nodejs/build) is able to provide this access to individuals authorized by the TC. ### 3. A Publicly Listed GPG Key @@ -39,7 +39,7 @@ The GPG keys should be fetchable from a known third-party keyserver, currently t gpg --keyserver pool.sks-keyservers.net --recv-keys ``` -Additionally, full GPG key fingerprints for individuals authorized to release should be listed in the io.js GitHub README.md file. +Additionally, full GPG key fingerprints for individuals authorized to release should be listed in the Node.js GitHub README.md file. ## How to create a release @@ -50,11 +50,11 @@ Notes: ### 1. Ensure that HEAD Is Stable -Run a **[iojs+any-pr+multi](https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/)** test run to ensure that the build is stable and the HEAD commit is ready for release. +Run a **[node+any-pr+multi](https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/)** test run to ensure that the build is stable and the HEAD commit is ready for release. ### 2. Produce a Nightly Build _(optional)_ -If there is reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[iojs+release+nightly](https://jenkins-iojs.nodesource.com/job/iojs+release+nightly/)** and wait for it to drop in . +If there is reason to produce a test release for the purpose of having others try out installers or specifics of builds, produce a nightly build using **[node+release+nightly](https://jenkins-iojs.nodesource.com/job/iojs+release+nightly/)** and wait for it to drop in . This is particularly recommended if there has been recent work relating to the OS X or Windows installers as they are not tested in any way by CI. @@ -123,7 +123,7 @@ The _CHANGELOG.md_ and _src/node_version.h_ changes should be the final commit t When committing these to git, use the following message format: ``` -YYYY-MM-DD io.js vx.y.z Release +YYYY-MM-DD Node.js vx.y.z Release Notable changes: @@ -135,7 +135,7 @@ Notable changes: Tag the release as vx.y.z and sign **using the same GPG key that will be used to sign SHASUMS256.txt**. ``` -git tag -sm 'YYYY-MM-DD io.js vz.y.x Release' vx.y.z +git tag -sm 'YYYY-MM-DD Node.js vz.y.x Release' vx.y.z ``` ### 8. Set Up For the Next Release @@ -164,7 +164,7 @@ git push origin branch vx.y.z ### 9. Produce Release Builds -Use **[iojs+release](https://jenkins-iojs.nodesource.com/job/iojs+release/)** to produce release artefacts. Enter the "vx.y.z" version string for this release and it will fetch your tagged commit. +Use **[node+release](https://jenkins-iojs.nodesource.com/job/iojs+release/)** to produce release artefacts. Enter the "vx.y.z" version string for this release and it will fetch your tagged commit. Artefacts from each slave are uploaded to Jenkins and are available if further testing is required. Use this opportunity particularly to test OS X and Windows installers if there are any concerns. Click through to the individual slaves for a run to find the artefacts. For example, the Windows 64-bit .msi file for v1.0.4 can be found [here](https://jenkins-iojs.nodesource.com/job/iojs+release/20/nodes=iojs-win2008r2-release-x64/). @@ -198,7 +198,7 @@ If you didn't wait for ARM builds in the previous step before promoting the rele ### 11. Check the Release -Your release should be available at and also . Check that the appropriate files are in place, you may also want to check that the binaries are working as appropriate and have the right internal version strings. Check that the API docs are available at . Check that the release catalog files are correct at and . +Your release should be available at and also . Check that the appropriate files are in place, you may also want to check that the binaries are working as appropriate and have the right internal version strings. Check that the API docs are available at . Check that the release catalog files are correct at and . ### 12. Announce diff --git a/doc/template.html b/doc/template.html index 7d32a5b59..f9f27d0dc 100644 --- a/doc/template.html +++ b/doc/template.html @@ -2,18 +2,18 @@ - __SECTION__ io.js __VERSION__ Manual & Documentation + __SECTION__ Node.js __VERSION__ Manual & Documentation - +
__GTOC__ @@ -21,7 +21,7 @@
-

io.js __VERSION__ Documentation

+

Node.js __VERSION__ Documentation

Index | From c77a5e4dea9fa38dba08026ad5ced7755266939b Mon Sep 17 00:00:00 2001 From: Andrew de Andrade Date: Wed, 3 Jun 2015 15:36:29 -0700 Subject: [PATCH 2/2] Change io.js to node.js everywhere but ./doc/ --- BSDmakefile | 2 +- CHANGELOG.md | 2 +- COLLABORATOR_GUIDE.md | 16 +- CONTRIBUTING.md | 31 +- GOVERNANCE.md | 12 +- LICENSE | 12 +- Makefile | 24 +- README.md | 2 +- ROADMAP.md | 28 +- WORKING_GROUPS.md | 58 +- benchmark/README.md | 10 +- benchmark/common.js | 2 +- benchmark/http-flamegraph.sh | 6 +- benchmark/http.sh | 2 +- benchmark/http_simple_bench.sh | 2 +- benchmark/plot.R | 2 +- benchmark/plot_csv.R | 2 +- configure | 8 +- deps/openssl/config/Makefile | 4 +- deps/openssl/config/opensslconf.h | 6 +- deps/openssl/doc/UPGRADING.md | 26 +- doc/iojs.1 | 731 ------------------- lib/_debugger.js | 6 +- node | 1 + node.gyp | 8 +- iojs_README.md => node_README.md | 41 +- src/node.cc | 8 +- src/node.h | 20 +- src/node_version.h | 2 +- src/res/node.rc | 14 +- src/res/node_etw_provider.man | 4 +- src/res/node_perfctr_provider.man | 2 +- test/common.js | 2 +- test/debugger/test-debugger-remote.js | 2 +- test/parallel/test-fs-read-stream-fd-leak.js | 2 +- test/parallel/test-readline-keys.js | 6 +- test/parallel/test-repl.js | 6 +- tools/install.py | 23 +- tools/msvs/msi/nodemsi.wixproj | 2 +- tools/msvs/msi/product.wxs | 82 +-- tools/msvs/nodevars.bat | 12 +- tools/osx-pkg.pmdoc/01local.xml | 2 +- tools/osx-pkg.pmdoc/02npm.xml | 2 +- tools/osx-pkg.pmdoc/index.xml.tmpl | 8 +- tools/release.sh | 4 +- tools/rpm/{iojs.spec => node.spec} | 17 +- tools/rpm/rpmbuild.sh | 8 +- tools/test.py | 10 +- vcbuild.bat | 14 +- 49 files changed, 266 insertions(+), 1030 deletions(-) delete mode 100644 doc/iojs.1 create mode 120000 node rename iojs_README.md => node_README.md (87%) rename tools/rpm/{iojs.spec => node.spec} (86%) diff --git a/BSDmakefile b/BSDmakefile index fa0b4a9b8..699e2921f 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -4,7 +4,7 @@ FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} all: .DEFAULT .DEFAULT: @which gmake > /dev/null 2>&1 ||\ - (echo "GMake is required for io.js to build.\ + (echo "GMake is required for Node.js to build.\ Install and try again" && exit 1) @gmake ${.FLAGS} ${.TARGETS} diff --git a/CHANGELOG.md b/CHANGELOG.md index 64bad7c5b..4c4c11c91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# io.js ChangeLog +# Node.js ChangeLog ## 2015-06-01, Version 2.2.1, @rvagg diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 9e16778ed..01fc917d0 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -1,4 +1,4 @@ -# io.js Collaborator Guide +# Node.js Collaborator Guide **Contents** @@ -8,7 +8,7 @@ * Landing Pull Requests - Technical HOWTO -This document contains information for Collaborators of the io.js +This document contains information for Collaborators of the Node.js project regarding maintaining the code, documentation and issues. Collaborators should be familiar with the guidelines for new @@ -19,7 +19,7 @@ understand the project governance model as outlined in ## Issues and Pull Requests Courtesy should always be shown to individuals submitting issues and -pull requests to the io.js project. +pull requests to the Node.js project. Collaborators should feel free to take full responsibility for managing issues and pull requests they feel qualified to handle, as @@ -27,16 +27,16 @@ long as this is done while being mindful of these guidelines, the opinions of other Collaborators and guidance of the TC. Collaborators may **close** any issue or pull request they believe is -not relevant for the future of the io.js project. Where this is +not relevant for the future of the Node.js project. Where this is unclear, the issue should be left open for several days to allow for -additional discussion. Where this does not yield input from io.js +additional discussion. Where this does not yield input from Node.js Collaborators or additional evidence that the issue has relevance, the issue may be closed. Remember that issues can always be re-opened if necessary. ## Accepting Modifications -All modifications to the io.js code and documentation should be +All modifications to the Node.js code and documentation should be performed via GitHub pull requests, including modifications by Collaborators and TC members. @@ -132,7 +132,7 @@ $ git merge --ff-only origin/master Apply external patches ```text -$ curl -L https://github.com/nodejs/io.js/pull/xxx.patch | git am --whitespace=fix +$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix ``` Check and re-review the changes @@ -219,7 +219,7 @@ With git, there's a way to override remote trees by force pushing (`git push -f`). This should generally be seen as forbidden (since you're rewriting history on a repository other people are working against) but is allowed for simpler slip-ups such as typos in commit -messages. However, you are only allowed to force push to any io.js +messages. However, you are only allowed to force push to any Node.js branch within 10 minutes from your original push. If someone else pushes to the branch your commit lives in or the 10 minute period passes, consider the commit final. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ab54f981..0d312ab5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,10 @@ -# Contributing to io.js +# Contributing to Node.js ## Issue Contributions When opening new issues or commenting on existing issues on this repository please make sure discussions are related to concrete technical issues with the -io.js software. +Node.js software. Discussion of non-technical topics including subjects like intellectual property, trademark and high level project questions should move to the @@ -13,7 +13,7 @@ instead. ## Code Contributions -The io.js project has an open governance model and welcomes new contributors. +The Node.js project has an open governance model and welcomes new contributors. Individuals making significant and valuable contributions are made _Collaborators_ and given commit-access to the project. See the [GOVERNANCE.md](./GOVERNANCE.md) document for more information about how this @@ -23,13 +23,13 @@ This document will guide you through the contribution process. ### Step 1: Fork -Fork the project [on GitHub](https://github.com/nodejs/io.js) and check out your +Fork the project [on GitHub](https://github.com/nodejs/node) and check out your copy locally. ```text -$ git clone git@github.com:username/io.js.git -$ cd io.js -$ git remote add upstream git://github.com/nodejs/io.js.git +$ git clone git@github.com:username/node.git +$ cd node +$ git remote add upstream git://github.com/nodejs/node.git ``` #### Which branch? @@ -48,17 +48,16 @@ always welcome but API or behavioral changes to modules at stability level 3 #### Dependencies -io.js has several bundled dependencies in the *deps/* and the *tools/* +Node.js has several bundled dependencies in the *deps/* and the *tools/* directories that are not part of the project proper. Any changes to files in those directories or its subdirectories should be sent to their respective projects. Do not send your patch to us, we cannot accept it. In case of doubt, open an issue in the -[issue tracker](https://github.com/nodejs/io.js/issues/) or contact one of the -[project Collaborators](https://github.com/nodejs/io.js/#current-project-team-members). -([IRC](http://webchat.freenode.net/?channels=io.js) is often the best medium.) Especially do so if you plan to work on something big. Nothing is more -frustrating than seeing your hard work go to waste because your vision -does not align with the project team. +[issue tracker](https://github.com/nodejs/node/issues/) or contact one of the +[project Collaborators](https://github.com/nodejs/node/#current-project-team-members) +([IRC](http://webchat.freenode.net/?channels=node.js) is often the best medium.) Especially do so if you plan to work on something big. Nothing is more frustrating than seeing your hard work +go to waste because your vision does not align with the project team. ### Step 2: Branch @@ -139,10 +138,10 @@ can use this syntax to run it exactly as the test harness would: $ python tools/test.py -v --mode=release parallel/test-stream2-transform ``` -You can run tests directly with iojs: +You can run tests directly with node: ```text -$ iojs ./test/parallel/test-streams2-transform.js +$ node ./test/parallel/test-streams2-transform.js ``` @@ -152,7 +151,7 @@ $ iojs ./test/parallel/test-streams2-transform.js $ git push origin my-feature-branch ``` -Go to https://github.com/yourusername/io.js and select your feature branch. +Go to https://github.com/yourusername/node and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days. If there are comments diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 7e8aa80da..5251b3f3d 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -1,8 +1,8 @@ -# io.js Project Governance +# Node.js Project Governance ## Technical Committee -The io.js project is jointly governed by a Technical Committee (TC) +The Node.js project is jointly governed by a Technical Committee (TC) which is responsible for high-level guidance of the project. The TC has final authority over this project including: @@ -15,8 +15,8 @@ The TC has final authority over this project including: * Maintaining the list of additional Collaborators Initial membership invitations to the TC were given to individuals who -had been active contributors to io.js, and who have significant -experience with the management of the io.js project. Membership is +had been active contributors to Node.js, and who have significant +experience with the management of the Node.js project. Membership is expected to evolve over time according to the needs of the project. For the current list of TC members, see the project @@ -24,7 +24,7 @@ For the current list of TC members, see the project ## Collaborators -The [iojs/io.js](https://github.com/nodejs/io.js) GitHub repository is +The [nodejs/node](https://github.com/nodejs/node) GitHub repository is maintained by the TC and additional Collaborators who are added by the TC on an ongoing basis. @@ -37,7 +37,7 @@ _Note:_ If you make a significant contribution and are not considered for commit-access log an issue or contact a TC member directly and it will be brought up in the next TC meeting. -Modifications of the contents of the iojs/io.js repository are made on +Modifications of the contents of the nodejs/node repository are made on a collaborative basis. Anybody with a GitHub account may propose a modification via pull request and it will be considered by the project Collaborators. All pull requests must be reviewed and accepted by a diff --git a/LICENSE b/LICENSE index f493fde36..6fc9b4209 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ -io.js is licensed for use as follows: +Node.js is licensed for use as follows: """ -Copyright io.js contributors. All rights reserved. +Copyright Node.js contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -22,7 +22,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -This license applies to parts of io.js originating from the +This license applies to parts of Node.js originating from the https://github.com/joyent/node repository: """ @@ -46,10 +46,10 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -The io.js license applies to all parts of io.js that are not externally +The Node.js license applies to all parts of Node.js that are not externally maintained libraries. -The externally maintained libraries used by io.js are: +The externally maintained libraries used by Node.js are: - V8, located at deps/v8. V8's license follows: """ @@ -612,7 +612,7 @@ The externally maintained libraries used by io.js are: included for use in the npm website and documentation, used with permission. - This program uses several io.js modules contained in the node_modules/ + This program uses several Node.js modules contained in the node_modules/ subdirectory, according to the terms of their respective licenses. """ diff --git a/Makefile b/Makefile index 94f130f5f..a8a2ea7e5 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,9 @@ PREFIX ?= /usr/local EXEEXT := $(shell $(PYTHON) -c \ "import sys; print('.exe' if sys.platform == 'win32' else '')") -NODE ?= ./iojs$(EXEEXT) -NODE_EXE = iojs$(EXEEXT) -NODE_G_EXE = iojs_g$(EXEEXT) +NODE ?= ./node$(EXEEXT) +NODE_EXE = node$(EXEEXT) +NODE_G_EXE = node_g$(EXEEXT) # Default to verbose builds. # To do quiet/pretty builds, run `make V=` to set V to an empty string, @@ -208,7 +208,7 @@ ifdef NIGHTLY TAG = nightly-$(NIGHTLY) FULLVERSION=$(VERSION)-$(TAG) endif -TARNAME=iojs-$(FULLVERSION) +TARNAME=node-$(FULLVERSION) TARBALL=$(TARNAME).tar BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) BINARYTAR=$(BINARYNAME).tar @@ -217,9 +217,9 @@ XZ_COMPRESSION ?= 9 PKG=out/$(TARNAME).pkg PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz +PKGSRC=node-$(DESTCPU)-$(RAWVER).tgz ifdef NIGHTLY -PKGSRC=iojs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz +PKGSRC=node-$(DESTCPU)-$(RAWVER)-$(TAG).tgz endif dist: doc $(TARBALL) $(PKG) @@ -259,13 +259,13 @@ $(PKG): release-only $(PYTHON) ./configure --dest-cpu=x64 --tag=$(TAG) $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh - lipo $(PKGDIR)/32/usr/local/bin/iojs \ - $(PKGDIR)/usr/local/bin/iojs \ - -output $(PKGDIR)/usr/local/bin/iojs-universal \ + lipo $(PKGDIR)/32/usr/local/bin/node \ + $(PKGDIR)/usr/local/bin/node \ + -output $(PKGDIR)/usr/local/bin/node-universal \ -create - mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs + mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node rm -rf $(PKGDIR)/32 - cat tools/osx-pkg.pmdoc/index.xml.tmpl | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > tools/osx-pkg.pmdoc/index.xml + cat tools/osx-pkg.pmdoc/index.xml.tmpl | sed -e 's|__nodeversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > tools/osx-pkg.pmdoc/index.xml $(PACKAGEMAKER) \ --id "org.nodejs.Node" \ --doc tools/osx-pkg.pmdoc \ @@ -275,7 +275,7 @@ $(PKG): release-only $(TARBALL): release-only $(NODE_EXE) doc git checkout-index -a -f --prefix=$(TARNAME)/ mkdir -p $(TARNAME)/doc/api - cp doc/iojs.1 $(TARNAME)/doc/iojs.1 + cp doc/node.1 $(TARNAME)/doc/node.1 cp -r out/doc/api/* $(TARNAME)/doc/api/ rm -rf $(TARNAME)/deps/v8/{test,samples,tools/profviz} # too big rm -rf $(TARNAME)/doc/images # too big diff --git a/README.md b/README.md index 02c3112fb..7281fbbb6 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ Foundation: This project is operating with the oversight of the joint Node.js and io.js core technical teams. -Note: The original io.js README.md is temporarily renamed to iojs_README.md. +Note: The original io.js README.md is temporarily renamed to node_README.md. diff --git a/ROADMAP.md b/ROADMAP.md index 04254859d..4d2db27cb 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,4 +1,4 @@ -# io.js Roadmap +# Node.js Roadmap ***This is a living document, it describes the policy and priorities as they exist today but can evolve over time.*** @@ -6,15 +6,15 @@ The most important consideration in every code change is the impact it will have, positive or negative, on the ecosystem (modules and applications). -io.js does not remove stdlib JS API. +Node.js does not remove stdlib JS API. -Shipping with current and well supported dependencies is the best way to ensure long term stability of the platform. When those dependencies are no longer maintained io.js will take on their continued maintenance as part of our [Long Term Support policy](#long-term-support). +Shipping with current and well supported dependencies is the best way to ensure long term stability of the platform. When those dependencies are no longer maintained Node.js will take on their continued maintenance as part of our [Long Term Support policy](#long-term-support). -io.js will continue to adopt new V8 releases. +Node.js will continue to adopt new V8 releases. * When V8 ships a breaking change to their C++ API that can be handled by [`nan`](https://github.com/rvagg/nan) -the *minor* version of io.js will be increased. +the *minor* version of Node.js will be increased. * When V8 ships a breaking change to their C++ API that can NOT be handled by [`nan`](https://github.com/rvagg/nan) -the *major* version of io.js will be increased. +the *major* version of Node.js will be increased. * When new features in the JavaScript language are introduced by V8 the *minor* version number will be increased. TC39 has stated clearly that no backwards incompatible changes will be made to the language so it is @@ -26,23 +26,23 @@ Any API addition will cause an increase in the *minor* version. ### Long Term Support -io.js supports old versions for as long as community members are fixing bugs in them. +Node.js supports old versions for as long as community members are fixing bugs in them. -As long as there is a community back porting bug fixes we will push patch releases for those versions of io.js. +As long as there is a community back porting bug fixes we will push patch releases for those versions of Node.js. -When old versions of dependencies like V8 are no longer supported by their project io.js will take on the responsibility of maintenance to ensure continued long term support in io.js patch releases. +When old versions of dependencies like V8 are no longer supported by their project Node.js will take on the responsibility of maintenance to ensure continued long term support in Node.js patch releases. ## Channels Channels are points of collaboration with the broader community and are not strictly scoped to a repository or branch. * Release - Stable production ready builds. Unique version numbers following semver. -* Canary - Nightly builds w/ V8 version in Chrome Canary + changes landing to io.js. No version designation. +* Canary - Nightly builds w/ V8 version in Chrome Canary + changes landing to Node.js. No version designation. * NG - "Next Generation." No version designation. ## NG (Next Generation) -In order for io.js to stay competitive we need to work on the next generation of the platform which will more accurately integrate and reflect the advancements in the language and the ecosystem. +In order for Node.js to stay competitive we need to work on the next generation of the platform which will more accurately integrate and reflect the advancements in the language and the ecosystem. While this constitutes a great leap forward for the platform we will be making this leap without breaking backwards compatibility with the existing ecosystem of modules. @@ -50,9 +50,9 @@ While this constitutes a great leap forward for the platform we will be making t ## Debugging and Tracing -Debugging is one of the first things from everyone's mouth, both developer and enterprise, when describing trouble they've had with node.js/io.js. +Debugging is one of the first things from everyone's mouth, both developer and enterprise, when describing trouble they've had with Node.js. -The goal of io.js' effort is to build a healthy debugging and tracing ecosystem and not to try and build any "silver bullet" features for core (like the domains debacle). +The goal of Node.js' effort is to build a healthy debugging and tracing ecosystem and not to try and build any "silver bullet" features for core (like the domains debacle). The [Tracing WG](https://github.com/nodejs/tracing-wg) is driving this effort: @@ -61,7 +61,7 @@ The [Tracing WG](https://github.com/nodejs/tracing-wg) is driving this effort: * Tracing * Add tracing support for more platforms (LTTng, etc). * [Unify the Tracing endpoint](https://github.com/nodejs/io.js/issues/729). - * New Chrome Debugger - Google is working on a version of Chrome's debugger that is without Chrome and can be used with io.js. + * New Chrome Debugger - Google is working on a version of Chrome's debugger that is without Chrome and can be used with Node.js. ## Ecosystem Automation diff --git a/WORKING_GROUPS.md b/WORKING_GROUPS.md index e8af871ee..6b2d0dac0 100644 --- a/WORKING_GROUPS.md +++ b/WORKING_GROUPS.md @@ -1,7 +1,7 @@ -# io.js Working Groups +# Node.js Working Groups -io.js Working Groups are autonomous projects created by the -[Technical Committee (TC)](https://github.com/nodejs/io.js/blob/master/GOVERNANCE.md#technical-committee). +Node.js Working Groups are autonomous projects created by the +[Technical Committee (TC)](https://github.com/nodejs/node/blob/master/GOVERNANCE.md#technical-committee). Working Groups can be formed at any time but must be ratified by the TC. Once formed the work defined in the Working Group charter is the @@ -33,30 +33,30 @@ back in to the TC. ### [Website](https://github.com/nodejs/website) The website working group's purpose is to build and maintain a public -website for the `io.js` project. +website for the `Node.js` project. Its responsibilities are: -* Develop and maintain a build and automation system for `iojs.org`. -* Ensure the site is regularly updated with changes made to `io.js` like +* Develop and maintain a build and automation system for `nodejs.org`. +* Ensure the site is regularly updated with changes made to `Node.js` like releases and features. * Foster and enable a community of translators. ### [Streams](https://github.com/nodejs/readable-stream) The Streams WG is dedicated to the support and improvement of the Streams API -as used in io.js and the npm ecosystem. We seek to create a composable API that +as used in Node.js and the npm ecosystem. We seek to create a composable API that solves the problem of representing multiple occurrences of an event over time in a humane, low-overhead fashion. Improvements to the API will be driven by the needs of the ecosystem; interoperability and backwards compatibility with other solutions and prior versions are paramount in importance. Our responsibilities include: -* Addressing stream issues on the io.js issue tracker. -* Authoring and editing stream documentation within the io.js project. -* Reviewing changes to stream subclasses within the io.js project. -* Redirecting changes to streams from the io.js project to this project. -* Assisting in the implementation of stream providers within io.js. -* Recommending versions of readable-stream to be included in io.js. +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of readable-stream to be included in Node.js. * Messaging about the future of streams to give the community advance notice of changes. @@ -75,7 +75,7 @@ Its responsibilities are: ### [Tracing](https://github.com/nodejs/tracing-wg) The tracing working group's purpose is to increase the -transparency of software written in io.js. +transparency of software written in Node.js. Its responsibilities are: * Collaboration with V8 to integrate with `trace_event`. @@ -95,12 +95,12 @@ language community might then produce multiple localizations for various project resources. Their responsibilities are: -* Translations of any io.js materials they believe are relevant to their +* Translations of any Node.js materials they believe are relevant to their community. * Review processes for keeping translations up to date and of high quality. * Social media channels in their language. -* Promotion of io.js speakers for meetups and conferences in their +* Promotion of Node.js speakers for meetups and conferences in their language. Each language community maintains its own membership. @@ -144,7 +144,7 @@ Each language community maintains its own membership. ### [Evangelism](https://github.com/nodejs/evangelism) The evangelism working group promotes the accomplishments -of io.js and lets the community know how they can get involved. +of Node.js and lets the community know how they can get involved. Their responsibilities are: * Project messaging. @@ -158,7 +158,7 @@ content. ### [Roadmap](https://github.com/nodejs/roadmap) The roadmap working group is responsible for user community outreach -and the translation of their concerns into a plan of action for io.js. +and the translation of their concerns into a plan of action for Node.js. The final [ROADMAP](./ROADMAP.md) document is still owned by the TC and requires the same approval for changes as any other project asset. @@ -172,10 +172,10 @@ Their responsibilities are: ### [Docker](https://github.com/nodejs/docker-iojs) The Docker working group's purpose is to build, maintain, and improve official -Docker images for the `io.js` project. +Docker images for the `Node.js` project. Their responsibilities are: -* Keep the official Docker images updated in line with new `io.js` releases. +* Keep the official Docker images updated in line with new `Node.js` releases. * Decide and implement image improvements and/or fixes. * Maintain and improve the images' documentation. @@ -184,9 +184,9 @@ Their responsibilities are: The Addon API Working Group is responsible for maintaining the NAN project and corresponding _nan_ package in npm. The NAN project makes available an -abstraction layer for native add-on authors for both Node.js and io.js, -assisting in the writing of code that is compatible with many actively used -versions of Node.js, io.js, V8 and libuv. +abstraction layer for native add-on authors for Node.js, assisting in the +writing of code that is compatible with many actively used versions of Node.js, +V8 and libuv. Their responsibilities are: @@ -194,12 +194,12 @@ Their responsibilities are: including code, issues and documentation. * Maintaining the [addon-examples](https://github.com/nodejs/node-addon-examples) GitHub repository, including code, issues and documentation. -* Maintaining the C++ Addon API within the io.js project, in subordination to - the io.js TC. -* Maintaining the Addon documentation within the io.js project, in - subordination to the io.js TC. +* Maintaining the C++ Addon API within the Node.js project, in subordination to + the Node.js TC. +* Maintaining the Addon documentation within the Node.js project, in + subordination to the Node.js TC. * Maintaining the _nan_ package in npm, releasing new versions as appropriate. -* Messaging about the future of the io.js and NAN interface to give the +* Messaging about the future of the Node.js and NAN interface to give the community advance notice of changes. The current members can be found in their @@ -239,7 +239,7 @@ governance process, hence the term "bootstrap." ### *[insert WG name]* Working Group -The io.js *[insert WG name]* is jointly governed by a Working Group (WG) +The Node.js *[insert WG name]* is jointly governed by a Working Group (WG) that is responsible for high-level guidance of the project. The WG has final authority over this project including: diff --git a/benchmark/README.md b/benchmark/README.md index dc6f53fbe..cbb57c693 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -1,7 +1,7 @@ -# io.js core benchmark tests +# Node.js core benchmark tests This folder contains benchmark tests to measure the performance for certain -io.js APIs. +Node.js APIs. ## Prerequisites @@ -18,7 +18,7 @@ There are two ways to run benchmark tests: 1. Run all tests of a given type, for example, buffers ```sh -iojs benchmark/common.js buffers +node benchmark/common.js buffers ``` The above command will find all scripts under `buffers` directory and require @@ -78,7 +78,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244. 2. Run an individual test, for example, buffer-slice.js ```sh -iojs benchmark/buffers/buffer-read.js +node benchmark/buffers/buffer-read.js ``` The output: ``` @@ -95,7 +95,7 @@ This example will run only the first type of url test, with one iteration. ```sh -iojs benchmark/url/url-parse.js type=one n=1 +node benchmark/url/url-parse.js type=one n=1 ``` Output: ``` diff --git a/benchmark/common.js b/benchmark/common.js index c7961e565..158354004 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -19,7 +19,7 @@ if (module === require.main) { var type = process.argv[2]; var testFilter = process.argv[3]; if (!type) { - console.error('usage:\n ./iojs benchmark/common.js [testFilter]'); + console.error('usage:\n ./node benchmark/common.js [testFilter]'); process.exit(1); } diff --git a/benchmark/http-flamegraph.sh b/benchmark/http-flamegraph.sh index 5dc41b541..7df0c1575 100644 --- a/benchmark/http-flamegraph.sh +++ b/benchmark/http-flamegraph.sh @@ -1,7 +1,7 @@ #!/bin/bash cd "$(dirname "$(dirname $0)")" -node=${NODE:-./iojs} +node=${NODE:-./node} name=${NAME:-stacks} @@ -22,7 +22,7 @@ fi ulimit -n 100000 $node benchmark/http_simple.js & nodepid=$! -echo "iojs pid = $nodepid" +echo "node pid = $nodepid" sleep 1 # has to stay alive until dtrace exits @@ -62,7 +62,7 @@ echo 'Turn the stacks into a svg' stackvis dtrace flamegraph-svg < "$name".src > "$name".raw.svg echo 'Prune tiny stacks out of the graph' -iojs -e ' +node -e ' var infile = process.argv[1]; var outfile = process.argv[2]; var output = ""; diff --git a/benchmark/http.sh b/benchmark/http.sh index 63fc02e97..9a844a900 100755 --- a/benchmark/http.sh +++ b/benchmark/http.sh @@ -24,7 +24,7 @@ if [ "$k" = "no" ]; then else k="-k" fi -node=${NODE:-./iojs} +node=${NODE:-./node} $node benchmark/http_simple.js & npid=$! diff --git a/benchmark/http_simple_bench.sh b/benchmark/http_simple_bench.sh index 2066047b9..694822797 100755 --- a/benchmark/http_simple_bench.sh +++ b/benchmark/http_simple_bench.sh @@ -14,7 +14,7 @@ if [ ! -d benchmark/ ]; then fi if [ $SERVER == "127.0.0.1" ]; then - ./iojs benchmark/http_simple.js & + ./node benchmark/http_simple.js & node_pid=$! sleep 1 fi diff --git a/benchmark/plot.R b/benchmark/plot.R index 288e8bd5a..1f902eddf 100755 --- a/benchmark/plot.R +++ b/benchmark/plot.R @@ -52,7 +52,7 @@ ab.load <- function (filename, name) { filename <- args[0:1] -data <- ab.load(filename, "iojs") +data <- ab.load(filename, "node") # histogram diff --git a/benchmark/plot_csv.R b/benchmark/plot_csv.R index 20ab033ef..796097588 100755 --- a/benchmark/plot_csv.R +++ b/benchmark/plot_csv.R @@ -5,7 +5,7 @@ # # Once installed, you can generate some CSV output with a command like this: # -# $ OUTPUT_FORMAT=csv iojs benchmark/http/client-request-body.js > data.csv +# $ OUTPUT_FORMAT=csv node benchmark/http/client-request-body.js > data.csv # $ ./benchmark/plot_csv.R data.csv data.png bytes type # # Where the 3rd argument to this script is the graph's X coordinate, the 4th is diff --git a/configure b/configure index 5c9b29bf2..10baee0d1 100755 --- a/configure +++ b/configure @@ -39,7 +39,7 @@ shared_optgroup = optparse.OptionGroup(parser, "Shared libraries", "built-in dependencies or its shared representations. If necessary, " "provide multiple libraries with comma.") intl_optgroup = optparse.OptionGroup(parser, "Internationalization", - "Flags that lets you enable i18n features in io.js as well as which " + "Flags that lets you enable i18n features in Node.js as well as which " "library you want to build against.") # Options should be in alphabetical order but keep --prefix at the top, @@ -396,7 +396,7 @@ def get_llvm_version(cc): proc = subprocess.Popen(shlex.split(cc) + ['-v'], stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE) except OSError: - print '''io.js configure error: No acceptable C compiler found! + print '''Node.js configure error: No acceptable C compiler found! Please make sure you have a C compiler installed on your system and/or consider adjusting the CC environment variable if you installed @@ -421,7 +421,7 @@ def get_gas_version(cc): stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE) except OSError: - print '''io.js configure error: No acceptable C compiler found! + print '''Node.js configure error: No acceptable C compiler found! Please make sure you have a C compiler installed on your system and/or consider adjusting the CC environment variable if you installed @@ -479,7 +479,7 @@ def cc_macros(): stdout=subprocess.PIPE, stderr=subprocess.PIPE) except OSError: - print '''io.js configure error: No acceptable C compiler found! + print '''Node.js configure error: No acceptable C compiler found! Please make sure you have a C compiler installed on your system and/or consider adjusting the CC environment variable if you installed diff --git a/deps/openssl/config/Makefile b/deps/openssl/config/Makefile index 02f926e73..345b8e11f 100644 --- a/deps/openssl/config/Makefile +++ b/deps/openssl/config/Makefile @@ -9,7 +9,7 @@ linux-x86_64 solaris-x86-gcc solaris64-x86_64-gcc CFG = opensslconf.h SRC_CFG = ../openssl/crypto/$(CFG) BACKUP_FILES = ../openssl/Makefile ../openssl/Makefile.bak $(SRC_CFG) -BACKUP_EXT = iojsbackup +BACKUP_EXT = nodebackup # OPENSSL_CPUID_OBJ is defined in openssl.gypi for use --openssl-no-asm CPUIDFIX = 's/\#define OPENSSL_CPUID_OBJ$$//;' @@ -28,7 +28,7 @@ $(ARCHS): # The current openssl release does not use RC4 asm since it explicitly # specified as `$asm=~s/rc4\-[^:]+//;` in # https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584 -# But iojs has used RC4 asm on MacOS for long time. Fix type of RC4_INT +# But node has used RC4 asm on MacOS for long time. Fix type of RC4_INT # into `unsigned int` in opensslconf.h of darwin64-x86_64-cc to work on # the RC4 asm. fixdarwin64: diff --git a/deps/openssl/config/opensslconf.h b/deps/openssl/config/opensslconf.h index 76efd0863..c27e8a47d 100644 --- a/deps/openssl/config/opensslconf.h +++ b/deps/openssl/config/opensslconf.h @@ -3,7 +3,7 @@ specifying a target argument, where it includes several defines that depend on OS and architecture platform. - In iojs, we statically mapped --dest-os and --dest-cpu options in + In node, we statically mapped --dest-os and --dest-cpu options in configure to the target of Configure in OpenSSL and make `deps/openssl/conf/openssconf.h` so as to include each file according to its target by checking pre-defined compiler macros. @@ -11,9 +11,9 @@ Included opnesslconf.h files for supported target architectures can be generated by `Makefile` and stored under `archs/{target}/opensslconf.h`. The Makefile also fixes several - defines to meet iojs build requirements. + defines to meet node build requirements. - Here is a map table of configure options in iojs, target arch of + Here is a map table of configure options in node, target arch of Configure in OpenSSL and CI support. | --dest-os | --dest-cpu | OpenSSL target arch | CI | diff --git a/deps/openssl/doc/UPGRADING.md b/deps/openssl/doc/UPGRADING.md index 81f129c43..2f8d5b4a3 100644 --- a/deps/openssl/doc/UPGRADING.md +++ b/deps/openssl/doc/UPGRADING.md @@ -1,7 +1,7 @@ -## How to upgrade openssl library in io.js +## How to upgrade openssl library in Node.js This document describes the procedure to upgrade openssl from 1.0.1m -to 1.0.2a in io.js. +to 1.0.2a in Node.js. ### Build System and Upgrading Overview @@ -17,16 +17,16 @@ hardware performance according to the type of cpus. `Configure TABLE` shows various build parameters that depend on each os and arch. -In io.js, build target is defined as `--dest-os` and `--dest-cpu` in +In Node.js, build target is defined as `--dest-os` and `--dest-cpu` in configure options which are different from the one that is defined in openssl and it's build system is gyp that is based on python, therefore we cannot use the openssl build system directly. -In order to build openssl with gyp in iojs, files of opensslconf.h and +In order to build openssl with gyp in node, files of opensslconf.h and asm are generated in advance for several supported platforms. Here is a map table to show conf(opensslconf.h) and asm between -the openssl target and configuration parameters of os and cpu in iojs. +the openssl target and configuration parameters of os and cpu in node. The tested platform in CI are also listed. | --dest-os | --dest-cpu | conf | asm | openssl target | CI | @@ -74,7 +74,7 @@ build. Furthermore, these perl scripts check the version of assembler and generate asm files according to the supported instructions in each compiler. -Since perl is not a build requirement in iojs, they all should be +Since perl is not a build requirement in node, they all should be generated in advance and statically stored in the repository. We provide two sets of asm files, one is asm_latest(avx2 and addx supported) in `deps/openssl/asm` and the other asm_obsolete(without @@ -91,7 +91,7 @@ https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha5 otherwise asm_obsolete are used. The following is the detail instruction steps how to upgrade openssl -version from 1.0.1m to 1.0.2a in iojs. +version from 1.0.1m to 1.0.2a in node. ### 1. Replace openssl source in `deps/openssl/openssl` Remove old openssl sources in `deps/openssl/openssl` . @@ -104,18 +104,18 @@ There are three kinds of private patches to be applied in openssl-1.0.2a. - The two fixes of assembly error on ia32 win32. masm is no longer supported in openssl. We should move to use nasm or yasm in future - version of iojs. + version of node. - The fix of openssl-cli built on win. Key press requirement of openssl-cli in win causes timeout failures of several tests. - Backport patches for alt cert feature from openssl-1.1.x. Root certs - of 1024bit RSA key length were deprecated in io.js. When a tls - server has a cross root cert, io.js client leads CERT_UNTRUSTED + of 1024bit RSA key length were deprecated in Node.js. When a tls + server has a cross root cert, Node.js client leads CERT_UNTRUSTED error because openssl does not find alternate cert chains. This fix supports its feature but was made the current master which is openssl-1.1.x. We backported them privately into openssl-1.0.2 on - iojs. + node. ### 3. Replace openssl header files in `deps/openssl/openssl/include/openssl` all header files in `deps/openssl/openssl/include/openssl/*.h` are @@ -142,7 +142,7 @@ One fix of opensslconf.h is needed in 64-bit MacOS. The current openssl release does not use RC4 asm since it explicitly specified as `$asm=~s/rc4\-[^:]+//;` in https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584 -But iojs has used RC4 asm on MacOS for long time. Fix type of RC4_INT +But node has used RC4 asm on MacOS for long time. Fix type of RC4_INT into `unsigned int` in opensslconf.h of darwin64-x86_64-cc to work on the RC4 asm. @@ -154,7 +154,7 @@ be obtained via `Configure TABLE`. Its list is put in the table of There is no way to verify all necessary sources automatically. We can only carefully look at the source list and compiled objects in Makefile of openssl and compare the compiled objects that stored -stored under `out/Release/obj.target/openssl/deps/openssl/' in iojs. +stored under `out/Release/obj.target/openssl/deps/openssl/' in node. ### 6. ASM files for openssl We provide two sets of asm files. One is for the latest assembler diff --git a/doc/iojs.1 b/doc/iojs.1 deleted file mode 100644 index 8a94af35d..000000000 --- a/doc/iojs.1 +++ /dev/null @@ -1,731 +0,0 @@ -.TH IO.JS "1" "2010" "" "" - - -.SH "NAME" -iojs \- Server-side JavaScript - -.SH SYNOPSIS - - -.B iojs -[ -.B \-v -] -[ -.B \-\-debug -| -.B \-\-debug-brk -] -[ -.B \-\-v8-options -] -.br - [ -.B \-e -.I command -| -.I script.js -] -[ -.I arguments -] - -Execute without arguments to start the REPL. - - -.SH DESCRIPTION - -io.js is a set of libraries for javascript which allows -it to be used outside of the browser. It is primarily -focused on creating simple, easy to build network clients -and servers. - - -.SH OPTIONS - - -v, --version print iojs's version - - -e, --eval script evaluate script - - -p, --print print result of --eval - - -i, --interactive always enter the REPL even if stdin - does not appear to be a terminal - - -r, --require module to preload at startup - - --no-deprecation silence deprecation warnings - - --trace-deprecation show stack traces on deprecations - - --throw-deprecation throw errors on deprecations - - --v8-options print v8 command line options - - -.SH ENVIRONMENT VARIABLES - -.IP NODE_PATH -\':\'\-separated list of directories prefixed to the module search path. - -.IP NODE_DISABLE_COLORS -If set to 1 then colors will not be used in the REPL. - -.SH V8 OPTIONS - - --use_strict (enforce strict mode) - type: bool default: false - --es_staging (enable all completed harmony features) - type: bool default: false - --harmony (enable all completed harmony features) - type: bool default: false - --harmony_shipping (enable all shipped harmony features) - type: bool default: true - --harmony_modules (enable "harmony modules (implies block scoping)" (in progress)) - type: bool default: false - --harmony_arrays (enable "harmony array methods" (in progress)) - type: bool default: false - --harmony_array_includes (enable "harmony Array.prototype.includes" (in progress)) - type: bool default: false - --harmony_regexps (enable "harmony regular expression extensions" (in progress)) - type: bool default: false - --harmony_arrow_functions (enable "harmony arrow functions" (in progress)) - type: bool default: false - --harmony_proxies (enable "harmony proxies" (in progress)) - type: bool default: false - --harmony_sloppy (enable "harmony features in sloppy mode" (in progress)) - type: bool default: false - --harmony_unicode (enable "harmony unicode escapes" (in progress)) - type: bool default: false - --harmony_tostring (enable "harmony toString") - type: bool default: false - --harmony_numeric_literals (enable "harmony numeric literals") - type: bool default: true - --harmony_strings (enable "harmony string methods") - type: bool default: true - --harmony_scoping (enable "harmony block scoping") - type: bool default: true - --harmony_classes (enable "harmony classes (implies block scoping & object literal extension)") - type: bool default: true - --harmony_object_literals (enable "harmony object literal extensions") - type: bool default: true - --harmony_templates (enable "harmony template literals") - type: bool default: true - --compiled_keyed_generic_loads (use optimizing compiler to generate keyed generic load stubs) - type: bool default: false - --pretenuring_call_new (pretenure call new) - type: bool default: false - --allocation_site_pretenuring (pretenure with allocation sites) - type: bool default: true - --trace_pretenuring (trace pretenuring decisions of HAllocate instructions) - type: bool default: false - --trace_pretenuring_statistics (trace allocation site pretenuring statistics) - type: bool default: false - --track_fields (track fields with only smi values) - type: bool default: true - --track_double_fields (track fields with double values) - type: bool default: true - --track_heap_object_fields (track fields with heap values) - type: bool default: true - --track_computed_fields (track computed boilerplate fields) - type: bool default: true - --track_field_types (track field types) - type: bool default: true - --smi_binop (support smi representation in binary operations) - type: bool default: true - --vector_ics (support vector-based ics) - type: bool default: false - --optimize_for_size (Enables optimizations which favor memory size over execution speed.) - type: bool default: false - --unbox_double_arrays (automatically unbox arrays of doubles) - type: bool default: true - --string_slices (use string slices) - type: bool default: true - --crankshaft (use crankshaft) - type: bool default: true - --hydrogen_filter (optimization filter) - type: string default: * - --use_gvn (use hydrogen global value numbering) - type: bool default: true - --gvn_iterations (maximum number of GVN fix-point iterations) - type: int default: 3 - --use_canonicalizing (use hydrogen instruction canonicalizing) - type: bool default: true - --use_inlining (use function inlining) - type: bool default: true - --use_escape_analysis (use hydrogen escape analysis) - type: bool default: true - --use_allocation_folding (use allocation folding) - type: bool default: true - --use_local_allocation_folding (only fold in basic blocks) - type: bool default: false - --use_write_barrier_elimination (eliminate write barriers targeting allocations in optimized code) - type: bool default: true - --max_inlining_levels (maximum number of inlining levels) - type: int default: 5 - --max_inlined_source_size (maximum source size in bytes considered for a single inlining) - type: int default: 600 - --max_inlined_nodes (maximum number of AST nodes considered for a single inlining) - type: int default: 196 - --max_inlined_nodes_cumulative (maximum cumulative number of AST nodes considered for inlining) - type: int default: 400 - --loop_invariant_code_motion (loop invariant code motion) - type: bool default: true - --fast_math (faster (but maybe less accurate) math functions) - type: bool default: true - --collect_megamorphic_maps_from_stub_cache (crankshaft harvests type feedback from stub cache) - type: bool default: true - --hydrogen_stats (print statistics for hydrogen) - type: bool default: false - --trace_check_elimination (trace check elimination phase) - type: bool default: false - --trace_hydrogen (trace generated hydrogen to file) - type: bool default: false - --trace_hydrogen_filter (hydrogen tracing filter) - type: string default: * - --trace_hydrogen_stubs (trace generated hydrogen for stubs) - type: bool default: false - --trace_hydrogen_file (trace hydrogen to given file name) - type: string default: NULL - --trace_phase (trace generated IR for specified phases) - type: string default: HLZ - --trace_inlining (trace inlining decisions) - type: bool default: false - --trace_load_elimination (trace load elimination) - type: bool default: false - --trace_store_elimination (trace store elimination) - type: bool default: false - --trace_alloc (trace register allocator) - type: bool default: false - --trace_all_uses (trace all use positions) - type: bool default: false - --trace_range (trace range analysis) - type: bool default: false - --trace_gvn (trace global value numbering) - type: bool default: false - --trace_representation (trace representation types) - type: bool default: false - --trace_removable_simulates (trace removable simulates) - type: bool default: false - --trace_escape_analysis (trace hydrogen escape analysis) - type: bool default: false - --trace_allocation_folding (trace allocation folding) - type: bool default: false - --trace_track_allocation_sites (trace the tracking of allocation sites) - type: bool default: false - --trace_migration (trace object migration) - type: bool default: false - --trace_generalization (trace map generalization) - type: bool default: false - --stress_pointer_maps (pointer map for every instruction) - type: bool default: false - --stress_environments (environment for every instruction) - type: bool default: false - --deopt_every_n_times (deoptimize every n times a deopt point is passed) - type: int default: 0 - --deopt_every_n_garbage_collections (deoptimize every n garbage collections) - type: int default: 0 - --print_deopt_stress (print number of possible deopt points) - type: bool default: false - --trap_on_deopt (put a break point before deoptimizing) - type: bool default: false - --trap_on_stub_deopt (put a break point before deoptimizing a stub) - type: bool default: false - --deoptimize_uncommon_cases (deoptimize uncommon cases) - type: bool default: true - --polymorphic_inlining (polymorphic inlining) - type: bool default: true - --use_osr (use on-stack replacement) - type: bool default: true - --array_bounds_checks_elimination (perform array bounds checks elimination) - type: bool default: true - --trace_bce (trace array bounds check elimination) - type: bool default: false - --array_bounds_checks_hoisting (perform array bounds checks hoisting) - type: bool default: false - --array_index_dehoisting (perform array index dehoisting) - type: bool default: true - --analyze_environment_liveness (analyze liveness of environment slots and zap dead values) - type: bool default: true - --load_elimination (use load elimination) - type: bool default: true - --check_elimination (use check elimination) - type: bool default: true - --store_elimination (use store elimination) - type: bool default: false - --dead_code_elimination (use dead code elimination) - type: bool default: true - --fold_constants (use constant folding) - type: bool default: true - --trace_dead_code_elimination (trace dead code elimination) - type: bool default: false - --unreachable_code_elimination (eliminate unreachable code) - type: bool default: true - --trace_osr (trace on-stack replacement) - type: bool default: false - --stress_runs (number of stress runs) - type: int default: 0 - --lookup_sample_by_shared (when picking a function to optimize, watch for shared function info, not JSFunction itself) - type: bool default: true - --cache_optimized_code (cache optimized code for closures) - type: bool default: true - --flush_optimized_code_cache (flushes the cache of optimized code for closures on every GC) - type: bool default: true - --inline_construct (inline constructor calls) - type: bool default: true - --inline_arguments (inline functions with arguments object) - type: bool default: true - --inline_accessors (inline JavaScript accessors) - type: bool default: true - --escape_analysis_iterations (maximum number of escape analysis fix-point iterations) - type: int default: 2 - --optimize_for_in (optimize functions containing for-in loops) - type: bool default: true - --concurrent_recompilation (optimizing hot functions asynchronously on a separate thread) - type: bool default: true - --job_based_recompilation (post tasks to v8::Platform instead of using a thread for concurrent recompilation) - type: bool default: false - --trace_concurrent_recompilation (track concurrent recompilation) - type: bool default: false - --concurrent_recompilation_queue_length (the length of the concurrent compilation queue) - type: int default: 8 - --concurrent_recompilation_delay (artificial compilation delay in ms) - type: int default: 0 - --block_concurrent_recompilation (block queued jobs until released) - type: bool default: false - --concurrent_osr (concurrent on-stack replacement) - type: bool default: true - --omit_map_checks_for_leaf_maps (do not emit check maps for constant values that have a leaf map, deoptimize the optimized code if the layout of the maps changes.) - type: bool default: true - --turbo_filter (optimization filter for TurboFan compiler) - type: string default: ~ - --trace_turbo (trace generated TurboFan IR) - type: bool default: false - --trace_turbo_graph (trace generated TurboFan graphs) - type: bool default: false - --trace_turbo_cfg_file (trace turbo cfg graph (for C1 visualizer) to a given file name) - type: string default: NULL - --trace_turbo_types (trace TurboFan's types) - type: bool default: true - --trace_turbo_scheduler (trace TurboFan's scheduler) - type: bool default: false - --trace_turbo_reduction (trace TurboFan's various reducers) - type: bool default: false - --trace_turbo_jt (trace TurboFan's jump threading) - type: bool default: false - --turbo_asm (enable TurboFan for asm.js code) - type: bool default: true - --turbo_verify (verify TurboFan graphs at each phase) - type: bool default: false - --turbo_stats (print TurboFan statistics) - type: bool default: false - --turbo_types (use typed lowering in TurboFan) - type: bool default: true - --turbo_source_positions (track source code positions when building TurboFan IR) - type: bool default: false - --context_specialization (enable context specialization in TurboFan) - type: bool default: false - --turbo_deoptimization (enable deoptimization in TurboFan) - type: bool default: false - --turbo_inlining (enable inlining in TurboFan) - type: bool default: false - --turbo_inlining_intrinsics (enable inlining of intrinsics in TurboFan) - type: bool default: false - --trace_turbo_inlining (trace TurboFan inlining) - type: bool default: false - --loop_assignment_analysis (perform loop assignment analysis) - type: bool default: true - --turbo_profiling (enable profiling in TurboFan) - type: bool default: false - --turbo_reuse_spill_slots (reuse spill slots in TurboFan) - type: bool default: true - --turbo_delay_ssa_decon (delay ssa deconstruction in TurboFan register allocator) - type: bool default: false - --turbo_move_optimization (optimize gap moves in TurboFan) - type: bool default: true - --turbo_jt (enable jump threading) - type: bool default: true - --typed_array_max_size_in_heap (threshold for in-heap typed array) - type: int default: 64 - --frame_count (number of stack frames inspected by the profiler) - type: int default: 1 - --interrupt_budget (execution budget before interrupt is triggered) - type: int default: 6144 - --type_info_threshold (percentage of ICs that must have type info to allow optimization) - type: int default: 25 - --generic_ic_threshold (max percentage of megamorphic/generic ICs to allow optimization) - type: int default: 30 - --self_opt_count (call count before self-optimization) - type: int default: 130 - --trace_opt_verbose (extra verbose compilation tracing) - type: bool default: false - --debug_code (generate extra code (assertions) for debugging) - type: bool default: false - --code_comments (emit comments in code disassembly) - type: bool default: false - --enable_sse3 (enable use of SSE3 instructions if available) - type: bool default: true - --enable_sse4_1 (enable use of SSE4.1 instructions if available) - type: bool default: true - --enable_sahf (enable use of SAHF instruction if available (X64 only)) - type: bool default: true - --enable_avx (enable use of AVX instructions if available) - type: bool default: true - --enable_fma3 (enable use of FMA3 instructions if available) - type: bool default: true - --enable_vfp3 (enable use of VFP3 instructions if available) - type: bool default: true - --enable_armv7 (enable use of ARMv7 instructions if available (ARM only)) - type: bool default: true - --enable_armv8 (enable use of ARMv8 instructions if available (ARM 32-bit only)) - type: bool default: true - --enable_neon (enable use of NEON instructions if available (ARM only)) - type: bool default: true - --enable_sudiv (enable use of SDIV and UDIV instructions if available (ARM only)) - type: bool default: true - --enable_mls (enable use of MLS instructions if available (ARM only)) - type: bool default: true - --enable_movw_movt (enable loading 32-bit constant by means of movw/movt instruction pairs (ARM only)) - type: bool default: false - --enable_unaligned_accesses (enable unaligned accesses for ARMv7 (ARM only)) - type: bool default: true - --enable_32dregs (enable use of d16-d31 registers on ARM - this requires VFP3) - type: bool default: true - --enable_vldr_imm (enable use of constant pools for double immediate (ARM only)) - type: bool default: false - --force_long_branches (force all emitted branches to be in long mode (MIPS only)) - type: bool default: false - --expose_natives_as (expose natives in global object) - type: string default: NULL - --expose_debug_as (expose debug in global object) - type: string default: NULL - --expose_free_buffer (expose freeBuffer extension) - type: bool default: false - --expose_gc (expose gc extension) - type: bool default: false - --expose_gc_as (expose gc extension under the specified name) - type: string default: NULL - --expose_externalize_string (expose externalize string extension) - type: bool default: false - --expose_trigger_failure (expose trigger-failure extension) - type: bool default: false - --stack_trace_limit (number of stack frames to capture) - type: int default: 10 - --builtins_in_stack_traces (show built-in functions in stack traces) - type: bool default: false - --disable_native_files (disable builtin natives files) - type: bool default: false - --inline_new (use fast inline allocation) - type: bool default: true - --trace_codegen (print name of functions for which code is generated) - type: bool default: false - --trace (trace function calls) - type: bool default: false - --mask_constants_with_cookie (use random jit cookie to mask large constants) - type: bool default: true - --lazy (use lazy compilation) - type: bool default: true - --trace_opt (trace lazy optimization) - type: bool default: false - --trace_opt_stats (trace lazy optimization statistics) - type: bool default: false - --opt (use adaptive optimizations) - type: bool default: true - --always_opt (always try to optimize functions) - type: bool default: false - --always_osr (always try to OSR functions) - type: bool default: false - --prepare_always_opt (prepare for turning on always opt) - type: bool default: false - --trace_deopt (trace optimize function deoptimization) - type: bool default: false - --trace_stub_failures (trace deoptimization of generated code stubs) - type: bool default: false - --serialize_toplevel (enable caching of toplevel scripts) - type: bool default: true - --serialize_inner (enable caching of inner functions) - type: bool default: false - --trace_serializer (print code serializer trace) - type: bool default: false - --min_preparse_length (minimum length for automatic enable preparsing) - type: int default: 1024 - --max_opt_count (maximum number of optimization attempts before giving up.) - type: int default: 10 - --compilation_cache (enable compilation cache) - type: bool default: true - --cache_prototype_transitions (cache prototype transitions) - type: bool default: true - --cpu_profiler_sampling_interval (CPU profiler sampling interval in microseconds) - type: int default: 1000 - --trace_debug_json (trace debugging JSON request/response) - type: bool default: false - --trace_js_array_abuse (trace out-of-bounds accesses to JS arrays) - type: bool default: false - --trace_external_array_abuse (trace out-of-bounds-accesses to external arrays) - type: bool default: false - --trace_array_abuse (trace out-of-bounds accesses to all arrays) - type: bool default: false - --enable_liveedit (enable liveedit experimental feature) - type: bool default: true - --hard_abort (abort by crashing) - type: bool default: true - --stack_size (default size of stack region v8 is allowed to use (in kBytes)) - type: int default: 984 - --max_stack_trace_source_length (maximum length of function source code printed in a stack trace.) - type: int default: 300 - --always_inline_smi_code (always inline smi code in non-opt code) - type: bool default: false - --min_semi_space_size (min size of a semi-space (in MBytes), the new space consists of twosemi-spaces) - type: int default: 0 - --target_semi_space_size (target size of a semi-space (in MBytes) before triggering a GC) - type: int default: 0 - --max_semi_space_size (max size of a semi-space (in MBytes), the new space consists of twosemi-spaces) - type: int default: 0 - --semi_space_growth_factor (factor by which to grow the new space) - type: int default: 2 - --experimental_new_space_growth_heuristic (Grow the new space based on the percentage of survivors instead of their absolute value.) - type: bool default: false - --max_old_space_size (max size of the old space (in Mbytes)) - type: int default: 0 - --initial_old_space_size (initial old space size (in Mbytes)) - type: int default: 0 - --max_executable_size (max size of executable memory (in Mbytes)) - type: int default: 0 - --gc_global (always perform global GCs) - type: bool default: false - --gc_interval (garbage collect after allocations) - type: int default: -1 - --trace_gc (print one trace line following each garbage collection) - type: bool default: false - --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection) - type: bool default: false - --trace_gc_ignore_scavenger (do not print trace line after scavenger collection) - type: bool default: false - --trace_idle_notification (print one trace line following each idle notification) - type: bool default: false - --trace_idle_notification_verbose (prints the heap state used by the idle notification) - type: bool default: false - --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit) - type: bool default: false - --print_max_heap_committed (print statistics of the maximum memory committed for the heap in name=value format on exit) - type: bool default: false - --trace_gc_verbose (print more details following each garbage collection) - type: bool default: false - --trace_fragmentation (report fragmentation for old pointer and data pages) - type: bool default: false - --collect_maps (garbage collect maps from which no objects can be reached) - type: bool default: true - --weak_embedded_maps_in_optimized_code (make maps embedded in optimized code weak) - type: bool default: true - --weak_embedded_objects_in_optimized_code (make objects embedded in optimized code weak) - type: bool default: true - --flush_code (flush code that we expect not to use again (during full gc)) - type: bool default: true - --flush_code_incrementally (flush code that we expect not to use again (incrementally)) - type: bool default: true - --trace_code_flushing (trace code flushing progress) - type: bool default: false - --age_code (track un-executed functions to age code and flush only old code (required for code flushing)) - type: bool default: true - --incremental_marking (use incremental marking) - type: bool default: true - --incremental_marking_steps (do incremental marking steps) - type: bool default: true - --concurrent_sweeping (use concurrent sweeping) - type: bool default: true - --trace_incremental_marking (trace progress of the incremental marking) - type: bool default: false - --track_gc_object_stats (track object counts and memory usage) - type: bool default: false - --heap_profiler_trace_objects (Dump heap object allocations/movements/size_updates) - type: bool default: false - --use_idle_notification (Use idle notification to reduce memory footprint.) - type: bool default: true - --use_ic (use inline caching) - type: bool default: true - --trace_ic (trace inline cache state transitions) - type: bool default: false - --native_code_counters (generate extra code for manipulating stats counters) - type: bool default: false - --always_compact (Perform compaction on every full GC) - type: bool default: false - --never_compact (Never perform compaction on full GC - testing only) - type: bool default: false - --compact_code_space (Compact code space on full non-incremental collections) - type: bool default: true - --incremental_code_compaction (Compact code space on full incremental collections) - type: bool default: true - --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.) - type: bool default: true - --use_marking_progress_bar (Use a progress bar to scan large objects in increments when incremental marking is active.) - type: bool default: true - --zap_code_space (Zap free memory in code space with 0xCC while sweeping.) - type: bool default: true - --random_seed (Default seed for initializing random generator (0, the default, means to use system random).) - type: int default: 0 - --trace_weak_arrays (trace WeakFixedArray usage) - type: bool default: false - --track_prototype_users (keep track of which maps refer to a given prototype object) - type: bool default: false - --use_verbose_printer (allows verbose printing) - type: bool default: true - --allow_natives_syntax (allow natives syntax) - type: bool default: false - --trace_parse (trace parsing and preparsing) - type: bool default: false - --trace_sim (Trace simulator execution) - type: bool default: false - --debug_sim (Enable debugging the simulator) - type: bool default: false - --check_icache (Check icache flushes in ARM and MIPS simulator) - type: bool default: false - --stop_sim_at (Simulator stop after x number of instructions) - type: int default: 0 - --sim_stack_alignment (Stack alingment in bytes in simulator (4 or 8, 8 is default)) - type: int default: 8 - --sim_stack_size (Stack size of the ARM64 and MIPS64 simulator in kBytes (default is 2 MB)) - type: int default: 2048 - --log_regs_modified (When logging register values, only print modified registers.) - type: bool default: true - --log_colour (When logging, try to use coloured output.) - type: bool default: true - --ignore_asm_unimplemented_break (Don't break for ASM_UNIMPLEMENTED_BREAK macros.) - type: bool default: false - --trace_sim_messages (Trace simulator debug messages. Implied by --trace-sim.) - type: bool default: false - --stack_trace_on_illegal (print stack trace when an illegal exception is thrown) - type: bool default: false - --abort_on_uncaught_exception (abort program (dump core) when an uncaught exception is thrown) - type: bool default: false - --randomize_hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed)) - type: bool default: true - --hash_seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed)) - type: int default: 0 - --profile_deserialization (Print the time it takes to deserialize the snapshot.) - type: bool default: false - --regexp_optimization (generate optimized regexp code) - type: bool default: true - --testing_bool_flag (testing_bool_flag) - type: bool default: true - --testing_maybe_bool_flag (testing_maybe_bool_flag) - type: maybe_bool default: unset - --testing_int_flag (testing_int_flag) - type: int default: 13 - --testing_float_flag (float-flag) - type: float default: 2.5 - --testing_string_flag (string-flag) - type: string default: Hello, world! - --testing_prng_seed (Seed used for threading test randomness) - type: int default: 42 - --testing_serialization_file (file in which to serialize heap) - type: string default: /tmp/serdes - --startup_blob (Write V8 startup blob file. (mksnapshot only)) - type: string default: NULL - --profile_hydrogen_code_stub_compilation (Print the time it takes to lazily compile hydrogen code stubs.) - type: bool default: false - --predictable (enable predictable mode) - type: bool default: false - --help (Print usage message, including flags, on console) - type: bool default: true - --dump_counters (Dump counters on exit) - type: bool default: false - --debugger (Enable JavaScript debugger) - type: bool default: false - --map_counters (Map counters to a file) - type: string default: - --js_arguments (Pass all remaining arguments to the script. Alias for "--".) - type: arguments default: - --gdbjit (enable GDBJIT interface (disables compacting GC)) - type: bool default: false - --gdbjit_full (enable GDBJIT interface for all code objects) - type: bool default: false - --gdbjit_dump (dump elf objects with debug info to disk) - type: bool default: false - --gdbjit_dump_filter (dump only objects containing this substring) - type: string default: - --force_marking_deque_overflows (force overflows of marking deque by reducing it's size to 64 words) - type: bool default: false - --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows)) - type: bool default: false - --log (Minimal logging (no API, code, GC, suspect, or handles samples).) - type: bool default: false - --log_all (Log all events to the log file.) - type: bool default: false - --log_api (Log API events to the log file.) - type: bool default: false - --log_code (Log code events to the log file without profiling.) - type: bool default: false - --log_gc (Log heap samples on garbage collection for the hp2ps tool.) - type: bool default: false - --log_handles (Log global handle events.) - type: bool default: false - --log_snapshot_positions (log positions of (de)serialized objects in the snapshot.) - type: bool default: false - --log_suspect (Log suspect operations.) - type: bool default: false - --prof (Log statistical profiling information (implies --log-code).) - type: bool default: false - --prof_browser_mode (Used with --prof, turns on browser-compatible mode for profiling.) - type: bool default: true - --log_regexp (Log regular expression execution.) - type: bool default: false - --logfile (Specify the name of the log file.) - type: string default: v8.log - --logfile_per_isolate (Separate log files for each isolate.) - type: bool default: true - --ll_prof (Enable low-level linux profiler.) - type: bool default: false - --perf_basic_prof (Enable perf linux profiler (basic support).) - type: bool default: false - --perf_jit_prof (Enable perf linux profiler (experimental annotate support).) - type: bool default: false - --gc_fake_mmap (Specify the name of the file for fake gc mmap used in ll_prof) - type: string default: /tmp/__v8_gc__ - --log_internal_timer_events (Time internal events.) - type: bool default: false - --log_timer_events (Time events including external callbacks.) - type: bool default: false - --log_instruction_stats (Log AArch64 instruction statistics.) - type: bool default: false - --log_instruction_file (AArch64 instruction statistics log file.) - type: string default: arm64_inst.csv - --log_instruction_period (AArch64 instruction statistics logging period.) - type: int default: 4194304 - --redirect_code_traces (output deopt information and disassembly into file code--.asm) - type: bool default: false - --redirect_code_traces_to (output deopt information and disassembly into the given file) - type: string default: NULL - --hydrogen_track_positions (track source code positions when building IR) - type: bool default: false - --trace_elements_transitions (trace elements transitions) - type: bool default: false - --trace_creation_allocation_sites (trace the creation of allocation sites) - type: bool default: false - --print_code_stubs (print code stubs) - type: bool default: false - --test_secondary_stub_cache (test secondary stub cache by disabling the primary one) - type: bool default: false - --test_primary_stub_cache (test primary stub cache by disabling the secondary one) - type: bool default: false - --print_code (print generated code) - type: bool default: false - --print_opt_code (print optimized code) - type: bool default: false - --print_unopt_code (print unoptimized code before printing optimized code based on it) - type: bool default: false - --print_code_verbose (print more information for code) - type: bool default: false - --print_builtin_code (print generated code for builtins) - type: bool default: false - --sodium (print generated code output suitable for use with the Sodium code viewer) - type: bool default: false - --print_all_code (enable all flags related to printing code) - type: bool default: false - -.SH RESOURCES AND DOCUMENTATION - -See the website for documentation http://iojs.org/ - -Mailing list: http://groups.google.com/group/nodejs - -IRC: irc.freenode.net #io.js diff --git a/lib/_debugger.js b/lib/_debugger.js index 4c503d2f5..0d67c7a39 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -14,9 +14,9 @@ exports.start = function(argv, stdin, stdout) { argv || (argv = process.argv.slice(2)); if (argv.length < 1) { - console.error('Usage: iojs debug script.js'); - console.error(' iojs debug :'); - console.error(' iojs debug -p '); + console.error('Usage: node debug script.js'); + console.error(' node debug :'); + console.error(' node debug -p '); process.exit(1); } diff --git a/node b/node new file mode 120000 index 000000000..0277cbda6 --- /dev/null +++ b/node @@ -0,0 +1 @@ +out/Release/node \ No newline at end of file diff --git a/node.gyp b/node.gyp index de0e47ec2..9509b800d 100644 --- a/node.gyp +++ b/node.gyp @@ -80,7 +80,7 @@ 'targets': [ { - 'target_name': 'iojs', + 'target_name': 'node', 'type': '<(node_target_type)', 'dependencies': [ @@ -527,10 +527,10 @@ { 'action_name': 'node_dtrace_provider_o', 'inputs': [ - '<(OBJ_DIR)/iojs/src/node_dtrace.o', + '<(OBJ_DIR)/node/src/node_dtrace.o', ], 'outputs': [ - '<(OBJ_DIR)/iojs/src/node_dtrace_provider.o' + '<(OBJ_DIR)/node/src/node_dtrace_provider.o' ], 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d', '<@(_inputs)', '-o', '<@(_outputs)' ] @@ -580,7 +580,7 @@ '<(SHARED_INTERMEDIATE_DIR)/v8constants.h' ], 'outputs': [ - '<(OBJ_DIR)/iojs/src/node_dtrace_ustack.o' + '<(OBJ_DIR)/node/src/node_dtrace_ustack.o' ], 'conditions': [ [ 'target_arch=="ia32"', { diff --git a/iojs_README.md b/node_README.md similarity index 87% rename from iojs_README.md rename to node_README.md index ca5ab327b..d0ef9f0de 100644 --- a/iojs_README.md +++ b/node_README.md @@ -1,40 +1,37 @@ -io.js +Node.js ===== -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/iojs/io.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This repository began as a GitHub fork of [joyent/node](https://github.com/joyent/node). -io.js contributions, releases, and contributorship are under an +Node.js contributions, releases, and contributorship are under an [open governance model](./GOVERNANCE.md). We intend to land, with increasing regularity, releases which are compatible with the npm ecosystem that has been built to date for Node.js. -## Is it io.js or IO.js or iojs or IOjs or iOjS? +## Is it Node.js or NODE.js or nodejs or NODEjs? -The official name is **io.js**, which should never be capitalized, -especially not at the start of a sentence, unless it is being -displayed in a location that is customarily all-caps (such as -the title of man pages). +The official name is **Node.js**. ## Download Binaries, installers, and source tarballs are available at -. +. -**Releases** are available at , listed under -their version string. The symlink +**Releases** are available at , listed under +their version string. The symlink will point to the latest release directory. **Nightly** builds are available at -, listed under their version +, listed under their version string which includes their date (in UTC time) and the commit SHA at the HEAD of the release. **API documentation** is available in each release and nightly -directory under _docs_. points to the the +directory under _docs_. points to the the latest version. ### Verifying Binaries @@ -45,10 +42,10 @@ download. To check that a downloaded file matches the checksum, run it through `sha256sum` with a command such as: ``` -$ grep iojs-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - +$ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - ``` -_(Where "iojs-vx.y.z.tar.gz" is the name of the file you have +_(Where "node-vx.y.z.tar.gz" is the name of the file you have downloaded)_ Additionally, releases (not nightlies) have GPG signed copies of @@ -68,7 +65,7 @@ $ gpg --keyserver pool.sks-keyservers.net \ _(Include each of the key fingerprints at the end of this command.)_ You can then use `gpg --verify SHASUMS256.txt.asc` to verify that the -file has been signed by an authorized member of the io.js team. +file has been signed by an authorized member of the Node.js team. Once verified, use the SHASUMS256.txt.asc file to get the checksum for the binary verification command above. @@ -116,7 +113,7 @@ $ make doc To read the documentation: ```text -$ man doc/iojs.1 +$ man doc/node.1 ``` ### Windows @@ -255,16 +252,16 @@ as `deps/icu` (You'll have: `deps/icu/source/...`) * [CONTRIBUTING.md](./CONTRIBUTING.md) * [GOVERNANCE.md](./GOVERNANCE.md) * IRC: - [#io.js on Freenode.net](http://webchat.freenode.net?channels=io.js&uio=d4) -* [iojs/io.js on Gitter](https://gitter.im/iojs/io.js) + [#node.js on Freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4) +* [nodejs/node on Gitter](https://gitter.im/nodejs/node) ## Current Project Team Members -The io.js project team comprises a group of core collaborators and a sub-group +The Node.js project team comprises a group of core collaborators and a sub-group that forms the _Technical Committee_ (TC) which governs the project. For more -information about the governance of the io.js project, see +information about the governance of the Node.js project, see [GOVERNANCE.md](./GOVERNANCE.md). * **Isaac Z. Schlueter** ([@isaacs](https://github.com/isaacs)) <i@izs.me> (Technical Committee) @@ -301,4 +298,4 @@ information about the governance of the io.js project, see * **Yosuke Furukawa** ([@yosuke-furukawa](https://github.com/yosuke-furukawa)) <yosuke.furukawa@gmail.com> Collaborators follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in -maintaining the io.js project. +maintaining the Node.js project. diff --git a/src/node.cc b/src/node.cc index f47dd7220..6b24daa36 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3056,11 +3056,11 @@ static bool ParseDebugOpt(const char* arg) { } static void PrintHelp() { - printf("Usage: iojs [options] [ -e script | script.js ] [arguments] \n" - " iojs debug script.js [arguments] \n" + printf("Usage: node [options] [ -e script | script.js ] [arguments] \n" + " node debug script.js [arguments] \n" "\n" "Options:\n" - " -v, --version print io.js version\n" + " -v, --version print Node.js version\n" " -e, --eval script evaluate script\n" " -p, --print evaluate script and print result\n" " -i, --interactive always enter the REPL even if stdin\n" @@ -3097,7 +3097,7 @@ static void PrintHelp() { #endif #endif "\n" - "Documentation can be found at https://iojs.org/\n"); + "Documentation can be found at https://nodejs.org/\n"); } diff --git a/src/node.h b/src/node.h index acdfe5740..4d8551436 100644 --- a/src/node.h +++ b/src/node.h @@ -42,26 +42,26 @@ #include "v8.h" // NOLINT(build/include_order) #include "node_version.h" // NODE_MODULE_VERSION -#define IOJS_MAKE_VERSION(major, minor, patch) \ +#define NODE_MAKE_VERSION(major, minor, patch) \ ((major) * 0x1000 + (minor) * 0x100 + (patch)) #ifdef __clang__ -# define IOJS_CLANG_AT_LEAST(major, minor, patch) \ - (IOJS_MAKE_VERSION(major, minor, patch) <= \ - IOJS_MAKE_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__)) +# define NODE_CLANG_AT_LEAST(major, minor, patch) \ + (NODE_MAKE_VERSION(major, minor, patch) <= \ + NODE_MAKE_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__)) #else -# define IOJS_CLANG_AT_LEAST(major, minor, patch) (0) +# define NODE_CLANG_AT_LEAST(major, minor, patch) (0) #endif #ifdef __GNUC__ -# define IOJS_GNUC_AT_LEAST(major, minor, patch) \ - (IOJS_MAKE_VERSION(major, minor, patch) <= \ - IOJS_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)) +# define NODE_GNUC_AT_LEAST(major, minor, patch) \ + (NODE_MAKE_VERSION(major, minor, patch) <= \ + NODE_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)) #else -# define IOJS_GNUC_AT_LEAST(major, minor, patch) (0) +# define NODE_GNUC_AT_LEAST(major, minor, patch) (0) #endif -#if IOJS_CLANG_AT_LEAST(2, 9, 0) || IOJS_GNUC_AT_LEAST(4, 5, 0) +#if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0) # define NODE_DEPRECATED(message, declarator) \ __attribute__((deprecated(message))) declarator #elif defined(_MSC_VER) diff --git a/src/node_version.h b/src/node_version.h index cea34b542..2e9a59976 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -45,6 +45,6 @@ * an API is broken in the C++ side, including in v8 or * other dependencies. */ -#define NODE_MODULE_VERSION 44 /* io.js v2.0.0 */ +#define NODE_MODULE_VERSION 44 /* Node.js v2.0.0 */ #endif /* SRC_NODE_VERSION_H_ */ diff --git a/src/res/node.rc b/src/res/node.rc index 526f795b1..587843df2 100644 --- a/src/res/node.rc +++ b/src/res/node.rc @@ -3,7 +3,7 @@ // Application icon -1 ICON iojs.ico +1 ICON node.ico // Version resource @@ -29,14 +29,14 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "io.js" - VALUE "ProductName", "io.js" - VALUE "FileDescription", "io.js: Server-side JavaScript" + VALUE "CompanyName", "Node.js" + VALUE "ProductName", "Node.js" + VALUE "FileDescription", "Node.js: Server-side JavaScript" VALUE "FileVersion", "NODE_VERSION_STRING" VALUE "ProductVersion", "NODE_VERSION_STRING" - VALUE "OriginalFilename", "iojs.exe" - VALUE "InternalName", "iojs" - VALUE "LegalCopyright", "Copyright io.js contributors. MIT license." + VALUE "OriginalFilename", "node.exe" + VALUE "InternalName", "node" + VALUE "LegalCopyright", "Copyright Node.js contributors. MIT license." END END BLOCK "VarFileInfo" diff --git a/src/res/node_etw_provider.man b/src/res/node_etw_provider.man index 9e8c477b1..efdc26d3d 100644 --- a/src/res/node_etw_provider.man +++ b/src/res/node_etw_provider.man @@ -7,8 +7,8 @@ + resourceFileName="node.exe" + messageFileName="node.exe"> node compatibility symlink. - link_target = 'bin/node' - link_path = abspath(install_path, link_target) - if action == uninstall: - action([link_path], link_target) - elif action == install: - try_symlink('iojs', link_path) - else: - assert(0) # Unhandled action type. + action(['out/Release/node' + exeext], 'bin/node' + exeext) if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d') @@ -150,9 +139,9 @@ def files(action): action(['src/node.stp'], 'share/systemtap/tapset/') if 'freebsd' in sys.platform or 'openbsd' in sys.platform: - action(['doc/iojs.1'], 'man/man1/') + action(['doc/node.1'], 'man/man1/') else: - action(['doc/iojs.1'], 'share/man/man1/') + action(['doc/node.1'], 'share/man/man1/') if 'true' == variables.get('node_install_npm'): npm_files(action) diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj index 4ca4d5568..8d17a6cfb 100644 --- a/tools/msvs/msi/nodemsi.wixproj +++ b/tools/msvs/msi/nodemsi.wixproj @@ -6,7 +6,7 @@ 3.5 {1d808ff0-b5a9-4be9-859d-b334b6f48be2} 2.0 - iojs-v$(NodeVersion)-$(Platform) + node-v$(NodeVersion)-$(Platform) Package True $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index 6ba74cb45..ad25cde4d 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -2,11 +2,11 @@ - - - + + + - + @@ -23,11 +23,11 @@ + DowngradeErrorMessage="A later version of Node.js is already installed. Setup will now exit."/> - + - + @@ -40,8 +40,8 @@ @@ -49,24 +49,17 @@ - - - - + Description="Installs support for Node.js-specific performance counters."> + Description="Installs support for event tracing (ETW) events generated by Node.js."> @@ -74,7 +67,7 @@ + Description="Install npm, the recommended package manager for Node.js."> @@ -85,18 +78,18 @@ + Description="Add start menu entries that link the the online documentation for Node.js $(var.ProductVersion) and the Node.js website."> + Description="Add Node.js, npm, and modules that were globally installed by npm to the PATH environment variable."> + Title="Node.js and npm" + Description="Add Node.js and npm (if installed) to the PATH environment variable."> @@ -110,24 +103,18 @@ - + - + - - - - - - + @@ -145,7 +132,7 @@ - + @@ -165,17 +152,17 @@ Type="string" Value="$(var.ProductVersion)"/> @@ -262,13 +249,6 @@ - - @@ -279,9 +259,7 @@ Return="check" /> - - $NodeAlias = 3 - + @@ -329,7 +307,7 @@ NOT Installed 1 - + diff --git a/tools/msvs/nodevars.bat b/tools/msvs/nodevars.bat index 2b7915662..22d2ec48d 100644 --- a/tools/msvs/nodevars.bat +++ b/tools/msvs/nodevars.bat @@ -1,24 +1,24 @@ @echo off -rem Ensure this io.js and npm are first in the PATH +rem Ensure this Node.js and npm are first in the PATH set PATH=%APPDATA%\npm;%~dp0;%PATH% setlocal enabledelayedexpansion pushd "%~dp0" -rem Figure out the io.js version. -set print_version=.\iojs.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +rem Figure out the Node.js version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v rem Print message. if exist npm.cmd ( - echo Your environment has been set up for using io.js !version! and npm. + echo Your environment has been set up for using Node.js !version! and npm. ) else ( - echo Your environment has been set up for using io.js !version!. + echo Your environment has been set up for using Node.js !version!. ) popd endlocal -rem If we're in the io.js directory, change to the user's home dir. +rem If we're in the Node.js directory, change to the user's home dir. if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/tools/osx-pkg.pmdoc/01local.xml b/tools/osx-pkg.pmdoc/01local.xml index 1d99404e4..1fef475f6 100644 --- a/tools/osx-pkg.pmdoc/01local.xml +++ b/tools/osx-pkg.pmdoc/01local.xml @@ -1 +1 @@ -org.iojs.pkg1.0../out/dist-osx/usr/local//usr/localinstallTo.isRelativeTypeinstallTolocationTyperelocatableinstallFrom.pathinstallTo.isAbsoluteTypeidentifierparentinstallTo.pathinstallFrom.isRelativeType +org.nodejs.pkg1.0../out/dist-osx/usr/local//usr/localinstallTo.isRelativeTypeinstallTolocationTyperelocatableinstallFrom.pathinstallTo.isAbsoluteTypeidentifierparentinstallTo.pathinstallFrom.isRelativeType diff --git a/tools/osx-pkg.pmdoc/02npm.xml b/tools/osx-pkg.pmdoc/02npm.xml index 06360b5df..577298efe 100644 --- a/tools/osx-pkg.pmdoc/02npm.xml +++ b/tools/osx-pkg.pmdoc/02npm.xml @@ -1 +1 @@ -org.iojs.npm.pkg1.0../deps/npm/usr/local/lib/node_modules/npminstallTo.pathinstallFrom.isRelativeTypeinstallToscripts.postinstall.isRelativeTypeparentinstallTo.isAbsoluteTypeosx-pkg-postinstall.sh +org.nodejs.npm.pkg1.0../deps/npm/usr/local/lib/node_modules/npminstallTo.pathinstallFrom.isRelativeTypeinstallToscripts.postinstall.isRelativeTypeparentinstallTo.isAbsoluteTypeosx-pkg-postinstall.sh diff --git a/tools/osx-pkg.pmdoc/index.xml.tmpl b/tools/osx-pkg.pmdoc/index.xml.tmpl index 7376a9d37..7d27f3223 100644 --- a/tools/osx-pkg.pmdoc/index.xml.tmpl +++ b/tools/osx-pkg.pmdoc/index.xml.tmpl @@ -1,17 +1,15 @@ -io.js/Users/iojs/Desktop/iojs.pkgorg.iojs../doc/osx_installer_logo.png../LICENSENode.js/Users/node/Desktop/node.pkgorg.nodejs../doc/osx_installer_logo.png../LICENSE +- Rename to Node.js + * Mon Apr 13 2015 Dan Varga - Fix paths for changelog and manpage diff --git a/tools/rpm/rpmbuild.sh b/tools/rpm/rpmbuild.sh index 3f3643b8b..6f2d0d123 100755 --- a/tools/rpm/rpmbuild.sh +++ b/tools/rpm/rpmbuild.sh @@ -38,7 +38,7 @@ fi set -x sed -re "s/%define _version .+/%define _version ${VERSION}/" \ - "$TOOLSDIR/iojs.spec" > $RPMBUILD_PATH/SPECS/iojs.spec -tar --exclude-vcs --transform="s|^|iojs-${VERSION}/|" \ - -czf $RPMBUILD_PATH/SOURCES/iojs-v${VERSION}.tar.gz . -rpmbuild $* -ba $RPMBUILD_PATH/SPECS/iojs.spec + "$TOOLSDIR/node.spec" > $RPMBUILD_PATH/SPECS/node.spec +tar --exclude-vcs --transform="s|^|node-${VERSION}/|" \ + -czf $RPMBUILD_PATH/SOURCES/node-v${VERSION}.tar.gz . +rpmbuild $* -ba $RPMBUILD_PATH/SPECS/node.spec diff --git a/tools/test.py b/tools/test.py index 4d6337037..4c15449d4 100755 --- a/tools/test.py +++ b/tools/test.py @@ -748,20 +748,20 @@ def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppr def GetVm(self, arch, mode): if arch == 'none': - name = 'out/Debug/iojs' if mode == 'debug' else 'out/Release/iojs' + name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node' else: - name = 'out/%s.%s/iojs' % (arch, mode) + name = 'out/%s.%s/node' % (arch, mode) # Currently GYP does not support output_dir for MSVS. # http://code.google.com/p/gyp/issues/detail?id=40 - # It will put the builds into Release/iojs.exe or Debug/iojs.exe + # It will put the builds into Release/node.exe or Debug/node.exe if utils.IsWindows(): out_dir = os.path.join(dirname(__file__), "..", "out") if not exists(out_dir): if mode == 'debug': - name = os.path.abspath('Debug/iojs.exe') + name = os.path.abspath('Debug/node.exe') else: - name = os.path.abspath('Release/iojs.exe') + name = os.path.abspath('Release/node.exe') else: name = os.path.abspath(name + '.exe') diff --git a/vcbuild.bat b/vcbuild.bat index 21e8d5411..a1f56e10b 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -127,14 +127,14 @@ if errorlevel 1 goto exit @rem Skip signing if the `nosign` option was specified. if defined nosign goto licensertf -signtool sign /a /d "io.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\iojs.exe +signtool sign /a /d "Node.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\node.exe if errorlevel 1 echo Failed to sign exe&goto exit :licensertf @rem Skip license.rtf generation if not requested. if not defined licensertf goto msi -%config%\iojs tools\license2rtf.js < LICENSE > %config%\license.rtf +%config%\node tools\license2rtf.js < LICENSE > %config%\license.rtf if errorlevel 1 echo Failed to generate license.rtf&goto exit :msi @@ -146,12 +146,12 @@ if not defined NIGHTLY goto msibuild set NODE_VERSION=%NODE_VERSION%.%NIGHTLY% :msibuild -echo Building iojs-%NODE_VERSION% +echo Building node-%NODE_VERSION% msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit if defined nosign goto run -signtool sign /a /d "io.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\iojs-v%NODE_VERSION%-%msiplatform%.msi +signtool sign /a /d "Node.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\node-v%NODE_VERSION%-%msiplatform%.msi if errorlevel 1 echo Failed to sign msi&goto exit :run @@ -160,7 +160,7 @@ if errorlevel 1 echo Failed to sign msi&goto exit :build-node-weak @rem Build node-weak if required if "%buildnodeweak%"=="" goto run-tests -"%config%\iojs" deps\npm\node_modules\node-gyp\bin\node-gyp rebuild --directory="%~dp0test\gc\node_modules\weak" --nodedir="%~dp0." +"%config%\node" deps\npm\node_modules\node-gyp\bin\node-gyp rebuild --directory="%~dp0test\gc\node_modules\weak" --nodedir="%~dp0." if errorlevel 1 goto build-node-weak-failed goto run-tests @@ -181,7 +181,7 @@ goto jslint :jslint if not defined jslint goto exit echo running jslint -%config%\iojs tools\eslint\bin\eslint.js src lib test --reset --quiet +%config%\node tools\eslint\bin\eslint.js src lib test --reset --quiet goto exit :create-msvs-files-failed @@ -207,5 +207,5 @@ rem *************** :getnodeversion set NODE_VERSION= for /F "usebackq tokens=*" %%i in (`python "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i -if not defined NODE_VERSION echo Cannot determine current version of io.js & exit /b 1 +if not defined NODE_VERSION echo Cannot determine current version of Node.js & exit /b 1 goto :EOF