Commit Graph
39070 Commits
Author SHA1 Message Date
Rafael Gonzaga a8d5c16a2a doc: include experimental features assessment
PR-URL: https://github.com/nodejs/node/pull/48824
Refs: https://github.com/nodejs-private/node-private/issues/420
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-26 20:32:24 +01:00
Node.js GitHub Bot 6059b59018 deps: update zlib to 1.2.13.1-motley-61dc0bd
PR-URL: https://github.com/nodejs/node/pull/48788
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-11-26 20:32:24 +01:00
Livia Medeiros ae8bb162b4 fs: remove redundant nullCheck
PR-URL: https://github.com/nodejs/node/pull/48826
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-26 20:32:24 +01:00
Jason 97d87495c7 src: remove unnecessary temporary creation
PR-URL: https://github.com/nodejs/node/pull/48734
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-26 20:32:23 +01:00
Michael Dawson e6d8735e2b doc: add new TSC members
Refs: https://github.com/nodejs/TSC/issues/1411
Refs: https://github.com/nodejs/TSC/issues/1410

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/48841
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-26 20:32:23 +01:00
Michael Dawson d4fe00d0c7 doc: refactor node-api support matrix
- refactor table so that it does not grow for
  every new version of Node.js
- refer to latest version of table as the canonical
  reference
- add info for Node-API v9

Refs: https://github.com/nodejs/node/issues/48277

Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/48774
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-26 20:32:23 +01:00
Jan Olaf Krems f5384c3262 src: fix nullptr access on realm
Adding the per-realm binding data tracking introduced a call to a realm
method when realm was potentially null. This is triggered whenever the
function is called from `ContextifyContext::New` which passes `nullptr`
as the `realm`.

PR-URL: https://github.com/nodejs/node/pull/48802
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-26 20:32:23 +01:00
Deokjin Kim 629132d84c doc: declare path on example of async_hooks.executionAsyncId()
Example is not runnable because `path` is used, but it's not
declared.

PR-URL: https://github.com/nodejs/node/pull/48556
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-26 20:32:23 +01:00
Node.js GitHub Bot f7d6e9ba43 tools: update lint-md-dependencies to @rollup/plugin-commonjs@25.0.3
PR-URL: https://github.com/nodejs/node/pull/48791
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-11-26 20:32:22 +01:00
Chemi Atlow f62b24276c meta: add mailmap entry for atlowChemi
PR-URL: https://github.com/nodejs/node/pull/48810
Refs: https://github.com/nodejs/node/pull/48806
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-26 20:32:22 +01:00
Jason dfd368ac9f doc: remove the . in the end to reduce confusing
PR-URL: https://github.com/nodejs/node/pull/48719
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-11-26 20:32:22 +01:00
Yagiz Nizipli 2441415c68 url: reduce pathToFileURL cpp calls
PR-URL: https://github.com/nodejs/node/pull/48709
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-26 20:32:22 +01:00
Rafael Gonzaga 74d8f96413 doc: nodejs-social over nodejs/tweet
PR-URL: https://github.com/nodejs/node/pull/48769
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-11-26 20:32:22 +01:00
Jason 358273d77f src: remove OnScopeLeaveImpl's move assignment overload
... as it's not valid implementation and also has not been used

PR-URL: https://github.com/nodejs/node/pull/48732
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-26 20:32:21 +01:00
Node.js GitHub Bot e455dd4003 deps: update googletest to cc36671
PR-URL: https://github.com/nodejs/node/pull/48789
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-11-26 20:32:21 +01:00
Jordan Harband e08fd98bcc bootstrap: use correct descriptor for Symbol.{dispose,asyncDispose}
Followup to #48518; fixes #48699

PR-URL: https://github.com/nodejs/node/pull/48703
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-26 20:32:21 +01:00
Benjamin Gruenbaum 67925bb914 test: add Symbol.dispose support to mock timers
PR-URL: https://github.com/nodejs/node/pull/48549
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
2023-11-26 19:34:21 +01:00
Keyhan Vakil 7f68e14ea2 child_process: improve spawn performance on Linux
Speed up child_process.spawn by enabling the new V8 build flag which
makes fork/exec faster.

Here are the results of running the existing benchmark. Note that this
optimization helps more for applications with larger heaps, so this is
somewhat of an underestimate of the real world performance benefits.

```console
$ ./node benchmark/compare.js --runs 15 \
        --new ./node \
        --old ~/node-v20/out/Release/node \
        --filter params child_process > cpr
$ node-benchmark-compare cpr
                                 confidence improvement  (***)
methodName='exec' n=1000                ***     60.84 % ±5.43%
methodName='execFile' n=1000            ***     53.72 % ±3.33%
methodName='execFileSync' n=1000        ***      9.10 % ±0.84%
methodName='execSync' n=1000            ***     10.44 % ±0.97%
methodName='spawn' n=1000               ***     53.10 % ±2.90%
methodName='spawnSync' n=1000           ***      8.64 % ±1.22%

  0.01 false positives, when considering a 0.1% risk acceptance (***)
```

