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

Commit a5c675d

Browse files
committed
meta: merge node/master into node-chakracore/master
Merge 0fb1e07 as of 2017-11-28 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Taylor Woll <taylor.woll@microsoft.com>
2 parents a008278 + 0fb1e07 commit a5c675d

File tree

316 files changed

+7177
-20138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+7177
-20138
lines changed

.eslintrc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ rules:
5656
- object: assert
5757
property: deepEqual
5858
message: Use assert.deepStrictEqual().
59+
- object: assert
60+
property: notDeepEqual
61+
message: Use assert.notDeepStrictEqual().
5962
- object: assert
6063
property: equal
6164
message: Use assert.strictEqual() rather than assert.equal().

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Code of Conduct
22

33
The Node.js Code of Conduct document has moved to
4-
https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md. Please update
4+
https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md. Please update
55
links to this document accordingly.
6+
7+
The Node.js Moderation policy can be found at
8+
https://github.com/nodejs/admin/blob/master/Moderation-Policy.md

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ By making a contribution to this project, I certify that:
862862
[benchmark results]: ./doc/guides/writing-and-running-benchmarks.md
863863
[Building guide]: ./BUILDING.md
864864
[CI (Continuous Integration) test run]: #ci-testing
865-
[Code of Conduct]: https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md
865+
[Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md
866866
[https://ci.nodejs.org/]: https://ci.nodejs.org/
867867
[IRC in the #node-dev channel]: https://webchat.freenode.net?channels=node-dev&uio=d4
868868
[Node.js help repository]: https://github.com/nodejs/help/issues

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,13 @@ LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
10311031
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
10321032
$(LINT_JS_TARGETS)
10331033

1034+
lint-js-fix:
1035+
@if [ -x $(NODE) ]; then \
1036+
$(NODE) $(LINT_JS_CMD) --fix; \
1037+
else \
1038+
node $(LINT_JS_CMD) --fix; \
1039+
fi
1040+
10341041
lint-js:
10351042
@echo "Running JS linter..."
10361043
@if [ -x $(NODE) ]; then \
@@ -1177,6 +1184,7 @@ lint-clean:
11771184
lint-cpp \
11781185
lint-js \
11791186
lint-js-ci \
1187+
lint-js-fix \
11801188
list-gtests \
11811189
lint-md \
11821190
lint-md-build \

benchmark/net/tcp-raw-c2s.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
1414
dur: [5]
1515
});
1616

17-
const TCP = process.binding('tcp_wrap').TCP;
17+
const { TCP, constants: TCPConstants } = process.binding('tcp_wrap');
1818
const TCPConnectWrap = process.binding('tcp_wrap').TCPConnectWrap;
1919
const WriteWrap = process.binding('stream_wrap').WriteWrap;
2020
const PORT = common.PORT;
@@ -36,7 +36,7 @@ function fail(err, syscall) {
3636
}
3737

3838
function server() {
39-
const serverHandle = new TCP();
39+
const serverHandle = new TCP(TCPConstants.SERVER);
4040
var err = serverHandle.bind('127.0.0.1', PORT);
4141
if (err)
4242
fail(err, 'bind');
@@ -92,7 +92,7 @@ function client() {
9292
throw new Error(`invalid type: ${type}`);
9393
}
9494

95-
const clientHandle = new TCP();
95+
const clientHandle = new TCP(TCPConstants.SOCKET);
9696
const connectReq = new TCPConnectWrap();
9797
const err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
9898

benchmark/net/tcp-raw-pipe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
1414
dur: [5]
1515
});
1616

17-
const TCP = process.binding('tcp_wrap').TCP;
17+
const { TCP, constants: TCPConstants } = process.binding('tcp_wrap');
1818
const TCPConnectWrap = process.binding('tcp_wrap').TCPConnectWrap;
1919
const WriteWrap = process.binding('stream_wrap').WriteWrap;
2020
const PORT = common.PORT;
@@ -35,7 +35,7 @@ function fail(err, syscall) {
3535
}
3636

3737
function server() {
38-
const serverHandle = new TCP();
38+
const serverHandle = new TCP(TCPConstants.SERVER);
3939
var err = serverHandle.bind('127.0.0.1', PORT);
4040
if (err)
4141
fail(err, 'bind');
@@ -89,7 +89,7 @@ function client() {
8989
throw new Error(`invalid type: ${type}`);
9090
}
9191

92-
const clientHandle = new TCP();
92+
const clientHandle = new TCP(TCPConstants.SOCKET);
9393
const connectReq = new TCPConnectWrap();
9494
const err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
9595
var bytes = 0;

benchmark/net/tcp-raw-s2c.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
1414
dur: [5]
1515
});
1616

17-
const TCP = process.binding('tcp_wrap').TCP;
17+
const { TCP, constants: TCPConstants } = process.binding('tcp_wrap');
1818
const TCPConnectWrap = process.binding('tcp_wrap').TCPConnectWrap;
1919
const WriteWrap = process.binding('stream_wrap').WriteWrap;
2020
const PORT = common.PORT;
@@ -35,7 +35,7 @@ function fail(err, syscall) {
3535
}
3636

3737
function server() {
38-
const serverHandle = new TCP();
38+
const serverHandle = new TCP(TCPConstants.SERVER);
3939
var err = serverHandle.bind('127.0.0.1', PORT);
4040
if (err)
4141
fail(err, 'bind');
@@ -107,7 +107,7 @@ function server() {
107107
}
108108

109109
function client() {
110-
const clientHandle = new TCP();
110+
const clientHandle = new TCP(TCPConstants.SOCKET);
111111
const connectReq = new TCPConnectWrap();
112112
const err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
113113

benchmark/process/next-tick-breadth-args.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const common = require('../common.js');
44
const bench = common.createBenchmark(main, {
5-
millions: [2]
5+
millions: [4]
66
});
77

88
function main(conf) {

benchmark/process/next-tick-breadth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const common = require('../common.js');
44
const bench = common.createBenchmark(main, {
5-
millions: [2]
5+
millions: [4]
66
});
77

88
function main(conf) {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
'use strict';
2+
const common = require('../common.js');
3+
const bench = common.createBenchmark(main, {
4+
millions: [5]
5+
});
6+
7+
function main(conf) {
8+
var n = +conf.millions * 1e6;
9+
10+
bench.start();
11+
for (var i = 0; i < n; i++) {
12+
if (i % 4 === 0)
13+
process.nextTick(onNextTick, i, true, 10, 'test');
14+
else if (i % 3 === 0)
15+
process.nextTick(onNextTick, i, true, 10);
16+
else if (i % 2 === 0)
17+
process.nextTick(onNextTick, i, 20);
18+
else
19+
process.nextTick(onNextTick, i);
20+
}
21+
function onNextTick(i) {
22+
if (i + 1 === n)
23+
bench.end(+conf.millions);
24+
}
25+
}

0 commit comments

Comments
 (0)