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.3.0' into 8.3.0-proposal
Browse files Browse the repository at this point in the history
2017-08-09 Node.js v8.3.0 (Current) Release
Git-EVTag-v0-SHA512: a8c07aa1217584adb18eb9b40d2d4537d0089183e23522641743d6d1feff3984cfe474dfe2ddc7a5223424bc8721e54b344516b75525c8cfa1d87a8061116b8d
  • Loading branch information
Jack Horton authored and kfarnung committed Aug 11, 2017
2 parents 73ed2f0 + fb88fa1 commit 263686a
Show file tree
Hide file tree
Showing 2,667 changed files with 178,938 additions and 103,347 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*/
test/fixtures
test/disabled
test/tmp*/
tools/eslint
node_modules
Expand Down
26 changes: 13 additions & 13 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,13 @@ rules:
func-call-spacing: error
func-name-matching: error
func-style: [error, declaration, {allowArrowFunctions: true}]
# indent: [error, 2, {ArrayExpression: first,
# CallExpression: {arguments: first},
# FunctionDeclaration: {parameters: first},
# FunctionExpression: {parameters: first},
# MemberExpression: off,
# ObjectExpression: first,
# SwitchCase: 1}]
indent-legacy: [error, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
MemberExpression: 1,
ObjectExpression: first,
SwitchCase: 1}]
indent: [error, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
FunctionDeclaration: {parameters: first},
FunctionExpression: {parameters: first},
MemberExpression: off,
ObjectExpression: first,
SwitchCase: 1}]
key-spacing: [error, {mode: minimum}]
keyword-spacing: error
linebreak-style: [error, unix]
Expand All @@ -124,6 +119,12 @@ rules:
no-mixed-spaces-and-tabs: error
no-multiple-empty-lines: [error, {max: 2, maxEOF: 0, maxBOF: 0}]
no-restricted-syntax: [error, {
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."
}, {
Expand Down Expand Up @@ -167,7 +168,6 @@ rules:
template-curly-spacing: error

# Custom rules in tools/eslint-rules
assert-throws-arguments: [error, { requireTwo: true }]
no-unescaped-regexp-dot: error

# Global scoped method and vars
Expand Down
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.2.1">8.2.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.3.0">8.3.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.2.1">8.2.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.2.0">8.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.4">8.1.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.1.3">8.1.3</a><br/>
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ $(PKG): release-only
--release-urlbase=$(RELEASE_URLBASE) \
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
SIGN="$(CODESIGN_CERT)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
SIGN="$(CODESIGN_CERT)" PKGDIR="$(PKGDIR)/usr/local" bash \
tools/osx-codesign.sh
cat tools/osx-pkg.pmdoc/index.xml.tmpl \
| sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
Expand Down Expand Up @@ -807,6 +808,9 @@ $(BINARYTAR): release-only
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
cp CHANGELOG.md $(BINARYNAME)
ifeq ($(OSTYPE),darwin)
SIGN="$(CODESIGN_CERT)" PKGDIR="$(BINARYNAME)" bash tools/osx-codesign.sh
endif
tar -cf $(BINARYNAME).tar $(BINARYNAME)
$(RM) -r $(BINARYNAME)
gzip -c -f -9 $(BINARYNAME).tar > $(BINARYNAME).tar.gz
Expand Down Expand Up @@ -887,11 +891,16 @@ CPPLINT_EXCLUDE += src/queue.h
CPPLINT_EXCLUDE += src/tree.h
CPPLINT_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h)
CPPLINT_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/*.h)
# These files were copied more or less verbatim from V8.
CPPLINT_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h

CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \
src/*.c \
src/*.cc \
src/*.h \
src/*/*.c \
src/*/*.cc \
src/*/*.h \
test/addons/*/*.cc \
test/addons/*/*.h \
test/cctest/*.cc \
Expand Down
13 changes: 0 additions & 13 deletions benchmark/.eslintrc.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions benchmark/_benchmark_progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ class BenchmarkProgress {
this.updateProgress();
}

completeConfig(data) {
completeConfig() {
this.completedConfig++;
this.updateProgress();
}

completeRun(job) {
completeRun() {
this.completedRuns++;
this.updateProgress();
}
Expand Down Expand Up @@ -108,7 +108,7 @@ class BenchmarkProgress {
`${caption} `;
}

updateProgress(finished) {
updateProgress() {
if (!process.stderr.isTTY || process.stdout.isTTY) {
return;
}
Expand Down
123 changes: 123 additions & 0 deletions benchmark/assert/deepequal-map.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
'use strict';

/* eslint-disable no-restricted-properties */

const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
n: [5e2],
len: [5e2],
method: [
'deepEqual_primitiveOnly',
'deepStrictEqual_primitiveOnly',
'deepEqual_objectOnly',
'deepStrictEqual_objectOnly',
'deepEqual_mixed',
'deepStrictEqual_mixed',
'deepEqual_looseMatches',
'notDeepEqual_primitiveOnly',
'notDeepStrictEqual_primitiveOnly',
'notDeepEqual_objectOnly',
'notDeepStrictEqual_objectOnly',
'notDeepEqual_mixed',
'notDeepStrictEqual_mixed',
'notDeepEqual_looseMatches',
]
});

function benchmark(method, n, values, values2) {
const actual = new Map(values);
// Prevent reference equal elements
const deepCopy = JSON.parse(JSON.stringify(values2 ? values2 : values));
const expected = new Map(deepCopy);
bench.start();
for (var i = 0; i < n; ++i) {
method(actual, expected);
}
bench.end(n);
}

