Skip to content

Commit 7b20b8a

Browse files
authored
Merge branch 'nodejs:main' into fix/issue-63473-repl-asm-warning
2 parents 6a9412f + dbec31c commit 7b20b8a

739 files changed

Lines changed: 30236 additions & 6132 deletions

File tree

Some content is hidden

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

.github/label-pr-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ subSystemLabels:
104104
/^lib\/internal\/url\.js$/: whatwg-url
105105
/^lib\/internal\/modules\/esm/: esm
106106
/^lib\/internal\/modules/: module
107+
/^lib\/internal\/source_map/: source maps
107108
/^lib\/internal\/webstreams/: web streams
108109
/^lib\/internal\/test_runner/: test_runner
109110
/^lib\/internal\/v8\//: v8 module
@@ -128,6 +129,8 @@ exlusiveLabels:
128129
/^test\/report\//: test, report
129130
/^test\/fixtures\/es-module/: test, esm
130131
/^test\/es-module\//: test, esm
132+
/^test\/fixtures\/source-map/: test, source maps
133+
/^test\/fixtures\/test-426/: test, source maps
131134
/^test\/fixtures\/wpt\/streams\//: test, web streams
132135
/^test\/fixtures\/typescript/: test, strip-types
133136
/^test\/module-hooks\//: test, module, loaders
@@ -214,6 +217,7 @@ allJsSubSystems:
214217
- url
215218
- util
216219
- v8
220+
- vfs
217221
- vm
218222
- wasi
219223
- worker

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99

1010
jobs:
1111
analyze:
12+
if: github.repository == 'nodejs/node'
1213
name: Analyze
1314
runs-on: ubuntu-slim
1415
permissions:

.github/workflows/commit-lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
pull_request:
55
branches:
66
- main
7-
- v[0-9]+.x-staging
87

