Skip to content

Commit c31e7e5

Browse files
committed
Merge remote-tracking branch 'upstream/main' into sdghjfsjghafjhkfs
2 parents a1009cb + bdaa898 commit c31e7e5

File tree

595 files changed

+49612
-24087
lines changed

Some content is hidden

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

595 files changed

+49612
-24087
lines changed

.github/workflows/commit-queue.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ jobs:
3838
--base ${{ github.ref_name }} \
3939
--label 'commit-queue' \
4040
--json 'number' \
41-
--search "created:<=$(date --date="2 days ago" +"%Y-%m-%dT%H:%M:%S%z")" \
41+
--search "created:<=$(date --date="2 days ago" +"%Y-%m-%dT%H:%M:%S%z") -label:blocked" \
4242
-t '{{ range . }}{{ .number }} {{ end }}' \
4343
--limit 100)
4444
fast_track_prs=$(gh pr list \
4545
--repo ${{ github.repository }} \
4646
--base ${{ github.ref_name }} \
4747
--label 'commit-queue' \
4848
--label 'fast-track' \
49+
--search "-label:blocked" \
4950
--json 'number' \
5051
-t '{{ range . }}{{ .number }} {{ end }}' \
5152
--limit 100)

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ release.
3838
<th title="LTS Until 2025-04"><a href="doc/changelogs/CHANGELOG_V18.md">18</a> (LTS)</th>
3939
</tr>
4040
<tr>
41-
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a></b><br/>
41+
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a></b><br/>
42+
<a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a><br/>
4243
<a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a><br/>
4344
</td>
4445
<td valign="top">
@@ -88,7 +89,8 @@ release.
8889
<a href="doc/changelogs/CHANGELOG_V20.md#20.0.0">20.0.0</a><br/>
8990
</td>
9091
<td valign="top">
91-
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.20.4">18.20.4</a></b><br/>
92+
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.20.5">18.20.5</a></b><br/>
93+
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.4">18.20.4</a><br/>
9294
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.3">18.20.3</a><br/>
9395
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.2">18.20.2</a><br/>
9496
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.1">18.20.1</a><br/>

LICENSE

+29-1
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,34 @@ The externally maintained libraries used by Node.js are:
797797

798798
----------------------------------------------------------------------
799799

800+
JSON parsing library (nlohmann/json)
801+
802+
File: vendor/json/upstream/single_include/nlohmann/json.hpp (only for ICU4C)
803+
804+
MIT License
805+
806+
Copyright (c) 2013-2022 Niels Lohmann
807+
808+
Permission is hereby granted, free of charge, to any person obtaining a copy
809+
of this software and associated documentation files (the "Software"), to deal
810+
in the Software without restriction, including without limitation the rights
811+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
812+
copies of the Software, and to permit persons to whom the Software is
813+
furnished to do so, subject to the following conditions:
814+
815+
The above copyright notice and this permission notice shall be included in all
816+
copies or substantial portions of the Software.
817+
818+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
819+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
820+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
821+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
822+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
823+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
824+
SOFTWARE.
825+
826+
----------------------------------------------------------------------
827+
800828
File: aclocal.m4 (only for ICU4C)
801829
Section: pkg.m4 - Macros to locate and utilise pkg-config.
802830

@@ -834,7 +862,7 @@ The externally maintained libraries used by Node.js are:
834862

835863
This file is free software; you can redistribute it and/or modify it
836864
under the terms of the GNU General Public License as published by
837-
the Free Software Foundation; either version 3 of the License, or
865+
the Free Software Foundation, either version 3 of the License, or
838866
(at your option) any later version.
839867

840868
This program is distributed in the hope that it will be useful, but

Makefile

+20-15
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ with-code-cache test-code-cache:
171171
$(warning '$@' target is a noop)
172172

