43878 Commits

Author SHA1 Message Date
Node.js GitHub Bot
17c65d1900
deps: update simdutf to 6.4.0
PR-URL: https://github.com/nodejs/node/pull/56764
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-04-08 13:28:00 +02:00
Antoine du Hamel
86bfdb5528
build: remove nocorepack vcbuild flag
PR-URL: https://github.com/nodejs/node/pull/57772
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2025-04-08 08:53:00 +00:00
Node.js GitHub Bot
77f88b9485
tools: update doc to new version
PR-URL: https://github.com/nodejs/node/pull/57769
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-08 01:03:17 +00:00
Antoine du Hamel
1540fc6a37
src: improve error handling in node_env_var.cc
PR-URL: https://github.com/nodejs/node/pull/57767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-07 22:37:25 +00:00
Rich Trott
b2ab1a2c41
fs: improve globSync performance
PR-URL: https://github.com/nodejs/node/pull/57725
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-08 00:15:02 +02:00
Dario Piotrowicz
1f7cfb7a36
test: add tests for REPL custom evals
PR-URL: https://github.com/nodejs/node/pull/57691
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-08 00:09:33 +02:00
Shelley Vohr
b9b4cb7731
crypto: remove BoringSSL dh-primes addition
PR-URL: https://github.com/nodejs/node/pull/57023
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-07 23:27:14 +02:00
James M Snell
a369818b1e lib: add defaultValue and name options to AsyncLocalStorage
The upcoming `AsyncContext` specification adds a default value and name
to async storage variables. This adds the same to `AsyncLocalStorage`
to promote closer alignment with the pending spec.

```js
const als = new AsyncLocalStorage({
  name: 'foo',
  defaultValue: 123,
});

console.log(als.name);  // 'foo'
console.log(als.getStore());  // 123
```

Refs: https://github.com/tc39/proposal-async-context/blob/master/spec.html
PR-URL: https://github.com/nodejs/node/pull/57766
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-07 13:41:18 -07:00
James M Snell
4c5341ab73 doc: graduate multiple experimental apis
* events.addAbortListener
* process apis
* util.aborted

PR-URL: https://github.com/nodejs/node/pull/57765
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-07 12:51:30 -07:00
James M Snell
08a7df8337 src: improve error handling in node_http2
PR-URL: https://github.com/nodejs/node/pull/57764
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-07 11:42:36 -07:00
James M Snell
e06a2ad21f src: improve error handing in node_messaging
PR-URL: https://github.com/nodejs/node/pull/57760
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-07 11:41:37 -07:00
James M Snell
588770630d src: improve error handling in crypto_x509
Avoiding use of ToLocalChecked

PR-URL: https://github.com/nodejs/node/pull/57757
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-07 10:45:01 -07:00
James M Snell
a5877d014c src: improve error handling in callback.cc
Avoiding use of v8 `Checked()` APIs where appropriate.
Few other style cleanups

PR-URL: https://github.com/nodejs/node/pull/57758
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-07 10:43:19 -07:00
Trivikram Kamat
b6a10f75b3
doc: explicitly state that corepack will be removed in v25+
PR-URL: https://github.com/nodejs/node/pull/57747
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-07 15:53:54 +00:00
Ethan Arrowood
b85505d450
dns: restore dns query cache ttl
Fixes: https://github.com/nodejs/node/issues/57636

Co-authored-by: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/57640
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-07 11:43:14 +00:00
Yukihiro Hasegawa
a2de5b9150
doc: update position type to integer | null in fs
PR-URL: https://github.com/nodejs/node/pull/57745
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-06 17:30:20 +00:00
James M Snell
93644d5126
src: improve StringBytes error handling
PR-URL: https://github.com/nodejs/node/pull/57706
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-06 17:19:44 +00:00
Remco Haszing
7d45c346bb
doc: allow the $schema property in node.config.json
The documentation states people can use the `$schema` property, but the
JSON schema forbids this. This change allows it.

PR-URL: https://github.com/nodejs/node/pull/57560
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-06 17:19:36 +00:00
Antoine du Hamel
52425d2ee7
doc: update CI instructions
The recent changes made to better protect CI against malicious PRs have
changed how the `Retry` button can be used, it will no longer be
useful when follow up commits were pushed due to the non-matching
commit SHA.

