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

v12.8.0 release proposal #29017

Merged
merged 88 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
19dad19
deps: float 15d7e79 from openssl
tniessen Jul 21, 2019
e334c1f
src: fix type name in comment
bnoordhuis Jun 20, 2019
386d5d7
lib: support min/max values in validateInteger()
cjihrig Jul 22, 2019
2262526
module: implement "exports" proposal for CommonJS
jkrems Jul 19, 2019
d0b1fb3
doc: api/stream.md typo from writeable to writable
imcotton Jul 23, 2019
e0e7763
crypto: increase maxmem range from 32 to 53 bits
tniessen Jul 21, 2019
a38fecd
tools: update certdata.txt
sam-github Jul 22, 2019
86f4c68
crypto: update root certificates
sam-github Jul 22, 2019
c0a0448
doc: fix type in NSS update instructions
sam-github Jul 22, 2019
24b9d29
build: `uname -m` is amd64 on freebsd, not x86_64
bnoordhuis Jul 22, 2019
3c30456
src : elevate v8 namespaces
HarshithaKP Jul 22, 2019
0667d0c
doc: add documentation for response.flushHeaders()
lpinca Jul 22, 2019
95b87ce
doc: claim NODE_MODULE_VERSION=76 for Electron 8
MarshallOfSound Jul 22, 2019
ae56a23
deps: backport b107214 from upstream V8
addaleax Jul 24, 2019
727ffe4
domain: use strong reference to domain while active
addaleax Jun 20, 2019
881e345
doc: describe why new Buffer() is problematic
sam-github Jul 23, 2019
860c0d8
n-api: add APIs for per-instance state management
Jul 15, 2019
454e879
doc: fix incorrect name in report docs
cjihrig Jul 24, 2019
e0951c8
report: loop over uv_cpu_info() results
cjihrig Jul 23, 2019
d3426ee
assert: avoid potentially misleading reference to object identity
addaleax Jul 23, 2019
b7c6ad5
crypto: add outputLength option to crypto.createHash
tniessen Jul 19, 2019
3a62202
crypto: fix handling of malicious getters (scrypt)
tniessen Jul 23, 2019
5d5c89a
policy: add dependencies map for resources
bmeck Jul 18, 2019
ffc7a00
doc: add documentation for stream.destroyed
ronag Jul 23, 2019
e6b3bfe
n-api: refactor a previous commit
Jul 18, 2019
cf071a0
stream: resolve perf regression introduced by V8 7.3
mcollina Jul 24, 2019
82f263d
build,tools: support building with Visual Studio 2019
targos Jul 20, 2019
f6051f9
test: specialize OOM check for AIX
sam-github Jul 24, 2019
8db43b1
src: move relative uptime init
Jul 24, 2019
c9c7256
http: reset parser.incoming when server response is finished
addaleax Jul 11, 2019
24b8f20
deps: remove backup files
AdamMajer Jul 26, 2019
9e7c662
build: ignore backup files
AdamMajer Jul 26, 2019
a7ef102
crypto: add null check to outputLength logic
cjihrig Jul 26, 2019
0b6a84a
test,report: relax CPU match requirements
addaleax Jul 28, 2019
84efadf
test, util: refactor isObject in test-util
RamirezAlex Jul 27, 2019
5533d48
doc: correct import statement
himself65 Jul 27, 2019
085eb48
doc: fixup esm resolver spec formatting
guybedford Jul 28, 2019
406c50c
src: read break_node_first_line from the inspect options
MarshallOfSound Jun 19, 2019
2142b6d
test: improve test-async-hooks-http-parser-destroy
Flarna Jun 16, 2019
b282c85
vm: increase code coverage of source_text_module.js
kball Jun 21, 2019
9b02f36
deps: dlloads node static linked executable
lal12 Jun 4, 2019
9dfa636
dgram: changed 'var' to 'let' and 'const'
mgochoa Jun 21, 2019
1b0d67b
src: fix OpenBSD build
devnexen Jun 22, 2019
d0d3149
http2: add constant to already destructured constants
dnalborczyk Jun 11, 2019
fa82cbc
http2: destructure constants from require call
dnalborczyk Jun 11, 2019
a28db5f
doc: add example of event close for child_process
ltciro Jun 21, 2019
32cf344
src: readlink("/proc/self/exe") -> uv_exename()
bnoordhuis Jun 21, 2019
a0f89a2
test: refactor test using assert instead of try/catch
juansb827 Jun 21, 2019
9b47f77
test: udpate test comment description
Angelfire Jun 21, 2019
048db38
benchmark: swap var for let in url benchmarks
RamirezAlex Jul 24, 2019
f2c1f36
benchmark: swap var for let in util benchmarks
RamirezAlex Jul 24, 2019
bbcf9f0
benchmark: swap var for let in buffer benchmarks
RamirezAlex Jul 26, 2019
cce2087
src: export v8.GetHeapCodeAndMetadataStatistics()
May 30, 2019
fb57bc4
build: do not mix spaces and tabs in Makefile
lpinca Jul 28, 2019
31aa33b
test: fix race in test-http2-origin
mildsunrise Jul 30, 2019
19070e4
test: fix nits in test/fixtures/tls-connect.js
lpinca Jul 28, 2019
25aa222
build: generate openssl config for BSD-x86
bnoordhuis Jul 22, 2019
3d51d30
src: large pages fix FreeBSD fix region size
devnexen Jul 17, 2019
470db47
build: remove support for s390 (but not s390x)
bnoordhuis Jul 28, 2019
391fe46
benchmark, http: refactor for code consistency
RamirezAlex Jul 21, 2019
464136f
lib: replace var with let in loaders.js
mbj36 Jun 5, 2019
43acce1
worker: handle calling terminate when kHandler is null
elyalvarado Jun 21, 2019
3e63429
doc: add example about emitter.emit in events documentation
felipedc09 Jun 21, 2019
b6e174b
test: use assert.throws() in test-require-json.js
alejandronanez Jun 21, 2019
d72b682
inspector: report all workers
eugeneo Jul 26, 2019
5f07f49
doc: revoke DEP0089
cjihrig Jul 29, 2019
d9084d2
module: unify package exports test for CJS and ESM
jkrems Jul 24, 2019
d601a0a
src: allow generic C++ callables in SetImmediate()
addaleax Jul 15, 2019
7c80963
doc: include "exports" resolver specification
guybedford Dec 11, 2018
c93df0c
n-api: refactoring napi_create_function testing
Jul 28, 2019
c42eb5d
test: refactoring test_error testing
himself65 Jul 30, 2019
efe9b97
test: refactor test-beforeexit-event-exit using mustNotCall
himself65 Jul 30, 2019
dcef7b8
build: include stubs in shared library
jeroen Jul 29, 2019
2236aff
module: exports error as MODULE_NOT_FOUND
guybedford Jul 31, 2019
c389526
test: add tests for spaces in folder names
PaulBags Jul 23, 2019
0ac6d28
doc: writableFinished is true before 'finish'
ronag Jul 23, 2019
f4abf17
doc: remove legacy mode deprecation in assert
Trott Jul 31, 2019
7d9eb17
http2: destroy when settingsFn throws an error
himself65 Jul 31, 2019
57f5d50
doc: fix sorting nit in sections of http.md
vsemozhetbyt Aug 2, 2019
4b91e4d
report: include network interfaces in report
cjihrig Jul 23, 2019
0f8f552
test: refactor test-fs-stat.js
Trott Aug 1, 2019
bdd442f
doc: describe NODE_OPTIONS interop w/cmd line opts
reasonablytall Aug 1, 2019
4a747f6
Revert "src: remove trace_sync_io_ from env"
ChALkeR Aug 1, 2019
3c52dbe
net: shallow copy option when create Server
himself65 Aug 1, 2019
02a50c3
doc: remove use of you
mhdawson Aug 1, 2019
1f82929
path: improve normalization performance
mscdex Aug 3, 2019
11470d5
deps: upgrade npm to 6.10.2
isaacs Jul 25, 2019
77d8f0c
2019-08-06, Version 12.8.0 (Current)
BridgeAR Aug 6, 2019
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: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ _UpgradeReport_Files/
*.pyc
__pycache__
.DS_Store
*~
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.7.0">12.7.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.8.0">12.8.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.7.0">12.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.6.0">12.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.5.0">12.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.4.0">12.4.0</a><br/>
Expand Down
70 changes: 37 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ PWD = $(CURDIR)
BUILD_WITH ?= make

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
PARALLEL_ARGS = -j $(JOBS)
else
PARALLEL_ARGS = -J
PARALLEL_ARGS = -J
endif

