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

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge 6e3818f as of 2018-01-10
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Taylor Woll <tawoll@ntdev.microsoft.com>
  • Loading branch information
chakrabot committed Jan 20, 2018
2 parents bb91d42 + 6e3818f commit 8347baf
Show file tree
Hide file tree
Showing 40 changed files with 1,137 additions and 240 deletions.
26 changes: 13 additions & 13 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ file a new issue.

## Supported platforms

This list of supported platforms is current as of the branch / release to
This list of supported platforms is current as of the branch/release to
which it is attached.

### Input
Expand All @@ -33,15 +33,15 @@ Support is divided into three tiers:

### Supported platforms

The community does not build or test against end of life distributions (EoL).
Thus we do not recommend that you use Node on end of life or unsupported platforms
The community does not build or test against end-of-life distributions (EoL).
Thus we do not recommend that you use Node on end-of-life or unsupported platforms
in production.

| System | Support type | Version | Architectures | Notes |
|--------------|--------------|----------------------------------|----------------------|------------------|
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x64, arm, arm64 | |
| macOS | Tier 1 | >= 10.10 | x64 | |
| Windows | Tier 1 | >= Windows 7 / 2008 R2 | x86, x64 | vs2017 |
| Windows | Tier 1 | >= Windows 7/2008 R2 | x86, x64 | vs2017 |
| SmartOS | Tier 2 | >= 15 < 16.4 | x86, x64 | see note1 |
| FreeBSD | Tier 2 | >= 10 | x64 | |
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le >=power8 | |
Expand Down Expand Up @@ -92,7 +92,7 @@ Depending on host platform, the selection of toolchains may vary.
*Note:* All prerequisites can be easily installed by following
[this bootstrapping guide](https://github.com/nodejs/node/blob/master/tools/bootstrap/README.md).

### Unix / macOS
### Unix/macOS

Prerequisites:

Expand All @@ -101,7 +101,7 @@ Prerequisites:
* Python 2.6 or 2.7
* GNU Make 3.81 or newer

On macOS you will need to install the `Xcode Command Line Tools` by running
On macOS, you will need to install the `Xcode Command Line Tools` by running
`xcode-select --install`. Alternatively, if you already have the full Xcode
installed, you can find them under the menu `Xcode -> Open Developer Tool ->
More Developer Tools...`. This step will install `clang`, `clang++`, and
Expand All @@ -114,7 +114,7 @@ If the path to your build directory contains a space, the build will likely fail
```console
$ sudo ./tools/macosx-firewall.sh
```
Running this script will add rules for the executable `node` in the out
Running this script will add rules for the executable `node` in the `out`
directory and the symbolic `node` link in the project's root directory.

On FreeBSD and OpenBSD, you may also need:
Expand Down Expand Up @@ -233,7 +233,7 @@ To test if Node.js was built correctly:
> Release\node -e "console.log('Hello from Node.js', process.version)"
```

### Android / Android-based devices (e.g. Firefox OS)
### Android/Android-based devices (e.g. Firefox OS)

Although these instructions for building on Android are provided, please note
that Android is not an officially supported platform at this time. Patches to
Expand Down Expand Up @@ -273,7 +273,7 @@ With the `--download=all`, this may download ICU if you don't have an
ICU in `deps/icu`. (The embedded `small-icu` included in the default
Node.js source does not include all locales.)

##### Unix / macOS:
##### Unix/macOS:

```console
$ ./configure --with-intl=full-icu --download=all
Expand All @@ -290,7 +290,7 @@ $ ./configure --with-intl=full-icu --download=all
The `Intl` object will not be available, nor some other APIs such as
`String.normalize`.

##### Unix / macOS:
##### Unix/macOS:

```console
$ ./configure --without-intl
Expand All @@ -302,7 +302,7 @@ $ ./configure --without-intl
> .\vcbuild without-intl
```

#### Use existing installed ICU (Unix / macOS only):
#### Use existing installed ICU (Unix/macOS only):

```console
$ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
Expand All @@ -318,7 +318,7 @@ You can find other ICU releases at
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip`).

##### Unix / macOS
##### Unix/macOS

