Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.10.1 proposal #6060

Merged
merged 30 commits into from
Apr 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f3f19ee
net: refactor self=this to arrow functions
benjamingr Mar 23, 2016
0a13099
etw: add event messages
joaocgreis Mar 21, 2016
f14d71c
test: stdin is not always a net.Socket
Fishrock123 Mar 28, 2016
4f1fa2a
test: fix offending max-len linter error
thefourtheye Mar 31, 2016
96bb315
test: ensure _handle property existence
Trott Mar 26, 2016
c6ac6f2
http: Corrects IPv6 address in Host header
mpotra Feb 19, 2016
3f75751
build: introduce ci targets for lint/benchmark
jbergstroem Mar 27, 2016
a40b0cb
test: refactor http-end-throw-socket-handling
santigimeno Mar 12, 2016
8bec8aa
doc: consolidate timers docs in timers.markdown
bengl Mar 21, 2016
0ae5d02
doc: clarify that __dirname is module local
jasnell Apr 2, 2016
7337ef6
doc: minor argument formatting in stream.markdown
jasnell Apr 2, 2016
7491fdc
tools: remove disabling of already-disabled rule
Trott Apr 2, 2016
ce17371
doc: add 'Command Line Options' to 'View on single page'
firedfox Apr 2, 2016
f12c386
doc: clarify stdout/stderr arguments to callback
jasnell Apr 2, 2016
f879f5e
doc: document unspecified behavior for buf.write* methods
jasnell Mar 27, 2016
6052ced
test: fix error message checks in test-module-loading
jasnell Apr 1, 2016
0127c2b
test: fix test-dns.js flakiness
Trott Apr 1, 2016
dd25984
doc: note assert.throws() pitfall
Trott Apr 3, 2016
2ab1237
test: fix flaky test-net-socket-timeout-unref
Trott Mar 29, 2016
aa9fb03
doc: use HTTPS for links where possible
Trott Apr 2, 2016
1c40079
path: fix win32.isAbsolute() inconsistency
mscdex Apr 3, 2016
02f2ebd
test: explicitly set global in test-repl
Trott Apr 3, 2016
7db7a82
test: make arch available in status files
santigimeno Apr 1, 2016
cc8fcc5
test: be explicit about polluting of `global`
Trott Apr 2, 2016
059b607
test: make use of globals explicit
Trott Apr 2, 2016
0f5a51a
assert: Check typed array view type in deepEqual
addaleax Mar 26, 2016
50a062e
tools: remove obsolete lint config file
Trott Mar 30, 2016
8317778
meta: add "joining a wg" section to WORKING_GROUPS.md
mcollina Feb 29, 2016
781290b
doc: refine child_process detach behaviour
eljefedelrodeodeljefe Feb 19, 2016
5c4a414
2016-04-05, Version 5.10.1 (Stable) Release
Apr 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Node.js ChangeLog

## 2016-04-05, Version 5.10.1 (Stable), @thealphanerd

### Notable changes