173173
out/Makefile: config.gypi common.gypi node.gyp \
174-
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
175-
deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
174+
deps/*/*.gyp \
176175
tools/v8_gypfiles/toolchain.gypi \
177176
tools/v8_gypfiles/features.gypi \
178177
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
@@ -376,11 +375,11 @@ ifeq ($(OSTYPE),os400)
376375
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
377376
endif
378377

379-
node_use_openssl = $(call available-node,"-p" \
380-
"process.versions.openssl != undefined")
378+
node_use_openssl_and_icu = $(call available-node,"-p" \
379+
"process.versions.openssl != undefined && process.versions.icu != undefined")
381380
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
382-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
383-
echo "Skipping .docbuildstamp (no crypto)"; \
381+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
382+
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
384383
else \
385384
$(RM) -r test/addons/??_*/; \
386385
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
@@ -536,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
536535
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
537536
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
538537
CI_JS_SUITES ?= $(JS_SUITES) pummel
539-
ifeq ($(node_use_openssl), false)
538+
ifeq ($(node_use_openssl_and_icu), false)
540539
CI_DOC := doctool
541540
else
542541
CI_DOC =
@@ -633,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando
633632

634633
.PHONY: test-doc
635634
test-doc: doc-only lint-md ## Build, lint, and verify the docs.
636-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
637-
echo "Skipping test-doc (no crypto)"; \
635+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
636+
echo "Skipping test-doc (no crypto and/or no ICU)"; \
638637
else \
639638
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
640639
fi
@@ -750,17 +749,17 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
750749
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
751750

752751
tools/doc/node_modules: tools/doc/package.json
753-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
754-
echo "Skipping tools/doc/node_modules (no crypto)"; \
752+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
753+
echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
755754
else \
756755
cd tools/doc && $(call available-node,$(run-npm-ci)) \
757756
fi
758757

759758
.PHONY: doc-only
760759
doc-only: tools/doc/node_modules \
761760
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
762-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
763-
echo "Skipping doc-only (no crypto)"; \
761+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
762+
echo "Skipping doc-only (no crypto and/or no ICU)"; \
764763
else \
765764
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
766765
fi
@@ -1383,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
13831382
# Note that on the CI `lint-js-ci` is run instead.
13841383
lint-js-doc: LINT_JS_TARGETS=doc
13851384
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
1386-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
1387-
echo "Skipping $@ (no crypto)"; \
1385+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
1386+
echo "Skipping $@ (no crypto and/or no ICU)"; \
13881387
else \
13891388
echo "Running JS linter..."; \
13901389
$(call available-node,$(run-lint-js)) \
@@ -1414,6 +1413,11 @@ LINT_CPP_EXCLUDE += $(LINT_CPP_ADDON_DOC_FILES)
14141413
# These files were copied more or less verbatim from V8.
14151414
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h
14161415

