Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8.3.0 proposal #14594

Merged
merged 157 commits into from
Aug 10, 2017
Merged
Show file tree
Hide file tree
Changes from 156 commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
32ba8ae
repl: fix old history error handling
BridgeAR Jun 17, 2017
b5d0a03
test: fix error handling test-http-full-response
Trott Jul 15, 2017
d2121ab
doc: fix minor typo in cluster.md
lance Jul 18, 2017
72febfd
test: replace concatenation with template literals
csvwolf Jul 16, 2017
53ad91c
doc,stream: _transform happens one at a time
mcollina Jul 17, 2017
34821f6
repl: don't terminate on null thrown
Jul 16, 2017
dc0a26f
doc: replace dead link in v8 module
drboyer Jul 19, 2017
3bc7d2a
test: replace string concat in test-fs-watchfile.js
Helianthus21 Jul 16, 2017
f6a0343
docs: add note about fs.rmdir()
Oleksandr-Kushchak-i2 Jul 17, 2017
def98c6
test: replace string concatenation with template
nathansmile Jul 18, 2017
5ab4471
build,tools: do not force codesign prefix
evanlucas Jul 12, 2017
0ebb4df
build: codesign tarball binary on macOS
evanlucas Jul 12, 2017
94c7331
test: replace string concatenation with path.join
jkzing Jul 16, 2017
c866c90
test: use path.join for long path concatenation
jankjn Jul 16, 2017
9b104b4
benchmark: add assert map and set benchmarks
BridgeAR Jul 18, 2017
956a473
test: move test-fs-largefile to pummel
Trott Jul 18, 2017
b12924d
doc: add XadillaX to collaborators
XadillaX Jul 20, 2017
4be373b
doc: fixes default shell in child_process.md
henryzxu Jul 12, 2017
0197ba0
test: add comments for whatwg-url tests
gautamarora Jul 19, 2017
f1b09c0
doc: fix typo in stream.md
Jul 19, 2017
3c92b78
test: use path.join in async-hooks/test-tlswrap.js
vincentcn Jul 17, 2017
e237720
test: replace string concatenation with template
Jul 16, 2017
e54f75b
readline: remove the caching variable
Jul 16, 2017
99104e1
test: improve fs.exists coverage
jkzing Jul 16, 2017
11ae8c3
test: delete obsolete test-sendfd.js
decareano Jul 17, 2017
9b22acc
test: fix flaky test-net-write-after-close
Trott Jul 19, 2017
592787e
doc: error message are still major
refack Jul 19, 2017
953736c
test: move timing-dependent tests to sequential
aqrln Jul 19, 2017
c0ea5d8
tools: always include llvm_version in config
nanaya Jul 5, 2017
ebb9090
tools: skip workaround for newer llvm
nanaya Jul 5, 2017
3414e42
test: replace concatenation with template literals
leizongmin Jul 16, 2017
83c8e5c
doc: describe labelling process for backports
addaleax Apr 15, 2017
265f159
test: replace concatenation with template literals
4garfield Jul 16, 2017
d9273ed
deps: cherry-pick 18ea996 from c-ares upstream
addaleax Jul 15, 2017
0418a70
test: add non-internet resolveAny tests
addaleax Jun 22, 2017
6c6da38
doc: fix some links
vsemozhetbyt Jul 20, 2017
552d2be
test: improve test-util-inspect
psmarshall Jun 30, 2017
28f0693
lib: include cached modules in module.children
bnoordhuis Jul 8, 2017
fa134dd
n-api: add fast paths for integer getters
addaleax Jul 20, 2017
78f0c2a
doc,assert: document stackStartFunction in fail
BridgeAR Jul 2, 2017
26785a2
assert: refactor the code
BridgeAR Jul 2, 2017
d7a1637
test: change isAix to isAIX
LipperZack Jul 16, 2017
bdcd496
doc: update experimental status to reflect use
jasnell Apr 28, 2017
89586f6
assert: fix incorrect use of ERR_INVALID_ARG_TYPE
tniessen Jun 30, 2017
d89bb1c
test: bump test/common to master
addaleax Jul 24, 2017
1813467
test: upgrade tests to work with master’s `common`
addaleax Jul 24, 2017
f2efdc8
n-api: add code parameter to error helpers
mhdawson Jun 29, 2017
142ce5c
errors: order internal errors list alphabetically
addaleax Jul 24, 2017
751e873
http: check for handle before running asyncReset()
trevnorris Jul 21, 2017
3c50c59
test: replace concatenation with template literals
Suixinlei Jul 16, 2017
aeb8d66
test: fix test-async-wrap-getasyncid flakyness
Jul 17, 2017
ab9bc81
doc: add docs for module.paths
atever Jul 23, 2017
de3d73c
test: replace CRLF by LF in a fixture
vsemozhetbyt Jul 23, 2017
1c6135f
test: fix flaky http(s)-set-server-timeout tests
Trott Jul 20, 2017
a7b3e06
lib: modify destructuring for indentation
Trott Jul 21, 2017
5e95218
tools: update to ESLint 4.3.0
Trott Jul 21, 2017
cd0fffd
test: convert table in test doc to markdown table
sealkingw Jul 16, 2017
6420a73
test: replace concatenation with template literal
HSUCHING Jul 16, 2017
5057c7a
test: replace concatenation with template literal
rockcoder23 Jul 16, 2017
509039f
path: remove unnecessary string copies
tniessen Jul 23, 2017
14f6a5a
test: fix flaky test-force-repl
Trott Jul 23, 2017
6078dea
n-api: directly create Local from Persistent
kfarnung Jul 13, 2017
50447e8
http: reset stream to unconsumed in `unconsume()`
addaleax Jul 21, 2017
8a9de1b
doc: fix typo in using-internal-errors.md
b0yfriend Jul 22, 2017
0ff19b0
test: changed error message validator
pratik0509 Jul 24, 2017
4836f3b
inspector: send messages after the Node is done
Jul 24, 2017
f8c2302
test: use common.mustCall() instead of exit handle
Suixinlei Jul 16, 2017
71cb1cd
inspector: implement V8Inspector timer
Jul 18, 2017
b849b3d
n-api: re-use napi_env between modules
Jul 13, 2017
60e0f2b
n-api: add support for DataView
shivanth Jul 19, 2017
7f5bcbd
build,test: run v8 tests on windows
kunalspathak Jun 28, 2017
100e862
test: rename crypto test
bnoordhuis Jul 24, 2017
4ff562f
test: make flaky crypto test more deterministic
bnoordhuis Jul 24, 2017
eb7faf6
src: replace ASSERT with CHECK
bnoordhuis Jul 25, 2017
e90af29
tls: fix empty issuer/subject/infoAccess parsing
bnoordhuis Jul 24, 2017
c285389
test: refactor test-http-parser.js
Trott Jul 25, 2017
91b6ba1
test: refactor test-benchmark-timers
Trott Jul 24, 2017
e9088f9
doc: fix verify in crypto.md
rus0000 Jul 25, 2017
9e5a088
lib: adjust indentation for impending lint change
Trott Jul 20, 2017
d11840c
tools: enable stricter linting in lib directory
Trott Jul 20, 2017
23cd934
test: refactor test-httpparser.response.js
erdun Jul 16, 2017
5a8862b
repl: improve require() autocompletion
aqrln Jul 21, 2017
c704c02
test: increase coverage for path.parse
tniessen Jul 24, 2017
eb023ef
doc, lib, test: do not re-require needlessly
vsemozhetbyt Jul 15, 2017
7c51240
test: adjust indentation for stricter linting
Trott Jul 25, 2017
9252b8c
assert: refactor to reduce unecessary code paths
BridgeAR Jun 28, 2017
e2356e7
assert: improve deepEqual Set and Map worst case
BridgeAR Jul 15, 2017
451e643
test: remove --no-crankshaft
MylesBorins Jul 28, 2017
15b9aa1
test: improve error logging for inspector test
Trott Jul 27, 2017
7b6a774
test: remove disabled tests directory
Trott Jul 26, 2017
1a5927f
repl: do not consider `...` as a REPL command
shivanth Jul 23, 2017
8fea174
test: add DISABLED_ prefix to commented out test
danbev Jul 17, 2017
5844691
net: fix bytesWritten during writev
brendanashworth Jul 13, 2017
2c364ab
buffer: remove a wrongly added attribute specifier
hujiajie Jul 24, 2017
ddd97fe
test: fix error when foo in path to git clone
SwimmingSage Jul 26, 2017
4e2493a
doc: fix minor typos in net.md
darai0512 Jul 26, 2017
9dd9760
doc: update url.origin IDNA behavior
TimothyGu Jun 23, 2017
92b0555
doc: various small revisions in url
TimothyGu Jun 26, 2017
d90a5e0
src: replace deprecated ForceSet() method
fhinkel Jul 24, 2017
b41ae98
path: fix win32 volume-relative paths
TimothyGu Jul 24, 2017
fa8c5f4
tools: remove legacy indentation linting
Trott Jul 27, 2017
19a0e06
linkedlist: correct grammar in comments
alexbostock Jul 30, 2017
fffd8f5
doc: document napi_finalize() signature
cjihrig Jul 14, 2017
37e55bf
readline: remove max limit of crlfDelay
Azard Jun 6, 2017
0cf1e22
benchmark: remove unused parameters
mnalsup Jul 28, 2017
cfed48e
doc, url: add changelog metadata for url.format
TimothyGu Jul 30, 2017
3225942
url: update sort() behavior with no params
TimothyGu Jul 24, 2017
f40b906
test: add check on an addon that does not register
ezequielgarcia Jun 28, 2017
9f50db2
test: refactor test-vm-new-script-new-context
Trott Jul 29, 2017
7b96944
build,win: fix python detection script
jasongin Jul 31, 2017
106a23b
src,dns: refactor cares_wrap to avoid global state
addaleax Jul 27, 2017
69e41dc
dns: enable usage of independent cares resolvers
addaleax Jul 27, 2017
0982810
dns: add channel.cancel()
addaleax Jul 27, 2017
32b30d5
dns: name generated functions
addaleax Jul 31, 2017
ce9e3cf
test: refactor test/sequential/test-fs-watch.js
Trott Jul 29, 2017
b1fef05
test: improvements to various http tests
jasnell Jul 14, 2017
e529914
zlib: fix interaction of flushing and needDrain
addaleax Jul 28, 2017
f593960
util: refactor util module
jasnell Jun 19, 2017
9a3fc10
util: implement WHATWG Encoding Standard API
jasnell Jun 12, 2017
b6bd3cf
doc: cross-link util.TextDecoder and intl.md
vsemozhetbyt Jul 25, 2017
87e1080
build: fix build without icu
MSLaguana Jul 28, 2017
51c1afa
crypto: change segmentation faults to CHECKs
tniessen Jul 30, 2017
fa3aa2e
src: return MaybeLocal in AsyncWrap::MakeCallback
tniessen Jul 31, 2017
44ad55d
deps: update V8 to 6.0.286.52
MylesBorins Aug 1, 2017
160e2f0
deps: limit regress/regress-crbug-514081 v8 test
mhdawson May 9, 2016
357873d
v8: fix stack overflow in recursive method
bnoordhuis Apr 17, 2017
efd297a
deps: fix addons compilation with VS2013
bzoz May 23, 2017
2dbf95d
deps: backport c0f1ff2 from upstream V8
targos Jun 20, 2017
997204a
src: fix new V8 compiler warnings
targos Jun 30, 2017
e2b306c
deps: backport rehash strings after deserialization
hashseed Jul 18, 2017
8a3bc87
src: fix process.abort() interaction with V8
addaleax Jun 29, 2017
342f4cc
doc: change `child` to `subprocess`
Trott Aug 1, 2017
91b7843
doc: add entry for subprocess.killed property
Trott Aug 3, 2017
9c1199e
console: add console.count() and console.clear()
jasnell Apr 26, 2017
5094f2c
test: refactor test-domain-abort-on-uncaught
Trott Jul 30, 2017
9f319d5
tools: replace assert-throw-arguments custom lint
Trott Jul 30, 2017
8c80e91
doc: fix typo in writing-and-running-benchmarks.md
hiroppy Aug 2, 2017
255b9bf
console,test: make message test more accurate
addaleax Aug 1, 2017
767644d
tools: simplify no-unescaped-regexp-dot rule
Trott Aug 1, 2017
dd586c6
doc: erase unneeded eslint-plugin-markdown comment
vsemozhetbyt Aug 2, 2017
636ba8c
test: support odd value for kStringMaxLength
targos Jul 25, 2017
28b9c7a
test: fix test-readline-position w/o ICU
TimothyGu Jul 26, 2017
deea68c
inspector: fix console with inspector disabled
TimothyGu Aug 2, 2017
3c46ef4
test: explain sloppy mode for test-global
Trott Aug 2, 2017
8c5cd14
src: avoid dereference without existence check
TimothyGu Aug 5, 2017
c0f0c38
build: enable C++ linting for src/*/*
Jeyanthinath Jul 26, 2017
3c6b5e5
src: properly manage timer in cares ChannelWrap
addaleax Aug 4, 2017
4b01d8c
src: replace assert with CHECK_LE in node_api.cc
bnoordhuis Jul 27, 2017
eb068a0
src: remove unused Connection::ClearError()
bnoordhuis Jul 27, 2017
6ae6469
src: use existing strings over creating new ones
addaleax Aug 2, 2017
264e434
src: reuse 'ondone' string in node_crypto.cc
tniessen Aug 2, 2017
1f16c43
child_process: fix handle passing w large payloads
addaleax Aug 2, 2017
a813294
zlib: fix crash when initializing failed
addaleax Aug 7, 2017
e813cfa
querystring: avoid indexOf when parsing
mcollina Aug 8, 2017
ad901ed
doc: add gabrielschulhof to collaborators
Aug 8, 2017
fb88fa1
2017-08-09, Version 8.3.0 (Current)
addaleax Aug 2, 2017
08b662a
Working on v8.3.1
cjihrig Aug 10, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ more information about the governance of the Node.js project, see
**Daniel Wang** &lt;wangyang0123@gmail.com&gt;
* [Fishrock123](https://github.com/Fishrock123) -
**Jeremiah Senkpiel** &lt;fishrock123@rocketmail.com&gt;
* [gabrielschulhof](https://github.com/gabrielschulhof) -
**Gabriel Schulhof** &lt;gabriel.schulhof@intel.com&gt;
* [geek](https://github.com/geek) -
**Wyatt Preul** &lt;wpreul@gmail.com&gt;
* [gibfahn](https://github.com/gibfahn) -
Expand Down Expand Up @@ -448,6 +450,8 @@ more information about the governance of the Node.js project, see
**Daijiro Wachi** &lt;daijiro.wachi@gmail.com&gt; (he/him)
* [whitlockjc](https://github.com/whitlockjc) -
**Jeremy Whitlock** &lt;jwhitlock@apache.org&gt;
* [XadillaX](https://github.com/XadillaX) -
**Khaidi Chu** &lt;i@2333.moe&gt; (he/him)
* [yorkie](https://github.com/yorkie) -
**Yorkie Liu** &lt;yorkiefixer@gmail.com&gt;
* [yosuke-furukawa](https://github.com/yosuke-furukawa) -
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');
}
}
Loading