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

Commit

Permalink
Merge tag 'v8.1.1' into v8.x
Browse files Browse the repository at this point in the history
2017-06-13 Node.js 8.1.1 (Stable) Release
Git-EVTag-v0-SHA512: c78fd6249fcc44b33dcd7f9c661b73e0b5c1015e4649a7cebd0d542d5850365b7f67421d3da42d4e455687a260a549b00c7a208baf1cc631eaab99464eb0332a

PR-URL: #299
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
  • Loading branch information
kfarnung committed Jun 14, 2017
2 parents 16160c2 + 3e1492a commit 8356c2b
Show file tree
Hide file tree
Showing 75 changed files with 1,197 additions and 417 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.1.0">8.1.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.1.1">8.1.1</a></b><br/>
<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">
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ locally.
```text
$ git clone git@github.com:username/node.git
$ cd node
$ git remote add upstream git://github.com/nodejs/node.git
$ git remote add upstream https://github.com/nodejs/node.git
```

#### Which branch?
Expand Down
66 changes: 31 additions & 35 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
# Node.js Project Governance

## Core Technical Committee

The Node.js project is governed by a Core Technical Committee (CTC) which is
responsible for high-level guidance of the project.

The CTC has final authority over this project including:

* Technical direction
* Project governance and process (including this policy)
* Contribution policy
* GitHub repository hosting
* Conduct guidelines
* Maintaining the list of additional Collaborators

