Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge nodejs/master
Browse files Browse the repository at this point in the history
Merge 18df171 as of 2017-11-01.
This is an automatically created merge. For any problems please
contact @kunalspathak.
  • Loading branch information
chakrabot committed Nov 7, 2017
2 parents 35c8c3a + 18df171 commit 3aa2c16
Show file tree
Hide file tree
Showing 31 changed files with 573 additions and 64 deletions.
30 changes: 8 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ release lines.

Select a Node.js version below to view the changelog history:

* [Node.js 9](doc/changelogs/CHANGELOG_V9.md)
* [Node.js 8](doc/changelogs/CHANGELOG_V8.md)
* [Node.js 7](doc/changelogs/CHANGELOG_V7.md)
* [Node.js 6](doc/changelogs/CHANGELOG_V6.md)
Expand All @@ -20,14 +21,18 @@ release.

<table>
<tr>
<th><a href="doc/changelogs/CHANGELOG_V8.md">8</a><sup>Current</sup></th>
<th title="Supported until 2016-07-01"><a href="doc/changelogs/CHANGELOG_V7.md">7</a><sup>-</sup></th>
<th title="Current"><a href="doc/changelogs/CHANGELOG_V9.md">9</a><sup>Current</sup></th>
<th title="LTS Until 2019-12"><a href="doc/changelogs/CHANGELOG_V8.md">8</a><sup>LTS</sup></th>
<th title="LTS Until 2019-04"><a href="doc/changelogs/CHANGELOG_V6.md">6</a><sup>LTS</sup></th>
<th title="LTS Until 2018-04"><a href="doc/changelogs/CHANGELOG_V4.md">4</a><sup>LTS</sup></th>
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.8.1">8.8.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.0.0">9.0.0</a></b><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.9.0">8.9.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.8.1">8.8.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.8.0">8.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.7.0">8.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.6.0">8.6.0</a><br/>
Expand All @@ -43,25 +48,6 @@ release.
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.0">8.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.0.0">8.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V7.md#7.10.1">7.10.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.10.0">7.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.9.0">7.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.8.0">7.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.4">7.7.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.3">7.7.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.2">7.7.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.1">7.7.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.0">7.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.6.0">7.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.5.0">7.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.4.0">7.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.3.0">7.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.2.1">7.2.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.2.0">7.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.1.0">7.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.0.0">7.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.11.5">6.11.5</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.11.4">6.11.4</a><br/>
Expand Down
16 changes: 8 additions & 8 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An alias of [`assert.ok()`][].
<!-- YAML
added: v0.1.21
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
- version: v8.0.0
Expand Down Expand Up @@ -108,10 +108,10 @@ parameter is an instance of an `Error` then it will be thrown instead of the
<!-- YAML
added: v1.2.0
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15169
description: Enumerable symbol properties are now compared.
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the [SameValueZero][] comparison.
- version: v8.5.0
Expand Down Expand Up @@ -389,7 +389,7 @@ assert.ifError(new Error());
<!-- YAML
added: v0.1.21
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
- version: v8.0.0
Expand Down Expand Up @@ -454,13 +454,13 @@ parameter is an instance of an `Error` then it will be thrown instead of the
<!-- YAML
added: v1.2.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15398
description: -0 and +0 are not considered equal anymore.
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the [SameValueZero][] comparison.
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
- version: v8.0.0
Expand Down
2 changes: 1 addition & 1 deletion doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function promiseResolve(asyncId) { }
#### `async_hooks.createHook(callbacks)`

<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* `callbacks` {Object} The [Hook Callbacks][] to register
Expand Down
2 changes: 1 addition & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ of the event loop.

### `--no-force-async-hooks-checks`
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

Disables runtime checks for `async_hooks`. These will still be enabled
Expand Down
10 changes: 5 additions & 5 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data. The most common usage is handling output generated by the HTML5

### Certificate.exportChallenge(spkac)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->
- `spkac` {string | Buffer | TypedArray | DataView}
- Returns {Buffer} The challenge component of the `spkac` data structure, which
Expand All @@ -66,7 +66,7 @@ console.log(challenge.toString('utf8'));

### Certificate.exportPublicKey(spkac[, encoding])
<!-- YAML
added: REPLACEME
added: v9.0.0
-->
- `spkac` {string | Buffer | TypedArray | DataView}
- `encoding` {string}
Expand All @@ -83,7 +83,7 @@ console.log(publicKey);

