Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-05-30http2: improve tests and docsDaeyeon Jeong
This commit documents the event parameters and `http2stream.respond`, and adds some tests to ensure the actual behaviors are aligned with the docs. Testing the 'Http2Server.sessionError' event is added by updating `test/parallel/test-http2-options-max-headers-exceeds-nghttp2.js`. The event seemingly has not been tested so far. `ServerHttp2Session` is exported to validate the `session` event and the `sessionError` event. Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: https://github.com/nodejs/node/pull/42858 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2022-05-30net: add ability to reset a tcp socketpupilTong
Fixes: https://github.com/nodejs/node/issues/27428 PR-URL: https://github.com/nodejs/node/pull/43112 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30src,lib: migrate to console on context's extra bindinglegendecas
Since `globalThis.console` is not an ECMAScript defined builtin, V8's globally installed `console` implementation is been moved to the context's extra binding object. We need to migrate to that one before the globally installed console object is removed in V8. PR-URL: https://github.com/nodejs/node/pull/43142 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-05-30http: add uniqueHeaders option to request and createServerShogun
PR-URL: https://github.com/nodejs/node/pull/41397 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-05-30lib: refactor `validateInt32` and `validateUint32`mawaregetsuka
PR-URL: https://github.com/nodejs/node/pull/43071 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-30debugger: throw a more useful error when the frame is missingKohei Ueno
PR-URL: https://github.com/nodejs/node/pull/42776 Fixes: https://github.com/nodejs/node/issues/42775 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-30console: fix console.dir crash on a revoked proxyDaeyeon Jeong
Fixes: https://github.com/nodejs/node/issues/43095 Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: https://github.com/nodejs/node/pull/43100 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-30net: remoteAddress always undefined called before connectedOneNail
PR-URL: https://github.com/nodejs/node/pull/43011 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-30fs: add trailing commasLiviaMedeiros
PR-URL: https://github.com/nodejs/node/pull/43127 Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-05-30fs: make params in writing methods optionalLiviaMedeiros
This change allows passing objects as "named parameters": - `fs.write(fd, buffer[, options], callback)` - `fs.writeSync(fd, buffer[, options])` - `filehandle.write(buffer[, options])` Fixes: https://github.com/nodejs/node/issues/41666 PR-URL: https://github.com/nodejs/node/pull/42601 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-30bootstrap: include code cache in the embedded snapshotJoyee Cheung
Since V8 code cache encodes indices to the read-only space it is safer to make sure that the code cache is generated in the same heap used to generate the embdded snapshot. This patch merges the code cache builder into the snapshot builder and makes the code cache part of node::SnapshotData that is deserialized into the native module loader during bootstrap. PR-URL: https://github.com/nodejs/node/pull/43023 Fixes: https://github.com/nodejs/node/issues/31074 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-16fs: remove unnecessary ?? operatorMorgan Roderick
This was introduced in 57678e55817366c39a3a241f89949c8fbe8418bc With the `if` conditional around this statement, `options` will always be evaluated as truthy. That means that the nullish coalescing operator will always evaluate to the left side, make it unnecessary. PR-URL: https://github.com/nodejs/node/pull/43073 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-05-16perf_hooks: add PerformanceResourceTimingRafaelGSS
perf_hooks: create clearResourceTimings perf_hooks: add resourcetiming test parallel perf_hooks: add markResourceTiming perf_hooks: fix observable when using resource perf_hooks: fix observable when using resource perf_hooks: add class comments perf_hooks: add PerformanceResourceTiming perf_hooks: create clearResourceTimings perf_hooks: add resourcetiming test parallel perf_hooks: add markResourceTiming perf_hooks: fix observable when using resource perf_hooks: fix observable when using resource perf_hooks: add class comments perf_hooks: add Resource Timing documentation benchmark: measure resource timing module perf_hooks: add check avoiding new PerformanceResourceTiming perf_hooks: adjust doc PR-URL: https://github.com/nodejs/node/pull/42725 Fixes: https://github.com/nodejs/undici/issues/952 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2022-05-16typings: fix `os.cpus` invalid return typeHimself65
PR-URL: https://github.com/nodejs/node/pull/43006 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-10lib: move WebAssembly Web API into separate fileTobias Nießen
Refs: https://github.com/nodejs/node/pull/42960#discussion_r864871357 PR-URL: https://github.com/nodejs/node/pull/42993 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-10debugger: fix inconsistent inspector output of exec new Map()Kohei Ueno
PR-URL: https://github.com/nodejs/node/pull/42423 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-05-10assert: fix CallTracker wraps the function causes the length to be lostOneNail
PR-URL: https://github.com/nodejs/node/pull/42909 Fixes: https://github.com/nodejs/node/issues/40484 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10lib,test: enable wasm/webapi/empty-body WPTTobias Nießen
Refs: https://github.com/nodejs/node/pull/42701 Refs: https://github.com/nodejs/undici/pull/1346 Refs: https://github.com/nodejs/node/pull/42939 PR-URL: https://github.com/nodejs/node/pull/42960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2022-05-10bootstrap: stop delaying instantiation of maps in per-context scriptsDarshan Sen
The linked issue, https://bugs.chromium.org/p/v8/issues/detail?id=6593, is marked as "Fixed", so I think we can revert this now. This reverts commit 08a9c4a996964aca909cd75fa8ecafd652c54885. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42934 Refs: https://bugs.chromium.org/p/v8/issues/detail?id=9187 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10crypto: adjust minimum length in generateKey('hmac', ...)Livia Medeiros
Also affects generateKeySync('hmac', ...) PR-URL: https://github.com/nodejs/node/pull/42944 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-10http: added connection closing methodsShogun
Fixes: https://github.com/nodejs/node/issues/41578 PR-URL: https://github.com/nodejs/node/pull/42812 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-05-10fs: add `read(buffer[, options])` versionsLivia Medeiros
This adds the following: - `fs.read(fd, buffer[, options], callback)`. - `filehandle.read(buffer[, options])`. PR-URL: https://github.com/nodejs/node/pull/42768 Refs: https://github.com/nodejs/node/pull/42601 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-10http2: compat support for array headersOneNail
PR-URL: https://github.com/nodejs/node/pull/42901 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2022-05-10assert: make `assert.fail` less affected by prototype tamperingAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/42918 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2022-05-10crypto: clean up parameter validation in HKDFTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/42924 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
2022-05-10doc: clarify some default values in `fs.md`Livia Medeiros
PR-URL: https://github.com/nodejs/node/pull/42892 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-05-02worker: add hasRef() to MessagePortDarshan Sen
Since we were removing the hasRef() method before exposing the MessagePort object, the only way of knowing if the handle was keeping the event loop active was to parse the string returned by util.inspect(port), which is inconvenient and inconsistent with most of the other async resources. So this change stops removing hasRef() from the MessagePort prototype. The reason why this is also being documented is that while reporting active resources, async_hooks returns the same MessagePort object as the one that is accessible by users. Refs: https://github.com/nodejs/node/issues/42091#issuecomment-1104793189 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/42849 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-05-02perf_hooks: return different functions in timerifyHimself65
Fixes: https://github.com/nodejs/node/issues/42742 PR-URL: https://github.com/nodejs/node/pull/42854 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Co-authored-by: HE Shi-Jun <hax@heshijun.net>
2022-05-02v8: export cpu_profiler_metadata_size in getHeapCodeStatisticstheanarkh
PR-URL: https://github.com/nodejs/node/pull/42818 Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-05-02esm: fix imports from non-file moduleAntoine du Hamel
Fixes: https://github.com/nodejs/node/issues/42860 PR-URL: https://github.com/nodejs/node/pull/42881 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2022-05-02errors,console: refactor to use ES2021 syntax小菜
PR-URL: https://github.com/nodejs/node/pull/42872 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-28lib,src: use Response URL as WebAssembly locationTobias Nießen
As per Section 3 of the WebAssembly Web API spec. PR-URL: https://github.com/nodejs/node/pull/42842 Refs: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28errors,vm: update error and use causeGus Caplan
PR-URL: https://github.com/nodejs/node/pull/42820 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-04-28lib: remove experimental warning from FormDataXuguang Mei
fixes: https://github.com/nodejs/node/issues/42792 PR-URL: https://github.com/nodejs/node/pull/42807 Fixes: https://github.com/nodejs/node/issues/42792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-28crypto: validate `this` in all webcrypto methods and gettersFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/42815 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-04-28v8: export more fields in getHeapStatisticstheanarkh
export total_global_handles_size, used_global_handles_size, external_memory in getHeapStatistics PR-URL: https://github.com/nodejs/node/pull/42784 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-28lib,src: implement WebAssembly Web APITobias Nießen
Refs: https://github.com/nodejs/node/pull/41749 Fixes: https://github.com/nodejs/node/issues/21130 PR-URL: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-28doc: consolidate use of multiple-byte unitsAntoine du Hamel
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: https://github.com/nodejs/node/pull/42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
2022-04-28test_runner: add initial CLI runnerColin Ihrig
This commit introduces an initial version of a CLI-based test runner. PR-URL: https://github.com/nodejs/node/pull/42658 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-14module: ensure 'node:'-only modules can access node_modulesColin Ihrig
This commit allows require() and import to search the node_modules directories when importing a core module that must have the node: scheme. This prevents these core modules from shadowing userland modules with the same name but no prefix. PR-URL: https://github.com/nodejs/node/pull/42430 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com>
2022-04-13http: refactor headersTimeout and requestTimeout logicPaolo Insogna
PR-URL: https://github.com/nodejs/node/pull/41263 Fixes: https://github.com/nodejs/node/issues/33440 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-12buffer: fix `atob` input validationAustin Kelleher
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: https://github.com/nodejs/node/issues/42646 PR-URL: https://github.com/nodejs/node/pull/42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
2022-04-12dns: remove `dns.lookup` and `dnsPromises.lookup` options type coercionAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/41431 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-04-12net: make `server.address()` return an integer for `family`Antoine du Hamel
`dns.lookup` options only accepts integer for `family` options, having a string doesn't really make sense here. PR-URL: https://github.com/nodejs/node/pull/41431 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-04-08stream: remove thenable supportRobert Nagy
Remove support for returning thenables in stream implementation methods. This is causing more confusion and issues than it's worth. Refs: https://github.com/nodejs/node/issues/39535 PR-URL: https://github.com/nodejs/node/pull/40773 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-08readline: fix question still called after closedXuguang Mei
resolve: https://github.com/nodejs/node/issues/42450 PR-URL: https://github.com/nodejs/node/pull/42464 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-04-08fs: runtime deprecate string coercion in `fs.write`, `fs.writeFileSync`Livia Medeiros
This also affects `fs.writeFile`, `fs.appendFile`, and `fs.appendFileSync` PR-URL: https://github.com/nodejs/node/pull/42607 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-04-04buffer: improve Blob constructor error message when passing a stringXuguang Mei
resolve: https://github.com/nodejs/node/issues/38856 PR-URL: https://github.com/nodejs/node/pull/42338 Fixes: https://github.com/nodejs/node/issues/38856 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-04test_runner: support 'only' testsColin Ihrig
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: https://github.com/nodejs/node/pull/42514 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-04-04fs: fix write methods param validation and docsLivia Medeiros
The FS docs wrongfully indicated support for passing object with an own `toString` function property to `FileHandle.prototype.appendFile`, `FileHandle.prototype.writeFile`, `FileHandle.prototype.write`, `fsPromises.writeFile`, and `fs.writeSync`. This commit fixes that, and adds some test to ensure the actual behavior is aligned with the docs. It also fixes a bug that makes the process crash if a non-buffer object was passed to `FileHandle.prototype.write`. Refs: https://github.com/nodejs/node/pull/34993 PR-URL: https://github.com/nodejs/node/pull/41677 Refs: https://github.com/nodejs/node/issues/41666 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>