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

v14.3.0 proposal #33452

Merged
merged 104 commits into from May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
676ef95
test: add tests for options.fs in fs streams
julianduque May 1, 2020
c5a38fe
doc: fix style and grammer in buffer.md
seishun May 1, 2020
cc02c73
http: fixes memory retention issue with FreeList and HTTPParser
leidegre May 1, 2020
07372e9
doc: explicitly doc package.exports is breaking
MylesBorins Apr 26, 2020
a292630
src: retrieve binding data from the context
joyeecheung Apr 19, 2020
a56b600
Revert "src: add aliased-buffer-overflow abort test"
richardlau May 1, 2020
5ff3192
Revert "src: add test/abort build tasks"
richardlau May 1, 2020
cf47698
src: use BaseObjectPtr in StreamReq::Dispose
jasnell Apr 27, 2020
25443fa
doc: doc and test URLSearchParams discrepancy
jasnell May 4, 2020
cf88ed8
doc: update napi_async_init documentation
mhdawson Apr 30, 2020
b2fb01a
stream: make from read one at a time
ronag May 1, 2020
4ae6130
n-api: add uint32 test for -1
May 5, 2020
0572943
doc: add warnings about transferring Buffers and ArrayBuffer
jasnell May 5, 2020
dab5c38
doc: remove AsyncWrap mentions from async_hooks.md
puzpuzpuz May 5, 2020
6ffec50
doc: add troubleshooting guide for AsyncLocalStorage
puzpuzpuz May 5, 2020
4465d23
wasi: prevent syscalls before start
tniessen May 4, 2020
2c49dd3
doc: specify unit of time passed to `fs.utimes`
SimenB May 4, 2020
c6a8cd0
doc: fix md issue in src/README.md
juanarbol May 3, 2020
5b42d81
doc: add Uint8Array to `end` and `write`
rexagod May 2, 2020
27b814c
module: lazy load 'getOptionValue' in initializeLoader
himself65 May 2, 2020
e20fe53
doc: update Buffer(size) documentation
seishun May 1, 2020
b5dcfbf
doc: removed unnecessary util imports from vm examples
WalasPrime Apr 30, 2020
84974d3
doc: mention python3-distutils dependency in BUILDING.md
osher Apr 30, 2020
6bca487
lib: fix grammar in internal/bootstrap/loaders.js
szTheory May 2, 2020
302408e
test: skip some console tests on dumb terminal
AdamMajer Apr 30, 2020
6f54c2b
test: rename test-lookupService-promises
rickyes Apr 27, 2020
a9e4fdb
doc: correct description of `decipher.setAuthTag` in crypto.md
jbuhacoff Apr 27, 2020
ed41494
src: clean up large pages code
May 5, 2020
6a26eee
wasi: fix poll_oneoff memory interface
cjihrig May 5, 2020
0cbee57
doc: add warning for socket.connect reuse
ronag May 5, 2020
ad86807
module: better error for named exports from cjs
MylesBorins May 5, 2020
548cedd
src: split out callback queue implementation from Environment
addaleax May 6, 2020
94d0a08
lib: refactored scheduling policy assignment
yashLadha Apr 5, 2020
0a78925
meta: add issue template for API reference docs
DerekNonGeneric Apr 20, 2020
ef25033
src: fix invalid windowBits=8 gzip segfault
bnoordhuis Apr 24, 2020
736ca65
zlib: reject windowBits=8 when mode=GZIP
bnoordhuis Apr 24, 2020
b634d4b
http: set IncomingMessage.destroyed
ronag Apr 28, 2020
41c5524
http2: add `bytesWritten` test for `Http2Stream`
rexagod Apr 21, 2020
eedc131
tls: reset secureConnecting on client socket
davedoesdev May 2, 2020
cae2051
buffer: improve copy() performance
seishun May 2, 2020
ba66b21
deps: upgrade npm to 6.14.5
ruyadorno May 4, 2020
398bdf4
perf_hooks: fix error message for invalid entryTypes
targos May 7, 2020
1d2c81f
test: add hr-time Web platform tests
targos May 7, 2020
804982c
tools: add eslint rule to only pass through 'test' to debuglog
BridgeAR Mar 9, 2020
cf03fe5
tools: remove obsolete no-restricted-syntax eslint rules
BridgeAR Mar 9, 2020
3de9dd9
src: remove unnecessary Isolate::GetCurrent() calls
addaleax May 8, 2020
a133a88
lib: fix typo in timers insert function comment
danbev May 8, 2020
e1e57a4
tools: update ESLint to 7.0.0
cjihrig May 8, 2020
cc5c8e0
http: don't destroy completed request
ronag Apr 28, 2020
b061655
async_hooks: move PromiseHook handler to JS
Qard Apr 16, 2020
f33e866
http: expose http.validate-header-name/value
osher Apr 28, 2020
1dcf66c
fs: add .ref() and .unref() methods to watcher classes
rickyes Apr 28, 2020
fd9c7c2
src: fix compiler warning in async_wrap.cc
addaleax May 9, 2020
0d77eec
src: add support for TLA
devsnek Nov 12, 2019
5b2cd44
test: fix test-net-throttle
Trott May 9, 2020
f3129b2
src: fix typo in comment in async_wrap.cc
danbev May 11, 2020
4f0cd64
doc: fix typo in n-api.md
danbev May 9, 2020
b41affb
doc: add note about clientError writable handling
ShogunPanda May 8, 2020
066ca98
src: use MaybeLocal.ToLocal instead of IsEmpty
danbev May 8, 2020
c9c16c0
src: delete unused variables to resolve compile time print warning
rickyes May 11, 2020
1999607
src: remove unused using declarations in node.cc
danbev May 6, 2020
d292633
src: add primordials to arguments comment
danbev May 9, 2020
331f0b3
deps: update to ICU 67.1
targos May 9, 2020
85cffb8
test: update WPT interfaces and hr-time
joyeecheung May 12, 2020
f31b262
test: refactor WPTRunner
joyeecheung May 6, 2020
7d4db35
build: fix `--error-on-warn` for macOS
richardlau May 11, 2020
34e7400
build: enable `--error-on-warn` for POSIX workflows
richardlau May 11, 2020
fd89ef1
src: refactor Reallocate since it introduced in upstream v8
gengjiawen Apr 10, 2020
6d2aaaf
tls: fix --tls-keylog option
mildsunrise May 12, 2020
354ff4f
src: small modification to NgHeader
jasnell May 7, 2020
0ffa040
doc: add examples for implementing ESM
rosaxxny Apr 30, 2020
0257386
src: remove deprecated FinalizationRegistry hooks
devsnek May 12, 2020
1a9771a
repl: improve repl preview
BridgeAR May 4, 2020
d33dcf1
repl: show reference errors during preview
BridgeAR May 4, 2020
69061dc
repl: replace hard coded core module list with actual list
BridgeAR May 7, 2020
95842db
test: refactor test/parallel/test-bootstrap-modules.js
BridgeAR May 7, 2020
6257cf2
repl: improve repl autocompletion for require calls
BridgeAR May 7, 2020
c2d2dfc
module: do not check circular dependencies for exported proxies
BridgeAR May 10, 2020
c2cf978
Revert "vm: add importModuleDynamically option to compileFunction"
mcollina May 12, 2020
d3e2fc8
test: fix test-dns-idna2008
Trott May 12, 2020
182aaf5
doc: enhance guides by fixing and making grammar more consistent
ChrisAHolland Apr 29, 2020
12391c7
fs: clean up Dir.read() uv_fs_t data before calling into JS
addaleax May 6, 2020
c7c420e
fs: forbid concurrent operations on Dir handle
addaleax May 7, 2020
2dc5db8
cli: add `--trace-atomics-wait` flag
addaleax Dec 5, 2019
b1a7fda
worker: call CancelTerminateExecution() before exiting Locker
addaleax May 10, 2020
dd4789b
async_hooks: clear async_id_stack for terminations in more places
addaleax May 11, 2020
b93a723
test: regression tests for async_hooks + Promise + Worker interaction
addaleax May 10, 2020
8ada953
src: replace to CHECK_NOT_NULL in node_crypto
himself65 May 13, 2020
8f91338
doc: fix stream example
addaleax May 15, 2020
35aae31
module: add specific error for dir import
aduh95 May 3, 2020
e53de96
esm: improve commonjs hint on module not found
aduh95 May 14, 2020
9119344
tools: enable no-else-return lint rule
lpinca Apr 8, 2020
db7bb94
repl: deprecate repl.inputStream and repl.outputStream
BridgeAR May 7, 2020
ed83202
repl: remove obsolete completer variable
BridgeAR May 7, 2020
7aa581f
repl: deprecate repl._builtinLibs
BridgeAR May 7, 2020
5e5aa0b
src: add #include <string> in json_utils.h
zcbenz May 10, 2020
9d1e577
worker: fix crash when .unref() is called during exit
addaleax May 14, 2020
099f18e
src: distinguish refed/unrefed threadsafe Immediates
addaleax May 9, 2020
24faa37
buffer,n-api: release external buffers from BackingStore callback
addaleax May 9, 2020
7f9ccd6
doc: fix extension in esm example
devsnek May 14, 2020
cc27949
doc: prepare 14.x changelog for remark update
Trott May 15, 2020
453affe
tools: update dependencies for markdown linting
Trott May 15, 2020
e4ad464
src: add default: case to silence compiler warning
addaleax May 18, 2020
5d81e4d
2020-05-19, Version 14.3.0 (Current)
codebytere May 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 1 addition & 44 deletions .eslintrc.js
Expand Up @@ -129,6 +129,7 @@ module.exports = {
'no-dupe-else-if': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-else-return': ['error', { allowElseIf: true }],
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
Expand Down Expand Up @@ -189,34 +190,6 @@ module.exports = {
// as well to lib/.eslintrc.yaml.
'no-restricted-syntax': [
'error',
{
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()',
},
{
selector: "CallExpression[callee.property.name='doesNotThrow']",
message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='doesNotReject']",
message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]",
message: '`assert.rejects()` must be invoked with at least two arguments.',
},
{
selector: "CallExpression[callee.property.name='strictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.strictEqual()',
},
{
selector: "CallExpression[callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
message: 'Use an object as second argument of `assert.throws()`.',
},
{
selector: "CallExpression[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 All @@ -229,22 +202,6 @@ module.exports = {
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
message: 'Use `new` keyword when throwing an `Error`.',
},
{
selector: "CallExpression[callee.property.name='notDeepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='notStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
message: 'The first argument should be the `actual`, not the `expected` value.',
},
{
selector: "CallExpression[callee.name='isNaN']",
message: 'Use Number.isNaN() instead of the global isNaN() function.',
Expand Down
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/3-api-ref-docs-problem.md
@@ -0,0 +1,54 @@
---
name: "\U0001F4D7 Open an issue regarding the Node.js API reference docs"
about: Let us know about any problematic API reference documents
title: "doc: "
labels: doc
---

# 📗 API Reference Docs Problem

<!------------------------------------------------------------------------------
Thank you for wanting to make nodejs.org better!

This template is for issues with the Node.js API reference docs.

For more general support, please open an issue in
our help repo at “https://github.com/nodejs/help”.

For the issue title, enter a one-line summary after “doc: ”.
The “✍️” signifies a request for input. If unsure, do the best you can.

If you found a problem with nodejs.org beyond the API reference docs, please
open an issue in our website repo at “https://github.com/nodejs/nodejs.org”.
------------------------------------------------------------------------------->

<!--
Version: output of “node -v”
Platform: output of “uname -a” (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name
-->

- **Version**: ✍️
- **Platform**: ✍️
- **Subsystem**: ✍️

## Location

_Section of the site where the content exists_

Affected URL(s):
- https://nodejs.org/api/✍️

## Problem description

_Concise explanation of what you found to be problematic_

<!-- If applicable, include any screenshots that may help solve the problem. -->

✍️

---

<!-- Use “[x]” to check the box below if interested in contributing. -->

- [ ] I would like to work on this issue and submit a pull request.
2 changes: 1 addition & 1 deletion .github/workflows/test-linux.yml
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p dots"
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yml
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j8 V=1
run: make build-ci -j8 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
run: make run-ci -j8 V=1 TEST_CI_ARGS="-p dots"
2 changes: 2 additions & 0 deletions BUILDING.md
Expand Up @@ -249,6 +249,8 @@ Installation via Linux package manager can be achieved with:

FreeBSD and OpenBSD users may also need to install `libexecinfo`.

Python 3 users may also need to install `python3-distutils`.

#### macOS prerequisites

* Xcode Command Line Tools >= 10 for macOS
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -31,7 +31,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.2.0">14.2.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.3.0">14.3.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.2.0">14.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.1.0">14.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.0.0">14.0.0</a><br/>
</td>
Expand Down
53 changes: 6 additions & 47 deletions Makefile
Expand Up @@ -295,7 +295,7 @@ v8:
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

.PHONY: jstest
jstest: build-addons build-abort-tests build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests
jstest: build-addons build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
--skip-tests=$(CI_SKIP_TESTS) \
$(CI_JS_SUITES) \
Expand All @@ -319,7 +319,6 @@ test: all ## Runs default tests, linters, and builds docs.
$(MAKE) -s tooltest
$(MAKE) -s test-doc
$(MAKE) -s build-addons
$(MAKE) -s build-abort-tests
$(MAKE) -s build-js-native-api-tests
$(MAKE) -s build-node-api-tests
$(MAKE) -s cctest
Expand All @@ -328,7 +327,6 @@ test: all ## Runs default tests, linters, and builds docs.
.PHONY: test-only
test-only: all ## For a quick test, does not run linter or build docs.
$(MAKE) build-addons
$(MAKE) build-abort-tests
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
$(MAKE) cctest
Expand All @@ -338,7 +336,6 @@ test-only: all ## For a quick test, does not run linter or build docs.
# Used by `make coverage-test`
test-cov: all
$(MAKE) build-addons
$(MAKE) build-abort-tests
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
$(MAKE) cctest
Expand Down Expand Up @@ -458,31 +455,6 @@ test/node-api/.buildstamp: $(ADDONS_PREREQS) \
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
build-node-api-tests: | $(NODE_EXE) test/node-api/.buildstamp

ABORT_BINDING_GYPS := \
$(filter-out test/abort/??_*/binding.gyp, \
$(wildcard test/abort/*/binding.gyp))

ABORT_BINDING_SOURCES := \
$(filter-out test/abort/??_*/*.c, $(wildcard test/abort/*/*.c)) \
$(filter-out test/abort/??_*/*.cc, $(wildcard test/abort/*/*.cc)) \
$(filter-out test/abort/??_*/*.h, $(wildcard test/abort/*/*.h))

# Implicitly depends on $(NODE_EXE), see the build-node-api-tests rule for rationale.
test/abort/.buildstamp: $(ADDONS_PREREQS) \
$(ABORT_BINDING_GYPS) $(ABORT_BINDING_SOURCES) \
src/node_api.h src/node_api_types.h src/js_native_api.h \
src/js_native_api_types.h src/js_native_api_v8.h src/js_native_api_v8_internals.h
@$(call run_build_addons,"$$PWD/test/abort",$@)

.PHONY: build-abort-tests
# .buildstamp needs $(NODE_EXE) but cannot depend on it
# directly because it calls make recursively. The parent make cannot know
# if the subprocess touched anything so it pessimistically assumes that
# .buildstamp is out of date and need a rebuild.
# Just goes to show that recursive make really is harmful...
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
build-abort-tests: | $(NODE_EXE) test/abort/.buildstamp

BENCHMARK_NAPI_BINDING_GYPS := $(wildcard benchmark/napi/*/binding.gyp)

BENCHMARK_NAPI_BINDING_SOURCES := \
Expand All @@ -503,14 +475,12 @@ clear-stalled:
echo $${PS_OUT} | xargs kill -9; \
fi

test-build: | all build-addons build-abort-tests build-js-native-api-tests build-node-api-tests
test-build: | all build-addons build-js-native-api-tests build-node-api-tests

test-build-js-native-api: all build-js-native-api-tests

test-build-node-api: all build-node-api-tests

test-build-abort: all build-abort-tests

.PHONY: test-all
test-all: test-build ## Run default tests with both Debug and Release builds.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release
Expand All @@ -523,7 +493,7 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) test/*

# CI_* variables should be kept synchronized with the ones in vcbuild.bat
CI_NATIVE_SUITES ?= addons js-native-api node-api abort
CI_NATIVE_SUITES ?= addons js-native-api node-api
CI_JS_SUITES ?= default
ifeq ($(node_use_openssl), false)
CI_DOC := doctool
Expand All @@ -535,7 +505,7 @@ endif
# Build and test addons without building anything else
# Related CI job: node-test-commit-arm-fanned
test-ci-native: LOGLEVEL := info
test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/abort/.buildstamp
test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
Expand All @@ -557,7 +527,7 @@ test-ci-js: | clear-stalled
.PHONY: test-ci
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
test-ci: LOGLEVEL := info
test-ci: | clear-stalled build-addons build-abort-tests build-js-native-api-tests build-node-api-tests doc-only
test-ci: | clear-stalled build-addons build-js-native-api-tests build-node-api-tests doc-only
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
Expand Down Expand Up @@ -663,17 +633,8 @@ test-node-api-clean:
$(RM) -r test/node-api/*/build
$(RM) test/node-api/.buildstamp

.PHONY: test-abort
test-abort: test-build-abort
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) test-abort

.PHONY: test-abort-clean
test-abort-clean:
$(RM) -r test/abort/*/build
$(RM) test/abort/.buildstamp

.PHONY: test-addons
test-addons: test-build test-js-native-api test-node-api test-abort
test-addons: test-build test-js-native-api test-node-api
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) addons

.PHONY: test-addons-clean
Expand All @@ -683,7 +644,6 @@ test-addons-clean:
$(RM) test/addons/.buildstamp test/addons/.docbuildstamp
$(MAKE) test-js-native-api-clean
$(MAKE) test-node-api-clean
$(MAKE) test-abort-clean

test-async-hooks:
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) async-hooks
Expand All @@ -692,7 +652,6 @@ test-with-async-hooks:
$(MAKE) build-addons
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
$(MAKE) build-abort-tests
$(MAKE) cctest
NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
$(CI_JS_SUITES) \
Expand Down
27 changes: 23 additions & 4 deletions benchmark/async_hooks/promises.js
Expand Up @@ -2,10 +2,31 @@
const common = require('../common.js');
const { createHook } = require('async_hooks');

let hook;
const tests = {
disabled() {
hook = createHook({
promiseResolve() {}
});
},
enabled() {
hook = createHook({
promiseResolve() {}
}).enable();
},
enabledWithDestroy() {
hook = createHook({
promiseResolve() {},
destroy() {}
}).enable();
}
};

const bench = common.createBenchmark(main, {
n: [1e6],
asyncHooks: [
'enabled',
'enabledWithDestroy',
'disabled',
]
});
Expand All @@ -19,10 +40,8 @@ async function run(n) {
}

function main({ n, asyncHooks }) {
const hook = createHook({ promiseResolve() {} });
if (asyncHooks !== 'disabled') {
hook.enable();
}
if (hook) hook.disable();
tests[asyncHooks]();
bench.start();
run(n).then(() => {
bench.end(n);
Expand Down
7 changes: 3 additions & 4 deletions benchmark/es/spread-bench.js
Expand Up @@ -16,11 +16,10 @@ function makeTest(count, rest) {
return function test(...args) {
assert.strictEqual(count, args.length);
};
} else {
return function test() {
assert.strictEqual(count, arguments.length);
};
}
return function test() {
assert.strictEqual(count, arguments.length);
};
}

function main({ n, context, count, rest, method }) {
Expand Down
3 changes: 1 addition & 2 deletions benchmark/scatter.js
Expand Up @@ -30,9 +30,8 @@ let printHeader = true;
function csvEncodeValue(value) {
if (typeof value === 'number') {
return value.toString();
} else {
return `"${value.replace(/"/g, '""')}"`;
}
return `"${value.replace(/"/g, '""')}"`;
}

(function recursive(i) {
Expand Down
15 changes: 15 additions & 0 deletions benchmark/worker/atomics-wait.js
@@ -0,0 +1,15 @@
'use strict';
/* global SharedArrayBuffer */

const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [1e7]
});

function main({ n }) {
const i32arr = new Int32Array(new SharedArrayBuffer(4));
bench.start();
for (let i = 0; i < n; i++)
Atomics.wait(i32arr, 0, 1); // Will return immediately.
bench.end(n);
}
4 changes: 2 additions & 2 deletions deps/icu-small/README-FULL-ICU.txt
@@ -1,8 +1,8 @@
ICU sources - auto generated by shrink-icu-src.py

This directory contains the ICU subset used by --with-intl=full-icu
It is a strict subset of ICU 66 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt66l.dat.bz2 : compressed data file
It is a strict subset of ICU 67 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt67l.dat.bz2 : compressed data file


To rebuild this directory, see ../../tools/icu/README.md