**http**:
* Enclose IPv6 Host header in square brackets. This will enable proper seperation of the host adress from any port reference (Mihai Potra) [#5314](https://github.com/nodejs/node/pull/5314)

**path**:
* Make win32.isAbsolute more consistent (Brian White) [#6028](https://github.com/nodejs/node/pull/6028)

### Commits

* [[`0f5a51ae4b`](https://github.com/nodejs/node/commit/0f5a51ae4b)] - **assert**: Check typed array view type in deepEqual (Anna Henningsen) [#5910](https://github.com/nodejs/node/pull/5910)
* [[`e966d1f5db`](https://github.com/nodejs/node/commit/e966d1f5db)] - **buffer**: don't set `kNoZeroFill` flag in allocUnsafe (Vladimir Kurchatkin) [#6007](https://github.com/nodejs/node/pull/6007)
* [[`3f75751c2e`](https://github.com/nodejs/node/commit/3f75751c2e)] - **build**: introduce ci targets for lint/benchmark (Johan Bergström) [#5921](https://github.com/nodejs/node/pull/5921)
* [[`781290b61d`](https://github.com/nodejs/node/commit/781290b61d)] - **doc**: refine child_process detach behaviour (Robert Jefe Lindstaedt) [#5330](https://github.com/nodejs/node/pull/5330)
* [[`aa9fb03202`](https://github.com/nodejs/node/commit/aa9fb03202)] - **doc**: use HTTPS for links where possible (Rich Trott) [#6019](https://github.com/nodejs/node/pull/6019)
* [[`dd25984838`](https://github.com/nodejs/node/commit/dd25984838)] - **doc**: note assert.throws() pitfall (Rich Trott) [#6029](https://github.com/nodejs/node/pull/6029)
* [[`f879f5e68a`](https://github.com/nodejs/node/commit/f879f5e68a)] - **doc**: document unspecified behavior for buf.write* methods (James M Snell) [#5925](https://github.com/nodejs/node/pull/5925)
* [[`f12c3861e0`](https://github.com/nodejs/node/commit/f12c3861e0)] - **doc**: clarify stdout/stderr arguments to callback (James M Snell) [#6015](https://github.com/nodejs/node/pull/6015)
* [[`ce173716be`](https://github.com/nodejs/node/commit/ce173716be)] - **doc**: add 'Command Line Options' to 'View on single page' (firedfox) [#6011](https://github.com/nodejs/node/pull/6011)
* [[`7337ef6422`](https://github.com/nodejs/node/commit/7337ef6422)] - **doc**: minor argument formatting in stream.markdown (James M Snell) [#6016](https://github.com/nodejs/node/pull/6016)
* [[`0ae5d027c6`](https://github.com/nodejs/node/commit/0ae5d027c6)] - **doc**: clarify that __dirname is module local (James M Snell) [#6018](https://github.com/nodejs/node/pull/6018)
* [[`8bec8aa41f`](https://github.com/nodejs/node/commit/8bec8aa41f)] - **doc**: consolidate timers docs in timers.markdown (Bryan English) [#5837](https://github.com/nodejs/node/pull/5837)
* [[`0a13099c42`](https://github.com/nodejs/node/commit/0a13099c42)] - **etw**: add event messages (João Reis) [#5936](https://github.com/nodejs/node/pull/5936)
* [[`c6ac6f2ea1`](https://github.com/nodejs/node/commit/c6ac6f2ea1)] - **http**: Corrects IPv6 address in Host header (Mihai Potra) [#5314](https://github.com/nodejs/node/pull/5314)
* [[`8317778925`](https://github.com/nodejs/node/commit/8317778925)] - **meta**: add "joining a wg" section to WORKING_GROUPS.md (Matteo Collina) [#5488](https://github.com/nodejs/node/pull/5488)
* [[`f3f19ee5e2`](https://github.com/nodejs/node/commit/f3f19ee5e2)] - **net**: refactor self=this to arrow functions (Benjamin Gruenbaum) [#5857](https://github.com/nodejs/node/pull/5857)
* [[`1c4007927d`](https://github.com/nodejs/node/commit/1c4007927d)] - **path**: fix win32.isAbsolute() inconsistency (Brian White) [#6028](https://github.com/nodejs/node/pull/6028)
* [[`059b607a4f`](https://github.com/nodejs/node/commit/059b607a4f)] - **test**: make use of globals explicit (Rich Trott) [#6014](https://github.com/nodejs/node/pull/6014)
* [[`cc8fcc5a07`](https://github.com/nodejs/node/commit/cc8fcc5a07)] - **test**: be explicit about polluting of `global` (Rich Trott) [#6017](https://github.com/nodejs/node/pull/6017)
* [[`7db7a820b9`](https://github.com/nodejs/node/commit/7db7a820b9)] - **test**: make arch available in status files (Santiago Gimeno) [#5997](https://github.com/nodejs/node/pull/5997)
* [[`02f2ebd9b4`](https://github.com/nodejs/node/commit/02f2ebd9b4)] - **test**: explicitly set global in test-repl (Rich Trott) [#6026](https://github.com/nodejs/node/pull/6026)
* [[`2ab1237137`](https://github.com/nodejs/node/commit/2ab1237137)] - **test**: fix flaky test-net-socket-timeout-unref (Rich Trott) [#6003](https://github.com/nodejs/node/pull/6003)
* [[`0127c2bd39`](https://github.com/nodejs/node/commit/0127c2bd39)] - **test**: fix test-dns.js flakiness (Rich Trott) [#5996](https://github.com/nodejs/node/pull/5996)
* [[`6052ced37f`](https://github.com/nodejs/node/commit/6052ced37f)] - **test**: fix error message checks in test-module-loading (James M Snell) [#5986](https://github.com/nodejs/node/pull/5986)
* [[`a40b0cb673`](https://github.com/nodejs/node/commit/a40b0cb673)] - **test**: refactor http-end-throw-socket-handling (Santiago Gimeno) [#5676](https://github.com/nodejs/node/pull/5676)
* [[`96bb315262`](https://github.com/nodejs/node/commit/96bb315262)] - **test**: ensure _handle property existence (Rich Trott) [#5916](https://github.com/nodejs/node/pull/5916)
* [[`4f1fa2adeb`](https://github.com/nodejs/node/commit/4f1fa2adeb)] - **test**: fix offending max-len linter error (Sakthipriyan Vairamani) [#5980](https://github.com/nodejs/node/pull/5980)
* [[`f14d71ccea`](https://github.com/nodejs/node/commit/f14d71ccea)] - **test**: stdin is not always a net.Socket (Jeremiah Senkpiel) [#5935](https://github.com/nodejs/node/pull/5935)
* [[`50a062e691`](https://github.com/nodejs/node/commit/50a062e691)] - **tools**: remove obsolete lint config file (Rich Trott) [#5959](https://github.com/nodejs/node/pull/5959)
* [[`7491fdcfe9`](https://github.com/nodejs/node/commit/7491fdcfe9)] - **tools**: remove disabling of already-disabled rule (Rich Trott) [#6013](https://github.com/nodejs/node/pull/6013)

## 2016-03-31, Version 5.10.0 (Stable), @evanlucas

### Notable changes
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ bench-all: bench bench-misc bench-array bench-buffer bench-url bench-events benc

bench: bench-net bench-http bench-fs bench-tls

bench-ci: bench

bench-http-simple:
benchmark/http_simple_bench.sh

Expand Down Expand Up @@ -620,10 +622,12 @@ cpplint:

lint: jslint cpplint

lint-ci: lint

.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
check uninstall install install-includes install-bin all staticlib \
dynamiclib test test-all test-addons build-addons website-upload pkg \
blog blogclean tar binary release-only bench-http-simple bench-idle \
bench-all bench bench-misc bench-array bench-buffer bench-net \
bench-http bench-fs bench-tls cctest run-ci test-v8 test-v8-intl \
test-v8-benchmarks test-v8-all v8
test-v8-benchmarks test-v8-all v8 lint-ci bench-ci
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ Node.js from source.
* [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
* [CONTRIBUTING.md](./CONTRIBUTING.md)
* [GOVERNANCE.md](./GOVERNANCE.md)
* IRC (general questions): [#node.js on Freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4)
* IRC (node core development): [#node-dev on Freenode.net](http://webchat.freenode.net?channels=node-dev&uio=d4)
* IRC (general questions): [#node.js on Freenode.net](https://webchat.freenode.net?channels=node.js&uio=d4)
* IRC (node core development): [#node-dev on Freenode.net](https://webchat.freenode.net?channels=node-dev&uio=d4)
* [nodejs/node on Gitter](https://gitter.im/nodejs/node)

## Security
Expand Down
5 changes: 5 additions & 0 deletions WORKING_GROUPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ It's responsibilities are:
* Working with the Build Working Group to improve continuous integration.
* Improving tooling for testing.

## Joining a WG

To find out how to join a working group, consult the GOVERNANCE.md in
the working group's repository, or simply open an issue there.

## Starting a WG

A Working Group is established by first defining a charter that can be
Expand Down
1 change: 1 addition & 0 deletions doc/api/all.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@include buffer
@include child_process
@include cluster
@include cli
@include console
@include crypto
@include debugger
Expand Down
21 changes: 19 additions & 2 deletions doc/api/assert.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,13 @@ If the values are not strictly equal, an `AssertionError` is thrown with a

## assert.throws(block[, error][, message])

Expects the function `block` to throw an error. If specified, `error` can be a
constructor, [`RegExp`][], or validation function.
Expects the function `block` to throw an error.

If specified, `error` can be a constructor, [`RegExp`][], or validation
function.

If specified, `message` will be the message provided by the `AssertionError` if
the block fails to throw.

Validate instanceof using constructor:

Expand Down Expand Up @@ -402,6 +407,18 @@ assert.throws(
);
```

Note that `error` can not be a string. If a string is provided as the second
argument, then `error` is assumed to be omitted and the string will be used for
`message` instead. This can lead to easy-to-miss mistakes:

```js
// THIS IS A MISTAKE! DO NOT DO THIS!
assert.throws(myFunction, 'missing foo', 'did not throw with expected message');

// Do this instead.
assert.throws(myFunction, /missing foo/, 'did not throw with expected message');
```

[Locked]: documentation.html#documentation_stability_index
[`assert.deepEqual()`]: #assert_assert_deepequal_actual_expected_message
[`assert.deepStrictEqual()`]: #assert_assert_deepstrictequal_actual_expected_message
Expand Down
31 changes: 21 additions & 10 deletions doc/api/buffer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,8 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little
endian). The `value` argument must be a valid 64-bit double.
endian). The `value` argument *should* be a valid 64-bit double. Behavior is
not defined when `value` is anything other than a 64-bit double.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand Down Expand Up @@ -1416,7 +1417,7 @@ console.log(buf);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little
endian). Behavior is unspecified if `value` is anything other than a 32-bit
endian). Behavior is not defined when `value` is anything other than a 32-bit
float.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
Expand Down Expand Up @@ -1446,8 +1447,9 @@ console.log(buf);
* `noAssert` {Boolean} Default: false
* Return: {Number} The offset plus the number of written bytes

Writes `value` to the Buffer at the specified `offset`. The `value` must be a
valid signed 8-bit integer.
Writes `value` to the Buffer at the specified `offset`. The `value` should be a
valid signed 8-bit integer. Behavior is not defined when `value` is anything
other than a signed 8-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand All @@ -1474,7 +1476,8 @@ console.log(buf);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little
endian). The `value` must be a valid signed 16-bit integer.
endian). The `value` should be a valid signed 16-bit integer. Behavior is
not defined when `value` is anything other than a signed 16-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand All @@ -1501,7 +1504,8 @@ console.log(buf);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little
endian). The `value` must be a valid signed 32-bit integer.
endian). The `value` should be a valid signed 32-bit integer. Behavior is
not defined when `value` is anything other than a signed 32-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand Down Expand Up @@ -1547,15 +1551,18 @@ that `value` may be too large for the specific function and `offset` may be
beyond the end of the Buffer leading to the values being silently dropped. This
should not be used unless you are certain of correctness.

Behavior is not defined when `value` is anything other than an integer.

### buf.writeUInt8(value, offset[, noAssert])

* `value` {Number} Bytes to be written to Buffer
* `offset` {Number} `0 <= offset <= buf.length - 1`
* `noAssert` {Boolean} Default: false
* Return: {Number} The offset plus the number of written bytes

Writes `value` to the Buffer at the specified `offset`. The `value` must be a
valid unsigned 8-bit integer.
Writes `value` to the Buffer at the specified `offset`. The `value` should be a
valid unsigned 8-bit integer. Behavior is not defined when `value` is anything
other than an unsigned 8-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand Down Expand Up @@ -1585,7 +1592,8 @@ console.log(buf);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little
endian). The `value` must be a valid unsigned 16-bit integer.
endian). The `value` should be a valid unsigned 16-bit integer. Behavior is
not defined when `value` is anything other than an unsigned 16-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand Down Expand Up @@ -1619,7 +1627,8 @@ console.log(buf);

Writes `value` to the Buffer at the specified `offset` with specified endian
format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little
endian). The `value` must be a valid unsigned 32-bit integer.
endian). The `value` should be a valid unsigned 32-bit integer. Behavior is
not defined when `value` is anything other than an unsigned 32-bit integer.

Set `noAssert` to true to skip validation of `value` and `offset`. This means
that `value` may be too large for the specific function and `offset` may be
Expand Down Expand Up @@ -1665,6 +1674,8 @@ that `value` may be too large for the specific function and `offset` may be
beyond the end of the Buffer leading to the values being silently dropped. This
should not be used unless you are certain of correctness.

Behavior is not defined when `value` is anything other than an unsigned integer.

## buffer.INSPECT_MAX_BYTES

* {Number} Default: 50
Expand Down
51 changes: 39 additions & 12 deletions doc/api/child_process.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ exec('my.bat', (err, stdout, stderr) => {
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates
* `error` {Error}
* `stdout` {Buffer}
* `stderr` {Buffer}
* `stdout` {String|Buffer}
* `stderr` {String|Buffer}
* Return: {ChildProcess}

Spawns a shell then executes the `command` within that shell, buffering any
Expand All @@ -157,6 +157,13 @@ the exit code of the child process while `error.signal` will be set to the
signal that terminated the process. Any exit code other than `0` is considered
to be an error.

The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.

The `options` argument may be passed as the second argument to customize how
the process is spawned. The default options are:

Expand Down Expand Up @@ -198,8 +205,8 @@ replace the existing process and uses a shell to execute the command.*
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `callback` {Function} called with the output when process terminates
* `error` {Error}
* `stdout` {Buffer}
* `stderr` {Buffer}
* `stdout` {String|Buffer}
* `stderr` {String|Buffer}
* Return: {ChildProcess}

The `child_process.execFile()` function is similar to [`child_process.exec()`][]
Expand All @@ -220,6 +227,13 @@ const child = execFile('node', ['--version'], (error, stdout, stderr) => {
});
```

The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.

### child_process.fork(modulePath[, args][, options])

* `modulePath` {String} The module to run in the child
Expand Down Expand Up @@ -391,8 +405,27 @@ Doing so will cause the parent's event loop to not include the child in its
reference count, allowing the parent to exit independently of the child, unless
there is an established IPC channel between the child and parent.

Example of detaching a long-running process and redirecting its output to a
file:
When using the `detached` option to start a long-running process, the process
will not stay running in the background after the parent exits unless it is
provided with a `stdio` configuration that is not connected to the parent.
If the parent's `stdio` is inherited, the child will remain attached to the
controlling terminal.

Example of a long-running process, by detaching and also ignoring its parent
`stdio` file descriptors, in order to ignore the parent's termination:

```js
const spawn = require('child_process').spawn;

const child = spawn(process.argv[0], ['child_program.js'], {
detached: true,
stdio: ['ignore']
});

child.unref();
```

Alternatively one can redirect the child process' output into files:

```js
const fs = require('fs');
Expand All @@ -408,12 +441,6 @@ const child = spawn('prg', [], {
child.unref();
```

When using the `detached` option to start a long-running process, the process
will not stay running in the background after the parent exits unless it is
provided with a `stdio` configuration that is not connected to the parent.
If the parent's `stdio` is inherited, the child will remain attached to the
controlling terminal.

#### options.stdio

The `options.stdio` option is used to configure the pipes that are established
Expand Down
Loading