Commit Graph

1167 Commits

Author SHA1 Message Date
Filip Skokan
16184633f6
crypto: allow length=0 for HKDF and PBKDF2 in SubtleCrypto.deriveBits
PR-URL: https://github.com/nodejs/node/pull/55866
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>
2024-11-17 13:13:47 +00:00
Jordan Harband
e577618227 util: inspect: enumerable Symbols no longer have square brackets
Implements https://github.com/orgs/nodejs/discussions/41283#discussioncomment-11188239

PR-URL: https://github.com/nodejs/node/pull/55778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-11-17 06:57:37 +00:00
Rafael Gonzaga
bd0c4f80e4
test: fix permission fixtures lint
PR-URL: https://github.com/nodejs/node/pull/55819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-12 17:39:24 +01:00
Rafael Gonzaga
3a0968db43
permission: ignore internalModuleStat on module loading
This improves Permission Model usage when allowing read access to
specifi modules. To achieve that, the permission model check on
internalModuleStat has been removed meaning that on module loading,
uv_fs_stat is performed on files and folders even when the permission
model is enabled. Although a uv_fs_stat is performed, reading/executing
the module will still pass by the permission model check.

Without this PR when an app tries to --allow-fs-read=./a.js
--allow-fs-read=./b.js where `a` attempt to load b, it will fails as
it reads $pwd and no permission has been given to this path.

PR-URL: https://github.com/nodejs/node/pull/55797
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-11-11 17:31:44 +00:00
Rafael Gonzaga
c8e12983ad
test: add buffer to fs_permission tests
PR-URL: https://github.com/nodejs/node/pull/55734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-11-07 21:48:46 +00:00
RedYetiDev
1aa71351fa
test: update performance-timeline wpt
PR-URL: https://github.com/nodejs/node/pull/55197
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2024-11-06 10:59:52 +01:00
Filip Skokan
58a7b0011a
test,crypto: update WebCryptoAPI WPT
PR-URL: https://github.com/nodejs/node/pull/55703
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-05 10:13:52 +00:00
Marco Ippolito
d35cde624f
util: add sourcemap support to getCallSites
PR-URL: https://github.com/nodejs/node/pull/55589
Fixes: https://github.com/nodejs/node/issues/55109
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-11-04 16:06:47 +00:00
Chengzhong Wu
68dc15e400
util: fix util.getCallSites plurality
`util.getCallSite` returns an array of call site objects. Rename the
function to reflect that it returns a given count of frames captured
as an array of call site object.

Renames the first parameter `frames` to be `frameCount` to indicate
that it specifies the count of returned call sites.

PR-URL: https://github.com/nodejs/node/pull/55626
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-11-02 15:24:56 +00:00
Joyee Cheung
3b3a95ac0c module: trim off internal stack frames for require(esm) warnings
Trim off irrelevant internal stack frames for require(esm) warnings
so it's easier to locate where the call comes from when
--trace-warnings is used.

PR-URL: https://github.com/nodejs/node/pull/55496
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-10-29 18:29:27 +01:00
Joyee Cheung
7cb3a662da
module: allow ESM that failed to be required to be re-imported
When a ESM module cannot be loaded by require due to the presence
of TLA, its module status would be stopped at kInstantiated. In
this case, when it's imported again, we should allow it to be
evaluated asynchronously, as it's also a common pattern for users
to retry with dynamic import when require fails.

PR-URL: https://github.com/nodejs/node/pull/55502
Fixes: https://github.com/nodejs/node/issues/55500
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 12:21:22 +00:00
Filip Skokan
c63255b0c0
test,crypto: update WebCryptoAPI WPT
PR-URL: https://github.com/nodejs/node/pull/55512
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-26 07:41:27 +00:00
Jacob Smith
e312d60e3f
module: add findPackageJSON util
PR-URL: https://github.com/nodejs/node/pull/55412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-25 20:40:54 +00:00
Pietro Marchini
025d8ada5f
lib: ensure FORCE_COLOR forces color output in non-TTY environments
PR-URL: https://github.com/nodejs/node/pull/55404
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: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-23 06:51:50 +00:00
devstone
eb63cd24d2
test: update wpt test for webmessaging/broadcastchannel
PR-URL: https://github.com/nodejs/node/pull/55205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-22 06:47:26 +00:00
Filip Skokan
7d0a490d1b
test,crypto: update WebCryptoAPI WPT
PR-URL: https://github.com/nodejs/node/pull/55427
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-10-19 22:14:05 +00:00
Yagiz Nizipli
9f5000e0f2
src: remove icu based ToASCII and ToUnicode
PR-URL: https://github.com/nodejs/node/pull/55156
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-18 16:47:50 +00:00
Aviv Keller
d7a0b56b2c
test: update console wpt
PR-URL: https://github.com/nodejs/node/pull/55192
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-10-18 06:25:48 +00:00
Wei Zhu
c0aebed4b3
esm: fix inconsistency with importAssertion in resolve hook
As the documentation states, the `context.importAssertion` should be
still supported and emit a warning. This is true for the `load` hook,
but not correct for context of the `resolve` hook.

