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.3' into v8.x
Browse files Browse the repository at this point in the history
2017-06-29 Node.js 8.1.3 (Current) Release
Git-EVTag-v0-SHA512: 15d18d297da96b0340bbf1463cdb0e2f6bc5d441feb8e83523b3620769332a50f432aab3e87871ea4542d37f7abeb1b2f9d6c5127277c5cc12648131a7f01910
  • Loading branch information
kfarnung committed Jul 6, 2017
2 parents 76a7722 + 01461af commit 306b517
Show file tree
Hide file tree
Showing 1,250 changed files with 41,781 additions and 38,795 deletions.
27 changes: 19 additions & 8 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rules:
eqeqeq: [2, smart]
no-fallthrough: 2
no-global-assign: 2
no-multi-spaces: 2
no-multi-spaces: [2, {ignoreEOLComments: true}]
no-octal: 2
no-proto: 2
no-redeclare: 2
Expand Down Expand Up @@ -98,11 +98,18 @@ rules:
func-call-spacing: 2
func-name-matching: 2
func-style: [2, declaration, {allowArrowFunctions: true}]
indent: [2, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
MemberExpression: 1,
ObjectExpression: first,
SwitchCase: 1}]
# indent: [2, 2, {ArrayExpression: first,
# CallExpression: {arguments: first},
# FunctionDeclaration: {parameters: first},
# FunctionExpression: {parameters: first},
# MemberExpression: off,
# ObjectExpression: first,
# SwitchCase: 1}]
indent-legacy: [2, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
MemberExpression: 1,
ObjectExpression: first,
SwitchCase: 1}]
key-spacing: [2, {mode: minimum}]
keyword-spacing: 2
linebreak-style: [2, unix]
Expand All @@ -122,7 +129,7 @@ rules:
}, {
selector: "ThrowStatement > CallExpression[callee.name=/Error$/]",
message: "Use new keyword when throwing an Error."
}]
}]
no-tabs: 2
no-trailing-spaces: 2
one-var-declaration-per-line: 2
Expand All @@ -131,7 +138,11 @@ rules:
semi: 2
semi-spacing: 2
space-before-blocks: [2, always]
space-before-function-paren: [2, never]
space-before-function-paren: [2, {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}]
space-in-parens: [2, never]
space-infix-ops: 2
space-unary-ops: 2
Expand Down
4 changes: 4 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ 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
in production.

| System | Support type | Version | Architectures | Notes |
|--------------|--------------|----------------------------------|----------------------|------------------|
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x86, x64, arm, arm64 | |
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.1.2">8.1.2</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.1">8.1.1</a>><br/>
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.1.3">8.1.3</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.2">8.1.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.1">8.1.1</a><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>
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ cpplint:
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
@$(PYTHON) tools/check-imports.py

ifneq ("","$(wildcard tools/eslint/lib/eslint.js)")
ifneq ("","$(wildcard tools/eslint/bin/eslint.js)")
lint:
@EXIT_STATUS=0 ; \
$(MAKE) jslint || EXIT_STATUS=$$? ; \
Expand All @@ -924,6 +924,7 @@ lint:
@echo "Linting is not available through the source tarball."
@echo "Use the git repo instead:" \
"$ git clone https://github.com/nodejs/node.git"
exit 1

lint-ci: lint
endif
Expand Down
2 changes: 1 addition & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function formatResult(data) {
}

var rate = data.rate.toString().split('.');
rate[0] = rate[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,');
rate = (rate[1] ? rate.join('.') : rate[0]);
return `${data.name}${conf}: ${rate}`;
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (format === 'csv') {
console.log(`"${data.name}", "${conf}", ${data.rate}, ${data.time}`);
} else {
var rate = data.rate.toString().split('.');
rate[0] = rate[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,');
rate = (rate[1] ? rate.join('.') : rate[0]);
console.log(`${data.name} ${conf}: ${rate}`);
}
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ parser = optparse.OptionParser()

valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
'x64', 'x86', 's390', 's390x')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 's390', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
Expand Down
6 changes: 4 additions & 2 deletions doc/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* When documenting APIs, note the version the API was introduced in at
the end of the section. If an API has been deprecated, also note the first
version that the API appeared deprecated in.
* When using dashes, use emdashes ("—", Option+Shift+"-" on macOS) surrounded by
spaces, per the New York Times usage.
* When using dashes, use [Em dashes][] ("—" or `Option+Shift+"-"` on macOS)
surrounded by spaces, as per [The New York Times Manual of Style and Usage][].
* Including assets:
* If you wish to add an illustration or full program, add it to the
appropriate sub-directory in the `assets/` dir.
Expand All @@ -68,3 +68,5 @@

[plugin]: http://editorconfig.org/#download
[Oxford comma]: https://en.wikipedia.org/wiki/Serial_comma
[Em dashes]: https://en.wikipedia.org/wiki/Dash#Em_dash
[The New York Times Manual of Style and Usage]: https://en.wikipedia.org/wiki/The_New_York_Times_Manual_of_Style_and_Usage
6 changes: 3 additions & 3 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ Every new resource is assigned a unique ID.
###### `type`

The `type` is a string that represents the type of resource that caused
`init` to call. Generally it will be the name of the resource's constructor.
The resource types provided by the built-in Node.js modules are:
`init` to be called. Generally, it will correspond to the name of the
resource's constructor.

```
FSEVENTWRAP, FSREQWRAP, GETADDRINFOREQWRAP, GETNAMEINFOREQWRAP, HTTPPARSER,
JSSTREAM, PIPECONNECTWRAP, PIPEWRAP, PROCESSWRAP, QUERYWRAP, SHUTDOWNWRAP,
SIGNALWRAP, STATWATCHER, TCPCONNECTWRAP, TCPWRAP, TIMERWRAP, TTYWRAP,
UDPSENDWRAP, UDPWRAP, WRITEWRAP, ZLIB, SSLCONNECTION, PBKDF2REQUEST,
RANDOMBYTESREQUEST, TLSWRAP
RANDOMBYTESREQUEST, TLSWRAP, Timeout, Immediate, TickObject
```

Users are be able to define their own `type` when using the public embedder API.
Expand Down
16 changes: 13 additions & 3 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,9 @@ handle connections with "normal" or "special" priority:
const normal = require('child_process').fork('child.js', ['normal']);
const special = require('child_process').fork('child.js', ['special']);

// Open up the server and send sockets to child
const server = require('net').createServer();
// Open up the server and send sockets to child. Use pauseOnConnect to prevent
// the sockets from being read before they are sent to the child process.
const server = require('net').createServer({ pauseOnConnect: true });
server.on('connection', (socket) => {

// If this is special priority
Expand All @@ -1162,7 +1163,12 @@ to the event callback function:
```js
process.on('message', (m, socket) => {
if (m === 'socket') {
socket.end(`Request handled with ${process.argv[2]} priority`);
if (socket) {
// Check that the client socket exists.
// It is possible for the socket to be closed between the time it is
// sent and the time it is received in the child process.
socket.end(`Request handled with ${process.argv[2]} priority`);
}
}
});
```
Expand All @@ -1172,6 +1178,10 @@ tracking when the socket is destroyed. To indicate this, the `.connections`
property becomes `null`. It is recommended not to use `.maxConnections` when
this occurs.

It is also recommended that any `'message'` handlers in the child process
verify that `socket` exists, as the connection may have been closed during the
time it takes to send the connection to the child.

*Note*: This function uses [`JSON.stringify()`][] internally to serialize the
`message`.

Expand Down
Loading

0 comments on commit 306b517

Please sign in to comment.