0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

3959 Commits

Author SHA1 Message Date
hsmtkk
472a8a7f8d
doc: fix typo in cli.md
PR-URL: https://github.com/nodejs/node/pull/14855
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-08-16 18:14:13 +02:00
Kyle Farnung
e96b94970a doc: added napi_get_value_string_latin1
* Reordered string functions alphabetically
* Fixed a typo in napi_get_value_string_utf8

PR-URL: https://github.com/nodejs/node/pull/14678
Fixes: https://github.com/nodejs/node/issues/14397
Refs: https://github.com/nodejs/node/issues/14256
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-16 12:16:45 +02:00
Saad Quadri
eab2bea46f doc: fix word wrapping for api stability boxes
PR-URL: https://github.com/nodejs/node/pull/14809
Fixes: https://github.com/nodejs/nodejs.org/issues/1337
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-16 11:49:55 +02:00
James M Snell
eac0147085 tools: checkout for unassigned DEP00XX codes
Check for `DEP00XX` codes on release build like we do with `REPLACEME`

PR-URL: https://github.com/nodejs/node/pull/14702
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-16 00:04:03 -07:00
Anna Henningsen
1fe0741e50 2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](https://github.com/nodejs/node/pull/14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](https://github.com/nodejs/node/pull/8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](https://github.com/nodejs/node/pull/14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](https://github.com/nodejs/node/pull/14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](https://github.com/nodejs/node/pull/14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](https://github.com/nodejs/node/pull/14558)

PR-URL: https://github.com/nodejs/node/pull/14811
2017-08-15 15:05:22 -05:00
Weijia Wang
11a2ca29ba
errors: migrate _http_outgoing
PR-URL: https://github.com/nodejs/node/pull/14735
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-08-14 17:19:19 -04:00
Mudit Ameta
4a6b678070
os: add CIDR support
This patch adds support for CIDR notation to the output of the
`networkInterfaces()` method

PR-URL: https://github.com/nodejs/node/pull/14307
Fixes: https://github.com/nodejs/node/issues/14006
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-14 15:43:10 -04:00
Refael Ackermann
85d7d97d81
doc: delint
PR-URL: https://github.com/nodejs/node/pull/14707
Refs: https://github.com/nodejs/node/pull/12756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-08-14 08:13:07 -04:00
Refael Ackermann
6d84e30087
doc: fix header level typo
PR-URL: https://github.com/nodejs/node/pull/14707
Refs: https://github.com/nodejs/node/pull/12756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-08-14 08:13:07 -04:00
Anna Henningsen
314217f8fb
doc: add missing changes: metadata for util
Ref: https://github.com/nodejs/node/pull/14558
PR-URL: https://github.com/nodejs/node/pull/14810
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-08-13 22:21:03 +02:00
Anna Henningsen
7e0c2ea92b
doc: add missing changes: metadata for streams
Ref: https://github.com/nodejs/node/pull/14636
PR-URL: https://github.com/nodejs/node/pull/14810
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-08-13 22:20:44 +02:00
Gabriel Schulhof
6fe72c82d2 src: mention that node options are space-separated
The documentation does not mention that the value of NODE_OPTIONS is a
space-separated list.

PR-URL: https://github.com/nodejs/node/pull/14709
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-08-13 21:21:39 +03:00
Daijiro Wachi
7294f57c0d doc: fix docs style in util.md
Summary
  + L582: Cell should be padded
  + L589: Cell should be padded
  + L590: Cell should be padded
  + L600: Cell should be padded
  + L622: Cell should be padded

PR-URL: https://github.com/nodejs/node/pull/14711
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-08-13 20:19:12 +02:00
Daijiro Wachi
003ba0b0e2 doc: fix docs style in intl.md
Summary
  + L43: Add missing final pipe in table fence
  + L45: Add missing final pipe in table fence
  + L46: Add missing final pipe in table fence
  + L47: Add missing final pipe in table fence
  + L48: Add missing final pipe in table fence
  + L49: Add missing final pipe in table fence
  + L50: Add missing final pipe in table fence
  + L51: Add missing final pipe in table fence
  + L52: Add missing final pipe in table fence
  + L53: Add missing final pipe in table fence
  + L54: Add missing final pipe in table fence
  + L55: Add missing final pipe in table fence

PR-URL: https://github.com/nodejs/node/pull/14711
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-08-13 20:18:50 +02:00
Vishal Bisht
89d9cc789b
doc: expanded description of buffer.slice
Added description for the case when `end` is greater than buffer length

PR-URL: https://github.com/nodejs/node/pull/14720
Fixes: https://github.com/nodejs/node/issues/14714
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-08-12 16:16:46 -04:00
Anna Henningsen
835c383969
n-api: add napi_get_node_version
Add `napi_get_node_version`, to help with feature-detecting
Node.js as an environment.

PR-URL: https://github.com/nodejs/node/pull/14696
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-12 21:28:59 +02:00
Keita Akutsu
0eb7268451
doc: fix http2 sample code for http2.md
PR-URL: https://github.com/nodejs/node/pull/14667
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-10 17:41:50 +02:00
Gil Tayar
52a0d97187
doc: explain browser support of http/2 without SSL
Since browser support HTTP/2 only using SSL, the basic example
given in the docs won't work if the client is a browser.

Added a note to documentation explaining this and how to change
the code to make browser support it.

PR-URL: https://github.com/nodejs/node/pull/14670
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-08-10 17:40:12 +02:00
Mandeep Singh
4796fbc7d8 doc: add docs for AssertionError
Fixes: https://github.com/nodejs/node/issues/12274
PR-URL: https://github.com/nodejs/node/pull/14261
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2017-08-10 21:04:45 +08:00
Daniel Bevenius
02371c7a8c doc: fix order of AtExit callbacks in addons.md
The sanity_check AtExit callback needs to come last to verify that the
other callbacks have been completed. This was not noticed before as this
code was not been executed.

PR-URL: https://github.com/nodejs/node/pull/14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-08-10 07:24:52 +02:00
Daniel Bevenius
06ed0e8187 doc: remove undef NDEBUG from addons.md
When working on commit 0d95a0b60a
("test: remove undef NDEBUG from at-exit addons test) I searched for
usages of undef NDEBUG but did not include the doc directory (but I did
include the test directory) and missed this one.

Commit 1f02569f8db9cb0101807df4982534738f0161b2 ("tools: fix
tools/addon-verify.js") enables the code in the "AtExit" section to be
included in the test/addons diretory and this code will again be
tested.

PR-URL: https://github.com/nodejs/node/pull/14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-08-10 07:24:39 +02:00
Daniel Bevenius
7f81400723 tools: fix tools/addon-verify.js
The current implementation of addon-verify.js is including the code
for the "Function arguments" section in test/addons/01_callbacks and
there is no directory generated or the "Function arguments section".
This continues and leads to the last section, "AtExit", code to be
excluded. There is an test/addons/07_atexit_hooks but it contains code
from the "Passing wrapped objects around" section.

This commit modifies addon-verify to associate headers with code and
then iterates over the set and generates the files as a separate step.

PR-URL: https://github.com/nodejs/node/pull/14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-08-10 07:24:30 +02:00
Anna Henningsen
b72e702247 2017-08-09, Version 8.3.0 (Current)
V8 6.0:

  The V8 engine has been upgraded to version 6.0, which has a significantly
  changed performance profile.
  [#14574](https://github.com/nodejs/node/pull/14574)

  More detailed information on performance differences can be found at
  https://medium.com/the-node-js-collection/get-ready-a-new-v8-is-coming-node-js-performance-is-changing-46a63d6da4de

Other notable changes:

* **DNS**
  * Independent DNS resolver instances are supported now, with support for
    cancelling the corresponding requests.
    [#14518](https://github.com/nodejs/node/pull/14518)

* **N-API**
  * Multiple N-API functions for error handling have been changed to support
    assigning error codes.
    [#13988](https://github.com/nodejs/node/pull/13988)

* **REPL**
  * Autocompletion support for `require()` has been improved.
    [#14409](https://github.com/nodejs/node/pull/14409)

* **Utilities**
  * The WHATWG Encoding Standard (`TextDecoder` and `TextEncoder`) has
    been implemented as an experimental feature.
    [#13644](https://github.com/nodejs/node/pull/13644)

* **Added new collaborators**
  * [XadillaX](https://github.com/XadillaX) – Khaidi Chu
  * [gabrielschulhof](https://github.com/gabrielschulhof) – Gabriel Schulhof

Conflicts:
	src/node_version.h
2017-08-09 21:56:19 -04:00
Guy Margalit
c3c045aea0 stream: support readable/writableHWM for Duplex
This commits adds support for readableHighWaterMark and
writableHighWaterMark in Duplex stream, so that they can be set without
accessing the internal state.

Fixes: https://github.com/nodejs/node/issues/14555
PR-URL: https://github.com/nodejs/node/pull/14636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-08 11:18:25 +02:00
James M Snell
4da8b99a74 console: coerce label to string in console.time()
Per the console spec, the label in console.time() is a string.
Per the console spec, the default value of label is `'default'`.

PR-URL: https://github.com/nodejs/node/pull/14643
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-07 22:22:59 -07:00
Jared Kantrowitz
80ebb4282d
src: adjust windows abort behavior
Raising SIGABRT is handled in the CRT in windows, calling _exit()
with ambiguous code "3" by default.

This adjustment to the abort behavior gives a more sane exit code
on abort, by calling _exit directly with code 134.

PR-URL: https://github.com/nodejs/node/pull/13947
Fixes: https://github.com/nodejs/node/issues/12271
Refs: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/abort
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-08-07 22:46:01 -04:00
Jason Ginchereau
af70c3b478 n-api: optimize number API performance
- Add separate APIs for creating different kinds of numbers,
   because creating a V8 number value from an integer is faster
   than creating one from a double.
 - When getting number values, avoid getting the current context
   because the context will not actually be used and is expensive
   to obtain.
 - When creating values, don't use v8::TryCatch (NAPI_PREAMBLE),
   because these functions have no possibility of executing JS code.

Refs: https://github.com/nodejs/node/issues/14379
PR-URL: https://github.com/nodejs/node/pull/14573
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-07 17:31:17 -07:00
Rich Trott
0f325aaaeb doc: improve fs.read() doc text
PR-URL: https://github.com/nodejs/node/pull/14631
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-07 15:05:03 -07:00
dcharbonnier
680285c3b4 doc: clarify the position argument for fs.read
What happen to the file position after a read using a position null or
integer was not clear and you can assume that the cursor of the file
descriptor is updated even if position is an integer.

PR-URL: https://github.com/nodejs/node/pull/14631
Fixes: https://github.com/https://github.com/nodejs/node/issues/8397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-07 15:04:55 -07:00
Timothy Gu
365b2e3424
encoding: rudimentary TextDecoder support w/o ICU
Also split up the tests.

PR-URL: https://github.com/nodejs/node/pull/14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-05 16:40:41 +08:00
James M Snell
45b7fc2039 http2: add some doc detail for invalid header chars
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:57:39 -07:00
James M Snell
383a1696c0 http2: fix documentation errors
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:57:32 -07:00
James M Snell
b484ea1fab http2: refactor trailers API
Rather than using the `'fetchTrailers'` event to collect trailers,
a new `getTrailers` callback option is supported. If not set, the
internals will skip calling out for trailers at all. Expands the
test to make sure trailers work from the client side also.

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:57:13 -07:00
James M Snell
59e509808a http2: address initial pr feedback
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:57:09 -07:00
Matteo Collina
78cd5fedd5 http2: make writeHead behave like HTTP/1.
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:57:04 -07:00
Matteo Collina
a4017736d2 http2: doc and fixes to the Compatibility API
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:56:50 -07:00
James M Snell
d6a774b1bd http2: add range support for respondWith{File|FD}
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
  range requests
* Fix linting nits following most recent update

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:56:45 -07:00
James M Snell
6911fe337c http2: refinement and test for socketError
Fixes: https://github.com/nodejs/http2/issues/184

Refines the `'socketError'` event a bit and adds a test for the
emission of the `'socketError'` event on the server. Client side
is tested separately

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:56:34 -07:00
James M Snell
df0334669e doc: include http2.md in all.md
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:56:14 -07:00
James M Snell
f070d784d6 http2: fix documentation nits
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:56:10 -07:00
James M Snell
e71e71b513 http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.

This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.

This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.

Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.

The JS API is defined within `internal/http2/*.js`.

There are two APIs provided: Core and Compat.

The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.

The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.

Tests, documentation and initial benchmarks are included.

The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.

When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.

To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.

Additional configuration options to enable verbose debugging are provided:

```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```

The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.

The following illustrates as simple HTTP/2 server and client interaction:

(The HTTP/2 client and server support both plain text and TLS connections)

```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
  client.destroy();
});

// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
  stream.respond({ ':status': 200 });
  stream.write('hello ');
  stream.end('world');
});
server.listen(80);
```

```js
const http2 = require('http2');
const client = http2.connect('http://localhost');

```

Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:44 -07:00
James M Snell
b1909d3a70 tls: add tlsSocket.disableRenegotiation()
Allows TLS renegotiation to be disabled per `TLSSocket` instance.
Per HTTP/2, TLS renegotiation is forbidden after the initial
connection prefix is exchanged.

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:30 -07:00
Rich Trott
1abfbbb1c4 doc: add entry for subprocess.killed property
PR-URL: https://github.com/nodejs/node/pull/14578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-04 11:34:01 -07:00
Rich Trott
dd75005a9e doc: change child to subprocess
PR-URL: https://github.com/nodejs/node/pull/14578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-04 11:32:38 -07:00
Greg Alexander
211df3fe8c util: implement %o and %O as formatting specifiers
Implementing the %o and %O formatting specifiers for util.format.
Based on discussion in issue, this specifier should just call
util.inspect to format the value.

PR-URL: https://github.com/nodejs/node/pull/14558
Fixes: https://github.com/nodejs/node/issues/14545
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-04 19:30:42 +02:00
Vse Mozhet Byt
d41423fe72 doc: erase unneeded eslint-plugin-markdown comment
eslint-plugin-markdown comments affect only a code block below them,
so there is no need to cancel them for the rest code blocks.

PR-URL: https://github.com/nodejs/node/pull/14598
Refs:
 https://github.com/eslint/eslint-plugin-markdown#configuration-comments
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-03 20:51:20 +03:00
cjihrig
5a050550d3 dgram: add custom lookup function in sockets
This commit adds support for custom DNS lookup functions in
dgram sockets. This is similar to the existing feature in net
sockets.

Refs: https://github.com/nodejs/node/issues/6189
PR-URL: https://github.com/nodejs/node/pull/14560
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-08-02 20:32:51 -04:00
Yuta Hiroto
46c3dd701a doc: fix typo in writing-and-running-benchmarks.md
PR-URL: https://github.com/nodejs/node/pull/14600
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-08-02 16:35:28 -07:00
Lance Ball
766506a2e9
repl: deprecate REPLServer.parseREPLKeyword
This method does not need to be visible to user code. It has been
undocumented since it was introduced which was perhaps v0.8.9.

The motivation for this change is that the method is simply an
implementation detail of the REPLServer behavior, and does
not need to be exposed to user code.

This change adds documentation of the method with a deprecation
warning, and a test that the method is actually documented.

PR-RUL: https://github.com/nodejs/node/pull/14223
Refs: https://github.com/nodejs/node/issues/7619
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 14:39:06 -04:00
Rich Trott
e506bcd899 tools: replace assert-throw-arguments custom lint
The functionality of ESLint custom rule assert-throws-arguments can be
replaced with no-restricted-syntax entries.

PR-URL: https://github.com/nodejs/node/pull/14547
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 09:27:35 -07:00
James M Snell
cc43c8fb54 console: add console.count() and console.clear()
Both are simple utility functions defined by the WHATWG
console spec (https://console.spec.whatwg.org/).

PR-URL: https://github.com/nodejs/node/pull/12678
Ref: https://github.com/nodejs/node/issues/12675
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-02 08:23:07 -07:00
Anna Henningsen
8a8a6865c0
doc,net: assign deprecation code
Missed while landing 75a19fb379.

Ref: https://github.com/nodejs/node/pull/14449
PR-URL: https://github.com/nodejs/node/pull/14576
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02 00:35:21 +02:00
Lance Ball
2ca9f94e33
repl: make REPLServer.bufferedCommand private
The `REPLServer.bufferedCommand` property was undocumented, except
for its usage appearing, unexplained, in an example for
`REPLServer.defineCommand`. This commit deprecates that property,
privatizes it, and adds a `REPLServer.clearBufferedCommand()`
function that will clear the buffer.

PR-URL: https://github.com/nodejs/node/pull/13687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de>

Refs: https://github.com/nodejs/node/issues/12686
2017-08-01 22:45:28 +02:00
Anna Henningsen
732658e4cf
dns: add channel.cancel()
This can be used to implement custom timeouts.

Fixes: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:24 +02:00
Anna Henningsen
6e05970494
dns: enable usage of independent cares resolvers
Ref: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 19:57:23 +02:00
Weijia Wang
bdfbce9241 http_client, errors: migrate to internal/errors
PR-URL: https://github.com/nodejs/node/pull/14423
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-01 14:08:12 +02:00
Myles Borins
8a53897325
2017-08-01, Version 6.11.2 'Boron' (LTS)
This LTS release comes with 221 commits. This includes 80 which are
test related, 52 which are doc related, 32 which are build / tool
related and 10 commits which are updates to dependencies.

Notable Changes:

* configure:
  - add mips64el to valid_arch (Aditya Anand)
    - https://github.com/nodejs/node/pull/13620
* crypto:
  - Updated root certificates based on [NSS 3.30] (Ben Noordhuis)
    - https://github.com/nodejs/node/pull/13279
    - https://github.com/nodejs/node/pull/12402
    - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30_release_notes
* deps:
  - upgrade OpenSSL to version 1.0.2.l (Shigeki Ohtsu)
    - https://github.com/nodejs/node/pull/12913
* http:
  - parse errors are now reported when NODE_DEBUG=http (Sam Roberts)
    - https://github.com/nodejs/node/pull/13206
  - Agent construction can now be envoked without `new` (cjihrig)
    - https://github.com/nodejs/node/pull/12927
* zlib:
  - node will now throw an Error when zlib rejects the value of windowBits,
    instead of crashing (Alexey Orlenko)
    - https://github.com/nodejs/node/pull/13098

PR-URL: https://github.com/nodejs/node/pull/14356
2017-08-01 02:10:20 -05:00
Timothy Gu
6e79076fee
doc, url: add changelog metadata for url.format
PR-URL: https://github.com/nodejs/node/pull/14543
Fixes: https://github.com/nodejs/node/issues/11103
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-01 11:46:19 +08:00
Azard
b8e0a5ea23
readline: remove max limit of crlfDelay
PR-URL: https://github.com/nodejs/node/pull/13497
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-31 23:03:18 +02:00
cjihrig
6968eadc3f doc: document napi_finalize() signature
Refs: https://github.com/nodejs/node/issues/14138
PR-URL: https://github.com/nodejs/node/pull/14230
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-31 11:22:36 -04:00
Rich Trott
e9b67f7e5d tools: remove legacy indentation linting
All linting now uses the current ESLint 4.3.0 indentation linting.
Remove legacy indentation rules.

PR-URL: https://github.com/nodejs/node/pull/14515
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-07-30 09:21:52 -07:00
Timothy Gu
f0be75def1
doc: various small revisions in url
PR-URL: https://github.com/nodejs/node/pull/14478
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-30 19:12:07 +08:00
Timothy Gu
d074b2f427
doc: update url.origin IDNA behavior
Fixes: 413691fde0 "url: expose WHATWG url.origin as ASCII"
PR-URL: https://github.com/nodejs/node/pull/14478
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-30 19:11:43 +08:00
Daiki Arai
e95acebf3a
doc: fix minor typos in net.md
About writable, not 'reads' but 'writes' is correct.
And also, add parentheses because server.getConnections is function.

PR-URL: https://github.com/nodejs/node/pull/14502
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-07-30 13:07:59 +02:00
Vse Mozhet Byt
9623ce572a doc: cross-link util.TextDecoder and intl.md
Also, note about builds without ICU
and ASCII-sort some bottom references.

PR-URL: https://github.com/nodejs/node/pull/14486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-28 01:18:24 +03:00
Anna Henningsen
d731369b1d
async_hooks: remove deprecated APIs
These APIs were introduced during the lifetime of Node 8 in an
experimental API and should safely be removable in Node 9+.

PR-URL: https://github.com/nodejs/node/pull/14414
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-07-27 20:02:01 +02:00
Ruslan Iusupov
2e7ccc252e doc: fix verify in crypto.md
PR-URL: https://github.com/nodejs/node/pull/14469
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-27 10:31:41 -07:00
Shivanth MP
77ca3cb474 n-api: add support for DataView
Basic support for Dataview is added in this commit. This is achieved
by using three functions, napi_create_dataview(), napi_is_dataview()
and napi_get_dataview_info().

PR-URL: https://github.com/nodejs/node/pull/14382
Fixes: https://github.com/nodejs/node/issues/13926
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-27 02:30:05 +02:00
Anton Paras
c9e494c1f3
doc: fix typo in using-internal-errors.md
Change "messasge" to "message".

PR-URL: https://github.com/nodejs/node/pull/14429
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-07-26 20:18:40 +02:00
Anna Henningsen
75a19fb379
net,child_process: improve naming in internal code
All of this code is internal-only, and the changed variables/methods
are not generally useful to userland code.

When backporting this to release branches, it might be appropriate to
add non-enumerable aliases to be 100 % sure.

PR-URL: https://github.com/nodejs/node/pull/14449
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-26 20:03:51 +02:00
atever
9ab3172e5d
doc: add docs for module.paths
PR-URL: https://github.com/nodejs/node/pull/14435
Refs: https://github.com/nodejs/node/issues/14371#issuecomment-317184131
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-07-25 11:30:15 -04:00
James M Snell
ed21cb1774 util: implement WHATWG Encoding Standard API
Provide an (initially experimental) implementation of the WHATWG Encoding
Standard API (`TextDecoder` and `TextEncoder`). The is the same API
implemented on the browser side.

By default, with small-icu, only the UTF-8, UTF-16le and UTF-16be decoders
are supported. With full-icu enabled, every encoding other than iso-8859-16
is supported.

This provides a basic test, but does not include the full web platform
tests. Note: many of the web platform tests for this would fail by default
because we ship with small-icu by default.

A process warning will be emitted on first use to indicate that the
API is still experimental. No runtime flag is required to use the
feature.

Refs: https://encoding.spec.whatwg.org/
PR-URL: https://github.com/nodejs/node/pull/13644
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-24 14:04:13 -07:00
James M Snell
5c2d1af310 doc: update experimental status to reflect use
* Update the experimental status to reflect actual common use.
* Also make a few formatting fixes.

Fixes: https://github.com/nodejs/node/issues/12701

PR-URL: https://github.com/nodejs/node/pull/12723
Fixes: https://github.com/nodejs/node/issues/12701
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-07-24 09:55:13 -07:00
Weijia Wang
9cb390d899
errors: migrate dns to use internal/errors
PR-URL: https://github.com/nodejs/node/pull/14212
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-24 08:26:26 -04:00
Vse Mozhet Byt
4d1e0862ce doc: fix some links
PR-URL: https://github.com/nodejs/node/pull/14400
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-23 22:10:59 +03:00
Anna Henningsen
b440e8e4e4
doc: describe labelling process for backports
Based on discussion from the first backporting team meeting.

PR-URL: https://github.com/nodejs/node/pull/12431
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-07-23 16:05:27 +02:00
Refael Ackermann
ac8126749c
doc: error message are still major
PR-URL: https://github.com/nodejs/node/pull/14375
Refs: https://github.com/nodejs/node/issues/13937
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-21 15:36:28 -04:00
Sebastiaan Deckers
6add5b31fc
tools: enforce consistent spacing inside braces
PR-URL: https://github.com/nodejs/node/pull/14162
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-21 15:13:49 -04:00
Vse Mozhet Byt
4f87522244 doc, lib, test: do not re-require needlessly
PR-URL: https://github.com/nodejs/node/pull/14244
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-07-21 20:40:52 +03:00
Bougarfaoui El houcine
a03d8cee1f
errors: migrate socket_list to internal/errors
PR-URL: https://github.com/nodejs/node/pull/11356
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-07-21 06:14:19 -04:00
Marc Hernández Cabot
4d5ae3022c
doc: fix typo in stream.md
PR-URL: https://github.com/nodejs/node/pull/14364
Fixes: https://github.com/nodejs/node/issues/14362
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-21 10:48:38 +08:00
Jeremiah Senkpiel
6a5bdfb97e 2017-07-20, Version 8.2.1 (Current)
Notable changes

* http: Writes no longer abort if the Socket is missing.
* process, async_hooks: Avoid problems when triggerAsyncId is undefined.
* zlib: Streams no longer attempt to process data when destroyed.

PR-URL: https://github.com/nodejs/node/pull/14399
2017-07-20 18:16:37 -04:00
Gautam Arora
9e4ab6c206
test: add comments for whatwg-url tests
Added comments to whatwg-url tests that they should not be changed until
modifications are merged upstream as per "Web Platform Tests" guidelines

PR-URL: https://github.com/nodejs/node/pull/14355
Fixes: https://github.com/nodejs/node/issues/12793
Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-20 16:22:02 -04:00
Henry
7fdcb68dc3 doc: fixes default shell in child_process.md
Clarifies the default shell in Windows is process.env.ComSpec
and that cmd.exe is only used as a fallback. Functions whose
descriptions are affected include:
child_process.spawn, child_process.exec,
child_process.spawnsSync, and child_process.execSync.

PR-URL: https://github.com/nodejs/node/pull/14203
Fixes: https://github.com/nodejs/node/issues/14156
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-20 14:52:52 +02:00
Jeremiah Senkpiel
65eefa0105
2017-07-19, Version 8.2.0 (Current)
Big thanks to @addaleax who prepared the vast majority of this release.

Notable changes:

* **Async Hooks**
  * Multiple improvements to Promise support in `async_hooks` have been made.

* **Build**
  * The compiler version requirement to build Node with GCC has been raised to
    GCC 4.9.4.
    [[`820b011ed6`](https://github.com/nodejs/node/commit/820b011ed6)]
    [#13466](https://github.com/nodejs/node/pull/13466)

* **Cluster**
  * Users now have more fine-grained control over the inspector port used by
    individual cluster workers. Previously, cluster workers would simply
    increment from the master's debug port.
    [[`dfc46e262a`](https://github.com/nodejs/node/commit/dfc46e262a)]
    [#14140](https://github.com/nodejs/node/pull/14140)

* **DNS**
  * The server used for DNS queries can now use a custom port.
    [[`ebe7bb29aa`](https://github.com/nodejs/node/commit/ebe7bb29aa)]
    [#13723](https://github.com/nodejs/node/pull/13723)
  * Support for `dns.resolveAny()` has been added.
    [[`6e30e2558e`](https://github.com/nodejs/node/commit/6e30e2558e)]
    [#13137](https://github.com/nodejs/node/pull/13137)

* **npm**
  * The `npm` CLI has been updated to version 5.3.0. In particular, it now comes
    with the `npx` binary, which is also shipped with Node.
    [[`dc3f6b9ac1`](https://github.com/nodejs/node/commit/dc3f6b9ac1)]
    [#14235](https://github.com/nodejs/node/pull/14235)
  * `npm` Changelogs:
      - [v5.0.4](https://github.com/npm/npm/releases/tag/v5.0.4)
      - [v5.1.0](https://github.com/npm/npm/releases/tag/v5.1.0)
      - [v5.2.0](https://github.com/npm/npm/releases/tag/v5.2.0)
      - [v5.3.0](https://github.com/npm/npm/releases/tag/v5.3.0)

PR-URL: https://github.com/nodejs/node/pull/13744
2017-07-19 18:40:42 -04:00
Oleksandr Kushchak
bd7735e8f7 docs: add note about fs.rmdir()
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: https://github.com/nodejs/node/issues/8797
PR-URL: https://github.com/nodejs/node/pull/14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-07-19 13:46:33 -07:00
Devin Boyer
7bc666be17 doc: replace dead link in v8 module
PR-URL: https://github.com/nodejs/node/pull/14372
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-07-20 03:06:35 +08:00
Matteo Collina
0e5283b7ed doc,stream: _transform happens one at a time
Add a note to the stream docs specifying that at most a single
call to _transform can happen, and the provided callback()
should be used to process another chunk.

Fixes: https://github.com/nodejs/node/issues/3208
PR-URL: https://github.com/nodejs/node/pull/14321
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-19 10:36:10 +02:00
Gunar C. Gessner
b61cab2234
errors: port internal/fs errors to internal/errors
* Assign codes to errors reported by internal/fs.js

PR-URL: https://github.com/nodejs/node/pull/11317
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-18 23:55:20 -04:00
Lance Ball
c5521fa617
doc: fix minor typo in cluster.md
Adds a missing `'` in code example.

PR-URL: https://github.com/nodejs/node/pull/14353
Fixes: https://github.com/nodejs/node/issues/14352
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-18 22:57:19 -04:00
Anna Henningsen
a3365c6ae9
doc: fix inspectPort documentation in cluster.md
- Add missing `changes:` entry
- Use full sentences
- Use proper indentation

Ref: https://github.com/nodejs/node/pull/14140
PR-URL: https://github.com/nodejs/node/pull/14349
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-18 20:42:42 +02:00
Michael Dawson
9ab63d61f8 doc: add guidance on testing new errors
PR-URL: https://github.com/nodejs/node/pull/14207
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-17 20:18:35 -04:00
cornholio
b4300536f5
cluster: overriding inspector port
Added an option to override inspector port for workers using
`settings.inspectPort` will override default port incrementing behavior.
Also, using this option allows to set 0 port for the whole cluster.

PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-14 19:13:13 -04:00
cornholio
ca5b0c4f11
doc: fixes in cluster.md
* Capitalization and punctuation.

* `setupMaster` contained info about `settings` which where incomplete.

PR-URL: https://github.com/nodejs/node/pull/14140
Fixes: https://github.com/nodejs/node/issues/8495
Fixes: https://github.com/nodejs/node/issues/12941
Refs: https://github.com/nodejs/node/pull/9659
Refs: https://github.com/nodejs/node/pull/13761
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-14 19:11:39 -04:00
James Sumners
dce2f06f80 doc: update umask for clarity
PR-URL: https://github.com/nodejs/node/pull/14170
Fixes: https://github.com/nodejs/node/issues/14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-14 14:05:59 -07:00
starkwang
6e47e133ab doc: add notice about useGlobal option in repl docs
PR-URL: https://github.com/nodejs/node/pull/13866
Fixes: https://github.com/nodejs/node/issues/13827
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-07-14 14:01:38 -07:00
Kyle Farnung
73078d6072 n-api: add napi_fatal_error API
PR-URL: https://github.com/nodejs/node/pull/13971
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-07-13 18:48:27 -04:00
Michael Dawson
ac41db4af0 n-api: add code parameter to error helpers
In support of the effort to add error codes to all errors
generated by Node.js, add an optional code parameter to the
helper functions used to throw/create errors in N-API.

PR-URL: https://github.com/nodejs/node/pull/13988
Fixes: https://github.com/nodejs/node/issues/13933
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-07-13 15:05:19 -04:00
starkwang
dbfe8c4ea2
errors,buffer: port errors to internal/errors
PR-URL: https://github.com/nodejs/node/pull/13976
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-07-12 17:00:30 -04:00
Roman Shoryn
7f26a291f6
doc: prefix of the stacktrace in errors.md
PR-URL: https://github.com/nodejs/node/pull/14150
Fixes: https://github.com/nodejs/node/issues/5675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
2017-07-12 15:06:16 -04:00
Gabriel Schulhof
d5b397c9b6 n-api: Implement stricter wrapping
Use a stronger criterion to identify objects in the prototype chain that store
pointers to native data that were added by previous calls to `napi_wrap()`.

Whereas the old criterion for identifying `napi_wrap()`-injected prototype
chain objects was to consider an object with an internal field
count of 1 to be such an object, the new criterion is to consider an object
with an internal field count of 2 such that the second field holds a
`v8::External` which itself contains a pointer to a global static string unique
to N-API to be a `napi_wrap()`-injected prototype chain object.

This greatly reduces the possibility of returning a pointer that was not
previously added with `napi_wrap()`, and it allows us to recognize that an
object has already undergone `napi_wrap()` and we can thus prevent a chain of
wrappers only the first of which is accessible from appearing in the prototype
chain, as would be the result of multiple calls to `napi_wrap()` using the same
object.

PR-URL: https://github.com/nodejs/node/pull/13872
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-07-12 12:05:44 -04:00
Timothy Gu
b5b7c3b432
doc: add missing space
PR-URL: https://github.com/nodejs/node/pull/14181
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-07-12 15:18:53 +02:00
Evan Lucas
22889347df 2017-07-11, Version 8.1.4 (Current)
This is a security release. All Node.js users should consult the
security release summary at
https://nodejs.org/en/blog/vulnerability/july-2017-security-releases/
for details on patched vulnerabilities.

Notable changes

* **build**:
  - Disable V8 snapshots - The hashseed embedded in the snapshot is
    currently the same for all runs of the binary. This opens node up to
collision attacks which could result in a Denial of Service. We have
temporarily disabled snapshots until a more robust solution is found
(Ali Ijaz Sheikh)
* **deps**:
  - CVE-2017-1000381 - The c-ares function ares_parse_naptr_reply(),
    which is used for parsing NAPTR responses, could be triggered to
read memory outside of the given input buffer if the passed in DNS
response packet was crafted in a particular way. This patch checks that
there is enough data for the required elements of an NAPTR record (2
int16, 3 bytes for string lengths) before processing a record. (David
Drysdale)

PR-URL: https://github.com/nodejs/node-private/pull/91
2017-07-11 11:57:37 -05:00
Evan Lucas
89e121d4a7 2017-07-11, Version 7.10.1 (Current)
This is a security release. All Node.js users should consult the
security release summary at
https://nodejs.org/en/blog/vulnerability/july-2017-security-releases/
for details on patched vulnerabilities.

* **build**:
  - Disable V8 snapshots - The hashseed embedded in the snapshot is
    currently the same for all runs of the binary. This opens node up to
collision attacks which could result in a Denial of Service. We have
temporarily disabled snapshots until a more robust solution is found
(Ali Ijaz Sheikh)
* **deps**:
  - CVE-2017-1000381 - The c-ares function ares_parse_naptr_reply(),
    which is used for parsing NAPTR responses, could be triggered to
read memory outside of the given input buffer if the passed in DNS
response packet was crafted in a particular way. This patch checks that
there is enough data for the required elements of an NAPTR record (2
int16, 3 bytes for string lengths) before processing a record. (David
Drysdale)

PR-URL: https://github.com/nodejs/node-private/pull/92
2017-07-11 11:56:23 -05:00
Myles Borins
6218939cdd
2017-07-11, Version 6.11.1 'Boron' (LTS)
This is a security release. All Node.js users should consult the
security release summary at:

https://nodejs.org/en/blog/vulnerability/july-2017-security-releases/

for details on patched vulnerabilities.

Notable Changes:

* build:
  - Disable V8 snapshots - The hashseed embedded in the snapshot is
    currently the same for all runs of the binary. This opens node
    up to collision attacks which could result in a Denial of Service.
    We have temporarily disabled snapshots until a more robust solution
    is found (Ali Ijaz Sheikh)
* deps:
  - CVE-2017-1000381 - The c-ares function ares_parse_naptr_reply(),
    which is used for parsing NAPTR responses, could be triggered to
    read memory outside of the given input buffer if the passed in DNS
    response packet was crafted in a particular way. This patch checks
    that there is enough data for the required elements of an NAPTR
    record (2 int16, 3 bytes for string lengths) before processing a
    record. (David Drysdale)

PR-URL: https://github.com/nodejs/node-private/pull/89
2017-07-11 17:50:09 +01:00
Myles Borins
0130cf55bb
2017-07-11, Version 4.8.4 'Argon' (Maintenance)
This is a security release. All Node.js users should consult the
security release summary at:

https://nodejs.org/en/blog/vulnerability/july-2017-security-releases/

for details on patched vulnerabilities.

Notable Changes:

* build:
  - Disable V8 snapshots - The hashseed embedded in the snapshot is
    currently the same for all runs of the binary. This opens node
    up to collision attacks which could result in a Denial of Service.
    We have temporarily disabled snapshots until a more robust solution
    is found (Ali Ijaz Sheikh)
* deps:
  - CVE-2017-1000381 - The c-ares function ares_parse_naptr_reply(),
    which is used for parsing NAPTR responses, could be triggered to
    read memory outside of the given input buffer if the passed in DNS
    response packet was crafted in a particular way. This patch checks
    that there is enough data for the required elements of an NAPTR
    record (2 int16, 3 bytes for string lengths) before processing a
    record. (David Drysdale)

PR-URL: https://github.com/nodejs/node-private/pull/90
2017-07-11 17:49:34 +01:00
Rich Trott
199ad1d73f doc: correct stream Duplex allowHalfOpen doc
If allowHalfOpen is set to false, the stream will automatically end the
writable side when the readable side ends, but not the other way around.

PR-URL: https://github.com/nodejs/node/pull/14127
Fixes: https://github.com/nodejs/node/issues/4044
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-10 13:49:35 -07:00
Sam Roberts
97a6aa9b20 src: whitelist v8 options with '_' or '-'
V8 options allow either '_' or '-' to be used in options as a seperator,
such as "--abort-on_uncaught-exception". Allow these case variations
when used with NODE_OPTIONS.

PR-URL: https://github.com/nodejs/node/pull/14093
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-10 12:02:07 -07:00
Dean Coakley
ff07eaa140
doc: note 'resize' event conditions on Windows
PR-URL: https://github.com/nodejs/node/pull/13576
Fixes: https://github.com/nodejs/node/issues/13197
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-09 17:59:11 -04:00
Moogen Tian
d2aaf82fcf doc: fix mistake in http.md
If the first parameter of `request.end` `data` is specified, it should
be equivalent to calling `request.write(data, encoding)` (not
`response.write(data, encoding)`) followed by `request.end(callback)`.

This mistake was introduced in commit
14b3aab7d2:

    date: 28 November 2015 at 7:30:32 AM GMT+8
    author: jpersson <jonathan.persson@creuna.se>
    committer: James M Snell <jasnell@gmail.com>
    summary: doc: add links and backticks around names

PR-URL: https://github.com/nodejs/node/pull/14126
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-09 18:47:35 +02:00
XadillaX
a2d3cec81c
doc,test: fs - reserved characters under win32
Explain the behavior of `fs.open()` under win32 that file path contains
some characters and add some test cases for them.

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

PR-URL: https://github.com/nodejs/node/pull/13875
Refs: https://github.com/nodejs/node/issues/13868
Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-09 12:32:40 -04:00
Jan Krems
b647f04df1 doc: match debugger output & instructions to master behavior
PR-URL: https://github.com/nodejs/node/pull/13885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-08 09:25:16 -07:00
Sam Roberts
388e552579 src: document --abort-on-uncaught-exception
Its important for post-mortem diagnostics and should be more prominently
documented.

PR-URL: https://github.com/nodejs/node/pull/13931
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-07-06 14:09:01 -07:00
cjihrig
9c6804c1df n-api: add napi_has_own_property()
Refs: https://github.com/nodejs/node/issues/13925
PR-URL: https://github.com/nodejs/node/pull/14063
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-07-06 15:25:30 -04:00
Timothy Gu
6809429cfa
doc: add documentation on ICU
PR-URL: https://github.com/nodejs/node/pull/13916
Refs: https://github.com/nodejs/node/pull/13644#discussion_r121616327
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-06 11:19:34 +08:00
Sam Roberts
c45df83b54 src: --abort-on-uncaught-exception in NODE_OPTIONS
Allow --abort-on-uncaught-exception in NODE_OPTIONS, its useful to
enable for post-mortem debugging.

PR-URL: https://github.com/nodejs/node/pull/13932
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-05 13:57:59 -07:00
Refael Ackermann
46d7cb88c7
tools: eslint - use error and off
PR-URL: https://github.com/nodejs/node/pull/14061
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-07-05 16:41:19 -04:00
Vse Mozhet Byt
15599cbc97 tools: update: eslint-plugin-markdown@1.0.0-beta.7
* Remove pinning of eslint-plugin-markdown

  An issue affecting Node.js source has been fixed in
  eslint-plugin-markdown so we don't need to pin it to beta-4 anymore.

  Refs: https://github.com/eslint/eslint-plugin-markdown/issues/69

* Update eslint-plugin-markdown up to 1.0.0-beta.7

* Fix docs for eslint-plugin-markdown@1.0.0-beta.7

PR-URL: https://github.com/nodejs/node/pull/14047
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-05 06:51:10 +03:00
MoonBall
996a62e08a doc: fix padding mode of crypto.publicDecrypt
PR-URL: https://github.com/nodejs/node/pull/14036
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-04 18:46:30 +02:00
Natanael Log
f2149d4ea4 doc, util, console: clarify ambiguous docs
Add clarification to the documentation on util.format()
and console.log() regarding how excessive arguments are treated
when the first argument is a non-format string
compared to when it is not a string at all.

PR-URL: https://github.com/nodejs/node/pull/14027
Fixes: https://github.com/nodejs/node/issues/13908
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-04 18:53:50 +03:00
Daijiro Wachi
8b2c61c169 doc: fix api docs style
doc/api/cluster.md
  L337: Use the definition link

doc/api/deprecations.md
  L106: Fix the definition link name

doc/api/errors.md
  L901: Remove unused definition

PR-URL: https://github.com/nodejs/node/pull/13970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
2017-07-03 11:06:36 +02:00
Ruben Bridgewater
7a2b3e2b6c
doc,assert: document stackStartFunction in fail
PR-URL: https://github.com/nodejs/node/pull/13862
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-07-02 22:43:17 -04:00
Ruslan Iusupov
0794c101ef doc: fix example in child_process.md
PR-URL: https://github.com/nodejs/node/pull/13716
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-03 00:38:57 +02:00
Matej Krajčovič
51bb4ace5f doc: add default values to functions in fs.md
PR-URL: https://github.com/nodejs/node/pull/13767
Refs: https://github.com/nodejs/node/issues/11135
Refs: https://github.com/nodejs/node/pull/13769
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-03 00:15:30 +02:00
Alexander Gromnitsky
ea927b3711 doc: fix some broken references
PR-URL: https://github.com/nodejs/node/pull/13811
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-07-02 21:44:46 +02:00
Ruben Bridgewater
fc463639fa assert: fix assert.fail with zero arguments
PR-URL: https://github.com/nodejs/node/pull/13974
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-01 22:23:29 -04:00
cjihrig
732ae419b4 n-api: add napi_delete_property()
Fixes: https://github.com/nodejs/node/issues/13924
PR-URL: https://github.com/nodejs/node/pull/13934
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-07-01 11:40:14 -04:00
cjihrig
f803e77b1e n-api: add napi_delete_element()
Refs: https://github.com/nodejs/node/issues/13924
PR-URL: https://github.com/nodejs/node/pull/13949
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-06-30 17:08:51 -04:00
Ruben Bridgewater
e6b69b9418 repl: fix old history error handling
PR-URL: https://github.com/nodejs/node/pull/13733
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-30 19:21:23 +02:00
Tobias Nießen
d111319270 doc: move module-specific "globals" to modules.md
PR-URL: https://github.com/nodejs/node/pull/13962
Fixes: https://github.com/nodejs/node/issues/13953
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-30 18:41:56 +02:00
Rich Trott
7477f9ba9c doc: use stricter indentation checking for docs
Use stricter ESLint indent checking for sample code in docs.

PR-URL: https://github.com/nodejs/node/pull/13950
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-29 15:44:27 -07:00
Rich Trott
8969c1b762 doc: fix indentation issues in sample code
In preparation for stricter ESLint indentation checking, fix a few
issues in sample code.

PR-URL: https://github.com/nodejs/node/pull/13950
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-29 15:43:56 -07:00
Ruben Bridgewater
1b54371c50 stream: use more explicit statements
Using objectMode with stream_wrap has not worked properly
before and would end in an error.
Therefore prohibit the usage of objectMode alltogether.

This also improves the handling performance due to the
cheaper chunk check and by using explicit statements as they
produce better code from the compiler.

PR-URL: https://github.com/nodejs/node/pull/13863
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-06-29 18:03:54 +02:00
Rod Vagg
53b8c51e7c 2017-06-29, Version 8.1.3 (Current)
Notable changes

* **Stream**
  Two regressions with the `stream` module have been fixed:
  * The `finish` event will now always be emitted after the `error` event
    if one is emitted:
    [[`0a9e96e86c`](https://github.com/nodejs/node/commit/0a9e96e86c)]
    [#13850](https://github.com/nodejs/node/pull/13850)
  * In object mode, readable streams can now use `undefined` again.
    [[`5840138e70`](https://github.com/nodejs/node/commit/5840138e70)]
    [#13760](https://github.com/nodejs/node/pull/13760)
2017-06-29 17:02:43 +10:00
Kyle Farnung
a71d20518a n-api: fix section title typo
PR-URL: https://github.com/nodejs/node/pull/13972
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-28 20:19:08 -07:00
Gibson Fahnestock
4eeb4a4408 doc: note that fs.futimes only works on AIX >7.1
PR-URL: https://github.com/nodejs/node/pull/13659
Fixes: https://github.com/nodejs/node/issues/12609
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> i
2017-06-28 20:14:46 -07:00
Vse Mozhet Byt
04faf0c4eb doc: add @nodejs/documentation to CC table
PR-URL: https://github.com/nodejs/node/pull/13952
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-28 19:27:15 -07:00
Michael Dawson
ef28d85611 doc: doc lifetime of n-api last error info
Document the lifetime of the structure returned
by napi_get_last_error_info

PR-URL: https://github.com/nodejs/node/pull/13939
Fixes: https://github.com/nodejs/abi-stable-node/issues/251
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
2017-06-28 14:31:59 -04:00
Ruben Bridgewater
8ca9338655 doc: document missing error types
PR-URL: https://github.com/nodejs/node/pull/13857
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-28 19:58:55 +02:00
Tobias Nießen
2ff23c5622 doc: fix mistake in path.relative
The docs implied that the parameters `from` and `to` are invalid only
if neither of them is a string; in fact, they are invalid as soon as one
of them is not a string.

PR-URL: https://github.com/nodejs/node/pull/13912
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-28 14:25:37 +02:00
Tobias Nießen
23b3bbf506 doc: unify ERR_FALSY_VALUE_REJECTION description
PR-URL: https://github.com/nodejs/node/pull/13869
Refs: https://github.com/nodejs/node/pull/13604
Refs: https://github.com/nodejs/node/pull/13627
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-28 14:21:14 +02:00
Chris Young
f85d5b21fd doc: fixed formatting issue in cli docs
Removed some bad escape characters

PR-URL: https://github.com/nodejs/node/pull/13808
Fixes: https://github.com/nodejs/node/issues/13805
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-28 13:22:07 +02:00
Azard
d71d7a1bc7 doc: fix link in async_hooks.md
PR-URL: https://github.com/nodejs/node/pull/13930
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-26 22:41:01 +03:00
Refael Ackermann
e3ea0fc97b doc: update backporting guide
* also update STYLE_GUIDE comment about Em dashes

PR-URL: https://github.com/nodejs/node/pull/13749
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-23 15:21:54 -04:00
cjihrig
c02dcc7b59 doc: make socket IPC examples more robust
This commit aims to improve the documentation examples that send
sockets over IPC channels. Specifically, pauseOnConnect is added
to a server that inspects the socket before sending and a
'message' handler adds a check that the socket still exists.

PR-URL: https://github.com/nodejs/node/pull/13196
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-22 16:55:41 -04:00
Rob Wu
2a46e57d13 doc: add missing zlib link to stream API docs
This seems to have been removed inadvertently by
330c8d743e in PR 12925.

PR-URL: https://github.com/nodejs/node/pull/13838
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-21 20:49:27 -07:00
Vse Mozhet Byt
259466c6f4 doc: fix nits in guides/using-internal-errors.md
PR-URL: https://github.com/nodejs/node/pull/13820
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
2017-06-21 20:43:01 -07:00
Anna Henningsen
d1027695b8
doc: mention rebasing of v?.x-staging post release
Mention that the staging branch should be rebased on top of the release
branch after merging a release proposal.

PR-URL: https://github.com/nodejs/node/pull/13742
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-21 22:22:49 +02:00
XadillaX
330349f706 dns: make dns.setServers support customized port
allow `dns.setServers` parameter to contain port

e.g.

```
dns.setServers([ '103.238.225.181:666' ]);
```

And `dns.getServers` will return IP with port if not the default port.

PR-URL: https://github.com/nodejs/node/pull/13723
Refs: https://github.com/nodejs/node/issues/7903
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-06-20 18:42:25 -04:00
James M Snell
1fcb76e8f2 cluster: remove deprecated property
PR-URL: https://github.com/nodejs/node/pull/13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-20 11:48:47 -07:00
James M Snell
3fab9f2cd7 doc: EOL deprecated API and update notes
PR-URL: https://github.com/nodejs/node/pull/13702
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-20 11:48:36 -07:00
James M Snell
22cf25cf2d buffer: support boxed strings and toPrimitive
Add support for `Buffer.from(new String('...'))` and
`Buffer.from({[Symbol.toPrimitive]() { return '...'; }})`

PR-URL: https://github.com/nodejs/node/pull/13725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-19 15:27:01 -07:00
Justin Beckwith
24ecc331e2
doc: document res.connection and res.socket
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: https://github.com/nodejs/node/pull/13617
Fixes: https://github.com/nodejs/node/issues/12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-06-19 19:40:51 +02:00
Daijiro Wachi
4ca3b9cd6a doc: fix api docs style
doc/api/async_hooks.md
  + L198: Missing code-language flag
  + L239: Missing code-language flag
  + L317: Missing code-language flag
  + L347: Missing code-language flag

doc/api/fs.md
  + L2857: Unused definition

PR-URL: https://github.com/nodejs/node/pull/13700
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-19 10:51:37 +02:00
DuanPengfei
6e69421e53 doc: path.relative uses cwd
PR-URL: https://github.com/nodejs/node/pull/13714
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 22:17:58 -04:00
Roman Reiss
ecf6a46d98
src,lib,test,doc: correct misspellings
PR-URL: https://github.com/nodejs/node/pull/13719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-17 19:17:46 +02:00
Anna Henningsen
1e2905f46a
buffer: add constants object
Add `buffer.constants`, containing length limits for `Buffer` and
`string` instances.

This could be useful for programmers to tell whether a value can
be turned into a string or not.

Ref: https://github.com/nodejs/node/issues/13465
PR-URL: https://github.com/nodejs/node/pull/13467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-16 19:48:51 +02:00
Anna Henningsen
50d151578d
doc: small makeover for onboarding.md
PR-URL: https://github.com/nodejs/node/pull/13413
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-16 19:44:42 +02:00
Michael Dawson
62e940dfa6 doc: fix a few n-api doc issues
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: https://github.com/nodejs/node/pull/13650
Fixes: https://github.com/nodejs/node/issues/13555
Fixes: https://github.com/nodejs/node/issues/13556
Fixes: https://github.com/nodejs/node/issues/13562
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Ingvar Stepanyan <me@rreverser.com>
2017-06-16 00:45:36 -04:00
Chris Young
386f53f31d doc: fixes a typo in the async_hooks documentation
> Generally it will correspond the name of the resource's constructor.
should read "Generally, it will correspond to the name..."

PR-URL: https://github.com/nodejs/node/pull/13666
Fixes: https://github.com/nodejs/node/issues/13663
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-15 21:31:53 +02:00
Sebastian Van Sande
de4a749788 internal/util: use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/11301
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <fhinkel@vt.edu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-15 17:07:45 +02:00
Rod Vagg
c7323af131 2017-06-15, Version 8.1.2 (Current)
Release to fix broken `process.release` properties
Ref: https://github.com/nodejs/node/issues/13667
2017-06-15 22:43:54 +10:00
Dan Homola
aff8d358fa errors, repl: migrate to use internal/errors.js
* Use existing errors where suitable
* Assign code to a REPL specific error
* Include documentation for the new error code

PR-URL: https://github.com/nodejs/node/pull/11347
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-14 23:05:25 +02:00
Sam Roberts
37fdfce93e net: return this from getConnections()
PR-URL: https://github.com/nodejs/node/pull/13553
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:29:29 -07:00
Sam Roberts
cf24177aba net: return this from destroy()
PR-URL: https://github.com/nodejs/node/pull/13530
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:15:51 -07:00
Sam Roberts
84f3b8f09f doc: document and test that methods return this
Also, add tests to ensure they will always return this, and to confirm
they return this when these doc changes are back-ported to earlier
release lines.

PR-URL: https://github.com/nodejs/node/pull/13531
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 13:12:21 -07:00
XadillaX
c1c226719f https: make opts optional & immutable when create
`opts` in `createServer` will be immutable that won't change origional
opts value. What's more, it's optional which can make `requestListener`
be the first argument.

PR-URL: https://github.com/nodejs/node/pull/13599
Fixes: https://github.com/nodejs/node/issues/13584
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-14 15:14:34 -04:00
jklepatch
2f34bf0f77 doc: removed redundant mentions to error codes
PR-URL: https://github.com/nodejs/node/pull/13627
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-14 16:57:16 +02:00
Aditya Anand
3d215696a4 doc: sort and update /cc list for inspector issues
Updated onboarding-extras.md to /cc @nodejs/v8-inspector for inspector
issues and reorganized /cc list in alphabetical order.

PR-URL: https://github.com/nodejs/node/pull/13632
Fixes: https://github.com/nodejs/node/issues/13621
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-14 16:21:53 +02:00
Andreas Madsen
de762b71f2
async_hooks: rename currentId and triggerId
currentId is renamed to executionAsyncId
triggerId is renamed to triggerAsyncId
AsyncResource.triggerId is renamed to AsyncResource.triggerAsyncId
AsyncHooksGetCurrentId is renamed to AsyncHooksGetExecutionAsyncId
AsyncHooksGetTriggerId is renamed to AsyncHooksGetTriggerAsyncId

PR-URL: https://github.com/nodejs/node/pull/13490
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-06-14 12:39:53 +02:00
Anna Henningsen
9dc3f936c7 2017-06-13, Version 8.1.1 (Current)
* **Child processes**
  * `stdout` and `stderr` are now available on the error output of a
    failed call to the `util.promisify()`ed version of
    `child_process.exec`.
    [[`d66d4fc94c`](https://github.com/nodejs/node/commit/d66d4fc94c)]
    [#13388](https://github.com/nodejs/node/pull/13388)

* **HTTP**
  * A regression that broke certain scenarios in which HTTP is used together
    with the `cluster` module has been fixed.
    [[`fff8a56d6f`](https://github.com/nodejs/node/commit/fff8a56d6f)]
    [#13578](https://github.com/nodejs/node/pull/13578)

* **HTTPS**
  * The `rejectUnauthorized` option now works properly for unix sockets.
    [[`c4cbd99d37`](https://github.com/nodejs/node/commit/c4cbd99d37)]
    [#13505](https://github.com/nodejs/node/pull/13505)

* **Readline**
  * A change that broke `npm init` and other code which uses `readline`
    multiple times on the same input stream is reverted.
    [[`0df6c0b5f0`](https://github.com/nodejs/node/commit/0df6c0b5f0)]
    [#13560](https://github.com/nodejs/node/pull/13560)

PR-URL: https://github.com/nodejs/node/pull/13598
2017-06-13 15:32:26 -07:00
Tobias Nießen
e318c8a97a doc: fix minor issues reported in #9538
oath.md: make order of properties consistent
tls.md: remove spaces in getPeerCertificate signature
tls.md: add deprecation notice to server.connections
http.md: fix signature of request.end
crypto.md: change crypto parameters to camelCase
vm.md: add missing apostrophe
vm.md: fix signature of vm.runInNewContext
zlib.md: improve description of zlib.createXYZ

PR-URL: https://github.com/nodejs/node/pull/13491
Ref: https://github.com/nodejs/node/issues/9538
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-14 00:18:59 +02:00
Anna Henningsen
0ab461440e doc: update async_hooks providers list
PR-URL: https://github.com/nodejs/node/pull/13561
Ref: https://github.com/nodejs/node/pull/13452
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-13 12:44:21 -07:00
James M Snell
873e2f270f errors: add missing ERR_ prefix on util.callbackify error
The `FALSY_VALUE_REJECTION` error code added by
https://github.com/nodejs/node/pull/12712 did not have the `ERR_` prefix,
nor was it added to the errors.md documentation. Add the prefix in for
consistency.

PR-URL: https://github.com/nodejs/node/pull/13604
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-06-13 12:33:52 -07:00
Scott McKenzie
7f3f72c19b errors, readline: migrate to use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/11390
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-13 08:44:22 -07:00
XadillaX
ca8a29c360 doc: fix out of date napi_callback doc
The earlier version `napi_callback` returns `void` but now is
`napi_value`. The document of this section hasn't been modified.

PR-URL: https://github.com/nodejs/node/pull/13570
Fixes: https://github.com/nodejs/node/issues/12248
Fixes: https://github.com/nodejs/node/issues/13562
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-13 07:53:32 -07:00
Vse Mozhet Byt
e2617a0388 doc: fix links and typos in fs.md
PR-URL: https://github.com/nodejs/node/pull/13573
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-12 12:23:35 +03:00
Justin Beckwith
a2ed3a9c88 doc: fix incorrect fs.utimes() link
PR-URL: https://github.com/nodejs/node/pull/13608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-06-11 14:31:15 -07:00
Anshul Guleria
b6e2cde4b4
doc: fs constants for Node < v6.3.0 in fs.md
Add changelog history in `fs.access` for the changes introduced to
`constants` in the `fs` module prior to Node v6.3.0.

PR-URL: https://github.com/nodejs/node/pull/12690
Fixes: https://github.com/nodejs/node/issues/8044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-11 21:47:38 +01:00
Refael Ackermann
af3aa682ac util: add callbackify
Add `util.callbackify(function)` for creating callback style functions
from functions returning a `Thenable`

PR-URL: https://github.com/nodejs/node/pull/12712
Fixes: https://github.com/nodejs/CTC/issues/109
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-10 22:49:28 -04:00
Samuel Reed
ac3477971f
doc: add readline.emitKeypressEvents note
PR-URL: https://github.com/nodejs/node/pull/9447
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-10 19:16:57 +02:00
Jamen Marzonie
2529119680 doc: fix napi_create_*_error signatures in n-api
PR-URL: https://github.com/nodejs/node/pull/13544
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna M. Kedzierska <anna.m.kedzierska@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-06-10 17:58:35 +03:00
Gil Tayar
8d7f07f379
child_process: promisify includes stdio in error
This converts the initial implementation of a promised exec that used
the customPromisifyArgs support in util.promisify with a custom
implementation. This is because exec and execFile, when there is an
error, still supply the stdout and stderr of the process, and yet
the promisified version with customPromisifyArgs does
not supply this ability.

I created a custom implementation and attached it to exec and execFile
using the util.promisify.custom key.

Fixes: https://github.com/nodejs/node/issues/13364
PR-URL: https://github.com/nodejs/node/pull/13388
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-09 21:46:09 +02:00
XadillaX
27de36926b
dns: add resolveAny support
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior
like `$ dig <domain> any` and returns an array with several types of
records.

`dns.resolveAny` parses the result packet by several rules in turn.

Supported types:

* A
* AAAA
* CNAME
* MX
* NAPTR
* NS
* PTR
* SOA
* SRV
* TXT

Fixes: https://github.com/nodejs/node/issues/2848
PR-URL: https://github.com/nodejs/node/pull/13137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-06-09 19:09:28 +02:00
Michael Dawson
c28418a9e5 doc: fix out of date sections in n-api doc
PR-URL: https://github.com/nodejs/node/pull/13508
Fixes: https://github.com/nodejs/node/issues/13469
Fixes: https://github.com/nodejs/node/issues/13458
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-06-09 09:56:50 -04:00
Anna Henningsen
8f39881b74
async_hooks: use resource objects for Promises
Use `PromiseWrap` resource objects whose lifetimes are tied to
the `Promise` instances themselves to track promises, and have
a `.promise` getter that points to the `Promise` and a `.parent`
property that points to the parent Promise’s resource object,
if there is any.

The properties are implemented as getters for internal fields
rather than normal properties in the hope that it helps keep
performance for the common case that async_hooks users will
often not inspect them.

PR-URL: https://github.com/nodejs/node/pull/13452
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-06-08 23:59:58 +02:00
Tarun
597ba1580a
doc: corrects reference to tlsClientError
After the renaming of `clientError` in TLS to `tlsClientError` in
https://github.com/nodejs/node/commit/1ab6b21360d97719b3101153fb164c0c3eddf08,
the docs inconsistently referred the error as `clientError`, which is now
corrected.

Fixes: https://github.com/nodejs/node/issues/13417
PR-URL: https://github.com/nodejs/node/pull/13533
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-06-08 14:41:37 +02:00
James M Snell
d7f6919228 2017-05-07, Version 8.1.0 (Current)
* **Async Hooks**
  * When one `Promise` leads to the creation of a new `Promise`, the parent
    `Promise` will be identified as the trigger
    [[`135f4e6643`](https://github.com/nodejs/node/commit/135f4e6643)]
    [#13367](https://github.com/nodejs/node/pull/13367).
* **Dependencies**
  * libuv has been updated to 1.12.0
    [[`968596ec77`](https://github.com/nodejs/node/commit/968596ec77)]
    [#13306](https://github.com/nodejs/node/pull/13306).
  * npm has been updated to 5.0.3
    [[`ffa7debd7a`](https://github.com/nodejs/node/commit/ffa7debd7a)]
    [#13487](https://github.com/nodejs/node/pull/13487).
* **File system**
  * The `fs.exists()` function now works correctly with `util.promisify()`
    [[`6e0eccd7a1`](https://github.com/nodejs/node/commit/6e0eccd7a1)]
    [#13316](https://github.com/nodejs/node/pull/13316).
  * fs.Stats times are now also available as numbers
    [[`c756efb25a`](https://github.com/nodejs/node/commit/c756efb25a)]
    [#13173](https://github.com/nodejs/node/pull/13173).
* **Inspector**
  * It is now possible to bind to a random port using `--inspect=0`
    [[`cc6ec2fb27`](https://github.com/nodejs/node/commit/cc6ec2fb27)]
    [#5025](https://github.com/nodejs/node/pull/5025).
* **Zlib**
  * A regression in the Zlib module that made it impossible to properly
    subclasses `zlib.Deflate` and other Zlib classes has been fixed.
    [[`6aeb555cc4`](https://github.com/nodejs/node/commit/6aeb555cc4)]
    [#13374](https://github.com/nodejs/node/pull/13374).
2017-06-08 20:54:01 +10:00
Refael Ackermann
47b9772f52 fs: expose Stats times as Numbers
PR-URL: https://github.com/nodejs/node/pull/13173
Fixes: https://github.com/nodejs/node/issues/8276
Refs: https://github.com/nodejs/node/pull/12607
Refs: https://github.com/nodejs/node/pull/12818
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-07 16:15:45 -04:00
Sam Roberts
324f1115b3 lib: return this from net.Socket.end()
PR-URL: https://github.com/nodejs/node/pull/13481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-07 12:54:00 -07:00
Fedor Indutny
d6260a8f4b http: overridable keep-alive behavior of Agent
Introduce two overridable `Agent` methods:

* `keepSocketAlive(socket)`
* `reuseSocket(socket, req)`

These methods can be overridden by particular `Agent` class child to
make keep-alive behavior customizable.

Motivation: destroy persisted sockets after some configurable timeout.
It is very non-trivial to do it with available primitives. Such program
will most likely need to poke with undocumented events and methods of
`Agent`. With introduced API such behavior is easy to implement.

PR-URL: https://github.com/nodejs/node/pull/13005
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-07 14:41:22 -04:00
Vladimir Trifonov
60d14c8702
doc: Add URL argument with http/https request
PR-URL: https://github.com/nodejs/node/pull/13405
Fixes: https://github.com/nodejs/node/issues/13383
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-06 22:39:10 -07:00
Sam Roberts
2791b360c1 inspector: allow --inspect=host:port from js
PR-URL: https://github.com/nodejs/node/pull/13228
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-06 14:41:17 -07:00
Myles Borins
4c5cbb7c83
2017-06-06, Version 6.11.0 'Boron' (LTS)
This LTS release comes with 126 commits. This includes 40 which
are test related, 32 which are doc related, 12 which are
build / tool related and 4 commits which are updates to
dependencies.

Notable Changes:

* build:
  - support for building mips64el (nanxiongchao)
    https://github.com/nodejs/node/pull/10991
* cluster:
  - disconnect() now returns a reference to the disconnected
    worker. (Sean Villars)
    https://github.com/nodejs/node/pull/10019
* crypto:
  - ability to select cert store at runtime (Adam Majer)
    https://github.com/nodejs/node/pull/8334
  - Use system CAs instead of using bundled ones (Adam Majer)
    https://github.com/nodejs/node/pull/8334
  - The `Decipher` methods `setAuthTag()` and `setAAD` now return
    `this`. (Kirill Fomichev)
    https://github.com/nodejs/node/pull/9398
  - adding support for OPENSSL_CONF again (Sam Roberts)
    https://github.com/nodejs/node/pull/11006
  - make LazyTransform compabile with Streams1 (Matteo Collina)
    https://github.com/nodejs/node/pull/12380
* deps:
  - upgrade libuv to 1.11.0 (cjihrig)
    https://github.com/nodejs/node/pull/11094
  - upgrade libuv to 1.10.2 (cjihrig)
    https://github.com/nodejs/node/pull/10717
  - upgrade libuv to 1.10.1 (cjihrig)
    https://github.com/nodejs/node/pull/9647
  - upgrade libuv to 1.10.0 (cjihrig)
    https://github.com/nodejs/node/pull/9267
* dns:
  - Implemented `{ttl: true}` for `resolve4()` and `resolve6()`
    (Ben Noordhuis)
    https://github.com/nodejs/node/pull/9296
* process:
  - add NODE_NO_WARNINGS environment variable (cjihrig)
    https://github.com/nodejs/node/pull/10842
* readline:
  - add option to stop duplicates in history (Danny Nemer)
    https://github.com/nodejs/node/pull/2982
* src:
  - support "--" after "-e" as end-of-options (John Barboza)
    https://github.com/nodejs/node/pull/10651
* tls:
  - new tls.TLSSocket() supports sec ctx options (Sam Roberts)
    https://github.com/nodejs/node/pull/11005
  - Allow obvious key/passphrase combinations. (Sam Roberts)
    https://github.com/nodejs/node/pull/10294

PR-URL: https://github.com/nodejs/node/pull/13059
2017-06-06 16:30:15 -04:00
Jamen Marz
df46fcb61a doc: fix typo "ndapi" in n-api.md
PR-URL: https://github.com/nodejs/node/pull/13484
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-06 14:11:09 -04:00
Bartosz Sosnowski
422722ff67 win, doc: document per-drive current working dir
Add note to fs.md and path.md about Windows using per-drive current
working directory.

Fixes: https://github.com/nodejs/node/issues/9378
PR-URL: https://github.com/nodejs/node/pull/13330
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-06 11:19:23 +02:00
Michael Dawson
7d9dfdaea3 doc: add ref to option to enable n-api
Since its guarded in by a command line option say
that in the docs and provide the option that needs
to be used to enable it.

PR-URL: https://github.com/nodejs/node/pull/13406
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießn <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-05 19:51:38 -04:00
Vse Mozhet Byt
5d9dc94509 doc: fix nits in code examples of async_hooks.md
* Make `require()` consistent.
* Add missing argument.
* Add missing `\n` in outputs.
* Reduce string concatenations.
* Update outputs.
* Reword and fix a typo.

PR-URL: https://github.com/nodejs/node/pull/13400
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-05 16:43:34 +03:00
Vse Mozhet Byt
ce8bce497c doc: use prefer-rest-params eslint rule in docs
Do not promote using of `arguments`.

One fragment is left as is because of history nature:
it uses a real deprecated code from libs.

Refs: http://eslint.org/docs/rules/prefer-rest-params
Refs: 99da8e8e02/lib/util.js (L1002-L1006)

PR-URL: https://github.com/nodejs/node/pull/13389
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-05 14:27:57 +03:00
Nikolai Vavilov
3d9e7bb1d4 repl: remove unused function convertToContext
PR-URL: https://github.com/nodejs/node/pull/13434
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-05 13:30:05 +03:00
Matteo Collina
5ca836c192 doc,stream: clarify 'data', pipe() and 'readable'
We stated that 'data' and pipe() are preferred over 'readable'.
This commit clarifies that 'data' and pipe() are easier to understand,
but 'readable' might result in increased throughput.

Fixes: https://github.com/nodejs/node/issues/11587
PR-URL: https://github.com/nodejs/node/pull/13432
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-05 10:19:04 +02:00
Matteo Collina
0b432e08b1 doc: resume a stream after pipe() and unpipe()
Clarifies the behavior of streams when _readableState.flowing is
false. resume() must be called explicitly for the 'data' event to
be emitted again.

Fixes: https://github.com/nodejs/node/issues/1041
PR-URL: https://github.com/nodejs/node/pull/13329
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-06-05 09:19:02 +02:00
Paul Bininda
7637347ae6 doc: add missing backticks to doc/api/tls.md
PR-URL: https://github.com/nodejs/node/pull/13394
Fixes: https://github.com/nodejs/node/issues/13382
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-04 18:45:02 -04:00
Anna Henningsen
9b9a25c5eb
doc: update who to cc for async_hooks
Now that `async_hooks` is released, it makes sense to me to have a team
for addressing issues with it. nodejs/diagnostics can still be
@mentioned if there are questions about the API rather than its
implementation.

PR-URL: https://github.com/nodejs/node/pull/13332
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-03 22:34:34 +02:00
Daijiro Wachi
917f86ea35 doc: add require modules in url.md
To make the example codes in URL doc work without additional codes,
it should have more lines to require modules.

PR-URL: https://github.com/nodejs/node/pull/13365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-03 13:21:52 +02:00
Vse Mozhet Byt
e0f4310f68 doc: add object-curly-spacing to doc/.eslintrc
PR-URL: https://github.com/nodejs/node/pull/13354
Refs: http://eslint.org/docs/rules/object-curly-spacing
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-03 01:57:01 +03:00
Vse Mozhet Byt
de411a471e doc: unify spaces in object literals
PR-URL: https://github.com/nodejs/node/pull/13354
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-03 01:56:19 +03:00
Vse Mozhet Byt
7de6998d89 doc: use destructuring in code examples
PR-URL: https://github.com/nodejs/node/pull/13349
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-03 01:33:55 +03:00
Vse Mozhet Byt
6cfdbc74d9 doc: fix code examples in zlib.md
* Use test() instead of match() in boolean context.
* Add spaces in code example.
* Fix typo.

PR-URL: https://github.com/nodejs/node/pull/13342
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-02 21:51:38 +03:00
Michael Dawson
84c066a9ce doc: update who to cc for n-api
Add info about who to @cc for issues with n-api

PR-URL: https://github.com/nodejs/node/pull/13335
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
2017-06-02 12:31:52 -04:00
Vse Mozhet Byt
a235e670a8 doc: refine spaces in example from vm.md
PR-URL: https://github.com/nodejs/node/pull/13334
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-02 16:47:47 +03:00
James, please
17e10b33c2 doc: fix link in CHANGELOG_V8
PR-URL: https://github.com/nodejs/node/pull/13313
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-01 15:42:31 -07:00
Vse Mozhet Byt
38cec08ff7 doc: add async_hooks, n-api to _toc.md and all.md
PR-URL: https://github.com/nodejs/node/pull/13379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-02 01:13:46 +03:00
Michael Dawson
449dd71631 doc: remove 'you' from writing-tests.md
Noticed this while reading through writing-tests.md today.
As per style guide avoid the use of you, your etc.
Rational as per: http://www2.ivcc.edu/rambo/tip_formal_writing_voice.htm

PR-URL: https://github.com/nodejs/node/pull/13319
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-01 17:55:17 -04:00
Myles Borins
8440777553 doc: fix date for 8.0.0 changelog
Fixes #13356

PR-URL: https://github.com/nodejs/node/pull/13360
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-01 14:23:47 -07:00
Thorsten Lorenz
126170a05f
doc: async-hooks documentation
Author: Thorsten Lorenz <thlorenz@gmx.de>
Author: Andreas Madsen <amwebdk@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/13287
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-01 23:03:51 +02:00
Jason Ginchereau
8ab8c33985 n-api: enable napi_wrap() to work with any object
Previously, napi_wrap() would only work with objects created from a
constructor returned by napi_define_class(). While the N-API team
was aware of this limitation, it was not clearly documented and is
likely to cause confusion anyway. It's much simpler if addons are
allowed to use any JS object. Also, the specific behavior of the
limitation is difficult to reimplement on other VMs that work
differently from V8.

V8 requires object internal fields to be declared on the object
prototype (which napi_define_class() used to do). Since it's too
late to modify the object prototype by the time napi_wrap() is
called, napi_wrap() now inserts a new object (with the internal
field) into the supplied object's prototype chain. Then it can be
retrieved from there later by napi_unwrap().

This change also includes improvements to the documentation for
napi_create_external(), partly to explain how it is different from
napi_wrap().

PR-URL: https://github.com/nodejs/node/pull/13250
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-01 11:46:55 -07:00
Vse Mozhet Byt
862bf1bbc2 doc: modernize and fix code examples in util.md
* Remove useless constructor.

* Use template literals.

* Update code example.
  Now all arrays with just holes are outputted the same way.
  In the fixed example, it was `[ <101 empty items> ]` twice.

PR-URL: https://github.com/nodejs/node/pull/13298
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-01 17:45:27 +03:00
Vse Mozhet Byt
f1b2e68d65 doc: fix code examples in url.md
* Update outputs.
* Refine spaces.
* Restore missing part.

PR-URL: https://github.com/nodejs/node/pull/13288
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-01 02:23:11 +03:00
Alexander O'Mara
e7100364f4
zlib: expose amount of data read for engines
Added bytesRead property to Zlib engines

Fixes: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13088
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-06-01 00:22:23 +02:00
Alexander O'Mara
d0b1b52edb
zlib: option for engine in convenience methods
Added option to expose engine to convenience methods

Refs: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13089
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-01 00:21:32 +02:00
Rich Trott
102e1aa4e3 doc: fix ordering error in errors.md
PR-URL: https://github.com/nodejs/node/pull/13274
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-31 10:21:29 -07:00
JongChan Choi
fd54b10500 doc: fix typo in n-api.md
PR-URL: https://github.com/nodejs/node/pull/13323
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-05-31 10:35:39 +03:00
James M Snell
43e4efdf21 2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](https://github.com/nodejs/node/commit/4a7233c178)]
    [#12892](https://github.com/nodejs/node/pull/12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](https://github.com/nodejs/node/commit/d2d32ea5a2)]
    [#11968](https://github.com/nodejs/node/pull/11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](https://github.com/nodejs/node/commit/7eb1b4658e)]
    [#12141](https://github.com/nodejs/node/pull/12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](https://github.com/nodejs/node/commit/beca3244e2)]
    [#10236](https://github.com/nodejs/node/pull/10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](https://github.com/nodejs/node/commit/97a77288ce)]
    [#12348](https://github.com/nodejs/node/pull/12348),
    [[`d75fdd96aa`](https://github.com/nodejs/node/commit/d75fdd96aa)]
    [#10423](https://github.com/nodejs/node/pull/10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](https://github.com/nodejs/node/commit/627ecee9ed)]
    [#10653](https://github.com/nodejs/node/pull/10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](https://github.com/nodejs/node/commit/f18e08d820)]
    [#9744](https://github.com/nodejs/node/pull/9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](https://github.com/nodejs/node/commit/3c3b36af0f)]
    [#12936](https://github.com/nodejs/node/pull/12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](https://github.com/nodejs/node/commit/60d1aac8d2)]
    [#12784](https://github.com/nodejs/node/pull/12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](https://github.com/nodejs/node/commit/84dabe8373)]
    [#12489](https://github.com/nodejs/node/pull/12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](https://github.com/nodejs/node/commit/7a55e34ef4)]
    [#10467](https://github.com/nodejs/node/pull/10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](https://github.com/nodejs/node/commit/3c2a9361ff)]
    [#9683](https://github.com/nodejs/node/pull/9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](https://github.com/nodejs/node/commit/90403dd1d0)]
    [#11567](https://github.com/nodejs/node/pull/11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](https://github.com/nodejs/node/commit/d3480776c7)]
    [#11259](https://github.com/nodejs/node/pull/11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](https://github.com/nodejs/node/commit/fb71ba4921)]
    [#11355](https://github.com/nodejs/node/pull/11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](https://github.com/nodejs/node/commit/3e6f1032a4)]
    [#10805](https://github.com/nodejs/node/pull/10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](https://github.com/nodejs/node/commit/5de3cf099c)]
    [#10116](https://github.com/nodejs/node/pull/10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](https://github.com/nodejs/node/commit/84a23391f6)]
    [#12113](https://github.com/nodejs/node/pull/12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](https://github.com/nodejs/node/commit/56e881d0b0)]
    [#11975](https://github.com/nodejs/node/pull/11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](https://github.com/nodejs/node/commit/03e89b3ff2)]
    [#10116](https://github.com/nodejs/node/pull/10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](https://github.com/nodejs/node/commit/dd20e68b0f)]
    [#12725](https://github.com/nodejs/node/pull/12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](https://github.com/nodejs/node/commit/3f27f02da0)]
    [#11599](https://github.com/nodejs/node/pull/11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (https://github.com/nodejs/node/commit/ec7cbaf266)]
    [#12995](https://github.com/nodejs/node/pull/12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](https://github.com/nodejs/node/commit/a16b570f8c)]
    [#11968](https://github.com/nodejs/node/pull/11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](https://github.com/nodejs/node/commit/010f864426)]
    [#12949](https://github.com/nodejs/node/pull/12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](https://github.com/nodejs/node/commit/a5f91ab230)]
    [#11689](https://github.com/nodejs/node/pull/11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](https://github.com/nodejs/node/commit/8a7db9d4b5)]
    [#12087](https://github.com/nodejs/node/pull/12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](https://github.com/nodejs/node/commit/b6e1d22fa6)]
    [#12925](https://github.com/nodejs/node/pull/12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](https://github.com/nodejs/node/commit/07c7f198db)]
    [#12828](https://github.com/nodejs/node/pull/12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](https://github.com/nodejs/node/commit/348cc80a3c)]
    [#5923](https://github.com/nodejs/node/pull/5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](https://github.com/nodejs/node/commit/a2ae08999b)]
    [#11349](https://github.com/nodejs/node/pull/11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](https://github.com/nodejs/node/commit/d523eb9c40)]
    [#11447](https://github.com/nodejs/node/pull/11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](https://github.com/nodejs/node/commit/d080ead0f9)]
    [#12710](https://github.com/nodejs/node/pull/12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](https://github.com/nodejs/node/commit/5bfd13b81e)]
    [#9726](https://github.com/nodejs/node/pull/9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](https://github.com/nodejs/node/commit/455e6f1dd8)]
    [#11708](https://github.com/nodejs/node/pull/11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](https://github.com/nodejs/node/commit/aab0d202f8)]
    [#11624](https://github.com/nodejs/node/pull/11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](https://github.com/nodejs/node/commit/99da8e8e02)]
    [#12442](https://github.com/nodejs/node/pull/12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](https://github.com/nodejs/node/commit/91383e47fd)]
    [#12001](https://github.com/nodejs/node/pull/12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](https://github.com/nodejs/node/commit/b514bd231e)]
    [#11391](https://github.com/nodejs/node/pull/11391).
2017-05-30 10:58:31 -07:00
Daijiro Wachi
1d60fc3aa5 doc: fix doc styles
BUILDING.md
  + L122: Missing code-language flag
  + L170: Strong should use `*` as a marker

doc/changelogs/CHANGELOG_V6.md
  + L1494: Don't pad `emphasis` with inner spaces

doc/guides/maintaining-V8.md
  + L3: Don't use multiple top level headings
  + L16: Don't use multiple top level headings
  + L40: Don't use multiple top level headings
  + L124: Don't use multiple top level headings
  + L182: Missing code-language flag
  + L223: Don't use multiple top level headings
  + L288: Don't use multiple top level headings
  + L307: Don't use multiple top level headings

doc/guides/writing-tests.md
  + L322: Missing code-language flag
  + L329: Missing code-language flag

doc/releases.md
  + L299: Missing code-language flag

PR-URL: https://github.com/nodejs/node/pull/13270
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-05-30 19:18:48 +02:00
James M Snell
dbbe1faf30 doc: restructure url.md
PR-URL: https://github.com/nodejs/node/pull/12710
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-29 07:39:37 -07:00
James M Snell
10754b60d0 doc: graduate WHATWG URL from Experimental
PR-URL: https://github.com/nodejs/node/pull/12710
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-29 07:39:30 -07:00
Daijiro Wachi
a94b98e7e1 doc: fix api docs style
doc/api/fs.md
  + L314: Missing code-language flag

doc/api/stream.md
  + L2120: Do not use definitions with the same identifier
  + L2121: Do not use definitions with the same identifier
  + L2122: Do not use definitions with the same identifier

doc/api/v8.md
  + L157: Move definitions to the end of the file
  + L158: Move definitions to the end of the file
  + L159: Move definitions to the end of the file
  + L160: Move definitions to the end of the file

PR-URL: https://github.com/nodejs/node/pull/13236
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-05-28 22:03:13 +02:00
Michael Dawson
5b50501395 doc: make spelling of behavior consistent
In the api docs there were some instances of behaviour
and many more with behavior.  I was asked as part of a review
on a different PR which one to use and went with behavior
to be consistent with the majority.

Our style guide states that American English spelling is preferred.

PR-URL: https://github.com/nodejs/node/pull/13245
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
2017-05-28 10:54:10 +02:00
larissayvette
234353a1b8 lib,src: refactor buffer out of range index
PR-URL: https://github.com/nodejs/node/pull/11296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-05-27 21:11:26 -07:00
Anna Henningsen
9f610b5e26
stream: support Uint8Array input to methods
PR-URL: https://github.com/nodejs/node/pull/11608
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-05-27 11:19:39 +02:00
mskec
0ecdf29340 errors: migrate lib/console
Migrate console.js to use internal/errors.js.

PR-URL: https://github.com/nodejs/node/pull/11340
Ref: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-05-27 09:28:07 +02:00
Michael Dawson
d9ee297afb n-api: add napi_get_version
Add napi_get_version function so that addons can
query the level of N-API supported.

PR-URL: https://github.com/nodejs/node/pull/13207
Fixes: https://github.com/nodejs/abi-stable-node/issues/231
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
2017-05-26 17:05:42 -04:00
Timur Shemsedinov
0aa7ef5950
http: destroy sockets after keepAliveTimeout
Implement server.keepAliveTimeout in addition to server.timeout to
prevent temporary socket/memory leaking in keep-alive mode.

PR-URL: https://github.com/nodejs/node/pull/2534
Author: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Author: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-05-26 19:05:53 +03:00
Vse Mozhet Byt
329b6e908c doc: fix code example in inspector.md
PR-URL: https://github.com/nodejs/node/pull/13182
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-26 11:51:53 +03:00
Alexey Orlenko
2af49b6c89 doc: make the style of notes consistent
Make the style of "Note:" paragraphs consistent and document the
guidelines in `doc/STYLE_GUIDE.md`.

PR-URL: https://github.com/nodejs/node/pull/13133
Fixes: https://github.com/nodejs/node/issues/13131
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-25 18:49:41 -04:00
Ebrahim Byagowi
b3d1e3d4c7 fs: fix realpath{Sync} on resolving pipes/sockets
PR-URL: https://github.com/nodejs/node/pull/13028
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-05-25 18:18:29 -04:00
Sam Roberts
b659385791 src: allow --tls-cipher-list in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/13172
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-25 09:19:17 -07:00
Sam Roberts
3954ea9f41
inspector: document bad usage for --inspect-port
Document --inspect-port, and fix the reporting for when it is misused.

The option requires an argument, but when the argument was omitted, the
error message incorrectly reported --inspect-port as being bad, as if
was not supported at all:

    % node --inspect-port
    node: bad option: --inspect-port
    % node --none-such
    node: bad option: --none-such

It is now correctly reported as requiring an argument:

    % ./node --inspect-port
    ./node: --inspect-port requires an argument

PR-URL: https://github.com/nodejs/node/pull/12581
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-24 20:31:56 +02:00
Calvin Metcalf
ba513d140c
stream: add final method
Adds the ability to for write streams to have an _final method which acts
similarly to the _flush method that transform streams have but is called before
the finish event is emitted and if asynchronous delays the stream from
finishing.  The `final` option may also be passed in order to set it.

PR-URL: https://github.com/nodejs/node/pull/12828
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-05-24 13:11:01 -04:00
Michael Dawson
e912c67d24 dgram: convert to using internal/errors
Covert lib/dgram.js over to using lib/internal/errors.js
for generating Errors. See
[using-internal-errors.md](https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md)
for more details.

I have not addressed the cases that use errnoException() and
exceptionWithHostPort() helper methods as changing these would require
fixing the tests across all of the different files that use them. In
addition, these helpers already add a `code` to the Error and we'll
have to discuss how that interacts with the `code` used by
lib/internal/errors.js.  I believe we should convert all users
of errnoException and exceptionWithHostPort in a PR dedicated to
that conversion.

PR-URL: https://github.com/nodejs/node/pull/12926
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de>
2017-05-24 10:16:46 -04:00
Vse Mozhet Byt
6af72d4b03 doc: don't use useless constructors in stream.md
PR-URL: https://github.com/nodejs/node/pull/13145
Refs: http://eslint.org/docs/rules/no-useless-constructor
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-24 03:53:06 +03:00
Vse Mozhet Byt
9278ce202a doc: update code example for Windows in stream.md
PR-URL: https://github.com/nodejs/node/pull/13138
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-24 03:49:12 +03:00
Alexey Orlenko
eebc262278
doc: improve formatting of STYLE_GUIDE.md
* Wrap text at 80 characters.
* Use periods consistently.

PR-URL: https://github.com/nodejs/node/pull/13135
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-23 21:14:56 +02:00
Alexey Orlenko
ef56d47f50
doc: fix incorrect keyboard shortcut
This commit fixes an incorrect keyboard shortcut in
`doc/STYLE_GUIDE.md`: entering em-dashes is done via Alt+Shift+"-" on
macOS, not via Ctrl+Alt+"-". Besides that, Option is more canonical name
of Alt on Macs.

PR-URL: https://github.com/nodejs/node/pull/13134
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-23 21:12:23 +02:00
Michael Dawson
f3ef9719b5
doc: fix title/function name mismatch
Fix mismatch in title for napi_get_value_string_utf16

Fixes: https://github.com/nodejs/abi-stable-node/issues/243
PR-URL: https://github.com/nodejs/node/pull/13123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-23 21:04:11 +02:00
Anna Henningsen
02bf16e5ae
doc: link to common docs in test writing guide
PR-URL: https://github.com/nodejs/node/pull/13118
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-05-23 20:53:50 +02:00
Ebrahim Byagowi
594b5d7b89
cmd: support dash as stdin alias
PR-URL: https://github.com/nodejs/node/pull/13012
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-23 20:41:13 +02:00
Eugene Ostroukhov
60390cd7fb
inspector: JavaScript bindings for the inspector
PR-URL: https://github.com/nodejs/node/pull/12263
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-05-23 19:45:48 +02:00
Chris Young
c470f04f22 doc: list macOS as supporting filename argument
also added regression tests

PR-URL: https://github.com/nodejs/node/pull/13111
Fixes: https://github.com/nodejs/node/issues/13108
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-05-22 15:55:08 -04:00