This commit fixes the inconsistency.

PR-URL: https://github.com/nodejs/node/pull/55365
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-15 21:02:07 +02:00
Aviv Keller
9ba339119a
test: update compression wpt
PR-URL: https://github.com/nodejs/node/pull/55191
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-11 19:26:47 +00:00
Antoine du Hamel
f98d9c125c
process: fix process.features.typescript when Amaro is unavailable
PR-URL: https://github.com/nodejs/node/pull/55323
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-11 11:27:16 +00:00
Joyee Cheung
3fb7426f83
module: check --experimental-require-module separately from detection
Previously we assumed if `--experimental-detect-module` is true, then
`--experimental-require-module` is true, which isn't the case, as
the two can be enabled/disabled separately. This patch fixes the
checks so `--no-experimental-require-module` is still effective when
`--experimental-detect-module` is enabled.

Drive-by: make the assertion messages more informative and remove
obsolete TODO about allowing TLA in entrypoints handled by
require(esm).

PR-URL: https://github.com/nodejs/node/pull/55250
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-10-08 20:26:13 +00:00
Joyee Cheung
14353387eb
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
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-10-08 10:19:46 +00:00
Aviv Keller
9a9409ff1f
test_runner: throw on invalid source map
PR-URL: https://github.com/nodejs/node/pull/55055
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-10-06 20:27:32 +00:00
Pietro Marchini
1c7795e52e
test_runner: add cwd option to run
PR-URL: https://github.com/nodejs/node/pull/54705
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-10-03 15:45:49 +00:00
Aviv Keller
1d95b79b66
test: move coverage source map tests to new file
PR-URL: https://github.com/nodejs/node/pull/55123
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-03 13:44:06 +00:00
Guy Bedford
1d5ed725e9 esm: export 'module.exports' on ESM CJS wrapper
PR-URL: https://github.com/nodejs/node/pull/53848
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-02 12:30:23 -07:00
Guy Bedford
d24c7313f7 module: support 'module.exports' interop export in require(esm)
PR-URL: https://github.com/nodejs/node/pull/54563
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-10-01 21:13:03 -07:00
Kevin Toshihiro Uehara
2755551c3c
test: adding more tests for strip-types
PR-URL: https://github.com/nodejs/node/pull/54929
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-10-02 01:23:49 +00:00
Joyee Cheung
33bbf3751b src: fixup Error.stackTraceLimit during snapshot building
When V8 creates a context for snapshot building, it does not
install Error.stackTraceLimit. As a result, error.stack would
be undefined in the snapshot builder script unless users
explicitly initialize Error.stackTraceLimit, which may be
surprising.

This patch initializes Error.stackTraceLimit based on the
value of --stack-trace-limit to prevent the surprise. If
users have modified Error.stackTraceLimit in the builder
script, the modified value would be restored during
deserialization. Otherwise, the fixed up limit would be
deleted since V8 expects to find it unset and re-initialize
it during snapshot deserialization.

PR-URL: https://github.com/nodejs/node/pull/55121
Fixes: https://github.com/nodejs/node/issues/55100
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-09-30 15:05:12 +00:00
Joyee Cheung
65fbc95949 src: parse --stack-trace-limit and use it in --trace-* flags
Previously, --trace-exit and --trace-sync-io doesn't take care
of --stack-trace-limit and always print a stack trace with maximum
size of 10. This patch parses --stack-trace-limit during
initialization and use the value in --trace-* flags.

PR-URL: https://github.com/nodejs/node/pull/55121
Fixes: https://github.com/nodejs/node/issues/55100
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-09-30 15:05:12 +00:00
devstone
371ed85e4e
test: update wpt test for encoding
PR-URL: https://github.com/nodejs/node/pull/55151
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-09-30 14:26:23 +00:00
Aviv Keller
27dab9d916
test_runner: support typescript files in default glob
PR-URL: https://github.com/nodejs/node/pull/55081
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-29 02:47:48 +00:00
Nathan Baulch
28c7394319
test: fix typos
PR-URL: https://github.com/nodejs/node/pull/55063
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-28 13:58:55 +00:00
Aviv Keller
bf11e5793b
test_runner: support custom arguments in run()
PR-URL: https://github.com/nodejs/node/pull/55126
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-28 13:52:04 +00:00
RedYetiDev
772b35bdc4
module: support loading entrypoint as url
Co-Authored-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54933
Refs: https://github.com/nodejs/node/pull/49975
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-27 15:26:48 +08:00
Node.js GitHub Bot
5f78e2c880
deps: update timezone to 2024b
PR-URL: https://github.com/nodejs/node/pull/55056
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-09-26 16:26:59 +00:00
Joyee Cheung
06206af181
module: unflag --experimental-require-module
This unflags --experimental-require-module so require(esm) can be
used without the flag. For now, when require() actually encounters
an ESM, it will still emit an experimental warning. To opt out
of the feature, --no-experimental-require-module can be used.

There are some tests specifically testing ERR_REQUIRE_ESM. Some
of them are repurposed to test --no-experimental-require-module.
Some of them are modified to just expect loading require(esm) to
work, when it's appropriate.

