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 e714da6 as of 2018-03-22
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: chakrabot <[email protected]>
  • Loading branch information
chakrabot committed Mar 24, 2018
2 parents bd169e3 + e714da6 commit 7cfa11f
Show file tree
Hide file tree
Showing 60 changed files with 314 additions and 189 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ module.exports = {
}
],
/* eslint-disable max-len, quotes */
// If this list is modified, please copy the change to lib/.eslintrc.yaml
'no-restricted-syntax': [
'error',
{
Expand Down
82 changes: 67 additions & 15 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [How are LTS Branches Managed?](#how-are-lts-branches-managed)
- [How can I help?](#how-can-i-help)
- [How is an LTS release cut?](#how-is-an-lts-release-cut)
* [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker)

This document contains information for Collaborators of the Node.js
project regarding managing the project's code, documentation, and issue tracker.
Expand All @@ -53,7 +54,7 @@ requests they feel qualified to handle. Make sure this is done while being
mindful of these guidelines, the opinions of other Collaborators, and guidance
of the [TSC][]. They may also notify other qualified parties for more input on
an issue or a pull request.
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues)
See [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker).

### Welcoming First-Time Contributors

Expand Down Expand Up @@ -118,7 +119,7 @@ Collaborator, an additional Collaborator is required for sign-off.

In some cases, it may be necessary to summon a GitHub team to a pull request for
review by @-mention.
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues).
See [Who to CC in the issue tracker](#who-to-cc-in-the-issue-tracker).

If you are unsure about the modification and are not prepared to take
full responsibility for the change, defer to another Collaborator.
Expand Down Expand Up @@ -192,9 +193,17 @@ All bugfixes require a test case which demonstrates the defect. The
test should *fail* before the change, and *pass* after the change.

All pull requests that modify executable code should also include a test case
and be subjected to continuous integration tests on the
and must be subjected to continuous integration tests on the
[project CI server](https://ci.nodejs.org/). The pull request should have a CI
status indicator if possible.
status indicator.

Do not land any Pull Requests without passing (green or yellow) CI runs. If you
believe any failed (red or grey) CI sub-tasks are unrelated to the change in the
Pull Request, you may re-run the sub-task to try to see if it passes. If re-runs
of all failed sub-tasks pass, it is permissible to land the Pull Request but
only if the initial failures are believed in good faith to be unrelated to the
changes in the Pull Request. Otherwise, reasonable steps must be taken to
confirm that the changes are not resulting in an unreliable test.

#### Useful CI Jobs

Expand All @@ -203,13 +212,9 @@ is the standard CI run we do to check Pull Requests. It triggers
`node-test-commit`, which runs the `build-ci` and `test-ci` targets on all
supported platforms.

* [`node-test-linter`](https://ci.nodejs.org/job/node-test-linter/)
only runs the linter targets, which is useful for changes that only affect
comments or documentation.

* [`node-test-pull-request-lite`](https://ci.nodejs.org/job/node-test-pull-request-lite/)
only runs the linter job, as well as the tests on LinuxONE. Should only be used
for trivial changes that do not require being tested on all platforms.
only runs the linter job, as well as the tests on LinuxONE, which is very fast.
This is useful for changes that only affect comments or documentation.

* [`citgm-smoker`](https://ci.nodejs.org/job/citgm-smoker/)
uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run
Expand Down Expand Up @@ -498,12 +503,11 @@ The TSC should serve as the final arbiter where required.
one](https://github.com/nodejs/node/commit/b636ba8186) if unsure exactly how
to format your commit messages.

Additionally:
Check PRs from new contributors to make sure the person's name and email address
are correct before merging.

* Double check PRs to make sure the person's _full name_ and email
address are correct before merging.
* All commits should be self-contained (meaning every commit should pass all
tests). This makes it much easier when bisecting to find a breaking change.
All commits should be self-contained, meaning every commit should pass all
tests. This makes it much easier when bisecting to find a breaking change.

### Using `git-node`

Expand Down Expand Up @@ -818,6 +822,54 @@ selected commits will be picked from the staging branch to be included in the
release. This process of making a release will be a collaboration between the
LTS working group and the Release team.

## Who to CC in the issue tracker

| Subsystem | Maintainers |
| --- | --- |
| `benchmark/*` | @nodejs/benchmarking, @mscdex |
| `bootstrap_node.js` | @nodejs/process |
| `doc/*`, `*.md` | @nodejs/documentation |
| `lib/assert` | @nodejs/testing |
| `lib/async_hooks` | @nodejs/async\_hooks for bugs/reviews (+ @nodejs/diagnostics for API) |
| `lib/buffer` | @nodejs/buffer |
| `lib/child_process` | @nodejs/child\_process |
| `lib/cluster` | @nodejs/cluster |
| `lib/{crypto,tls,https}` | @nodejs/crypto |
| `lib/dgram` | @nodejs/dgram |
| `lib/domains` | @nodejs/domains |
| `lib/fs`, `src/{fs,file}` | @nodejs/fs |
| `lib/{_}http{*}` | @nodejs/http |
| `lib/inspector.js`, `src/inspector_*` | @nodejs/V8-inspector |
| `lib/internal/url`, `src/node_url` | @nodejs/url |
| `lib/net` | @bnoordhuis, @indutny, @nodejs/streams |
| `lib/repl` | @nodejs/repl |
| `lib/{_}stream{*}` | @nodejs/streams |
| `lib/timers` | @nodejs/timers |
| `lib/util` | @nodejs/util |
| `lib/zlib` | @nodejs/zlib |
| `src/async-wrap.*` | @nodejs/async\_hooks |
| `src/node_api.*` | @nodejs/n-api |
| `src/node_crypto.*` | @nodejs/crypto |
| `test/*` | @nodejs/testing |
| `tools/node_modules/eslint`, `.eslintrc` | @nodejs/linting |
| build | @nodejs/build |
| `src/module_wrap.*`, `lib/internal/loader/*`, `lib/internal/vm/Module.js` | @nodejs/modules |
| GYP | @nodejs/gyp |
| performance | @nodejs/performance |
| platform specific | @nodejs/platform-{aix,arm,freebsd,macos,ppc,smartos,s390,windows} |
| python code | @nodejs/python |
| upgrading c-ares | @rvagg |
| upgrading http-parser | @nodejs/http, @nodejs/http2 |
| upgrading libuv | @nodejs/libuv |
| upgrading npm | @fishrock123, @MylesBorins |
| upgrading V8 | @nodejs/V8, @nodejs/post-mortem |
| Embedded use or delivery of Node.js | @nodejs/delivery-channels |

When things need extra attention, are controversial, or `semver-major`:
@nodejs/tsc

If you cannot find who to cc for a file, `git shortlog -n -s <file>` may help.

[backporting guide]: doc/guides/backporting-to-release-lines.md
[contributing]: ./doc/guides/contributing/pull-requests.md#commit-message-guidelines
[Stability Index]: doc/api/documentation.md#stability-index
Expand Down
6 changes: 6 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,12 @@ Encoding provided to `util.TextDecoder()` API was not one of the
A `Promise` that was callbackified via `util.callbackify()` was rejected with a
falsy value.

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

An attempt has been made to read a file whose size is larger than the maximum
allowed size for a `Buffer`.

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

Expand Down
48 changes: 0 additions & 48 deletions doc/onboarding-extras.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,5 @@
# Additional Onboarding Information

## Who to CC in issues

| Subsystem | Maintainers |
| --- | --- |
| `benchmark/*` | @nodejs/benchmarking, @mscdex |
| `bootstrap_node.js` | @nodejs/process |
| `doc/*`, `*.md` | @nodejs/documentation |
| `lib/assert` | @nodejs/testing |
| `lib/async_hooks` | @nodejs/async\_hooks for bugs/reviews (+ @nodejs/diagnostics for API) |
| `lib/buffer` | @nodejs/buffer |
| `lib/child_process` | @nodejs/child\_process |
| `lib/cluster` | @nodejs/cluster |
| `lib/{crypto,tls,https}` | @nodejs/crypto |
| `lib/dgram` | @nodejs/dgram |
| `lib/domains` | @nodejs/domains |
| `lib/fs`, `src/{fs,file}` | @nodejs/fs |
| `lib/{_}http{*}` | @nodejs/http |
| `lib/inspector.js`, `src/inspector_*` | @nodejs/v8-inspector |
| `lib/internal/url`, `src/node_url` | @nodejs/url |
| `lib/net` | @bnoordhuis, @indutny, @nodejs/streams |
| `lib/repl` | @nodejs/repl |
| `lib/{_}stream{*}` | @nodejs/streams |
| `lib/timers` | @nodejs/timers |
| `lib/util` | @nodejs/util |
| `lib/zlib` | @nodejs/zlib |
| `src/async-wrap.*` | @nodejs/async\_hooks |
| `src/node_api.*` | @nodejs/n-api |
| `src/node_crypto.*` | @nodejs/crypto |
| `test/*` | @nodejs/testing |
| `tools/node_modules/eslint`, `.eslintrc` | @nodejs/linting |
| build | @nodejs/build |
| `src/module_wrap.*`, `lib/internal/loader/*`, `lib/internal/vm/Module.js` | @nodejs/modules |
| GYP | @nodejs/gyp |
| performance | @nodejs/performance |
| platform specific | @nodejs/platform-{aix,arm,freebsd,macos,ppc,smartos,s390,windows} |
| python code | @nodejs/python |
| upgrading c-ares | @rvagg |
| upgrading http-parser | @nodejs/http, @nodejs/http2 |
| upgrading libuv | @nodejs/libuv |
| upgrading npm | @fishrock123, @MylesBorins |
| upgrading V8 | @nodejs/v8, @nodejs/post-mortem |
| Embedded use or delivery of Node.js | @nodejs/delivery-channels |

When things need extra attention, are controversial, or `semver-major`:
@nodejs/tsc

If you cannot find who to cc for a file, `git shortlog -n -s <file>` may help.

## Labels

### Subsystems
Expand Down
6 changes: 3 additions & 3 deletions doc/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ onboarding session.
* Prior to the onboarding session, add the new Collaborator to
[the Collaborators team](https://github.com/orgs/nodejs/teams/collaborators).
* Ask them if they want to join any subsystem teams. See
[Who to CC for Issues][who-to-cc].
[Who to CC in the issue tracker][who-to-cc].

## Onboarding session

Expand Down Expand Up @@ -96,7 +96,7 @@ onboarding session.
* no outstanding review comments exist and
* at least one collaborator approved the PR.

* [**See "Who to CC in issues"**][who-to-cc]
* See [Who to CC in the issue tracker][who-to-cc].
* This will come more naturally over time
* For many of the teams listed there, you can ask to be added if you are
interested
Expand Down Expand Up @@ -253,4 +253,4 @@ needs to be pointed out separately during the onboarding.
[two-factor authentication]: https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
[Updating Node.js from Upstream]: ./onboarding-extras.md#updating-nodejs-from-upstream
[using a TOTP mobile app]: https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/
[who-to-cc]: ./onboarding-extras.md#who-to-cc-in-issues
[who-to-cc]: ../COLLABORATOR_GUIDE.md#who-to-cc-in-the-issue-tracker
18 changes: 18 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
rules:
no-restricted-syntax:
# Config copied from .eslintrc.js
- error
- selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']"
message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
- selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])"
message: "use a regular expression for second argument of assert.throws()"
- selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]"
message: "assert.throws() must be invoked with at least two arguments."
- selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]"
message: "setTimeout() must be invoked with at least two arguments."
- selector: "CallExpression[callee.name='setInterval'][arguments.length<2]"
message: "setInterval() must be invoked with at least 2 arguments."
- selector: "ThrowStatement > CallExpression[callee.name=/Error$/]"
message: "Use new keyword when throwing an Error."
# Config specific to lib
- selector: "NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError)$/])"
message: "Use an error exported by the internal/errors module."
# Custom rules in tools/eslint-rules
node-core/require-buffer: error
node-core/buffer-constructor: error
Expand Down
1 change: 1 addition & 0 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ function emitAbortNT() {


function createHangUpError() {
// eslint-disable-next-line no-restricted-syntax
var error = new Error('socket hang up');
error.code = 'ECONNRESET';
return error;
Expand Down
2 changes: 2 additions & 0 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ function onSocketClose(err) {
// Emit ECONNRESET
if (!this._controlReleased && !this[kErrorEmitted]) {
this[kErrorEmitted] = true;
// eslint-disable-next-line no-restricted-syntax
const connReset = new Error('socket hang up');
connReset.code = 'ECONNRESET';
this._tlsOptions.server.emit('tlsClientError', connReset, this);
Expand Down Expand Up @@ -1103,6 +1104,7 @@ function onConnectEnd() {
if (!this._hadError) {
const options = this[kConnectOptions];
this._hadError = true;
// eslint-disable-next-line no-restricted-syntax
const error = new Error('Client network socket disconnected before ' +
'secure TLS connection was established');
error.code = 'ECONNRESET';
Expand Down
1 change: 1 addition & 0 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ function innerOk(fn, argLen, value, message) {
} else if (message == null && !('chakracore' in process.versions)) {
// Use the call as error message if possible.
// This does not work with e.g. the repl.
// eslint-disable-next-line no-restricted-syntax
const err = new Error();
// Make sure the limit is set to 1. Otherwise it could fail (<= 0) or it
// does to much work.
Expand Down
1 change: 1 addition & 0 deletions lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ if (process.binding('config').hasIntl) {
return result;

const code = icuErrName(result);
// eslint-disable-next-line no-restricted-syntax
const err = new Error(`Unable to transcode Buffer [${code}]`);
err.code = code;
err.errno = result;
Expand Down
2 changes: 2 additions & 0 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
cmd += ` ${args.join(' ')}`;

if (!ex) {
// eslint-disable-next-line no-restricted-syntax
ex = new Error('Command failed: ' + cmd + '\n' + stderr);
ex.killed = child.killed || killed;
ex.code = code < 0 ? getSystemErrorName(code) : code;
Expand Down Expand Up @@ -588,6 +589,7 @@ function checkExecSyncError(ret, args, cmd) {
msg += cmd || args.join(' ');
if (ret.stderr && ret.stderr.length > 0)
msg += `\n${ret.stderr.toString()}`;
// eslint-disable-next-line no-restricted-syntax
err = new Error(msg);
}
if (err) {
Expand Down
Loading

0 comments on commit 7cfa11f

Please sign in to comment.