From an already-unpacked ICU:
```console
Expand Down Expand Up @@ -366,7 +366,7 @@ and [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
through which you get the file complies with the requirements
for a "secure installation" as described in section 6.6 in
the [user guide](https://openssl.org/docs/fips/UserGuide-2.0.pdf).
For evaluation/experimentation you can simply download and verify
For evaluation/experimentation, you can simply download and verify
`openssl-fips-x.x.x.tar.gz` from https://www.openssl.org/source/
2. Extract source to `openssl-fips` folder and `cd openssl-fips`
3. `./config`
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.3.0">9.3.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.4.0">9.4.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.3.0">9.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.2.1">9.2.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.2.0">9.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.1.0">9.1.0</a><br/>
Expand Down
14 changes: 8 additions & 6 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ Before landing pull requests, sufficient time should be left for input
from other Collaborators. In general, leave at least 48 hours during the
week and 72 hours over weekends to account for international time
differences and work schedules. However, certain types of pull requests
can be fast-tracked and may be landed after a shorter delay:

* Focused changes that affect only documentation and/or the test suite.
`code-and-learn` and `good-first-issue` pull requests typically fall
into this category.
* Changes that fix regressions.
can be fast-tracked and may be landed after a shorter delay. For example:

* Focused changes that affect only documentation and/or the test suite:
* `code-and-learn` tasks typically fall into this category.
* `good-first-issue` pull requests may also be suitable.
* Changes that fix regressions:
* Regressions that break the workflow (red CI or broken compilation).
* Regressions that happen right before a release, or reported soon after.

When a pull request is deemed suitable to be fast-tracked, label it with
`fast-track`. The pull request can be landed once 2 or more Collaborators
Expand Down
107 changes: 107 additions & 0 deletions benchmark/net/net-wrap-js-stream-passthrough.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// test the speed of .pipe() with JSStream wrapping for PassThrough streams
'use strict';

const common = require('../common.js');
const { PassThrough } = require('stream');

const bench = common.createBenchmark(main, {
len: [102400, 1024 * 1024 * 16],
type: ['utf', 'asc', 'buf'],
dur: [5],
}, {
flags: ['--expose-internals']
});

var dur;
var len;
var type;
var chunk;
var encoding;
var JSStreamWrap; // Can only require internals inside main().

function main(conf) {
dur = +conf.dur;
len = +conf.len;
type = conf.type;
JSStreamWrap = require('internal/wrap_js_stream');

switch (type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');
break;
case 'utf':
encoding = 'utf8';
chunk = 'ü'.repeat(len / 2);
break;
case 'asc':
encoding = 'ascii';
chunk = 'x'.repeat(len);
break;
default:
throw new Error(`invalid type: ${type}`);
}

doBenchmark();
}

function Writer() {
this.received = 0;
this.writable = true;
}

Writer.prototype.write = function(chunk, encoding, cb) {
this.received += chunk.length;

if (typeof encoding === 'function')
encoding();
else if (typeof cb === 'function')
cb();

return true;
};

// doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};


function flow() {
const dest = this.dest;
const res = dest.write(chunk, encoding);
if (!res)
dest.once('drain', this.flow);
else
process.nextTick(this.flow);
}

function Reader() {
this.flow = flow.bind(this);
this.readable = true;
}

Reader.prototype.pipe = function(dest) {
this.dest = dest;
this.flow();
return dest;
};


function doBenchmark() {
const reader = new Reader();
const writer = new Writer();

// the actual benchmark.
const fakeSocket = new JSStreamWrap(new PassThrough());
bench.start();
reader.pipe(fakeSocket);
fakeSocket.pipe(writer);

setTimeout(function() {
const bytes = writer.received;
const gbits = (bytes * 8) / (1024 * 1024 * 1024);
bench.end(gbits);
process.exit(0);
}, dur * 1000);
}
16 changes: 8 additions & 8 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ls.on('close', (code) => {
});
```