Fixes: https://github.com/nodejs/node/issues/25382
Fixes: https://github.com/nodejs/node/issues/14917
Refs: https://github.com/nodejs/performance/issues/93
Refs: https://github.com/nodejs/performance/issues/89
PR-URL: https://github.com/nodejs/node/pull/48523
Backport-PR-URL: https://github.com/nodejs/node/pull/50098
Refs: https://github.com/v8/v8/commit/1a782f6543ae999bf9e497e23042af0b70191f10
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-11-26 19:29:17 +01:00
Keyhan Vakil 747fbb49ca deps: V8: cherry-pick 1a782f6543ae
Original commit message:

    [base] add build flag to use MADV_DONTFORK

    Embedders like Node.js and Electron expose fork(2)/execve(2) to their
    users. Unfortunately when the V8 heap is very large, these APIs become
    rather slow on Linux, due to the kernel needing to do all the
    bookkeeping for the forked process (in clone's dup_mmap and execve's
    exec_mmap). Of course, this is useless because the forked child thread
    will never actually need to access the V8 heap.

    Add a new build flag v8_enable_private_mapping_fork_optimization which
    marks all pages allocated by OS::Allocate as MADV_DONTFORK. This
    improves the performance of Node.js's fork/execve combination by 10x on
    a 600 MB heap.

    Fixed: v8:7381
    Change-Id: Ib649f774d4a932b41886313ce89acc369923699d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4602858
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#88447}

Refs: https://github.com/v8/v8/commit/1a782f6543ae999bf9e497e23042af0b70191f10
PR-URL: https://github.com/nodejs/node/pull/48523
Backport-PR-URL: https://github.com/nodejs/node/pull/50098
Fixes: https://github.com/nodejs/node/issues/25382
Fixes: https://github.com/nodejs/node/issues/14917
Refs: https://github.com/nodejs/performance/issues/93
Refs: https://github.com/nodejs/performance/issues/89
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-11-26 19:29:10 +01:00
Moshe Atlow a98addb626 tools: skip ruff on tools/node_modules
PR-URL: https://github.com/nodejs/node/pull/49838
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-11-23 10:53:45 +01:00
Geoffrey Booth 00c08539b6 test: fix edge snapshot stack traces
PR-URL: https://github.com/nodejs/node/pull/49659
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-11-23 10:53:41 +01:00
Antoine du Hamel 48f6d9a975 test: refactor test-node-output-errors
The main reason is to not have the test fail if the CWD contains some
special URL chars.

PR-URL: https://github.com/nodejs/node/pull/48992
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-11-23 10:53:32 +01:00
Antoine du Hamel e96f7ef881 vm: use import attributes instead of import assertions
The old import assertions proposal has been
renamed to "import attributes" with the following major changes:

1. The keyword is now `with` instead of `assert`.
2. Unknown assertions cause an error rather than being ignored.

This PR updates the documentation to encourage folks to use the new
syntax, and add aliases to preserve backward compatibility.

PR-URL: https://github.com/nodejs/node/pull/50141
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-11-23 10:53:22 +01:00
Antoine du Hamel c1a8ae38c0 test: deflake test-loaders-workers-spawned
PR-URL: https://github.com/nodejs/node/pull/50251
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/50247
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-23 10:53:06 +01:00
Antoine du Hamel d5cc5d7956 test: deflake test-esm-loader-resolve-type
PR-URL: https://github.com/nodejs/node/pull/50273
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/50040
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-11-23 10:52:56 +01:00
Antoine du Hamel 92734d4480 esm: use import attributes instead of import assertions
The old import assertions proposal has been
renamed to "import attributes" with the follwing major changes:

1. The keyword is now `with` instead of `assert`.
2. Unknown assertions cause an error rather than being ignored,

This commit updates the documentation to encourage folks to use the new
syntax, and add aliases for module customization hooks.

