Skip to content

Commit 073456c

Browse files
Merge pull request #1016 from nodejs/main
Create a new pull request by comparing changes across two branches
2 parents 51fa7c0 + ccf05ef commit 073456c

File tree

384 files changed

+6781
-3622
lines changed

Some content is hidden

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

384 files changed

+6781
-3622
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,8 +1529,8 @@ cpplint: lint-cpp
15291529
# Try with '--system' if it fails without; the system may have set '--user'
15301530
lint-py-build:
15311531
$(info Pip installing ruff on $(shell $(PYTHON) --version)...)
1532-
$(PYTHON) -m pip install --upgrade --target tools/pip/site-packages ruff==0.4.5 || \
1533-
$(PYTHON) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.4.5
1532+
$(PYTHON) -m pip install --upgrade --target tools/pip/site-packages ruff==0.5.2 || \
1533+
$(PYTHON) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.5.2
15341534

15351535
.PHONY: lint-py
15361536
ifneq ("","$(wildcard tools/pip/site-packages/ruff)")
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
const common = require('../common.js');
4+
const bench = common.createBenchmark(main, {
5+
encoding: [
6+
'utf8', 'ascii', 'latin1',
7+
],
8+
len: [1, 8, 16, 32],
9+
n: [1e6],
10+
});
11+
12+
function main({ len, n, encoding }) {
13+
const buf = Buffer.allocUnsafe(len);
14+
const string = Buffer.from('a'.repeat(len)).toString();
15+
bench.start();
16+
for (let i = 0; i < n; ++i) {
17+
buf.write(string, 0, encoding);
18+
}
19+
bench.end(n);
20+
}

benchmark/streams/compose.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use strict';
2+
const common = require('../common.js');
3+
4+
const {
5+
PassThrough,
6+
Readable,
7+
Writable,
8+
compose,
9+
} = require('node:stream');
10+
11+
const bench = common.createBenchmark(main, {
12+
n: [1e3],
13+
});
14+
15+
function main({ n }) {
16+
const cachedPassThroughs = [];
17+
const cachedReadables = [];
18+
const cachedWritables = [];
19+
20+
for (let i = 0; i < n; i++) {
21+
const numberOfPassThroughs = 100;
22+
const passThroughs = [];
23+
24+
for (let i = 0; i < numberOfPassThroughs; i++) {
25+
passThroughs.push(new PassThrough());
26+
}
27+
28+
const readable = Readable.from(['hello', 'world']);
29+
const writable = new Writable({ objectMode: true, write: (chunk, encoding, cb) => cb() });
30+
31+
cachedPassThroughs.push(passThroughs);
32+
cachedReadables.push(readable);
33+
cachedWritables.push(writable);
34+
}
35+
36+
bench.start();
37+
for (let i = 0; i < n; i++) {
38+
const composed = compose(cachedReadables[i], ...cachedPassThroughs[i], cachedWritables[i]);
39+
composed.end();
40+
}
41+
bench.end(n);
42+
}

benchmark/url/url-searchparams-update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function getMethod(url, property) {
1717

1818
function main({ searchParams, property, n }) {
1919
const url = new URL('https://nodejs.org');
20-
if (searchParams === 'true') assert(url.searchParams);
20+
if (searchParams === 'true') assert.ok(url.searchParams);
2121

2222
const method = getMethod(url, property);
2323

common.gypi

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,12 @@
489489
}],
490490
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
491491
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
492-
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
492+
'cflags_cc': [
493+
'-fno-rtti',
494+
'-fno-exceptions',
495+
'-fno-strict-aliasing',
496+
'-std=gnu++20',
497+
],
493498
'defines': [ '__STDC_FORMAT_MACROS' ],
494499
'ldflags': [ '-rdynamic' ],
495500
'target_conditions': [
@@ -620,12 +625,10 @@
620625
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
621626
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
622627
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
628+
'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing
623629
'PREBINDING': 'NO', # No -Wl,-prebind
624630
'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0
625631
'USE_HEADERMAP': 'NO',
626-
'OTHER_CFLAGS': [
627-
'-fno-strict-aliasing',
628-
],
629632
'WARNING_CFLAGS': [
630633
'-Wall',
631634
'-Wendif-labels',

configure.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,6 @@ def configure_v8(o, configs):
16361636
o['variables']['v8_enable_javascript_promise_hooks'] = 1
16371637
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
16381638
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
1639-
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
16401639
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
16411640
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
16421641
o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1

deps/ncrypto/engine.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ EnginePointer EnginePointer::getEngineByName(const std::string_view name,
5858
}
5959
}
6060
}
61-
return std::move(engine);
61+
return engine;
6262
}
6363

6464
bool EnginePointer::setAsDefault(uint32_t flags, CryptoErrorList* errors) {

0 commit comments

Comments
 (0)