ifdef ENABLE_V8_TAP
TAP_V8 := --junitout $(PWD)/v8-tap.xml
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
TAP_V8 := --junitout $(PWD)/v8-tap.xml
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
endif

V8_TEST_OPTIONS = $(V8_EXTRA_TEST_OPTIONS)
ifdef DISABLE_V8_I18N
V8_BUILD_OPTIONS += i18nsupport=off
V8_BUILD_OPTIONS += i18nsupport=off
endif

ifeq ($(OSTYPE), darwin)
GCOV = xcrun llvm-cov gcov
GCOV = xcrun llvm-cov gcov
endif

BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]')
Expand All @@ -62,7 +62,7 @@ V ?= 0
# Use -e to double check in case it's a broken link
# Use $(PWD) so we can cd to anywhere before calling this
available-node = \
if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \
if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \
$(PWD)/$(NODE) $(1); \
elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \
`which node` $(1); \
Expand Down Expand Up @@ -107,12 +107,12 @@ $(NODE_G_EXE): config.gypi out/Makefile
else
ifeq ($(BUILD_WITH), ninja)
ifeq ($(V),1)
NINJA_ARGS := $(NINJA_ARGS) -v
NINJA_ARGS := $(NINJA_ARGS) -v
endif
ifdef JOBS
NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
else
NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
endif
$(NODE_EXE): config.gypi out/Release/build.ninja
ninja -C out/Release $(NINJA_ARGS)
Expand Down Expand Up @@ -141,9 +141,9 @@ test-code-cache: with-code-cache
echo "'test-code-cache' target is a noop"