98
env:
109
NODE_VERSION: lts/*

.github/workflows/daily.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313

1414
jobs:
1515
build-lto:
16+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
1617
runs-on: ubuntu-24.04-arm
1718
steps:
1819
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/scorecard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ permissions: read-all
2020

2121
jobs:
2222
analysis:
23+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
2324
name: Scorecard analysis
2425
# cannot use ubuntu-slim here because ossf/scorecard-action is dockerized
2526
# cannot use ubuntu-24.04-arm here because the docker image is x86 only

.github/workflows/test-internet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ permissions:
4444

4545
jobs:
4646
test-internet:
47-
if: github.event_name == 'schedule' && github.repository == 'nodejs/node' || github.event.pull_request.draft == false
47+
if: (github.event_name == 'schedule' && github.repository == 'nodejs/node') || (github.event.pull_request && github.event.pull_request.draft == false)
4848
runs-on: ubuntu-24.04-arm
4949
steps:
5050
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

BUILDING.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,11 @@ tarball and/or browse the git repository checked out at the relevant tag.
237237
### Prerequisites
238238

239239
* [A supported version of Python][Python versions] for building and testing.
240-
* A Rust toolchain if [building Node.js with Temporal support](#building-nodejs-with-temporal-support)
241-
is required (enabled by default starting in Node.js 26).
240+
* A Rust toolchain if [building Node.js with Temporal support](#building-nodejs-with-temporal-support).
242241
* Memory: at least 8GB of RAM is typically required when compiling with 4 parallel jobs (e.g: `make -j4`).
243242

244243
### Unix and macOS
245244

246-
Consult the official [Install Rust](https://rust-lang.org/tools/install/)
247-
instructions to install a Rust toolchain, required for Temporal support introduced in Node.js 25.4.0.
248-
Individual packages such as `rust` and `cargo` in some operating system distributions may be considered
249-
as an alternative, for example in CI environments.
250-
Consult with relevant operating system documentation to ensure that packages
251-
meet the minimum version specified in the
252-
[Building Node.js with Temporal support](#building-nodejs-with-temporal-support) section,
253-
as packaged versions may lag behind the `stable` version installed by the official instructions.
254-
Avoid mixing `rustup` together with `rust` and `cargo` package installations, due to
255-
potential version conflicts.
256-
257245
#### Unix prerequisites
258246

259247
* `gcc` and `g++` >= 13.2 or `clang` and `clang++` >= 19.1
@@ -1062,14 +1050,19 @@ enable FIPS support in Node.js.
10621050

10631051
Node.js supports the [Temporal](https://github.com/tc39/proposal-temporal) APIs, when
10641052
linking statically or dynamically with a version of [temporal\_rs](https://github.com/boa-dev/temporal).
1065-
1066-
Temporal support is enabled by default starting in Node.js 26. Building it
1067-
requires a Rust toolchain:
1053+
Building it requires a Rust toolchain:
10681054

10691055
* rustc >= 1.82 (with LLVM >= 19)
10701056
* cargo >= 1.82
10711057

10721058
Refer to [Install Rust](https://rust-lang.org/tools/install/) for instructions.
1059+
Individual packages such as `rust` and `cargo` in some operating system distributions may be considered
1060+
as an alternative, for example in CI environments.
1061+
Consult with relevant operating system documentation to ensure that packages
1062+
meet the minimum version specified above,
1063+
as packaged versions may lag behind the `stable` version installed by the official instructions.
1064+
Avoid mixing `rustup` together with `rust` and `cargo` package installations, due to
1065+
potential version conflicts.
10731066

10741067
If `--v8-enable-temporal-support` and `--v8-disable-temporal-support` are both
10751068
omitted, `configure.py` probes for `cargo` and `rustc`. If either is missing,

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ VERSION=v$(RAWVER)
856856

857857
.PHONY: doc-only
858858
.NOTPARALLEL: doc-only
859-
doc-only: $(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
859+
doc-only: $(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/llms.txt out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
860860

861861
.PHONY: doc
862862
doc: $(NODE_EXE) doc-only ## Build Node.js, and then build the documentation with the new binary.
@@ -901,6 +901,22 @@ $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json &: $(a
901901
fi
902902
endif
903903

904+
out/doc/llms.txt: $(apidoc_sources) tools/doc/node_modules | out/doc
905+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
906+
echo "Skipping $@ (no crypto and/or no ICU)"; \
907+
else \
908+
$(call available-node, \
909+
$(DOC_KIT) generate \
910+
-t llms-txt \
911+
-i doc/api/*.md \
912+
--ignore $(skip_apidoc_files) \
913+
-o $(@D) \
914+
-c ./CHANGELOG.md \
915+
-v $(VERSION) \
916+
--type-map doc/type-map.json \
917+
) \
918+
fi
919+
904920
out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
905921
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
906922
echo "Skipping $@ (no crypto and/or no ICU)"; \

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ When reporting security vulnerabilities, reporters must adhere to the following
8585

8686
4. **Report Quality**
8787
* Provide clear, detailed steps to reproduce the vulnerability.
88+
* Include reproducible code written in JavaScript.
8889
* Include only the minimum proof of concept required to demonstrate the issue.
8990
* Remove any malicious payloads or components that could cause harm.
9091

@@ -376,7 +377,7 @@ the community they pose.
376377
#### Permission Model Boundaries (`--permission`)
377378

378379
The Node.js [Permission Model](https://nodejs.org/api/permissions.html)
379-
(`--experimental-permission`) is an opt-in mechanism that limits which
380+
(`--permission`) is an opt-in mechanism that limits which
380381
resources a Node.js process may access. It is designed to reduce the blast
381382
radius of mistakes in trusted application code, **not** to act as a security
382383
boundary against intentional misuse or a compromised process.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
'use strict';
2+
3+
const common = require('../common.js');
4+
const fs = require('fs');
5+
const path = require('path');
6+
const tmpdir = require('../../test/common/tmpdir');
7+
8+
const bench = common.createBenchmark(main, {
9+
size: [64, 1024, 16384, 262144, 4194304],
10+
content: ['ascii', 'latin1', 'utf8_mixed'],
11+
source: ['path', 'fd'],
12+
n: [3e3],
13+
});
14+
15+
function buildContent(kind, size) {
16+
if (kind === 'ascii') {
17+
return Buffer.alloc(size, 0x61); // 'a'
18+
}
19+
if (kind === 'latin1') {
20+
// 'é' in UTF-8 is 0xC3 0xA9 (2 bytes per char)
21+
const pair = Buffer.from([0xC3, 0xA9]);
22+
const buf = Buffer.alloc(size);
23+
for (let i = 0; i + 2 <= size; i += 2) pair.copy(buf, i);
24+
return buf;
25+
}
26+
if (kind === 'utf8_mixed') {
27+
// mixed ASCII + 3-byte CJK (U+4E2D 中 = E4 B8 AD)
28+
const cjk = Buffer.from([0xE4, 0xB8, 0xAD]);
29+
const buf = Buffer.alloc(size);
30+
let i = 0;
31+
while (i + 4 <= size) {
32+
buf[i++] = 0x61;
33+
cjk.copy(buf, i);
34+
i += 3;
35+
}
36+
return buf;
37+
}
38+
throw new Error('unknown content: ' + kind);
39+
}
40+
41+
function main({ n, size, content, source }) {
42+
tmpdir.refresh();
43+
const file = path.join(tmpdir.path, `bench-${content}-${size}.bin`);
44+
fs.writeFileSync(file, buildContent(content, size));
45+
46+
let arg;
47+
let shouldClose = false;
48+
if (source === 'fd') {
49+
arg = fs.openSync(file, 'r');
50+
shouldClose = true;
51+
} else {
52+
arg = file;
53+
}
54+
55+
bench.start();
56+
for (let i = 0; i < n; i++) {
57+
fs.readFileSync(arg, 'utf8');
58+
}
59+
bench.end(n);
60+
61+
if (shouldClose) fs.closeSync(arg);
62+
}

0 commit comments

Comments
 (0)