Skip to content

Commit

Permalink
Merge tag 'v18.20.2' into node-ios-v18
Browse files Browse the repository at this point in the history
2024-04-10 Node.js v18.20.2 'Hydrogen' (LTS) Release
Git-EVTag-v0-SHA512: d8d90dda98c3ab09d0ce61e146890d54dc01d1a544e86fd6a8bee626b63ccd97ae72c53b8cefb60385d35a769e2ef5b022d9d81212d018e3c128345e3ecdd538
  • Loading branch information
1Conan committed Apr 23, 2024
2 parents fca9e3a + 9aedf16 commit 86fdad9
Show file tree
Hide file tree
Showing 1,356 changed files with 140,783 additions and 160,524 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ module.exports = {
parserOptions: {
babelOptions: {
plugins: [
[
Module._findPath('@babel/plugin-syntax-import-attributes'),
{ deprecatedAssertSyntax: true },
],
Module._findPath('@babel/plugin-syntax-import-attributes'),
],
},
requireConfigFile: false,
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.19.1">18.19.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.20.2">18.20.2</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.1">18.20.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.20.0">18.20.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.19.1">18.19.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.19.0">18.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.18.2">18.18.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.18.1">18.18.1</a><br/>
Expand Down
21 changes: 15 additions & 6 deletions benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ exports.PORT = Number(process.env.PORT) || 12346;

class AutocannonBenchmarker {
constructor() {
const shell = (process.platform === 'win32');
this.name = 'autocannon';
this.executable =
process.platform === 'win32' ? 'autocannon.cmd' : 'autocannon';
const result = child_process.spawnSync(this.executable, ['-h']);
this.present = !(result.error && result.error.code === 'ENOENT');
this.opts = { shell };
this.executable = shell ? 'autocannon.cmd' : 'autocannon';
const result = child_process.spawnSync(this.executable, ['-h'], this.opts);
if (shell) {
this.present = (result.status === 0);
} else {
this.present = !(result.error && result.error.code === 'ENOENT');
}
}

create(options) {
Expand All @@ -27,11 +32,15 @@ class AutocannonBenchmarker {
'-n',
];
for (const field in options.headers) {
args.push('-H', `${field}=${options.headers[field]}`);
if (this.opts.shell) {
args.push('-H', `'${field}=${options.headers[field]}'`);
} else {
args.push('-H', `${field}=${options.headers[field]}`);
}
}
const scheme = options.scheme || 'http';
args.push(`${scheme}://127.0.0.1:${options.port}${options.path}`);
const child = child_process.spawn(this.executable, args);
const child = child_process.spawn(this.executable, args, this.opts);
return child;
}

Expand Down
35 changes: 35 additions & 0 deletions benchmark/vm/compile-script-in-isolate-cache.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
'use strict';

// This benchmarks compiling scripts that hit the in-isolate compilation
// cache (by having the same source).
const common = require('../common.js');
const fs = require('fs');
const vm = require('vm');
const fixtures = require('../../test/common/fixtures.js');
const scriptPath = fixtures.path('snapshot', 'typescript.js');

const bench = common.createBenchmark(main, {
type: ['with-dynamic-import-callback', 'without-dynamic-import-callback'],
n: [100],
});

const scriptSource = fs.readFileSync(scriptPath, 'utf8');

function main({ n, type }) {
let script;
bench.start();
const options = {};
switch (type) {
case 'with-dynamic-import-callback':
// Use a dummy callback for now until we really need to benchmark it.
options.importModuleDynamically = async () => {};
break;
case 'without-dynamic-import-callback':
break;
}
for (let i = 0; i < n; i++) {
script = new vm.Script(scriptSource, options);
}
bench.end(n);
script.runInThisContext();
}
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.28',
'v8_embedder_string': '-node.36',

##### V8 defaults for Node.js #####

Expand Down
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Note that the mix of single and double quotes is intentional,
# as is the fact that the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"
command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
Expand All @@ -23,7 +24,7 @@ except ImportError:
from distutils.spawn import find_executable as which

print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
acceptable_pythons = ((3, 12), (3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
if sys.version_info[:2] in acceptable_pythons:
import configure
else:
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ def check_compiler(o):
if not ok:
warn(f'failed to autodetect C++ compiler version (CXX={CXX})')
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (8, 3, 0):
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 10.1.0 or clang++ 8.0.0')
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 8.3.0 or clang++ 8.0.0')

ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
Expand Down
Loading

0 comments on commit 86fdad9

Please sign in to comment.