RafaelGSS
db7b93fcef
lib: handle all windows reserved driver name
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/721
Refs: https://hackerone.com/reports/3160912
CVE-ID: CVE-2025-27210
2025-07-11 15:37:10 -03:00
Node.js GitHub Bot
3cf7cfb695
test: update WPT for WebCryptoAPI to edd42c005c
...
PR-URL: https://github.com/nodejs/node/pull/57365
Backport-PR-URL: https://github.com/nodejs/node/pull/58589
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-06-11 09:21:24 +02:00
Filip Skokan
f56e62851a
crypto: allow length=0 for HKDF and PBKDF2 in SubtleCrypto.deriveBits
...
PR-URL: https://github.com/nodejs/node/pull/55866
Backport-PR-URL: https://github.com/nodejs/node/pull/58589
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2025-06-11 09:21:24 +02:00
James M Snell
f57765bdcf
test: mark test-without-async-context-frame flaky on windows
...
Refs: https://github.com/nodejs/node/issues/56751
Refs: https://ci.nodejs.org/job/node-test-binary-windows-js-suites/32254/RUN_SUBSET=0,nodes=win2019-COMPILED_BY-vs2022/testReport/(root)/parallel/test_without_async_context_frame/
PR-URL: https://github.com/nodejs/node/pull/56753
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-06-11 09:21:23 +02:00
Shima Ryuhei
cdf3fa241c
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-06-11 09:21:21 +02:00
Kushagra Pandey
bbd5aec785
http2: fix graceful session close
...
Fix issue where session.close() prematurely destroys the session
when response.end() was called with an empty payload while active
http2 streams still existed. This change ensures that sessions are
closed gracefully only after all http2 streams complete and clients
properly receive the GOAWAY frame as per the HTTP/2 spec.
Refs: https://nodejs.org/api/http2.html\#http2sessionclosecallback
PR-URL: https://github.com/nodejs/node/pull/57808
Fixes: https://github.com/nodejs/node/issues/57809
Refs: https://nodejs.org/api/http2.html%5C#http2sessionclosecallback
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-06-11 09:21:19 +02:00
Wiyeong Seo
49e624f554
os: fix netmask format check condition in getCIDR function
...
Modified to check the format of the netmask instead
of just checking that each part of the netmask is even
PR-URL: https://github.com/nodejs/node/pull/57324
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-06-11 09:21:19 +02:00
Luigi Pinca
275ea8e7ef
test: force GC in test-file-write-stream4
...
Reduce `test/parallel/test-file-write-stream4.js` flakiness.
Refs: https://github.com/nodejs/node/pull/57927
PR-URL: https://github.com/nodejs/node/pull/57930
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-06-11 09:21:19 +02:00
Luigi Pinca
da6a13c338
test: deflake test-http2-options-max-headers-block-length
...
The socket can be closed while data is still being written, causing an
`ECONNRESET` error to be emitted on the client. Add a listener for it.
PR-URL: https://github.com/nodejs/node/pull/57959
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-06-11 09:21:19 +02:00
Paolo Insogna
0556f54544
http: correctly translate HTTP method
...
PR-URL: https://github.com/nodejs/node/pull/52701
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-06-11 09:21:18 +02:00
René
56fce6691e
test: prevent extraneous HOSTNAME substitution in test-runner-output
...
PR-URL: https://github.com/nodejs/node/pull/58076
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-06-10 14:32:57 +02:00
Antoine du Hamel
c9c0be5596
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-06-05 11:12:42 +02:00
Stefan Stojanovic
fcd1622fc1
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-06-05 11:12:07 +02:00
Matteo Collina
363bf744ab
worker: flush stdout and stderr on exit
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/56428
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2025-06-05 10:58:13 +02:00
Filip Skokan
39925de8b1
crypto: allow non-multiple of 8 in SubtleCrypto.deriveBits
...
PR-URL: https://github.com/nodejs/node/pull/55296
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-06-05 10:04:41 +02:00
Joyee Cheung
bffd4ec379
test: skip in test-buffer-tostring-rangeerror on allocation failure
...
If the buffer allocation fails due to insufficient memory, there is no
point continue testing toString().
PR-URL: https://github.com/nodejs/node/pull/58415
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-06-05 08:14:58 +02:00
6c57465920
src: fix error handling on async crypto operations
...
Fixes: https://hackerone.com/reports/2817648
Co-Authored-By: Filip Skokan <panva.ip@gmail.com >
Co-Authored-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/688
CVE-ID: CVE-2025-23166
PR-URL: https://github.com/nodejs-private/node-private/pull/710
2025-05-13 12:19:56 -03:00
Node.js GitHub Bot
eb25047b1b
deps: update llhttp to 9.2.0
...
PR-URL: https://github.com/nodejs/node/pull/51719
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-05-07 16:40:26 -03:00
Paolo Insogna
190e45a291
deps: update llhttp to 9.1.2
...
PR-URL: https://github.com/nodejs/node/pull/48981
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
CVE-ID: CVE-2025-23167
2025-05-07 16:40:04 -03:00
Richard Lau
fa93bb2633
test: update parallel/test-tls-dhe for OpenSSL 3.5
...
The output of the `s_client` command invoked by the test has changed
in the OpenSSL 3.5.0 version of `s_client`. Update the test so that
it works with both the old and new output -- the `s_client` binary
being run may not be at the exact same version of OpenSSL as used
by Node.js so the updated test allows either output.
PR-URL: https://github.com/nodejs/node/pull/57477
Refs: https://github.com/openssl/openssl/pull/26734
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-04-16 02:44:35 -03:00
Luigi Pinca
12744c1fd4
test: reduce number of written chunks
...
Reduce chances of write errors while the request is sent.
Refs: https://github.com/nodejs/node/pull/56756
PR-URL: https://github.com/nodejs/node/pull/56757
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
2025-03-06 13:38:18 +01:00
Luigi Pinca
e121d7d62c
test: fix invalid common.mustSucceed() usage
...
By its own nature, the function returned by `common.mustSucceed()`
cannot be used as a listener for `'error'` events.
Write errors like `read ECONNRESET` or `write EPIPE`, should be ignored
because the socket might be closed by the other peer while the request
is sent.
Refs: https://github.com/nodejs/node/commit/3caa2c1a005652fdb3e8
PR-URL: https://github.com/nodejs/node/pull/56756
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-03-06 13:38:18 +01:00
Rich Trott
11b82de7ed
test: use strict mode in global setters test
...
test-global-setters.js was added in
https://github.com/nodejs/node/pull/26882 and hasn't been modified
since. It appears that it avoids strict mode so that unscoped
identifiers are treated as globals, but that's true in strict mode too.
(In sloppy mode, an assignment to an undefined identifier will create a
global, but that's not what this test does. In strict mode, those
assignments will throw an error, which would seem to be what we would
want.)
PR-URL: https://github.com/nodejs/node/pull/56742
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2025-03-06 13:38:18 +01:00
James M Snell
f9d6e35c5e
test: cleanup and simplify test-crypto-aes-wrap
...
* Add comment explaining purpose of the test
* Eliminate duplicative/extraneous buffer allocations
PR-URL: https://github.com/nodejs/node/pull/56748
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-03-06 13:38:17 +01:00
Luigi Pinca
792ce98699
test: do not use common.isMainThread
...
`common.isMainThread` was removed in
https://github.com/nodejs/node/commit/8caa1dcee63b2c6fd7a9 , use the
`isMainThread` export of the `worker_threads` module instead.
PR-URL: https://github.com/nodejs/node/pull/56768
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-03-06 13:38:17 +01:00
Dario Piotrowicz
5e2dab7868
module: fix bad require.resolve with option paths for . and ..
...
this change fixes `require.resolve` used with the `paths` option
not considering `.` and `..` as relative
Fixes: https://github.com/nodejs/node/issues/47000
PR-URL: https://github.com/nodejs/node/pull/56735
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-03-06 13:38:16 +01:00
yamachu
4f0cf475e0
test: add test that uses multibyte for path and resolves modules
...
PR-URL: https://github.com/nodejs/node/pull/56696
Fixes: https://github.com/nodejs/node/issues/56650
Refs: https://github.com/nodejs/node/pull/56657
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-03-06 13:38:16 +01:00
Jonas
3bc8d273c2
test: add missing test for env file
...
PR-URL: https://github.com/nodejs/node/pull/56642
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
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: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:15 +01:00
Rich Trott
ad39367712
test: enforce strict mode in test-zlib-const
...
Instead of checking that assignments fail silently in sloppy mode, check
that they throw in strict mode.
PR-URL: https://github.com/nodejs/node/pull/56689
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:15 +01:00
islandryu
4c24ef8f71
http2: omit server name when HTTP2 host is IP address
...
Fixes: https://github.com/nodejs/node/issues/56189
PR-URL: https://github.com/nodejs/node/pull/56530
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-03-06 13:38:14 +01:00
Meghan Denny
ca79914137
test: test-stream-compose.js doesn't need internals
...
PR-URL: https://github.com/nodejs/node/pull/56619
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:13 +01:00
Maksim Gorkov
52f1f7e22b
child_process: fix parsing messages with splitted length field
...
Fixes: https://github.com/nodejs/node/issues/55834
PR-URL: https://github.com/nodejs/node/pull/56106
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:13 +01:00
Colin Ihrig
d17bf2f62a
test: update test-child-process-bad-stdio to use node:test
...
This commit updates test/parallel/test-child-process-bad-stdio.js
to use node:test. This change prevents multiple child processes
from being spawned in parallel, which can be problematic in the
CI.
PR-URL: https://github.com/nodejs/node/pull/56562
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-03-06 13:38:10 +01:00
Jelle van der Waa
5660b99b43
test: disable openssl 3.4.0 incompatible tests
...
The shake128/shake256 hashing algorithms broke due to an OpenSSL 3.4
incompatible change and now throws an Error.
PR-URL: https://github.com/nodejs/node/pull/56160
Refs: https://github.com/nodejs/node/issues/56159
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-03-06 13:38:10 +01:00
Jelle van der Waa
861c99f351
test: make test-crypto-hash compatible with OpenSSL > 3.4.0
...
OpenSSL 3.4 has a breaking change where the outputLength is now
mandatory for shake* hash algorithms.
https://github.com/openssl/openssl/commit/b911fef216d1386210ec24e201d54d709528abb4
PR-URL: https://github.com/nodejs/node/pull/56160
Refs: https://github.com/nodejs/node/issues/56159
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-03-06 13:38:10 +01:00
Chengzhong Wu
c06ac66356
src: fix undefined script name in error source
...
PR-URL: https://github.com/nodejs/node/pull/56502
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:08 +01:00
sebastianas
597a39b5f9
test: update error code in tls-psk-circuit for for OpenSSL 3.4
...
Update parallel/test-tls-psk-circuit.js to account for error code
changes in OpenSSL 3.4 and probably later.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc >
PR-URL: https://github.com/nodejs/node/pull/56420
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-03-06 13:38:06 +01:00
Colin Ihrig
cfe5380c44
test: update test-set-http-max-http-headers to use node:test
...
This commit updates test/parallel/test-set-http-max-http-headers.js
to use node:test. This test already implemented a test runner, so
it makes sense to use the existing public API.
PR-URL: https://github.com/nodejs/node/pull/56439
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:06 +01:00
Colin Ihrig
51ff71a87a
test: update test-child-process-windows-hide to use node:test
...
This commit updates test/parallel/test-child-process-windows-hide.js
to use node:test. This allows the test to use the built in mocking
functionality instead of managing spies manually. It also prevents
multiple child processes from being spawned in parallel, which can
be problematic in the CI.
PR-URL: https://github.com/nodejs/node/pull/56437
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-03-06 13:38:06 +01:00
Yiyun Lei
82461af6ec
test: migrate message eval tests from Python to JS
...
Migrate the eval tests in the `test/message` folder from Python to JS.
PR-URL: https://github.com/nodejs/node/pull/50482
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-03-06 13:38:04 +01:00
Luigi Pinca
b4b26e973d
test: deflake test-esm-loader-hooks-inspect-brk
...
Refs: https://github.com/nodejs/node/pull/54827
Refs: https://github.com/nodejs/node/pull/51560
PR-URL: https://github.com/nodejs/node/pull/56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-03-06 13:38:02 +01:00
Shima Ryuhei
8af1b53bb8
src: safely remove the last line from dotenv
...
Refs: https://github.com/nodejs/node/issues/55925
PR-URL: https://github.com/nodejs/node/pull/55982
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-03-06 13:38:02 +01:00
Robert Nagy
674b932f33
http: don't emit error after destroy
...
PR-URL: https://github.com/nodejs/node/pull/55457
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2025-03-06 13:38:01 +01:00
Node.js GitHub Bot
d69107f5a8
deps: update icu to 76.1
...
PR-URL: https://github.com/nodejs/node/pull/55551
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-03-06 13:38:01 +01:00
Richard Lau
bb57e909aa
src: remove base64 from process.versions
...
The `base64` dependency was previously removed along with the update
script (`tools/dep_updaters/update-base64.sh`) but the generated header,
`src/base64_version.h` was left behind and `process.versions` was still
listing the last version of `base64` that was included in Node.js before
it was removed
Refs: https://github.com/nodejs/node/pull/52714
PR-URL: https://github.com/nodejs/node/pull/53442
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-03-06 13:38:00 +01:00
Bosco Domingo
b8c89a693e
src: add --env-file-if-exists flag
...
Fixes: https://github.com/nodejs/node/issues/50993
Refs: https://github.com/nodejs/node/issues/51451
test: remove unnecessary comment
src: conform to style guidelines
src: change flag to `--env-file-optional`
test: revert automatic linter changes
doc: fix typos
src: change flag to `--env-file-if-exists`
src: refactor `env_file_data` and `GetEnvFileDataFromArgs`
test: clean up tests
src: print error when file not found
test: remove unnecessary extras
PR-URL: https://github.com/nodejs/node/pull/53060
Backport-PR-URL: https://github.com/nodejs/node/pull/56932
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-03-06 08:57:59 +01:00
Aviv Keller and Cedric Staniewski
9097de073a
src: don't match after -- in Dotenv::GetPathFromArgs
...
Co-Authored-By: Cedric Staniewski <cedric@gmx.ca >
PR-URL: https://github.com/nodejs/node/pull/54237
Backport-PR-URL: https://github.com/nodejs/node/pull/56932
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-03-06 08:57:42 +01:00
Paolo Insogna
73b5c16684
worker: add postMessageToThread
...
PR-URL: https://github.com/nodejs/node/pull/53682
Backport-PR-URL: https://github.com/nodejs/node/pull/57101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-02-20 13:37:44 +01:00
Joyee Cheung
ececd225b6
src: implement IsInsideNodeModules() in C++
...
This previously compiles a script and run it in a new context
to avoid global pollution, which is more complex than necessary
and can be too slow for it to be reused in other cases. The
new implementation just checks the frames in C++ which is safe
from global pollution, faster and simpler.
The previous implementation also had a bug when the call site
is in a ESM, because ESM have URLs as their script names,
which don't start with '/' or '\' and will be skipped. The new
implementation removes the skipping to fix it for ESM.
PR-URL: https://github.com/nodejs/node/pull/55286
Backport-PR-URL: https://github.com/nodejs/node/pull/56927
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Refs: https://github.com/nodejs/node/issues/52697
2025-02-11 11:56:43 +01:00
Joyee Cheung
4fba01911d
process: add process.features.require_module
...
For detecting whether `require(esm)` is supported without triggering
the experimental warning.
PR-URL: https://github.com/nodejs/node/pull/55241
Backport-PR-URL: https://github.com/nodejs/node/pull/56927
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Refs: https://github.com/nodejs/node/issues/52697
2025-02-11 11:56:41 +01:00