By default, pipes for `stdin`, `stdout` and `stderr` are established between
By default, pipes for `stdin`, `stdout`, and `stderr` are established between
the parent Node.js process and the spawned child. It is possible to stream data
through these pipes in a non-blocking way. *Note, however, that some programs
use line-buffered I/O internally. While that does not affect Node.js, it can
Expand Down Expand Up @@ -170,7 +170,7 @@ exec('echo "The \\$HOME variable is $HOME"');
//The $HOME variable is escaped in the first instance, but not in the second
```

*Note*: Never pass unsanitised user input to this function. Any input
*Note*: Never pass unsanitized user input to this function. Any input
containing shell metacharacters may be used to trigger arbitrary command
execution.

Expand Down Expand Up @@ -418,7 +418,7 @@ The `child_process.spawn()` method spawns a new process using the given
`command`, with command line arguments in `args`. If omitted, `args` defaults
to an empty array.

*Note*: If the `shell` option is enabled, do not pass unsanitised user input to
*Note*: If the `shell` option is enabled, do not pass unsanitized user input to
this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.

Expand Down Expand Up @@ -661,7 +661,7 @@ The [`child_process.spawnSync()`][], [`child_process.execSync()`][], and
the Node.js event loop, pausing execution of any additional code until the
spawned process exits.

Blocking calls like these are mostly useful for simplifying general purpose
Blocking calls like these are mostly useful for simplifying general-purpose
scripting tasks and for simplifying the loading/processing of application
configuration at startup.

Expand Down Expand Up @@ -715,7 +715,7 @@ completely exited.
does not exit, the parent process will still wait until the child process has
exited.

If the process times out, or has a non-zero exit code, this method ***will***
If the process times out or has a non-zero exit code, this method ***will***
throw an [`Error`][] that will include the full result of the underlying
[`child_process.spawnSync()`][].

Expand Down Expand Up @@ -767,11 +767,11 @@ exited. *Note that if the child process intercepts and handles the `SIGTERM`
signal and doesn't exit, the parent process will wait until the child
process has exited.*

If the process times out, or has a non-zero exit code, this method ***will***
If the process times out or has a non-zero exit code, this method ***will***
throw. The [`Error`][] object will contain the entire result from
[`child_process.spawnSync()`][]

*Note*: Never pass unsanitised user input to this function. Any input
*Note*: Never pass unsanitized user input to this function. Any input
containing shell metacharacters may be used to trigger arbitrary command
execution.

Expand Down Expand Up @@ -839,7 +839,7 @@ completely exited. Note that if the process intercepts and handles the
`SIGTERM` signal and doesn't exit, the parent process will wait until the child
process has exited.

*Note*: If the `shell` option is enabled, do not pass unsanitised user input
*Note*: If the `shell` option is enabled, do not pass unsanitized user input
to this function. Any input containing shell metacharacters may be used to
trigger arbitrary command execution.

Expand Down
6 changes: 6 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,12 @@ While using `N-API`, a constructor passed was not a function.

While using `N-API`, `Constructor.prototype` was not an object.

<a id="ERR_NAPI_INVALID_DATAVIEW_ARGS"></a>
### ERR_NAPI_INVALID_DATAVIEW_ARGS

While calling `napi_create_dataview()`, a given `offset` was outside the bounds
of the dataview or `offset + length` was larger than a length of given `buffer`.

<a id="ERR_NO_CRYPTO"></a>
### ERR_NO_CRYPTO

Expand Down
2 changes: 1 addition & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.

### emitter.rawListeners(eventName)
<!-- YAML
added: REPLACEME
added: v9.4.0
-->
- `eventName` {string|symbol}

Expand Down
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ changes:
-->

* `fd` {integer}
* `buffer` {string|Buffer|Uint8Array}
* `buffer` {Buffer|Uint8Array}
* `offset` {integer}
* `length` {integer}
* `position` {integer}
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ changes:
description: The default action of calling `.destroy()` on the `socket`
will no longer take place if there are listeners attached
for `clientError`.
- version: REPLACEME
- version: v9.4.0
pr-url: https://github.com/nodejs/node/pull/17672
description: The rawPacket is the current buffer that just parsed. Adding
this buffer to the error object of clientError event is to make
Expand Down
Loading

0 comments on commit 8347baf

Please sign in to comment.