Skip to content

Commit 2866fb3

Browse files
Merge pull request #1037 from nodejs/main
Create a new pull request by comparing changes across two branches
2 parents 2ce828c + 746b17e commit 2866fb3

File tree

98 files changed

+3304
-3766
lines changed

Some content is hidden

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

98 files changed

+3304
-3766
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ release.
8989
<a href="doc/changelogs/CHANGELOG_V20.md#20.0.0">20.0.0</a><br/>
9090
</td>
9191
<td valign="top">
92-
<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/>
9394
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.3">18.20.3</a><br/>
9495
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.2">18.20.2</a><br/>
9596
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.1">18.20.1</a><br/>

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ ifeq ($(OSTYPE),os400)
375375
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
376376
endif
377377

378-
node_use_openssl = $(call available-node,"-p" \
379-
"process.versions.openssl != undefined")
378+
node_use_openssl_and_icu = $(call available-node,"-p" \
379+
"process.versions.openssl != undefined && process.versions.icu != undefined")
380380
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
381-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
382-
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)"; \
383383
else \
384384
$(RM) -r test/addons/??_*/; \
385385
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
@@ -535,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
535535
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
536536
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
537537
CI_JS_SUITES ?= $(JS_SUITES) pummel
538-
ifeq ($(node_use_openssl), false)
538+
ifeq ($(node_use_openssl_and_icu), false)
539539
CI_DOC := doctool
540540
else
541541
CI_DOC =
@@ -632,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando
632632

633633
.PHONY: test-doc
634634
test-doc: doc-only lint-md ## Build, lint, and verify the docs.
635-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
636-
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)"; \
637637
else \
638638
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
639639
fi
@@ -749,17 +749,17 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
749749
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
750750

751751
tools/doc/node_modules: tools/doc/package.json
752-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
753-
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)"; \
754754
else \
755755
cd tools/doc && $(call available-node,$(run-npm-ci)) \
756756
fi
757757

758758
.PHONY: doc-only
759759
doc-only: tools/doc/node_modules \
760760
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
761-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
762-
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)"; \
763763
else \
764764
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
765765
fi
@@ -1382,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
13821382
# Note that on the CI `lint-js-ci` is run instead.
13831383
lint-js-doc: LINT_JS_TARGETS=doc
13841384
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
1385-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
1386-
echo "Skipping $@ (no crypto)"; \
1385+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
1386+
echo "Skipping $@ (no crypto and/or no ICU)"; \
13871387
else \
13881388
echo "Running JS linter..."; \
13891389
$(call available-node,$(run-lint-js)) \
Lines changed: 11 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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],
Lines changed: 41 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)