PR-URL: https://github.com/nodejs/node/pull/50140
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/50134
Refs: https://github.com/v8/v8/commit/159c82c5e6392e78b9bba7161b1bed6e23758984
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-11-23 10:52:48 +01:00
Node.js GitHub Bot 6cf8dd95d1 tools: update eslint to 8.51.0
PR-URL: https://github.com/nodejs/node/pull/50084
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-23 10:52:29 +01:00
Node.js GitHub Bot b8d2a29ff5 tools: update eslint to 8.50.0
PR-URL: https://github.com/nodejs/node/pull/49989
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-23 10:52:26 +01:00
Node.js GitHub Bot 1c1cbf06f0 tools: update eslint to 8.49.0
PR-URL: https://github.com/nodejs/node/pull/49586
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-23 10:52:24 +01:00
Node.js GitHub Bot 92d21864c5 tools: update eslint to 8.48.0
PR-URL: https://github.com/nodejs/node/pull/49343
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-11-23 10:52:22 +01:00
Node.js GitHub Bot 0940de36ee tools: update eslint to 8.47.0
PR-URL: https://github.com/nodejs/node/pull/49124
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-11-23 10:52:20 +01:00
Node.js GitHub Bot 4880a05fa2 tools: update eslint to 8.46.0
PR-URL: https://github.com/nodejs/node/pull/48966
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-11-23 10:52:18 +01:00
Node.js GitHub Bot e9632454cd tools: update eslint to 8.45.0
PR-URL: https://github.com/nodejs/node/pull/48793
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-11-23 10:52:17 +01:00
Geoffrey Booth c3c945e654 esm: bypass CommonJS loader under --default-type
PR-URL: https://github.com/nodejs/node/pull/49986
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-23 10:52:13 +01:00
João Lenon a67fa2a107 util: add getCwdSafe internal util fn
This function was first implemented in #46826, but at some point
of the PR implementation this fn was no longer related to the PR.

Refs: https://github.com/nodejs/node/pull/46826#discussion_r1225431178
PR-URL: https://github.com/nodejs/node/pull/48434
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-23 10:52:03 +01:00
Geoffrey Booth fe691984b2 esm: unflag extensionless javascript and wasm in module scope
PR-URL: https://github.com/nodejs/node/pull/49974
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-11-23 10:51:52 +01:00
Geoffrey Booth 56bd9a88ac esm: --experimental-default-type flag to flip module defaults
PR-URL: https://github.com/nodejs/node/pull/49869
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-11-23 10:51:31 +01:00
Antoine du HamelandGeoffrey Booth 72644d62e7 esm: improve JSDoc annotation of internal functions
Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: https://github.com/nodejs/node/pull/49959
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-11-23 10:51:20 +01:00
Geoffrey Booth 8c55f317a3 module: move helpers out of cjs loader
PR-URL: https://github.com/nodejs/node/pull/49912
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-23 10:51:10 +01:00
Geoffrey Booth 97579895f2 module, esm: jsdoc for modules files
PR-URL: https://github.com/nodejs/node/pull/49523
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-23 10:51:02 +01:00
Geoffrey Booth 957725f601 esm: require braces for modules code
PR-URL: https://github.com/nodejs/node/pull/49657
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-11-23 10:50:35 +01:00
Yagiz Nizipli fe26f8a860 lib: merge cjs and esm package json reader caches
PR-URL: https://github.com/nodejs/node/pull/48477
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-11-23 10:50:24 +01:00
Antoine du Hamel c12685f82d esm: fix cache collision on JSON files using file: URL
PR-URL: https://github.com/nodejs/node/pull/49887
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/49724
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-11-23 10:50:11 +01:00
Jacob Smith ed8dd33493 esm: identify parent importing a url with invalid host
PR-URL: https://github.com/nodejs/node/pull/49736
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-11-23 10:50:01 +01:00
Antoine du Hamel 73a7e00d06 doc: add missing history info for import.meta.resolve
PR-URL: https://github.com/nodejs/node/pull/49700
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-11-23 10:49:51 +01:00
Antoine du Hamel 46d730ab75 esm: fix return type of import.meta.resolve
PR-URL: https://github.com/nodejs/node/pull/49698
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Fixes: https://github.com/nodejs/node/issues/49695
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2023-11-23 10:49:43 +01:00
Geoffrey Booth 12cb700478 esm: update loaders warning
PR-URL: https://github.com/nodejs/node/pull/49633
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2023-11-23 10:49:35 +01:00
Antoine du Hamel 47193a347e esm: fix support for URL instances in register
PR-URL: https://github.com/nodejs/node/pull/49655
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-23 10:49:23 +01:00
Daniel Compton 51ced0f1a1 esm: clarify ERR_REQUIRE_ESM errors
In #39175, better ESM errors were introduced. This commit tweaks the
language in the error slightly to make it clear that there are three
different options to resolve the error.

Refs: https://github.com/nodejs/node/pull/39175
PR-URL: https://github.com/nodejs/node/pull/49521
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-11-23 10:49:12 +01:00
Antoine du Hamel 866d646b0e test: increase coverage of Module.register and initialize hook
PR-URL: https://github.com/nodejs/node/pull/49532
Backport-PR-URL: https://github.com/nodejs/node/pull/50669
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-23 10:49:02 +01:00