For the current list of CTC members, see the project
[README.md](./README.md#current-project-team-members).
The Node.js project is governed by its Collaborators, including a Core Technical
Committee (CTC) which is responsible for high-level guidance of the project.

## Collaborators

The [nodejs/node](https://github.com/nodejs/node) GitHub repository is
maintained by the CTC and additional Collaborators who are added by the
CTC on an ongoing basis.
maintained by Collaborators who are added by the CTC on an ongoing basis.

Individuals identified by the CTC as making significant and valuable
contributions are made Collaborators and given commit access to the project.

_Note:_ If you make a significant contribution and are not considered
for commit access, log an issue or contact a CTC member directly.
contributions are made Collaborators and given commit access to the project. If
you make a significant contribution and are not considered for commit access,
log an issue or contact a CTC member directly.

Modifications of the contents of the nodejs/node repository are made on
a collaborative basis. Anybody with a GitHub account may propose a
Expand All @@ -45,18 +29,15 @@ be accepted unless:
the change. Previously-objecting Collaborators do not necessarily have to
sign-off on the change, but they should not be opposed to it.
* The change is escalated to the CTC and the CTC votes to approve the change.
This should be used only after other options (especially discussion among
the disagreeing Collaborators) have been exhausted.
This should only happen if disagreements between Collaborators cannot be
resolved through discussion.

Collaborators may opt to elevate significant or controversial modifications to
the CTC by assigning the `ctc-review` label to a pull request or issue. The
CTC should serve as the final arbiter where required.

For the current list of Collaborators, see the project
[README.md](./README.md#current-project-team-members).

A guide for Collaborators is maintained in
[COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md).
* [Current list of Collaborators](./README.md#current-project-team-members)
* [A guide for Collaborators](./COLLABORATOR_GUIDE.md)

### Collaborator Activities

Expand All @@ -68,9 +49,23 @@ Typical activities of a Collaborator include:
* participation in working groups
* merging pull requests

While the above are typical things done by Collaborators, there are no required
activities to retain Collaborator status. There is currently no process by which
inactive Collaborators are removed from the project.
The CTC periodically reviews the Collaborator list to identify inactive
Collaborators. Past Collaborators are typically given _Emeritus_ status. Emeriti
may request that the CTC restore them to active status.

## Core Technical Committee

The Core Technical Committee (CTC) has final authority over this project
including:

* Technical direction
* Project governance and process (including this policy)
* Contribution policy
* GitHub repository hosting
* Conduct guidelines
* Maintaining the list of additional Collaborators

* [Current list of CTC members](./README.md#current-project-team-members)

## CTC Membership

Expand All @@ -83,9 +78,10 @@ membership beyond these rules.

The CTC may add additional members to the CTC by a standard CTC motion.

When a CTC member's participation in [CTC activities](#ctc-activities) has become
minimal for a sustained period of time, the CTC will request that the member
either indicate an intention to increase participation or voluntarily resign.
When a CTC member's participation in [CTC activities](#ctc-activities) has
become minimal for a sustained period of time, the CTC will request that the
member either indicate an intention to increase participation or voluntarily
resign.

CTC members may only be removed by voluntary resignation or through a standard
CTC motion.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function main(conf) {
var buff = new clazz(8);
var fn = `write${conf.type}`;

if (fn.match(/Int/))
if (/Int/.test(fn))
benchInt(buff, fn, len, noAssert);
else
benchFloat(buff, fn, len, noAssert);
Expand Down
39 changes: 20 additions & 19 deletions benchmark/child_process/child-process-exec-stdout.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
'use strict';
const common = require('../common.js');
const { exec, execSync } = require('child_process');
const isWindows = process.platform === 'win32';

var messagesLength = [64, 256, 1024, 4096];
// Windows does not support that long arguments
if (process.platform !== 'win32')
messagesLength.push(32768);
const bench = common.createBenchmark(main, {
// Windows does not support command lines longer than 8191 characters
if (!isWindows) messagesLength.push(32768);

const bench = common.createBenchmark(childProcessExecStdout, {
len: messagesLength,
dur: [5]
});

const child_process = require('child_process');
const exec = child_process.exec;
function main(conf) {
function childProcessExecStdout(conf) {
bench.start();

const dur = +conf.dur;
const maxDuration = conf.dur * 1000;
const len = +conf.len;

const msg = `"${'.'.repeat(len)}"`;
// eslint-disable-next-line no-unescaped-regexp-dot
msg.match(/./);
const options = {'stdio': ['ignore', 'pipe', 'ignore']};
const child = exec(`yes ${msg}`, options);
const cmd = `yes "${'.'.repeat(len)}"`;
const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] });

var bytes = 0;
child.stdout.on('data', function(msg) {
child.stdout.on('data', (msg) => {
bytes += msg.length;
});

setTimeout(function() {
setTimeout(() => {
bench.end(bytes);
if (process.platform === 'win32') {
// Sometimes there's a yes.exe process left hanging around on Windows...
child_process.execSync(`taskkill /f /t /pid ${child.pid}`);
if (isWindows) {
// Sometimes there's a yes.exe process left hanging around on Windows.
try {
execSync(`taskkill /f /t /pid ${child.pid}`);
} catch (_) {
// this is a best effort kill. stderr is piped to parent for tracing.
}
} else {
child.kill();
}
}, dur * 1000);
}, maxDuration);
}
70 changes: 70 additions & 0 deletions benchmark/cluster/echo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
'use strict';

const cluster = require('cluster');
if (cluster.isMaster) {
const common = require('../common.js');
const bench = common.createBenchmark(main, {
workers: [1],
payload: ['string', 'object'],
sendsPerBroadcast: [1, 10],
n: [1e5]
});

function main(conf) {
var n = +conf.n;
var workers = +conf.workers;
var sends = +conf.sendsPerBroadcast;
var expectedPerBroadcast = sends * workers;
var payload;
var readies = 0;
var broadcasts = 0;
var msgCount = 0;

switch (conf.payload) {
case 'string':
payload = 'hello world!';
break;
case 'object':
payload = { action: 'pewpewpew', powerLevel: 9001 };
break;
default:
throw new Error('Unsupported payload type');
}

for (var i = 0; i < workers; ++i)
cluster.fork().on('online', onOnline).on('message', onMessage);

function onOnline(msg) {
if (++readies === workers) {
bench.start();
broadcast();
}
}

function broadcast() {
var id;
if (broadcasts++ === n) {
bench.end(n);
for (id in cluster.workers)
cluster.workers[id].disconnect();
return;
}
for (id in cluster.workers) {
const worker = cluster.workers[id];
for (var i = 0; i < sends; ++i)
worker.send(payload);
}
}

function onMessage(msg) {
if (++msgCount === expectedPerBroadcast) {
msgCount = 0;
broadcast();
}
}
}
} else {
process.on('message', function(msg) {
process.send(msg);
});
}
3 changes: 2 additions & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ function Benchmark(fn, configs, options) {
Benchmark.prototype._parseArgs = function(argv, configs) {
const cliOptions = {};
const extraOptions = {};
const validArgRE = /^(.+?)=([\s\S]*)$/;
// Parse configuration arguments
for (const arg of argv) {
const match = arg.match(/^(.+?)=([\s\S]*)$/);
const match = arg.match(validArgRE);
if (!match) {
console.error(`bad argument: ${arg}`);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/cipher-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var bench = common.createBenchmark(main, {

function main(conf) {
var api = conf.api;
if (api === 'stream' && process.version.match(/^v0\.[0-8]\./)) {
if (api === 'stream' && /^v0\.[0-8]\./.test(process.version)) {
console.error('Crypto streams not available until v0.10');
// use the legacy, just so that we can compare them.
api = 'legacy';
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hash-stream-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var bench = common.createBenchmark(main, {

function main(conf) {
var api = conf.api;
if (api === 'stream' && process.version.match(/^v0\.[0-8]\./)) {
if (api === 'stream' && /^v0\.[0-8]\./.test(process.version)) {
console.error('Crypto streams not available until v0.10');
// use the legacy, just so that we can compare them.
api = 'legacy';
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hash-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var bench = common.createBenchmark(main, {

function main(conf) {
var api = conf.api;
if (api === 'stream' && process.version.match(/^v0\.[0-8]\./)) {
if (api === 'stream' && /^v0\.[0-8]\./.test(process.version)) {
console.error('Crypto streams not available until v0.10');
// use the legacy, just so that we can compare them.
api = 'legacy';
Expand Down
5 changes: 4 additions & 1 deletion deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob);
}

void* v8::ArrayBuffer::Allocator::Reserve(size_t length) { UNIMPLEMENTED(); }
void* v8::ArrayBuffer::Allocator::Reserve(size_t length) {
UNIMPLEMENTED();
return nullptr;
}

void v8::ArrayBuffer::Allocator::Free(void* data, size_t length,
AllocationMode mode) {
Expand Down
8 changes: 6 additions & 2 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ child runs longer than `timeout` milliseconds.
replace the existing process and uses a shell to execute the command.

If this method is invoked as its [`util.promisify()`][]ed version, it returns
a Promise for an object with `stdout` and `stderr` properties.
a Promise for an object with `stdout` and `stderr` properties. In case of an
error, a rejected promise is returned, with the same `error` object given in the
callback, but with an additional two properties `stdout` and `stderr`.

For example:

Expand Down Expand Up @@ -281,7 +283,9 @@ stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.

If this method is invoked as its [`util.promisify()`][]ed version, it returns
a Promise for an object with `stdout` and `stderr` properties.
a Promise for an object with `stdout` and `stderr` properties. In case of an
error, a rejected promise is returned, with the same `error` object given in the
callback, but with an additional two properties `stdout` and `stderr`.

```js
const util = require('util');
Expand Down
18 changes: 13 additions & 5 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@ changes:
pr-url: https://github.com/nodejs/node/pull/10739
description: The `path` parameter can be a WHATWG `URL` object using `file:`
protocol. Support is currently still *experimental*.
- version: v6.3.0
pr-url: https://github.com/nodejs/node/pull/6534
description: The constants like `fs.R_OK`, etc which were present directly
on `fs` were moved into `fs.constants` as a soft deprecation.
Thus for Node `< v6.3.0` use `fs` to access those constants, or
do something like `(fs.constants || fs).R_OK` to work with all
versions.
-->

* `path` {string|Buffer|URL}
Expand Down Expand Up @@ -1699,7 +1706,7 @@ changes:
parameter in case of success.
- version: v5.0.0
pr-url: https://github.com/nodejs/node/pull/3163
description: The `file` parameter can be a file descriptor now.
description: The `path` parameter can be a file descriptor now.
-->

* `path` {string|Buffer|URL|integer} filename or file descriptor
Expand Down Expand Up @@ -1759,15 +1766,15 @@ changes:
protocol. Support is currently still *experimental*.
- version: v5.0.0
pr-url: https://github.com/nodejs/node/pull/3163
description: The `file` parameter can be a file descriptor now.
description: The `path` parameter can be a file descriptor now.
-->

* `path` {string|Buffer|URL|integer} filename or file descriptor
* `options` {Object|string}
* `encoding` {string|null} default = `null`
* `flag` {string} default = `'r'`

Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`.
Synchronous version of [`fs.readFile()`][]. Returns the contents of the `path`.

If the `encoding` option is specified then this function returns a
string. Otherwise it returns a buffer.
Expand Down Expand Up @@ -2831,9 +2838,10 @@ The following constants are meant for use with the [`fs.Stats`][] object's
[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback
[`fs.open()`]: #fs_fs_open_path_flags_mode_callback
[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback
[`fs.readFile`]: #fs_fs_readfile_file_options_callback
[`fs.readFile()`]: #fs_fs_readfile_path_options_callback
[`fs.readFileSync()`]: #fs_fs_readfilesync_path_options
[`fs.stat()`]: #fs_fs_stat_path_callback
[`fs.utimes()`]: #fs_fs_futimes_fd_atime_mtime_callback
[`fs.utimes()`]: #fs_fs_utimes_path_atime_mtime_callback
[`fs.watch()`]: #fs_fs_watch_filename_options_listener
[`fs.write()`]: #fs_fs_write_fd_buffer_offset_length_position_callback
[`fs.writeFile()`]: #fs_fs_writefile_file_data_options_callback
Expand Down
Loading

0 comments on commit 8356c2b

Please sign in to comment.