out/Makefile: config.gypi common.gypi node.gyp \
deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make

config.gypi: configure configure.py
Expand Down Expand Up @@ -243,7 +243,7 @@ coverage-test: coverage-build
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/*.gcda
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/src/tracing/*.gcda
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage \
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
$(MAKE) coverage-report-js
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
--gcov-exclude='.*usr' -v -r Release/obj.target \
Expand All @@ -261,7 +261,7 @@ COV_REPORT_OPTIONS = --reporter=html \
--resolve=./lib --exclude="benchmark/" --exclude="deps/" --exclude="test/" --exclude="tools/" \
--wrapper-length=0
ifdef COV_ENFORCE_THRESHOLD
COV_REPORT_OPTIONS += --check-coverage --lines=$(COV_ENFORCE_THRESHOLD)
COV_REPORT_OPTIONS += --check-coverage --lines=$(COV_ENFORCE_THRESHOLD)
endif

.PHONY: coverage-report-js
Expand Down Expand Up @@ -299,7 +299,7 @@ coverage-run-js:
$(RM) -r out/$(BUILDTYPE)/.coverage
$(MAKE) coverage-build-js
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage CI_SKIP_TESTS=$(COV_SKIP_TESTS) \
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) jstest
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) jstest
$(MAKE) coverage-report-js

.PHONY: test
Expand Down Expand Up @@ -362,7 +362,7 @@ DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
endif

node_use_openssl = $(call available-node,"-p" \
"process.versions.openssl != undefined")
"process.versions.openssl != undefined")
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping .docbuildstamp (no crypto)"; \
Expand All @@ -387,9 +387,9 @@ ADDONS_PREREQS := config.gypi \

define run_build_addons
env npm_config_loglevel=$(LOGLEVEL) npm_config_nodedir="$$PWD" \
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
"$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" \
$1
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
"$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" \
$1
touch $2
endef

Expand Down Expand Up @@ -489,9 +489,9 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a
CI_NATIVE_SUITES ?= addons js-native-api node-api
CI_JS_SUITES ?= default
ifeq ($(node_use_openssl), false)
CI_DOC := doctool
CI_DOC := doctool
else
CI_DOC =
CI_DOC =
endif

.PHONY: test-ci-native
Expand Down Expand Up @@ -659,21 +659,21 @@ ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
# Related CI job: node-test-commit-v8-linux
test-v8: v8 ## Runs the V8 test suite on deps/v8.
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
mjsunit cctest debugger inspector message preparser \
$(TAP_V8)
$(TAP_V8)
@echo Testing hash seed
$(MAKE) test-hash-seed

test-v8-intl: v8
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) \
--mode=$(BUILDTYPE_LOWER) intl \
$(TAP_V8_INTL)
--mode=$(BUILDTYPE_LOWER) intl \
$(TAP_V8_INTL)

test-v8-benchmarks: v8
deps/v8/tools/run-tests.py --gn --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \
benchmarks \
$(TAP_V8_BENCHMARKS)
benchmarks \
$(TAP_V8_BENCHMARKS)

test-v8-updates:
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) v8-updates
Expand Down Expand Up @@ -806,6 +806,9 @@ UNAME_M=$(shell uname -m)
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64)
DESTCPU ?= x64
else
ifeq ($(findstring amd64,$(UNAME_M)),amd64)
DESTCPU ?= x64
else
ifeq ($(findstring ppc64,$(UNAME_M)),ppc64)
DESTCPU ?= ppc64
else
Expand Down Expand Up @@ -865,6 +868,7 @@ endif
endif
endif
endif
endif

# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32').
# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU.
Expand Down Expand Up @@ -1181,8 +1185,8 @@ tools/.docmdlintstamp: $(LINT_MD_DOC_FILES)
LINT_MD_TARGETS = src lib benchmark test tools/doc tools/icu
LINT_MD_ROOT_DOCS := $(wildcard *.md)
LINT_MD_MISC_FILES := $(shell find $(LINT_MD_TARGETS) -type f \
! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md') \
$(LINT_MD_ROOT_DOCS)
! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md') \
$(LINT_MD_ROOT_DOCS)
run-lint-misc-md = tools/lint-md.js -q -f $(LINT_MD_MISC_FILES)
# Lint other changed markdown files maintained by us
tools/.miscmdlintstamp: $(LINT_MD_MISC_FILES)
Expand Down Expand Up @@ -1298,9 +1302,9 @@ else
endif

ifeq ($(V),1)
CPPLINT_QUIET =
CPPLINT_QUIET =
else
CPPLINT_QUIET = --quiet
CPPLINT_QUIET = --quiet
endif
.PHONY: lint-cpp
# Lints the C++ code with cpplint.py and check-imports.py.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-base64-decode-wrapped.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function main({ charsPerLine, linesCount, n }) {
const buffer = Buffer.alloc(bytesCount, line, 'base64');

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
buffer.base64Write(data, 0, bytesCount);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-base64-decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ function main({ n, size }) {
const b = Buffer.allocUnsafe(encodedSize);
b.write(s, 0, encodedSize, 'base64');
bench.start();
for (var i = 0; i < n; i += 1) b.base64Write(s, 0, s.length);
for (let i = 0; i < n; i += 1) b.base64Write(s, 0, s.length);
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-bytelength.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function main({ n, len, encoding }) {
}

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
const index = n % strings.length;
// Go!
const r = Buffer.byteLength(strings[index], encoding);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/buffers/buffer-compare-offset.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const bench = common.createBenchmark(main, {
});

function compareUsingSlice(b0, b1, len, iter) {
for (var i = 0; i < iter; i++)
for (let i = 0; i < iter; i++)
Buffer.compare(b0.slice(1, len), b1.slice(1, len));
}

function compareUsingOffset(b0, b1, len, iter) {
for (var i = 0; i < iter; i++)
for (let i = 0; i < iter; i++)
b0.compare(b1, 1, len, 1, len);
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function main({ n, size }) {
b1[size - 1] = 'b'.charCodeAt(0);

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
Buffer.compare(b0, b1);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function main({ n, pieces, pieceSize, withTotalLength }) {
const totalLength = withTotalLength ? pieces * pieceSize : undefined;

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
Buffer.concat(list, totalLength);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-indexof-number.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function main({ n, value }) {

let count = 0;
bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
count += aliceBuffer.indexOf(value, 0, undefined);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-indexof.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function main({ n, search, encoding, type }) {
}

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
aliceBuffer.indexOf(search, 0, encoding);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-normalize-encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function main({ encoding, n }) {
const { normalizeEncoding } = require('internal/util');

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
normalizeEncoding(encoding);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-read-float.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function main({ n, type, endian, value }) {
buff[`write${type}${endian}`](values[type][value], 0);

bench.start();
for (var i = 0; i !== n; i++) {
for (let i = 0; i !== n; i++) {
buff[fn](0);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-read-with-byteLength.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function main({ n, buf, type, byteLength }) {

buff.writeDoubleLE(0, 0);
bench.start();
for (var i = 0; i !== n; i++) {
for (let i = 0; i !== n; i++) {
buff[fn](0, byteLength);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function main({ n, buf, type }) {
buff.writeDoubleLE(0, 0);
bench.start();

for (var i = 0; i !== n; i++) {
for (let i = 0; i !== n; i++) {
buff[fn](0);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const slowBuf = new SlowBuffer(1024);
function main({ n, type }) {
const b = type === 'fast' ? buf : slowBuf;
bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
b.slice(10, 256);
}
bench.end(n);
Expand Down
6 changes: 3 additions & 3 deletions benchmark/buffers/buffer-swap.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function swap(b, n, m) {
Buffer.prototype.htons = function htons() {
if (this.length % 2 !== 0)
throw new RangeError();
for (var i = 0; i < this.length; i += 2) {
for (let i = 0; i < this.length; i += 2) {
swap(this, i, i + 1);
}
return this;
Expand All @@ -46,7 +46,7 @@ Buffer.prototype.htonl = function htonl() {
Buffer.prototype.htonll = function htonll() {
if (this.length % 8 !== 0)
throw new RangeError();
for (var i = 0; i < this.length; i += 8) {
for (let i = 0; i < this.length; i += 8) {
swap(this, i, i + 7);
swap(this, i + 1, i + 6);
swap(this, i + 2, i + 5);
Expand All @@ -58,7 +58,7 @@ Buffer.prototype.htonll = function htonll() {
function createBuffer(len, aligned) {
len += aligned ? 0 : 1;
const buf = Buffer.allocUnsafe(len);
for (var i = 1; i <= len; i++)
for (let i = 1; i <= len; i++)
buf[i - 1] = i;
return aligned ? buf : buf.slice(1);
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffers/buffer-tojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function main({ n, len }) {
const buf = Buffer.allocUnsafe(len);

bench.start();
for (var i = 0; i < n; ++i)
for (let i = 0; i < n; ++i)
buf.toJSON();
bench.end(n);
}
Loading