### Certificate.verifySpkac(spkac)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->
- `spkac` {Buffer | TypedArray | DataView}
- Returns {boolean} `true` if the given `spkac` data structure is valid, `false`
Expand Down Expand Up @@ -1830,7 +1830,7 @@ negative performance implications for some applications, see the
<!-- YAML
added: v7.10.0
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15231
description: The `buffer` argument may be any ArrayBufferView
-->
Expand Down Expand Up @@ -1872,7 +1872,7 @@ console.log(crypto.randomFillSync(a).toString('hex'));
<!-- YAML
added: v7.10.0
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15231
description: The `buffer` argument may be any ArrayBufferView
-->
Expand Down
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ argument to `fs.createReadStream()`. If `path` is passed as a string, then
<!-- YAML
added: v0.1.21
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/13173
description: Added times as numbers.
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ socket/stream from this function, or by passing the socket/stream to `callback`.

### agent.keepSocketAlive(socket)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* `socket` {net.Socket}
Expand All @@ -181,7 +181,7 @@ it for use with the next request.

### agent.reuseSocket(socket, request)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* `socket` {net.Socket}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ should be discouraged.
<!-- YAML
added: v0.3.0
changes:
- version: REPLACEME
- version: v8.9.0
pr-url: https://github.com/nodejs/node/pull/16397
description: The `paths` option is now supported.
-->
Expand All @@ -620,7 +620,7 @@ but rather than loading the module, just return the resolved filename.

#### require.resolve.paths(request)
<!-- YAML
added: REPLACEME
added: v8.9.0
-->

* `request` {string} The module path whose lookup paths are being retrieved.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ backward slashes (`\`).

## path.toNamespacedPath(path)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* `path` {string}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ If the Node.js process was not spawned with an IPC channel,
<!-- YAML
added: v0.1.16
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/12794
description: Added support for the `flags` argument.
-->
Expand Down Expand Up @@ -1790,7 +1790,7 @@ changes:
- version: v4.2.0
pr-url: https://github.com/nodejs/node/pull/3102
description: The `icu` property is now supported.
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15785
description: The `v8` property now includes a Node.js specific suffix.
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ within the action function for commands registered using the

### replServer.clearBufferedCommand()
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

The `replServer.clearBufferedComand()` method clears any command that has been
Expand All @@ -390,7 +390,7 @@ called from within the action function for commands registered using the
### replServer.parseREPLKeyword(keyword, [rest])
<!-- YAML
added: v0.8.9
deprecated: REPLACEME
deprecated: v9.0.0
-->

* `keyword` {string} the potential keyword to parse and execute
Expand Down
41 changes: 41 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,47 @@ class MyWritable extends Writable {
}
```

#### Decoding buffers in a Writable Stream

Decoding buffers is a common task, for instance, when using transformers whose
input is a string. This is not a trivial process when using multi-byte
characters encoding, such as UTF-8. The following example shows how to decode
multi-byte strings using `StringDecoder` and [Writable][].

```js
const { Writable } = require('stream');
const { StringDecoder } = require('string_decoder');

class StringWritable extends Writable {
constructor(options) {
super(options);
const state = this._writableState;
this._decoder = new StringDecoder(state.defaultEncoding);
this.data = '';
}
_write(chunk, encoding, callback) {
if (encoding === 'buffer') {
chunk = this._decoder.write(chunk);
}
this.data += chunk;
callback();
}
_final(callback) {
this.data += this._decoder.end();
callback();
}
}

const euro = [[0xE2, 0x82], [0xAC]].map(Buffer.from);
const w = new StringWritable();

w.write('currency: ');
w.write(euro[0]);
w.end(euro[1]);

console.log(w.data); // currency: €
```

### Implementing a Readable Stream

The `stream.Readable` class is extended to implement a [Readable][] stream.
Expand Down
4 changes: 2 additions & 2 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ console.log(arr); // logs the full array

## util.isDeepStrictEqual(val1, val2)
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* `val1` {any}
* `val2` {any}
* Returns: {string}
* Returns: {boolean}

Returns `true` if there is deep strict equality between `val` and `val2`.
Otherwise, returns `false`.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ console.log(util.inspect(sandbox));
added: v0.11.14
deprecated: v8.0.0
changes:
- version: REPLACEME
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/12815
description: Calling this function now emits a deprecation warning.
-->
Expand Down
2 changes: 1 addition & 1 deletion doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class of the compressor/decompressor classes.

### zlib.bytesRead
<!-- YAML
added: REPLACEME
added: v9.0.0
-->

* {number}
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_ARCHIVE.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_IOJS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_V010.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_V012.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_V4.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG_V5.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</table>

* Other Versions
* [9.x](CHANGELOG_V9.md)
* [8.x](CHANGELOG_V8.md)
* [7.x](CHANGELOG_V7.md)
* [6.x](CHANGELOG_V6.md)
Expand Down
Loading

0 comments on commit 3aa2c16

Please sign in to comment.