Joyee Cheung
89dd09310e
src: serialize both BaseObject slots
...
We previously only return startup data for the first slot for
BaseObjects because we can already serialize all the necessary
information in one go, but slots that do not get special startup
data would be serialized verbatim which means that the pointer
addresses are going to be part of the snapshot blob, resulting
in indeterminism.
This patch updates the serialization routines and capture information
for both of the two slots - the first slot with type information
and memory management type (which we can use in the future for
cppgc-managed objects) and the second slot with data about the
object itself. This way the embeedder slots can be serialized
in a reproducible manner in the snapshot.
PR-URL: https://github.com/nodejs/node/pull/48996
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-08-15 18:32:14 +00:00
Jungku Lee
9a2e6bca4f
doc: add print results for examples in WebStreams
...
PR-URL: https://github.com/nodejs/node/pull/49143
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-15 16:41:14 +00:00
Livia Medeiros
966e3d3493
test: use tmpdir.resolve()
...
PR-URL: https://github.com/nodejs/node/pull/49128
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-15 13:45:44 +00:00
Livia Medeiros
e738edce6a
test: use tmpdir.resolve()
...
Subsystems: blob, child_process, common, crypto, http, http2,
readline, repl, snapshot, trace_events
PR-URL: https://github.com/nodejs/node/pull/49127
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-08-15 13:45:34 +00:00
Livia Medeiros
6a68794577
test: use tmpdir.resolve() in fs tests
...
PR-URL: https://github.com/nodejs/node/pull/49126
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-15 13:45:24 +00:00
Livia Medeiros
74e0ca3f49
test: use tmpdir.resolve() in fs tests
...
PR-URL: https://github.com/nodejs/node/pull/49125
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-08-15 13:45:14 +00:00
Node.js GitHub Bot
d6d8a6feda
tools: update lint-md-dependencies
...
- @rollup/plugin-commonjs@25.0.4
- rollup@3.28 .0
PR-URL: https://github.com/nodejs/node/pull/49122
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-15 15:44:50 +02:00
Tobias Nießen
115f801ae4
test: fix assertion message in test_async.c
...
PR-URL: https://github.com/nodejs/node/pull/49146
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-15 11:55:34 +00:00
Antoine du Hamel
1aeb48c975
test: refactor test-esm-loader-hooks for easier debugging
...
- Always check stderr before stdout as the former would contain error
information.
- Always match the full stdout to avoid surprises.
- Use `deepStrictEqual` when appropriate to get more informative test
failures.
- Remove leading slashes from relative paths/URLs to not confuse them
with absolute paths.
- Remove unnecessary `--no-warnings` flag.
PR-URL: https://github.com/nodejs/node/pull/49131
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-08-15 09:32:38 +00:00
Moshe Atlow
9cc7327979
tools: use spec reporter in actions
...
PR-URL: https://github.com/nodejs/node/pull/49129
Refs: https://github.com/nodejs/node/issues/49120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-15 07:16:53 +00:00
Moshe Atlow
0d6cdb25fe
tools: use @reporters/github when running in github actions
...
PR-URL: https://github.com/nodejs/node/pull/49129
Refs: https://github.com/nodejs/node/issues/49120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-15 07:16:52 +00:00
Moshe Atlow
8972f9beed
tools: add @reporters/github to tools
...
PR-URL: https://github.com/nodejs/node/pull/49129
Refs: https://github.com/nodejs/node/issues/49120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-15 07:16:51 +00:00
Node.js GitHub Bot
802c52fb8b
deps: update googletest to 7e33b6a
...
PR-URL: https://github.com/nodejs/node/pull/49034
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-08-15 07:02:41 +02:00
Node.js GitHub Bot
a3b25ebcc2
tools: update eslint to 8.47.0
...
PR-URL: https://github.com/nodejs/node/pull/49124
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-15 00:43:52 +00:00
Deokjin Kim
4b486e5e28
doc: fix Type notation in webstreams
...
Replace `type` with `Type: {Promise}`. Plus, fix incorrect
verb(`creates` -> `returns`) in description.
PR-URL: https://github.com/nodejs/node/pull/49121
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-08-14 22:40:02 +00:00
Node.js GitHub Bot
8aff50413a
deps: update zlib to 1.2.13.1-motley-526382e
...
PR-URL: https://github.com/nodejs/node/pull/49033
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-08-14 19:48:56 +02:00
Jungku Lee
6476c99ddc
src: remove duplicated code in GenerateSingleExecutableBlob()
...
PR-URL: https://github.com/nodejs/node/pull/49119
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-08-14 17:33:33 +00:00
Colin Ihrig
b5740756ca
test_runner: reland run global after() hook earlier
...
This commit reverts the revert in
bb52656fc6 . It also includes the
fix for the issue that required the revert
(https://github.com/nodejs/node/pull/49059#issuecomment-1675171959 )
and an additional common.mustCall() in the added test.
Refs: https://github.com/nodejs/node/pull/49059
Refs: https://github.com/nodejs/node/pull/49110
PR-URL: https://github.com/nodejs/node/pull/49116
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: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-14 14:29:29 +00:00
Joyee Cheung
634eb505a4
src: refactor vector writing in snapshot builder
...
- Build a static table of octal strings and use it instead of
building octal strings repeatedly during printing.
- Print a newline and an offset for every 64 bytes in the case
of printing array literals so it's easier to locate
variation in snapshot blobs.
- Rework the printing routines so that the differences are only
made in a WriteByteVectorLiteral routine. We can update this
for compression support in the future.
- Rename Snapshot::Generate() that write the data as C++ source
instead of a blob as Snaphost::GenerateAsSource() for clarity,
and move the file stream operations into it to streamline
error handling.
PR-URL: https://github.com/nodejs/node/pull/48851
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-08-14 12:53:02 +00:00
Antoine du Hamel
52b3007f89
doc: fix name of the flag in initialize() docs
...
PR-URL: https://github.com/nodejs/node/pull/49158
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-08-14 11:42:30 +00:00
Rafael Gonzaga
de4553f3d1
doc: make the NODE_VERSION_IS_RELEASE revert clear
...
PR-URL: https://github.com/nodejs/node/pull/49114
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-13 22:48:34 +00:00
André Alves
71391987f7
lib: fix MIME overmatch in data URLs
...
This commit adds the delimiters ^ and $ to the regex that matches the
MIME types for `data:` URLs.
PR-URL: https://github.com/nodejs/node/pull/49104
Fixes: https://github.com/nodejs/node/issues/48957
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-13 23:24:22 +02:00
Antoine du Hamel
b5da2f4dad
esm: fix globalPreload warning
...
PR-URL: https://github.com/nodejs/node/pull/49069
Fixes: https://github.com/nodejs/node/issues/49026
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 14:37:32 +00:00
Raz Luvaton
9fc57006c2
stream: improve WebStreams performance
...
PR-URL: https://github.com/nodejs/node/pull/49089
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-13 08:17:34 +00:00
Guy Bedford
ee8b7f1f18
esm: unflag import.meta.resolve
...
PR-URL: https://github.com/nodejs/node/pull/49028
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-08-13 05:42:25 +00:00
Antoine du Hamel
3d20582c0f
module: make CJS load from ESM loader
...
PR-URL: https://github.com/nodejs/node/pull/47999
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 04:23:05 +00:00
Livia Medeiros
a4928b069b
test: add tmpdir.resolve()
...
PR-URL: https://github.com/nodejs/node/pull/49079
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-08-13 01:39:34 +00:00
Livia Medeiros
dde8510e83
test: document fixtures.fileURL()
...
PR-URL: https://github.com/nodejs/node/pull/49083
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-13 03:30:00 +02:00
Guy Bedford
569267d048
esm: import.meta.resolve exact module not found errors should return
...
PR-URL: https://github.com/nodejs/node/pull/49038
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 00:02:03 +00:00
Yagiz Nizipli
607a545904
url: overload canParse V8 fast api method
...
PR-URL: https://github.com/nodejs/node/pull/48993
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-08-12 22:34:46 +00:00
Yagiz Nizipli
4cf30df026
src: add ability to overload fast api functions
...
PR-URL: https://github.com/nodejs/node/pull/48993
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-08-12 22:34:45 +00:00
Jungku Lee
82e4ca109e
src: remove redundant code for uv_handle_type
...
PR-URL: https://github.com/nodejs/node/pull/49061
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-08-12 22:16:35 +00:00
Ethan Arrowood
27cadf5e93
fs: fix readdir recursive sync & callback
...
Refs: https://github.com/nodejs/node/issues/48640
PR-URL: https://github.com/nodejs/node/pull/48698
Fixes: https://github.com/nodejs/node/issues/48858
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-08-12 20:55:36 +00:00
Node.js GitHub Bot
8358ce4486
deps: update undici to 5.23.0
...
PR-URL: https://github.com/nodejs/node/pull/49021
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-08-12 18:28:48 +00:00
Raz Luvaton
c39f04c141
events: remove weak listener for event target
...
Fixes: https://github.com/nodejs/node/issues/48951
PR-URL: https://github.com/nodejs/node/pull/48952
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-08-12 18:20:54 +00:00
bellbind
32245275b5
lib: fix to add resolve() before return at Blob.stream()'s source.pull()
...
Add lacked calling resolve() for finish ReadableStream source.pull().
Fixes: https://github.com/nodejs/node/issues/48668
Fixes: https://github.com/nodejs/node/issues/48916
Fixes: https://github.com/nodejs/node/issues/48232
Refs: https://github.com/nodejs/node/commit/8cc14387a2e77d7a2b411e7edaed690d43ea3809
PR-URL: https://github.com/nodejs/node/pull/48935
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2023-08-12 21:42:01 +05:30
Jakub Jankiewicz
87af913b66
readline: add paste bracket mode
...
The paste bracket mode allows REPL to have auto-indentation
that is handled differently when the user copy-pastes the code
from the clipboard and the code already has an indentation.
PR-URL: https://github.com/nodejs/node/pull/47150
Fixes: https://github.com/nodejs/node/issues/45213
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2023-08-12 13:39:24 +02:00
Antoine du Hamel
e68e359aae
test: reduce flakiness of test-esm-loader-hooks
...
PR-URL: https://github.com/nodejs/node/pull/49105
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-12 10:20:12 +00:00
Joyee Cheung
bb52656fc6
Revert "test_runner: run global after() hook earlier"
...
This reverts commit 6346bdc526 .
Reason for revert: breaking CI
PR-URL: https://github.com/nodejs/node/pull/49110
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-12 04:19:05 +00:00
Tobias Nießen
e117f16e09
doc: update process.binding deprecation text
...
As part of the recent security release, 4aa0eff7 updated the
documentation but bd7443ad did not.
PR-URL: https://github.com/nodejs/node/pull/49086
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-11 19:13:59 +00:00
Rafael Gonzaga
c00dfc8e33
doc: update with latest security release
...
PR-URL: https://github.com/nodejs/node/pull/49085
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-11 18:46:57 +00:00
Jason
f426cc0c3f
src: modernize use-equals-default
...
PR-URL: https://github.com/nodejs/node/pull/48735
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-08-11 17:58:04 +00:00
Yagiz Nizipli
7ffa5d7f0d
src: avoid string copy in BuiltinLoader::GetBuiltinIds
...
PR-URL: https://github.com/nodejs/node/pull/48721
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-08-11 15:31:58 +00:00
Michael Bianco
9497665d19
doc: add description for --port flag of node inspect
...
PR-URL: https://github.com/nodejs/node/pull/48785
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-11 17:31:04 +02:00
cjihrig
6346bdc526
test_runner: run global after() hook earlier
...
This commit moves the global after() hook execution from the
'beforeExit' event to the point where all tests have finished
running. This gives the global after() a chance to clean up
handles that would otherwise prevent the 'beforeExit' event
from being emitted.
PR-URL: https://github.com/nodejs/node/pull/49059
Fixes: https://github.com/nodejs/node/issues/49056
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-11 09:16:51 -04:00
cjihrig
4e61c22699
test_runner: expose location of tests
...
This commit adds each test's line and column number to the reporter
output. This will aid in debugging test suite failures when error
stacks are not helpful, test suites are large, or tests have the
same name. This data is also exposed on the spec reporter.
This commit also replaces the filename that was previously being
reported, with the filename where the test actually exists. These
are normally correct, but could be wrong if tests were run from
a file other than the user's entrypoint.
PR-URL: https://github.com/nodejs/node/pull/48975
Fixes: https://github.com/nodejs/node/issues/48457
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.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 >
2023-08-11 09:12:49 -04:00
Chemi Atlow
35f2b42d06
test: stabilize the inspector-open-dispose test
...
Ref: https://ci.nodejs.org/job/node-test-commit-osx-arm/nodes\=osx11/12543/console , https://github.com/nodejs/reliability/issues/631
PR-URL: https://github.com/nodejs/node/pull/49000
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-11 13:05:01 +00:00
Raz Luvaton
dadbdaff64
test: print instruction for creating missing snapshot in assertSnapshot
...
PR-URL: https://github.com/nodejs/node/pull/48914
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-08-11 08:17:53 +00:00
Antoine du Hamel
6aafb6fbbb
esm: protect ERR_UNSUPPORTED_DIR_IMPORT against prototype pollution
...
PR-URL: https://github.com/nodejs/node/pull/49060
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-11 06:29:14 +00:00
Daryl Haresign and Joyee Cheung
7f2c810814
src,tools: initialize cppgc
...
This patch:
- Initializes cppgc in InitializeOncePerProcess() when
kNoInitializeCppgc is not set
- Create a CppHeap and attach it to the Isolate when
there isn't one already during IsolateData initialization.
The CppHeap is detached and terminated when IsolateData
is freed.
- Publishes the cppgc headers in the tarball.
This allows C++ addons to start using cppgc to manage objects.
A helper node::SetCppgcReference() is also added to help addons
enable cppgc tracing in a user-defined object.
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com >
Refs: https://github.com/nodejs/node/issues/40786
PR-URL: https://github.com/nodejs/node/pull/45704
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-08-11 00:43:51 +00:00