PR-URL: https://github.com/nodejs/node/pull/57743
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-06 14:31:29 +00:00
Antoine du Hamel
33f6e1ea29
test: update expected error message for macOS
PR-URL: https://github.com/nodejs/node/pull/57742
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-06 14:20:04 +00:00
Jason Zhang
8456a12459
watch: check parent and child path properly
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57425
Fixes: https://github.com/nodejs/node/issues/57422
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-06 09:48:53 +02:00
Dario Piotrowicz
8c254658bb
module: improve getPackageType performance
PR-URL: https://github.com/nodejs/node/pull/57599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-04-06 07:47:53 +00:00
Dario Piotrowicz
d7a1565350
module: remove unnecessary readPackage function
PR-URL: https://github.com/nodejs/node/pull/57596
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-04-06 07:47:45 +00:00
Jason Zhang
79eddc613b
src: initialize privateSymbols for per_context
PR-URL: https://github.com/nodejs/node/pull/57479
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-06 07:47:37 +00:00
HEESEUNG
e6a0d77d57
util: fix parseEnv incorrectly splitting multiple ‘=‘ in value
Previously, parseEnv would create multiple environment
variables if a single line contained multiple ‘=‘ characters
(e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }).
This commit ensures that only the first ‘=‘ is used as
the key-value delimiter, and the rest of the line is treated
as the value.

Fixes: https://github.com/nodejs/node/issues/57411
PR-URL: https://github.com/nodejs/node/pull/57421
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-04-06 07:47:28 +00:00
Mert Can Altin
74722a55a6
buffer: define global v8::CFunction objects as const
PR-URL: https://github.com/nodejs/node/pull/57676
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-04-06 01:54:28 +00:00
Dario Piotrowicz
13e3aef053
doc: update example of using await in REPL
Clarify that the lexical scope of `const` is
invalidated when using top-level `await` in REPL.

As part of this change also add tests for the
documented behavior

Fixes: https://github.com/nodejs/node/issues/45918

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Dario Piotrowicz <dario.piotrowicz@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57653
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-05 22:06:45 +00:00
James M Snell
214e3d4aff src: improve error handling in process.env handling
PR-URL: https://github.com/nodejs/node/pull/57707
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-05 11:10:39 -07:00
Antoine du Hamel
f31c88021b build: stop distributing Corepack
PR-URL: https://github.com/nodejs/node/pull/57617
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2025-04-05 08:49:35 -07:00
Michaël Zasso
fb26fa1a43
src: remove unused variable in crypto_x509.cc
PR-URL: https://github.com/nodejs/node/pull/57754
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-05 14:47:23 +00:00
Dario Piotrowicz
e232b4a69a
repl: deprecate repl.builtinModules
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57508
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2025-04-05 13:40:18 +00:00
Ruben Bridgewater
e739559e46
assert,util: improve deep object comparison performance
This improves the performance for almost all objects when comparing
them deeply.

PR-URL: https://github.com/nodejs/node/pull/57648
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-05 08:53:31 +00:00
Aditi
7e43337fdd
src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
Refs: https://github.com/nodejs/node/pull/57578
PR-URL: https://github.com/nodejs/node/pull/57733
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-04-05 01:01:08 +00:00
Gürgün Dayıoğlu
054371dc90
sqlite: add setReturnArrays method to StatementSync
PR-URL: https://github.com/nodejs/node/pull/57542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-04 21:26:52 +00:00
dependabot[bot]
c514e8f781
tools: bump the eslint group in /tools/eslint with 4 updates
Bumps the eslint group in /tools/eslint with 4 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core), [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser), [@stylistic/eslint-plugin-js](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin-js) and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).

Updates `@babel/core` from 7.26.9 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-core)

Updates `@babel/eslint-parser` from 7.26.8 to 7.27.0
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/eslint/babel-eslint-parser)

Updates `@stylistic/eslint-plugin-js` from 3.1.0 to 4.2.0
- [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases)
- [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v4.2.0/packages/eslint-plugin-js)