PR-URL: https://github.com/nodejs/node/pull/55085
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-26 14:21:37 +00:00
Antoine du Hamel
aac8ba7bd7
test_runner: fix mocking modules with quote in their URL
PR-URL: https://github.com/nodejs/node/pull/55083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-09-25 17:34:58 +00:00
Joyee Cheung
0b9249e335
module: implement the "module-sync" exports condition
This patch implements a "module-sync" exports condition
for packages to supply a sycnrhonous ES module to the
Node.js module loader, no matter it's being required
or imported. This is similar to the "module" condition
that bundlers have been using to support `require(esm)`
in Node.js, and allows dual-package authors to opt into
ESM-first only newer versions of Node.js that supports
require(esm) while avoiding the dual-package hazard.

```json
{
  "type": "module",
  "exports": {
    "node": {
      // On new version of Node.js, both require() and import get
      // the ESM version
      "module-sync": "./index.js",
      // On older version of Node.js, where "module" and
      // require(esm) are not supported, use the transpiled CJS version
      // to avoid dual-package hazard. Library authors can decide
      // to drop support for older versions of Node.js when they think
      // it's time.
      "default": "./dist/index.cjs"
    },
    // On any other environment, use the ESM version.
    "default": "./index.js"
  }
}
```

We end up implementing a condition with a different name
instead of reusing "module", because existing code in the
ecosystem using the "module" condition sometimes also expect
the module resolution for these ESM files to work in CJS
style, which is supported by bundlers, but the native
Node.js loader has intentionally made ESM resolution
different from CJS resolution (e.g. forbidding `import
'./noext'` or `import './directory'`), so it would be
semver-major to implement a `"module"` condition
without implementing the forbidden ESM resolution rules.
For now, this just implments a new condition as semver-minor
so it can be backported to older LTS.

Refs: https://webpack.js.org/guides/package-exports/#target-environment-independent-packages
PR-URL: https://github.com/nodejs/node/pull/54648
Fixes: https://github.com/nodejs/node/issues/52173
Refs: https://github.com/joyeecheung/test-module-condition
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-09-25 06:35:26 +00:00
Aviv Keller
4f881790e9
test_runner: report error on missing sourcemap source
Co-Authored-By: Jayden Seric <me@jaydenseric.com>
Co-Authored-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55037
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2024-09-23 00:32:06 +00:00
Filip Skokan
0e187e4a21
test,crypto: update WebCryptoAPI WPT
PR-URL: https://github.com/nodejs/node/pull/55029
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-22 13:52:56 +00:00
RedYetiDev
b264cbe5e8 test_runner: use test: symbol on second print of parent test
PR-URL: https://github.com/nodejs/node/pull/54956
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-21 09:38:31 -07:00
Jason Zhang
77ca5ca075 fs: convert to u8 string for filesystem path
PR-URL: https://github.com/nodejs/node/pull/54653
Fixes: https://github.com/nodejs/node/issues/54476
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-21 09:13:19 -07:00
jazelly
d473606040 lib: propagate aborted state to dependent signals before firing events
PR-URL: https://github.com/nodejs/node/pull/54826
Fixes: https://github.com/nodejs/node/issues/54466
Fixes: https://github.com/nodejs/node/issues/54601
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-21 09:07:08 -07:00
Pietro Marchini
0c8c107aaa
test_runner: replace ansi clear with ansi reset
PR-URL: https://github.com/nodejs/node/pull/55013
Fixes: https://github.com/nodejs/node/issues/55009
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-09-21 13:42:14 +00:00
Aviv Keller
9be0057859
test: fix soucre to source
PR-URL: https://github.com/nodejs/node/pull/55038
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-09-21 08:27:56 +00:00
Joyee Cheung
62383cd113 module: implement flushCompileCache()
This implements an API for users to intentionally flush the
accumulated compile cache instead of waiting until process
shutdown. It may be useful for application that loads dependencies
first and then either reload itself in other instances, or spawning
other instances that load an overlapping set of its dependencies -
in this case its useful to flush the cache early instead of waiting
until the shutdown of itself.

Currently flushing is triggered by either process
shutdown or user requests. In the future we should simply start the
writes right after module loading on a separate thread, and this method
only blocks until all the pending writes (if any) on the other thread
are finished. In that case, the off-thread writes should finish long
before any attempt of flushing is made so the method would then only
incur a negligible overhead from thread synchronization.

PR-URL: https://github.com/nodejs/node/pull/54971
Fixes: https://github.com/nodejs/node/issues/54770
Fixes: https://github.com/nodejs/node/issues/54465
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-09-20 19:05:07 +00:00
Marco Ippolito
bb405210c5
test_runner: support typescript module mocking
PR-URL: https://github.com/nodejs/node/pull/54878
Fixes: https://github.com/nodejs/node/issues/54428
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-09-19 13:36:52 +00:00
Antoine du Hamel
be4babb3c2
module: report unfinished TLA in ambiguous modules
PR-URL: https://github.com/nodejs/node/pull/54980
Fixes: https://github.com/nodejs/node/issues/54931
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-09-19 10:34:13 +00:00