Raz Luvaton
ee391f3781
test_runner: add __proto__ null
...
PR-URL: https://github.com/nodejs/node/pull/48663
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-29 13:22:16 +00:00
Antoine du Hamel
42b5711d0b
test: fix es-module/test-esm-initialization
...
PR-URL: https://github.com/nodejs/node/pull/48880
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-29 09:51:10 +00:00
Matteo Bianchi
8f0f17e1e3
doc: improved joinDuplicateHeaders definition
...
PR-URL: https://github.com/nodejs/node/pull/48859
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-28 10:47:29 +00:00
Moshe Atlow
48345d0f62
watch: decrease debounce rate
...
PR-URL: https://github.com/nodejs/node/pull/48926
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2023-07-27 20:39:14 +00:00
Moshe Atlow
b814de6d77
watch: use debounce instead of throttle
...
PR-URL: https://github.com/nodejs/node/pull/48926
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2023-07-27 20:39:13 +00:00
Deokjin Kim
761f5681c8
doc: fix second parameter name of events.addAbortListener
...
Second parameter name is described as `listener`(not resource)
in below line.
PR-URL: https://github.com/nodejs/node/pull/48922
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-07-27 15:10:48 +00:00
Rafael Gonzaga
b907815fbc
lib,permission: drop repl autocomplete when pm enabled
...
PR-URL: https://github.com/nodejs/node/pull/48920
Fixes: https://github.com/nodejs/node/issues/48884
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-07-27 12:31:20 +00:00
Rafael Gonzaga
0da3f61a19
benchmark: add pm startup benchmark
...
PR-URL: https://github.com/nodejs/node/pull/48905
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-07-26 22:37:56 +00:00
Antoine du Hamel
053511f7ec
module: ensure successful import returns the same result
...
PR-URL: https://github.com/nodejs/node/pull/46662
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-07-26 20:34:20 +00:00
Rafael Gonzaga
14e7bd84f1
src,permission: restrict by default when pm enabled
...
PR-URL: https://github.com/nodejs/node/pull/48907
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-07-26 18:32:03 +00:00
Raz Luvaton
bcaf198900
test: reorder test files fixtures for better understanding
...
PR-URL: https://github.com/nodejs/node/pull/48787
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-26 17:16:31 +00:00
Joyee Cheung
faefe560ef
src: remove ContextEmbedderIndex::kBindingDataStoreIndex
...
We can now get the binding data through the reference to the
realm directly, so remove it from the context embedder data
slot.
PR-URL: https://github.com/nodejs/node/pull/48836
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-07-26 13:26:08 +00:00
Chemi Atlow
857774029c
doc: add new reporter events to custom reporter examples
...
Fixes: https://github.com/nodejs/node/issues/48894
PR-URL: https://github.com/nodejs/node/pull/48903
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-26 13:15:24 +00:00
LiviaMedeiros
1eae568a76
fs: mention URL in NUL character error message
...
PR-URL: https://github.com/nodejs/node/pull/48828
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-07-26 19:37:43 +08:00
LiviaMedeiros
6bef80a50b
fs: make mkdtemp accept buffers and URL
...
PR-URL: https://github.com/nodejs/node/pull/48828
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-07-26 19:32:31 +08:00
Darshan Sen
6cd678965f
sea: add support for V8 bytecode-only caching
...
Refs: https://github.com/nodejs/single-executable/issues/73
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48191
Fixes: https://github.com/nodejs/single-executable/issues/73
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-07-26 10:10:35 +00:00
github-actions[bot]
d246536924
doc: run license-builder
...
PR-URL: https://github.com/nodejs/node/pull/48898
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@google.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-07-26 00:15:17 +00:00
Node.js GitHub Bot
c8c1f8a295
deps: update ada to 2.6.0
...
PR-URL: https://github.com/nodejs/node/pull/48896
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-07-25 19:33:01 +00:00
Ardi_Nugraha
71165e111a
doc: change duration to duration_ms on test documentation
...
PR-URL: https://github.com/nodejs/node/pull/48892
Fixes: https://github.com/nodejs/node/issues/48887
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-25 13:34:16 +00:00
Guido Penta
36c72c8b2f
doc: improve requireHostHeader
...
PR-URL: https://github.com/nodejs/node/pull/48860
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-25 07:19:44 +00:00
Node.js GitHub Bot
9edea976a1
tools: update lint-md-dependencies to rollup@3.26.3
...
PR-URL: https://github.com/nodejs/node/pull/48888
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-07-25 00:56:53 +00:00
Paolo Insogna
8490318df8
http: start connections checking interval on listen
...
Co-authored-by: Luigi Pinca <luigipinca@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-07-24 20:55:19 +00:00
Michael Dawson
5cbf73ec9c
doc: add ver of 18.x where Node-api 9 is supported
...
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/48876
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-07-24 19:44:26 +00:00
Raz Luvaton
a0f3ed8ac4
test_runner: fix global before not called when no global test exists
...
PR-URL: https://github.com/nodejs/node/pull/48877
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-07-24 11:38:23 +00:00
Antoine du Hamel
ad0603edc6
url: ensure getter access do not mutate observable symbols
...
PR-URL: https://github.com/nodejs/node/pull/48897
Refs: https://github.com/nodejs/node/pull/48891
Refs: https://github.com/nodejs/node/issues/48886
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-07-24 07:47:47 +00:00
Tobias Nießen
1ceb8c113d
node-api: avoid macro redefinition
...
Even though the redefinition complies with the C standard because the
second definition is "effectively the same" as the first definition,
it's best to avoid any redefinition.
Refs: https://github.com/nodejs/node/pull/28237
Refs: https://github.com/nodejs/node/pull/30006
PR-URL: https://github.com/nodejs/node/pull/48879
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-23 19:51:38 +00:00
Tobias Nießen
88ab2e7f21
permission: move PrintTree into unnamed namespace
...
This function is not declared outside of fs_permission.cc and thus
should not be visible outside the file during the linking stage.
PR-URL: https://github.com/nodejs/node/pull/48874
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-07-23 19:35:38 +00:00
Raz Luvaton
44b8a061df
test_runner: fix async callback in describe not awaited
...
PR-URL: https://github.com/nodejs/node/pull/48856
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-23 10:22:35 +00:00
npm CLI robot
ab834ff861
deps: upgrade npm to 9.8.1
...
PR-URL: https://github.com/nodejs/node/pull/48838
Reviewed-By: Luke Karrys <luke@lukekarrys.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-07-23 10:11:27 +00:00
Hyunjin Kim
841b29c49f
src: use ARES_SUCCESS instead of 0
...
Since error messages are also using defined values, it is more clear
to use the defined value even when the operation succeeds.
PR-URL: https://github.com/nodejs/node/pull/48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-07-23 10:11:17 +00:00
Hyunjin Kim
9c5e272dae
typings: sync JSDoc with the actual implementation
...
JSDoc comment did not match the actual implementation of
`FileHandle#readableWebStream`.
Refs: https://github.com/nodejs/node/pull/46933
PR-URL: https://github.com/nodejs/node/pull/48853
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-07-23 10:05:05 +02:00
Ethan Arrowood
6c08b1fc02
test_runner: fix test_runner test:fail event type
...
PR-URL: https://github.com/nodejs/node/pull/48854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-22 16:02:40 +00:00
Yagiz Nizipli
9dd574c9e2
lib: remove invalid parameter to toASCII
...
PR-URL: https://github.com/nodejs/node/pull/48878
Refs: https://github.com/nodejs/node/pull/48873
Refs: https://github.com/nodejs/node/issues/48855
Refs: https://github.com/nodejs/node/issues/48850
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-07-22 00:52:20 +00:00
Yagiz Nizipli
f4863fa8e0
test: validate host with commas on url.parse
...
PR-URL: https://github.com/nodejs/node/pull/48878
Refs: https://github.com/nodejs/node/pull/48873
Refs: https://github.com/nodejs/node/issues/48855
Refs: https://github.com/nodejs/node/issues/48850
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-07-22 00:52:20 +00:00
Joyee Cheung
b68fa59960
src: use effective cppgc wrapper id to deduce non-cppgc id
...
Previously we hard-code a wrapper id to be used in BaseObjects
to avoid accidentally triggering cppgc on these non-cppgc-managed
objects, but hard-coding can be be hacky and result in mismatch
when we start to create CppHeap ourselves. This patch makes it
more robust by deducing non-cppgc id from the effective cppgc id,
if there is one.
PR-URL: https://github.com/nodejs/node/pull/48660
Refs: 9327503128
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-07-21 16:44:23 +02:00
Joyee Cheung
44027fbca8
deps: V8: cherry-pick 93275031284c
...
Original commit message:
[cppgc] expose wrapper descriptor on CppHeap
This makes it possible for embedders to:
1. Avoid creating wrapper objects that happen to have a layout that
leads V8 to consider the object cppgc-managed while it's not.
Refs: https://github.com/nodejs/node/pull/43521
2. Create cppgc-managed wrapper objects when they do not own the
CppHeap. Refs: https://github.com/nodejs/node/pull/45704
Bug: v8:13960
Change-Id: If31f4d56c5ead59dc0d56f937494d23d631f7438
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4598833
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Commit-Queue: Michael Lippautz <mlippautz@chromium.org >
Cr-Commit-Position: refs/heads/main@{#88490}
Refs: 9327503128
PR-URL: https://github.com/nodejs/node/pull/48660
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-07-21 16:44:20 +02:00
Rafael Gonzaga
3f4c127f92
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-07-21 13:51:55 +00:00
Raz Luvaton
24c3d8a1b3
test_runner: call abort on test finish
...
PR-URL: https://github.com/nodejs/node/pull/48827
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-07-21 12:53:58 +00:00
Joyee Cheung
4ee4718857
src: save the performance milestone time origin in the AliasedArray
...
Previously we cache the time origin for the milestones in the user
land, and refresh it at pre-execution. As result the time origin
gets serialized into the snapshot and is therefore not deterministic.
Now we store it in the milestone array as an internal value and
reset the milestones at serialization time instead of
deserialization time. This improves the determinism of the snapshot.
Drive-by: remove the unused MarkMilestone() binding.
PR-URL: https://github.com/nodejs/node/pull/48708
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-07-20 23:07:41 +00:00
Joyee Cheung
ac34e7561a
src: support snapshot in single executable applications
...
This patch adds snapshot support to single executable applications.
To build a snapshot from the main script when preparing the
blob that will be injected into the single executable application,
add `"useSnapshot": true` to the configuration passed to
`--experimental-sea-config`. For example:
```
{
"main": "snapshot.js",
"output": "sea-prep.blob",
"useSnapshot": true
}
```
The main script used to build the snapshot must invoke
`v8.startupSnapshot.setDeserializeMainFunction()` to configure the
entry point. The generated startup snapshot would be part of the
preparation blob and get injected into the final executable.
When the single executable application is launched, instead of running
the `main` script from scratch, Node.js would instead deserialize the
snapshot to get to the state initialized during build-time directly.
PR-URL: https://github.com/nodejs/node/pull/46824
Refs: https://github.com/nodejs/single-executable/discussions/57
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-07-20 22:57:00 +00:00
Juan José Arboleda
d5761a4f8e
2023-07-18, Version 20.5.0 (Current)
...
Notable changes:
doc:
* add atlowChemi to collaborators (atlowChemi) https://github.com/nodejs/node/pull/48757
events:
* (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) https://github.com/nodejs/node/pull/48596
fs:
* add a fast-path for readFileSync utf-8 (Yagiz Nizipli) https://github.com/nodejs/node/pull/48658
test_runner:
* (SEMVER-MINOR) add shards support (Raz Luvaton) https://github.com/nodejs/node/pull/48639
PR-URL: https://github.com/nodejs/node/pull/48761
2023-07-20 16:28:46 -05:00
Node.js GitHub Bot
01c8576a24
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-07-20 20:00:23 +00:00
Joyee Cheung
4a2e9bacab
deps: V8: cherry-pick 9f4b7699f68e
...
Original commit message:
Fix mistake in the skip branch of test/mjsunit/regress-1320641.js
It was doing a `string.test(regex)` which was wrong. It's supposed
to be `regex.test(string)`. It wasn't caught in the CI because
the skip path is not normally taken in the V8 CI.
Change-Id: Id1bdab5bbc41968bba8adc1cb3664e8f95fb5d72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4697855
Commit-Queue: Joyee Cheung <joyee@igalia.com >
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org >
Cr-Commit-Position: refs/heads/main@{#89044}
Refs: 9f4b7699f6
PR-URL: https://github.com/nodejs/node/pull/48830
Refs: c1a54d5ffc
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-07-20 19:50:21 +00:00
Joyee Cheung
399dd8e6c4
deps: V8: cherry-pick c1a54d5ffcd1
...
Original commit message:
Skip regress-1320641 when the system does not have enough memory
Change-Id: I23a5232f6437c4bc77390796ee2986f1600cb1bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4689686
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org >
Commit-Queue: Joyee Cheung <joyee@igalia.com >
Cr-Commit-Position: refs/heads/main@{#88973}
Refs: c1a54d5ffc
PR-URL: https://github.com/nodejs/node/pull/48830
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-07-20 19:50:20 +00:00
Livia Medeiros
e7c397739f
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-07-20 13:33:10 +00:00
Michaël Zasso
b0cc131e8f
test: delete test-net-bytes-per-incoming-chunk-overhead
...
The test's assumptions about RSS are no longer valid, at least with
Fedora 38.
Closes: https://github.com/nodejs/node/issues/48490
PR-URL: https://github.com/nodejs/node/pull/48811
Fixes: https://github.com/nodejs/node/issues/48490
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-07-20 13:20:44 +00:00
Jason
ce73e887a3
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-07-20 09:20:15 +00:00
Michael Dawson
c301404105
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-07-19 17:22:26 -04:00
Izaak Schroeder
a2fc4a383e
esm: unflag Module.register and allow nested loader import()
...
Major functional changes:
- Allow `import()` to work within loaders that require other loaders,
- Unflag the use of `Module.register`.
A new interface `Customizations` has been created in order to unify
`ModuleLoader` (previously `DefaultModuleLoader`), `Hooks` and
`CustomizedModuleLoader` all of which now implement it:
```ts
interface LoadResult {
format: ModuleFormat;
source: ModuleSource;
}
interface ResolveResult {
format: string;
url: URL['href'];
}
interface Customizations {
allowImportMetaResolve: boolean;
load(url: string, context: object): Promise<LoadResult>
resolve(
originalSpecifier:
string, parentURL: string,
importAssertions: Record<string, string>
): Promise<ResolveResult>
resolveSync(
originalSpecifier:
string, parentURL: string,
importAssertions: Record<string, string>
) ResolveResult;
register(specifier: string, parentUrl: string): any;
forceLoadHooks(): void;
importMetaInitialize(meta, context, loader): void;
}
```
The `ModuleLoader` class now has `setCustomizations` which takes an
object of this shape and delegates its responsibilities to this object
if present.
Note that two properties `allowImportMetaResolve` and `resolveSync`
exist now as a mechanism for `import.meta.resolve` – since `Hooks`
does not implement `resolveSync` other loaders cannot use
`import.meta.resolve`; `allowImportMetaResolve` is a way of checking
for that case instead of invoking `resolveSync` and erroring.
Fixes https://github.com/nodejs/node/issues/48515
Closes https://github.com/nodejs/node/pull/48439
PR-URL: https://github.com/nodejs/node/pull/48559
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-07-19 10:33:47 +00:00
Michael Dawson
38cc538453
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-07-19 00:06:45 +00:00