Updates `eslint-plugin-jsdoc` from 50.6.3 to 50.6.9
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v50.6.3...v50.6.9)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.26.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: "@babel/eslint-parser"
  dependency-version: 7.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: "@stylistic/eslint-plugin-js"
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: eslint
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 50.6.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/57721
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-04 18:49:24 +00:00
Edy Silva
9aa57bf8da
sqlite: enable common flags
PR-URL: https://github.com/nodejs/node/pull/57621
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-04 16:57:43 +00:00
Shima Ryuhei
b1402835a5
http2: skip writeHead if stream is closed
Fixes: https://github.com/nodejs/node/issues/57416
PR-URL: https://github.com/nodejs/node/pull/57686
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-04-04 15:07:09 +00:00
Darshan Sen
e2c8a0f9b8
doc: add back mention of visa fees to onboarding doc
Thanks to the incredible support from the community in
https://github.com/openjs-foundation/cross-project-council/issues/1240
we were able to amend the OpenJS Foundation travel fund policy to now
cover visa costs (even in case the visa is denied).

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57730
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-04 14:28:42 +00:00
Antoine du Hamel
87f8d3c8de
tools: enable linter in test/fixtures/source-map/output
PR-URL: https://github.com/nodejs/node/pull/57700
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-04 15:56:39 +02:00
Antoine du Hamel
caf478b72e
tools: enable linter in test/fixtures/errors
PR-URL: https://github.com/nodejs/node/pull/57701
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-04-04 15:41:48 +02:00
Antoine du Hamel
274898af4c
doc: remove link to QUIC.md
PR-URL: https://github.com/nodejs/node/pull/57729
Fixes: https://github.com/nodejs/node/issues/57252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-04-04 12:53:31 +00:00
Antoine du Hamel
ad07869602
tools: enable linter in test/fixtures/test-runner/output
PR-URL: https://github.com/nodejs/node/pull/57698
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-04-04 10:44:21 +02:00
Antoine du Hamel
633ba0079e
tools: enable linter in test/fixtures/eval
PR-URL: https://github.com/nodejs/node/pull/57699
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-04 10:39:36 +02:00
Yagiz Nizipli
9de01cc4d1
deps: update ada to 3.2.2
PR-URL: https://github.com/nodejs/node/pull/57693
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-04 10:21:01 +02:00
Stefan Stojanovic
32e5e815ef
src: fix kill signal 0 on Windows
This special case was missed in the previous changes to this file.

Refs: https://github.com/nodejs/node/pull/55514
Refs: https://github.com/nodejs/node/issues/42923
Fixes: https://github.com/nodejs/node/issues/57669
PR-URL: https://github.com/nodejs/node/pull/57695
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-04-04 06:52:52 +00:00
Guy Bedford
870dec25f7 esm: support top-level Wasm without package type
PR-URL: https://github.com/nodejs/node/pull/57610
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-03 19:38:40 -07:00
Yaksh Bariya
78e2f99651
doc: process.execve is only unavailable for Windows
execve() call is available on Android as well. When process.execve was
first added, it seems like no one checked if that is actually available
on Android as well and works out of the box as __POSIX__ is defined on
Android. process.execve call seems to behave just as fine as on Linux
environment in my testing, so just make the docs specify it.

PR-URL: https://github.com/nodejs/node/pull/57726
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-04 02:18:28 +00:00
Rafael Gonzaga
24e4a54471
src,permission: make ERR_ACCESS_DENIED more descriptive
This commit also adds a suggestion flag (if exists)
when ERR_ACCESS_DENIED is thrown, so users don't need
to jump into the documentation to see how to manage
that permission error.

PR-URL: https://github.com/nodejs/node/pull/57585
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-03 22:24:39 +00:00
James M Snell
538c813fa3 src: fixup fs SyncCall to propagate errors correctly
Propagate errors correctly in the SyncCall utility.

Previously the test case would trigger a crash.

PR-URL: https://github.com/nodejs/node/pull/57711
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-03 13:42:20 -07:00
Simon Zünd
264d03197e
src: fix inefficient usage of v8_inspector::StringView
v8_inspector::StringView can either be one-byte or two-byte strings.
Node has currently two places where it's unconditionally assumed that
it's a two-byte StringView.

This requires the upstream V8 inspector to unnecessarily create
a copy of the string:

https://source.chromium.org/chromium/chromium/src/+/main:v8/src/inspector/v8-inspector-session-impl.cc;l=192-199;drc=05bacd38e7a31e92afe0fd66081dfa2cc03b934a

This is particularly slow, especially for large CDP messages, as the
serialized JSON is iterated 8-bit char by 8-bit char and each one
widened to a 16-bit char.

This PR introduces a small helper that correctly converts a StringView
to a v8::String instance honoring the "is8Bit" flag. This allows
upstream V8 to remove the unnecessary widening copy.

PR-URL: https://github.com/nodejs/node/pull/52372
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-03 19:38:27 +00:00