Claudio W
e17c2618e3
doc: remove the last <pre> tag
...
PR-URL: https://github.com/nodejs/node/pull/53741
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-07-16 12:01:11 +02:00
Yagiz Nizipli
1300169f80
url: add missing documentation for URL.parse()
...
PR-URL: https://github.com/nodejs/node/pull/53733
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-16 12:01:10 +02:00
Alfredo González
50987ea833
doc: require node:process in assert doc examples
...
PR-URL: https://github.com/nodejs/node/pull/53702
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-07-16 12:01:09 +02:00
jakecastelli and Rafael Gonzaga
fa58d01497
doc: add additional explanation to the wildcard section in permissions
...
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/53664
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-07-16 12:01:09 +02:00
Vinicius Lourenço
1cc0b41f00
doc: include node.module_timer on available categories
...
PR-URL: https://github.com/nodejs/node/pull/53638
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-07-16 12:01:07 +02:00
Elliot Goodrich
d224e9eab5
doc: fix module customization hook examples
...
When running these examples, `node` fails to return as this
`MessagePort` keeps the event loop active in the main thread unless
it is `unref()`ed.
Fixes: https://github.com/nodejs/node/issues/52846
PR-URL: https://github.com/nodejs/node/pull/53637
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
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: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-07-16 12:01:06 +02:00
Emil Tayeb
2cf60964e6
doc: fix doc for correct usage with plan & TestContext
...
Fixed section in the doc that describes a test that uses the plan
feature in the test-runner.
However, the test in this example fails.
The fix use (Textcontext) and reduce the plan number
to 1 since we have 1 assertion.
PR-URL: https://github.com/nodejs/node/pull/53615
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-07-16 12:01:06 +02:00
Leonardo Peixoto
2d1ff91953
doc: add esm example for os
...
PR-URL: https://github.com/nodejs/node/pull/53604
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-07-16 12:01:05 +02:00
Filip Skokan
3cc01aa314
crypto: make deriveBits length parameter optional and nullable
...
PR-URL: https://github.com/nodejs/node/pull/53601
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-07-16 12:01:05 +02:00
René
80c1f5ce8a
doc, typings: events.once accepts symbol event type
...
PR-URL: https://github.com/nodejs/node/pull/53542
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-07-16 12:01:04 +02:00
Eliphaz Bouye
de99d69d75
doc: clarify usage of coverage reporters
...
PR-URL: https://github.com/nodejs/node/pull/53523
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-07-16 12:01:03 +02:00
Aviv Keller
519c328dcf
doc: document addition testing options
...
PR-URL: https://github.com/nodejs/node/pull/53569
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-07-16 12:01:03 +02:00
Tobias Nießen
c6166cdfe4
doc: clarify that fs.exists() may return false for existing symlink
...
Given that this API is problematic in any case, we should be precise
about its (perhaps surprising) behavior.
PR-URL: https://github.com/nodejs/node/pull/53566
Reviewed-By: Jithil P Ponnan <jithil@outlook.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-07-16 12:01:03 +02:00
Rob Hogan
9139ab2848
doc: note http.closeAllConnections excludes upgraded sockets
...
PR-URL: https://github.com/nodejs/node/pull/53560
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-07-16 12:01:02 +02:00
Aviv Keller
8743c4d65a
path: add matchesGlob method
...
PR-URL: https://github.com/nodejs/node/pull/52881
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-07-16 12:00:56 +02:00
Michaël Zasso
7e13cc5407
2024-07-02, Version 22.4.0 (Current)
...
Notable changes:
deps,lib,src:
* (SEMVER-MINOR) add experimental web storage (Colin Ihrig) https://github.com/nodejs/node/pull/52435
doc:
* move `node --run` stability to rc (Yagiz Nizipli) https://github.com/nodejs/node/pull/53433
* mark WebSocket as stable (Matthew Aitken) https://github.com/nodejs/node/pull/53352
* mark --heap-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
* mark --cpu-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
* doc-only deprecate OpenSSL engine-based APIs (Richard Lau) https://github.com/nodejs/node/pull/53329
inspector:
* fix disable async hooks on Debugger.setAsyncCallStackDepth (Joyee Cheung) https://github.com/nodejs/node/pull/53473
lib:
* (SEMVER-MINOR) add diagnostics_channel events to module loading (RafaelGSS) https://github.com/nodejs/node/pull/44340
util:
* (SEMVER-MINOR) support `--no-` for argument with boolean type for parseArgs (Zhenwei Jin) https://github.com/nodejs/node/pull/53107
PR-URL: https://github.com/nodejs/node/pull/53583
2024-07-01 15:33:39 +02:00
Michael Dawson
608cc05de1
doc: recommend not using libuv node-api function
...
- update documentation recommend not using the
napi_get_uv_event_loop function. It should not be
need for most if not all uses cases now that the
API is more complete.
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/53521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-06-25 11:17:07 +02:00
RafaelGSS and Stephen Belanger
e95af740fc
lib: add diagnostics_channel events to module loading
...
This commit adds a tracing channel for module loading
through `import()` and `require()`.
Co-Authored-By: Stephen Belanger <admin@stephenbelanger.com >
PR-URL: https://github.com/nodejs/node/pull/44340
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2024-06-21 11:05:40 +02:00
Michaël Zasso
15df4edd22
src: use args.This() instead of Holder
...
The latter is deprecated in V8.
Refs: http://crbug.com/333672197
PR-URL: https://github.com/nodejs/node/pull/53474
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-06-20 15:38:16 +02:00
cjihrig
9e30724b53
deps,lib,src: add experimental web storage
...
This commit introduces an experimental implementation of the Web
Storage API using SQLite as the backing data store.
PR-URL: https://github.com/nodejs/node/pull/52435
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2024-06-20 15:38:01 +02:00
Jay Kim
8b877099d0
stream: update outdated highwatermark doc
...
PR-URL: https://github.com/nodejs/node/pull/53494
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2024-06-20 14:45:28 +02:00
Zhenwei Jin
50733a1abe
util: support --no- for argument with boolean type for parseArgs
...
PR-URL: https://github.com/nodejs/node/pull/53107
Refs: https://github.com/nodejs/node/issues/53095
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-20 14:45:26 +02:00
Zhenwei Jin
befabe5c58
doc: update the description of the return type for options.filter
...
PR-URL: https://github.com/nodejs/node/pull/52742
Refs: https://github.com/nodejs/node/pull/52461
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-20 14:45:26 +02:00
eded1e9768
stream: support dispose in writable
...
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com >
Co-authored-by: atlowChemi <chemi@atlow.co.il >
PR-URL: https://github.com/nodejs/node/pull/48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:45:15 +02:00
Yagiz Nizipli
201266706b
doc: move node --run stability to rc
...
PR-URL: https://github.com/nodejs/node/pull/53433
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-06-20 14:42:21 +02:00
Christian Bates-White
46a7681cc4
doc: add Buffer.from(string) to functions that use buffer pool
...
Buffer.from(string) is one of the functions that may use the
pre-allocated buffer. It's mentioned in the description of
Buffer.from(array), but not in Buffer.from(string), or in the two other
places where functions that behave this way are listed, so this commit
adds those references.
PR-URL: https://github.com/nodejs/node/pull/52801
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:40:46 +02:00
jakecastelli
24c7a9415b
doc, http: add rejectNonStandardBodyWrites option, clear its behaviour
...
PR-URL: https://github.com/nodejs/node/pull/53396
Fixes: https://github.com/nodejs/node/issues/53035
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:40:41 +02:00
EhsanKhaki
fa113b8fc7
doc: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/53397
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-06-20 14:40:41 +02:00
Aviv Keller
d9182d0086
doc: define more cases for stream event emissions
...
PR-URL: https://github.com/nodejs/node/pull/53317
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-20 14:40:39 +02:00
István Donkó
48f78cd31b
doc: fix mistakes in the module load hook api
...
PR-URL: https://github.com/nodejs/node/pull/53349
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-06-20 14:40:38 +02:00
Khafra
16c0884d48
doc: mark WebSocket as stable
...
PR-URL: https://github.com/nodejs/node/pull/53352
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-06-20 14:40:37 +02:00
Richard Lau
df4762722c
doc: doc-only deprecate OpenSSL engine-based APIs
...
OpenSSL 3 deprecated support for custom engines with a recommendation
to switch to its new provider model.
PR-URL: https://github.com/nodejs/node/pull/53329
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-20 14:40:37 +02:00
Joyee Cheung
cf375e73c1
doc: mark --heap-prof and related flags stable
...
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Ruy Adorno <ruy@vlt.sh >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-06-20 14:40:37 +02:00
Joyee Cheung
0160745057
doc: mark --cpu-prof and related flags stable
...
PR-URL: https://github.com/nodejs/node/pull/53343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Ruy Adorno <ruy@vlt.sh >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-06-20 14:40:36 +02:00
RafaelGSS
2e7a7765d6
2024-06-11, Version 22.3.0 (Current)
...
Notable changes:
buffer:
* (SEMVER-MINOR) add .bytes() method to Blob (Matthew Aitken) https://github.com/nodejs/node/pull/53221
cli:
* (SEMVER-MINOR) add `NODE_RUN_PACKAGE_JSON_PATH` env (Yagiz Nizipli) https://github.com/nodejs/node/pull/53058
* (SEMVER-MINOR) add `NODE_RUN_SCRIPT_NAME` env to `node --run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53032
doc:
* (SEMVER-MINOR) add context.assert docs (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) improve explanation about built-in modules (Joyee Cheung) https://github.com/nodejs/node/pull/52762
* add StefanStojanovic to collaborators (StefanStojanovic) https://github.com/nodejs/node/pull/53118
* add Marco Ippolito to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/53008
fs:
* mark recursive cp methods as stable (Théo LUDWIG) https://github.com/nodejs/node/pull/53127
lib:
* (SEMVER-MINOR) add EventSource Client (Aras Abbasi) https://github.com/nodejs/node/pull/51575
* (SEMVER-MINOR) replace MessageEvent with undici's (Matthew Aitken) https://github.com/nodejs/node/pull/52370
module:
* (SEMVER-MINOR) print amount of load time of a cjs module (Vinicius Lourenço) https://github.com/nodejs/node/pull/52213
net:
* (SEMVER-MINOR) add new net.server.listen tracing channel (Paolo Insogna) https://github.com/nodejs/node/pull/53136
process:
* (SEMVER-MINOR) add process.getBuiltinModule(id) (Joyee Cheung) https://github.com/nodejs/node/pull/52762
src:
* (SEMVER-MINOR) traverse parent folders while running `--run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53154
src,permission:
* (SEMVER-MINOR) --allow-wasi & prevent WASI exec (Rafael Gonzaga) https://github.com/nodejs/node/pull/53124
test_runner:
* (SEMVER-MINOR) add snapshot testing (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) add context.fullName (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) support module mocking (Colin Ihrig) https://github.com/nodejs/node/pull/52848
PR-URL: https://github.com/nodejs/node/pull/53379
2024-06-10 09:53:43 -03:00
Yagiz Nizipli
5a41bcf9ca
src: traverse parent folders while running --run
...
PR-URL: https://github.com/nodejs/node/pull/53154
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-10 09:30:25 -03:00
Maarten Zuidhoorn
8c71522ced
doc: remove cases for keys not containing "*" in PATTERN_KEY_COMPARE
...
PR-URL: https://github.com/nodejs/node/pull/53215
Fixes: https://github.com/nodejs/node/issues/53206
Refs: https://github.com/nodejs/node/pull/40121
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2024-06-07 10:37:15 -03:00
Juan José
638b510ce7
cli: add --expose-gc flag available to NODE_OPTIONS
...
This commits allows users to send `--expose-gc` via `NODE_OPTIONS`
environment variable.
Using `node --expose-gc` is possible but via `NODE_OPTIONS` won't
work.
```sh
NODE_OPTIONS='--expose-gc' node
node: --expose-gc is not allowed in NODE_OPTIONS
```
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/53078
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-07 10:37:15 -03:00
Feng Yu
718a3ab1ab
doc: add err param to fs.cp callback
...
PR-URL: https://github.com/nodejs/node/pull/53234
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-07 10:37:15 -03:00
Feng Yu
d89bde26ff
doc: add err param to fs.copyFile callback
...
PR-URL: https://github.com/nodejs/node/pull/53234
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-07 10:37:14 -03:00
Rafael Gonzaga
75e5612fae
src,permission: --allow-wasi & prevent WASI exec
...
PR-URL: https://github.com/nodejs/node/pull/53124
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-06-03 08:48:32 +02:00
cjihrig
8c6dffc269
test_runner: add snapshot testing
...
This commit adds a t.assert.snapshot() method that implements
snapshot testing. Serialization uses JSON.stringify() by default,
but users can configure the serialization to meet their needs.
PR-URL: https://github.com/nodejs/node/pull/53169
Fixes: https://github.com/nodejs/node/issues/48260
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-06-01 10:55:09 +02:00
cjihrig
048478d351
doc: add context.assert docs
...
When context.assert was added, no docs were added. This commit
adds initial documentation for context.assert because the
snapshot() function requires them.
PR-URL: https://github.com/nodejs/node/pull/53169
Refs: https://github.com/nodejs/node/pull/52860
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-06-01 10:55:09 +02:00
cjihrig and Jacob Smith
f6d2af8ee7
test_runner: add context.fullName
...
This commit adds a fullName getter to the TestContext and
SuiteContext classes. This is similar to the existing name getter,
but also includes the name of all ancestor tests/suites.
PR-URL: https://github.com/nodejs/node/pull/53169
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Co-authored-by: Jacob Smith <jacob@frende.me >
2024-06-01 10:55:09 +02:00
Paolo Insogna
a0766bdf0e
net: add new net.server.listen tracing channel
...
PR-URL: https://github.com/nodejs/node/pull/53136
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2024-06-01 10:55:08 +02:00
Aviv Keller
c391923445
doc: include ESM import for HTTP
...
PR-URL: https://github.com/nodejs/node/pull/53165
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-06-01 10:55:08 +02:00
Joyee Cheung
374743cd4e
process: add process.getBuiltinModule(id)
...
`process.getBuiltinModule(id)` provides a way to load built-in modules
in a globally available function. ES Modules that need to support
other environments can use it to conditionally load a Node.js built-in
when it is run in Node.js, without having to deal with the resolution
error that can be thrown by `import` in a non-Node.js environment or
having to use dynamic `import()` which either turns the module into an
asynchronous module, or turns a synchronous API into an asynchronous
one.
```mjs
if (globalThis.process.getBuiltinModule) {
// Run in Node.js, use the Node.js fs module.
const fs = globalThis.process.getBuiltinModule('fs');
// If `require()` is needed to load user-modules, use
// createRequire()
const module = globalThis.process.getBuiltinModule('module');
const require = module.createRequire(import.meta.url);
const foo = require('foo');
}
```
If `id` specifies a built-in module available in the current Node.js
process, `process.getBuiltinModule(id)` method returns the
corresponding built-in module. If `id` does not correspond to any
built-in module, `undefined` is returned.
`process.getBuiltinModule(id)` accept built-in module IDs that are
recognized by `module.isBuiltin(id)`. Some built-in modules must be
loaded with the `node:` prefix.
The built-in modules returned by `process.getBuiltinModule(id)` are
always the original modules - that is, it's not affected by
`require.cache`.
PR-URL: https://github.com/nodejs/node/pull/52762
Fixes: https://github.com/nodejs/node/issues/52599
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-06-01 10:55:06 +02:00
Joyee Cheung
1eb55f3550
doc: improve explanation about built-in modules
...
PR-URL: https://github.com/nodejs/node/pull/52762
Fixes: https://github.com/nodejs/node/issues/52599
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-06-01 10:55:06 +02:00
Moshe Atlow
c249289121
test_runner,doc: align documentation with actual stdout/stderr behavior
...
PR-URL: https://github.com/nodejs/node/pull/53131
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-01 10:55:06 +02:00
Rafael Gonzaga
afbfe8922a
doc: mention pm is not enforced when using fd
...
PR-URL: https://github.com/nodejs/node/pull/53125
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-06-01 10:55:05 +02:00