function main(conf) {
const n = +conf.n;
const len = +conf.len;

const array = Array(len).fill(1);
var values, values2;

switch (conf.method) {
case 'deepEqual_primitiveOnly':
values = array.map((_, i) => [`str_${i}`, 123]);
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_primitiveOnly':
values = array.map((_, i) => [`str_${i}`, 123]);
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_objectOnly':
values = array.map((_, i) => [[`str_${i}`, 1], 123]);
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_objectOnly':
values = array.map((_, i) => [[`str_${i}`, 1], 123]);
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_mixed':
values = array.map((_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]);
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_mixed':
values = array.map((_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]);
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_looseMatches':
values = array.map((_, i) => [i, i]);
values2 = values.slice().map((v) => [String(v[0]), String(v[1])]);
benchmark(assert.deepEqual, n, values, values2);
break;
case 'notDeepEqual_primitiveOnly':
values = array.map((_, i) => [`str_${i}`, 123]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = ['w00t', 123];
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_primitiveOnly':
values = array.map((_, i) => [`str_${i}`, 123]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = ['w00t', 123];
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_objectOnly':
values = array.map((_, i) => [[`str_${i}`, 1], 123]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = [['w00t'], 123];
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_objectOnly':
values = array.map((_, i) => [[`str_${i}`, 1], 123]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = [['w00t'], 123];
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_mixed':
values = array.map((_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]);
values2 = values.slice(0);
values2[0] = ['w00t', 123];
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_mixed':
values = array.map((_, i) => [i % 2 ? [`str_${i}`, 1] : `str_${i}`, 123]);
values2 = values.slice(0);
values2[0] = ['w00t', 123];
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_looseMatches':
values = array.map((_, i) => [i, i]);
values2 = values.slice().map((v) => [String(v[0]), String(v[1])]);
values2[len - 1] = [String(len + 1), String(len + 1)];
benchmark(assert.notDeepEqual, n, values, values2);
break;
default:
throw new Error('Unsupported method');
}
}
132 changes: 132 additions & 0 deletions benchmark/assert/deepequal-set.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
'use strict';

/* eslint-disable no-restricted-properties */

const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
n: [5e2],
len: [5e2],
method: [
'deepEqual_primitiveOnly',
'deepStrictEqual_primitiveOnly',
'deepEqual_objectOnly',
'deepStrictEqual_objectOnly',
'deepEqual_mixed',
'deepStrictEqual_mixed',
'deepEqual_looseMatches',
'notDeepEqual_primitiveOnly',
'notDeepStrictEqual_primitiveOnly',
'notDeepEqual_objectOnly',
'notDeepStrictEqual_objectOnly',
'notDeepEqual_mixed',
'notDeepStrictEqual_mixed',
'notDeepEqual_looseMatches',
]
});

function benchmark(method, n, values, values2) {
const actual = new Set(values);
// Prevent reference equal elements
const deepCopy = JSON.parse(JSON.stringify(values2 ? values2 : values));
const expected = new Set(deepCopy);
bench.start();
for (var i = 0; i < n; ++i) {
method(actual, expected);
}
bench.end(n);
}

function main(conf) {
const n = +conf.n;
const len = +conf.len;

const array = Array(len).fill(1);

var values, values2;

switch (conf.method) {
case 'deepEqual_primitiveOnly':
values = array.map((_, i) => `str_${i}`);
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_primitiveOnly':
values = array.map((_, i) => `str_${i}`);
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_objectOnly':
values = array.map((_, i) => [`str_${i}`, null]);
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_objectOnly':
values = array.map((_, i) => [`str_${i}`, null]);
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_mixed':
values = array.map((_, i) => {
return i % 2 ? [`str_${i}`, null] : `str_${i}`;
});
benchmark(assert.deepEqual, n, values);
break;
case 'deepStrictEqual_mixed':
values = array.map((_, i) => {
return i % 2 ? [`str_${i}`, null] : `str_${i}`;
});
benchmark(assert.deepStrictEqual, n, values);
break;
case 'deepEqual_looseMatches':
values = array.map((_, i) => i);
values2 = values.slice().map((v) => String(v));
benchmark(assert.deepEqual, n, values, values2);
break;
case 'notDeepEqual_primitiveOnly':
values = array.map((_, i) => `str_${i}`);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = 'w00t';
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_primitiveOnly':
values = array.map((_, i) => `str_${i}`);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = 'w00t';
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_objectOnly':
values = array.map((_, i) => [`str_${i}`, null]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = ['w00t'];
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_objectOnly':
values = array.map((_, i) => [`str_${i}`, null]);
values2 = values.slice(0);
values2[Math.floor(len / 2)] = ['w00t'];
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_mixed':
values = array.map((_, i) => {
return i % 2 ? [`str_${i}`, null] : `str_${i}`;
});
values2 = values.slice();
values2[0] = 'w00t';
benchmark(assert.notDeepEqual, n, values, values2);
break;
case 'notDeepStrictEqual_mixed':
values = array.map((_, i) => {
return i % 2 ? [`str_${i}`, null] : `str_${i}`;
});
values2 = values.slice();
values2[0] = 'w00t';
benchmark(assert.notDeepStrictEqual, n, values, values2);
break;
case 'notDeepEqual_looseMatches':
values = array.map((_, i) => i);
values2 = values.slice().map((v) => String(v));
values2[len - 1] = String(len + 1);
benchmark(assert.notDeepEqual, n, values, values2);
break;
default:
throw new Error('Unsupported method');
}
}
Loading

0 comments on commit 263686a

Please sign in to comment.