1416+
# deps/ncrypto is included in this list, as it is maintained in
1417+
# this repository, and should be linted. Eventually it should move
1418+
# to its own repo, at which point we should remove it from this list.
1419+
LINT_CPP_DEPS = deps/ncrypto/*.cc deps/ncrypto/*.h
1420+
14171421
LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
14181422
benchmark/napi/*/*.cc \
14191423
src/*.c \
@@ -1438,6 +1442,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
14381442
tools/code_cache/*.h \
14391443
tools/snapshot/*.cc \
14401444
tools/snapshot/*.h \
1445+
$(LINT_CPP_DEPS) \
14411446
))
14421447

14431448
FORMAT_CPP_FILES ?=
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const { test } = require('node:test');
2+
3+
test('should pass', () => {});
4+
test('should fail', () => { throw new Error('fail'); });
5+
test('should skip', { skip: true }, () => {});
6+
test('parent', (t) => {
7+
t.test('should fail', () => { throw new Error('fail'); });
8+
t.test('should pass but parent fail', (t, done) => {
9+
setImmediate(done);
10+
});
11+
});

benchmark/fs/bench-opendirSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tmpdir.refresh();
88

99
const testFiles = fs.readdirSync('test', { withFileTypes: true })
1010
.filter((f) => f.isDirectory())
11-
.map((f) => path.join(f.path, f.name));
11+
.map((f) => path.join(f.parentPath, f.name));
1212
const bench = common.createBenchmark(main, {
1313
type: ['existing', 'non-existing'],
1414
n: [1e3],

benchmark/test_runner/mock-fn.js

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const assert = require('node:assert');
5+
const { test } = require('node:test');
6+
7+
const bench = common.createBenchmark(main, {
8+
n: [1e6],
9+
mode: ['define', 'execute'],
10+
}, {
11+
// We don't want to test the reporter here
12+
flags: ['--test-reporter=./benchmark/fixtures/empty-test-reporter.js'],
13+
});
14+
15+
const noop = () => {};
16+
17+
function benchmarkDefine(n) {
18+
let noDead;
19+
test((t) => {
20+
bench.start();
21+
for (let i = 0; i < n; i++) {
22+
noDead = t.mock.fn(noop);
23+
}
24+
bench.end(n);
25+
assert.ok(noDead);
26+
});
27+
}
28+
29+
function benchmarkExecute(n) {
30+
let noDead;
31+
test((t) => {
32+
const mocked = t.mock.fn(noop);
33+
bench.start();
34+
for (let i = 0; i < n; i++) {
35+
noDead = mocked();
36+
}
37+
bench.end(n);
38+
assert.strictEqual(noDead, noop());
39+
});
40+
}
41+
42+
function main({ n, mode }) {
43+
if (mode === 'define') {
44+
benchmarkDefine(n);
45+
} else if (mode === 'execute') {
46+
benchmarkExecute(n);
47+
}
48+
}
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const { run } = require('node:test');
5+
const reporters = require('node:test/reporters');
6+
const { Readable } = require('node:stream');
7+
const assert = require('node:assert');
8+
9+
const bench = common.createBenchmark(main, {
10+
n: [1e4],
11+
reporter: Object.keys(reporters),
12+
});
13+
14+
// No need to run this for every benchmark,
15+
// it should always be the same data.
16+
const stream = run({
17+
files: ['../fixtures/basic-test-runner.js'],
18+
});
19+
let testResults;
20+
21+
async function main({ n, reporter: r }) {
22+
testResults ??= await stream.toArray();
23+
24+
// Create readable streams for each iteration
25+
const readables = Array.from({ length: n }, () => Readable.from(testResults));
26+
27+
// Get the selected reporter
28+
const reporter = reporters[r];
29+
30+
bench.start();
31+
32+
let noDead;
33+
for (const readable of readables) {
34+
// Process each readable stream through the reporter
35+
noDead = await readable.compose(reporter).toArray();
36+
}
37+
38+
bench.end(n);
39+
40+
assert.ok(noDead);
41+
}

deps/cares/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
1212
INCLUDE (CheckStructHasMember)
1313
INCLUDE (CheckLibraryExists)
1414

15-
PROJECT (c-ares LANGUAGES C VERSION "1.34.2" )
15+
PROJECT (c-ares LANGUAGES C VERSION "1.34.3" )
1616

1717
# Set this version before release
1818
SET (CARES_VERSION "${PROJECT_VERSION}")
@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
3030
# For example, a version of 4:0:2 would generate output such as:
3131
# libname.so -> libname.so.2
3232
# libname.so.2 -> libname.so.2.2.0
33-
SET (CARES_LIB_VERSIONINFO "21:1:19")
33+
SET (CARES_LIB_VERSIONINFO "21:2:19")
3434

3535

3636
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -263,7 +263,7 @@ ENDIF ()
263263
# Set system-specific compiler flags
264264
IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
265265
LIST (APPEND SYSFLAGS -D_DARWIN_C_SOURCE)
266-
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
266+
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
267267
LIST (APPEND SYSFLAGS -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700)
268268
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
269269
LIST (APPEND SYSFLAGS -D__EXTENSIONS__ -D_REENTRANT -D_XOPEN_SOURCE=600)

0 commit comments

Comments
 (0)