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
AgeCommit message (Collapse)Author
2020-09-15http: add requestTimeoutMatteo Collina
This commits introduces a new http.Server option called requestTimeout with a default value in milliseconds of 0. If requestTimeout is set to a positive value, the server will start a new timer set to expire in requestTimeout milliseconds when a new connection is established. The timer is also set again if new requests after the first are received on the socket (this handles pipelining and keep-alive cases). The timer is cancelled when: 1. the request body is completely received by the server. 2. the response is completed. This handles the case where the application responds to the client without consuming the request body. 3. the connection is upgraded, like in the WebSocket case. If the timer expires, then the server responds with status code 408 and closes the connection. CVE-2020-8251 PR-URL: https://github.com/nodejs-private/node-private/pull/208 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Co-Authored-By: Paolo Insogna <paolo@cowtech.it> Co-Authored-By: Robert Nagy <ronagy@icloud.com>
2020-09-12errors: simplify ERR_REQUIRE_ESM message generationRich Trott
Because of the condition that starts the `if` block, we know that `parentPath` must be truthy. So there is no need to check for that in the template string that generates the error message. PR-URL: https://github.com/nodejs/node/pull/35123 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2020-09-11lib: remove ERR_INVALID_OPT_VALUE and ERR_INVALID_OPT_VALUE_ENCODINGDenys Otrishko
This will be a start to generalize all argument validation errors. As currently we throw ARG/OPT, OUT_OF_RANGE, and other more specific errors. The OPT errors didn't bring much to the errors as it's just another variant of ARG error which is sometimes more confusing (some of our code used OPT errors to denote just argument validation errors presumably because of similarity of OPT to 'option' and not 'options-object') and they don't specify the name of the options object where the invalid value is located. Much better approach would be to just specify path to the invalid value in the name of the value as it is done in this PR (i.e. 'options.format', 'options.publicKey.type' etc) Also since this decreases a variety of errors we have it'd be easier to reuse validation code across the codebase. Refs: https://github.com/nodejs/node/pull/31251 Refs: https://github.com/nodejs/node/pull/34070#discussion_r467251009 Signed-off-by: Denys Otrishko <shishugi@gmail.com> PR-URL: https://github.com/nodejs/node/pull/34682 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-09-11esm: better package.json parser errorsGuy Bedford
PR-URL: https://github.com/nodejs/node/pull/35117 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-30esm: shorten ERR_UNSUPPORTED_ESM_URL_SCHEME messageRich Trott
I know it just got modified to include new information, but this shortens the message a bit without (I hope) losing clarity or meaning. PR-URL: https://github.com/nodejs/node/pull/34836 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-08-26errors: use `ErrorPrototypeToString` from `primordials` objectExE Boss
PR-URL: https://github.com/nodejs/node/pull/34891 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-08-19workers: add support for data: URLsAntoine du HAMEL
PR-URL: https://github.com/nodejs/node/pull/34584 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2020-08-19esm: improve error message of ERR_UNSUPPORTED_ESM_URL_SCHEMEDenys Otrishko
Refs: https://github.com/nodejs/node/issues/34765 PR-URL: https://github.com/nodejs/node/pull/34795 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-18doc,lib: remove unused error codeRich Trott
As best as I can tell, ERR_V8BREAKITERATOR is unused anywhere in our code base and dependencies. Move to legacy errors. PR-URL: https://github.com/nodejs/node/pull/34792 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-08-15errors: improve ERR_INVALID_OPT_VALUE errorDenys Otrishko
* use util.inspect for value presentation * allow to optionally specify error reason PR-URL: https://github.com/nodejs/node/pull/34671 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
2020-08-13policy: support conditions for redirectsBradley Farias
PR-URL: https://github.com/nodejs/node/pull/34414 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2020-08-13module: share CJS/ESM resolver fns, refactoringGuy Bedford
PR-URL: https://github.com/nodejs/node/pull/34744 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-16quic: cleanup QuicClientSession constructorJames M Snell
PR-URL: https://github.com/nodejs/node/pull/34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-10quic: use less specific error codesJames M Snell
Stop the madness. Only you can prevent excessive error code proliferation. PR-URL: https://github.com/nodejs/node/pull/34262 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-10module: package "imports" fieldGuy Bedford
PR-URL: https://github.com/nodejs/node/pull/34117 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-07-03crypto: move typechecking for timingSafeEqual into C++Anna Henningsen
This makes the function more robust against V8 inlining. Fixes: https://github.com/nodejs/node/issues/34073 PR-URL: https://github.com/nodejs/node/pull/34141 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-06-25lib: handle one of args case in ERR_MISSING_ARGSDenys Otrishko
This makes ERR_MISSING_ARGS handle nested arrays in argument names as one-of case and will print them as '"arg1" or "arg2" or "arg3"'. Example: ```js throw new ERR_MISSING_ARGS(['a', 'b', 'c']); // will result in message: // The "a" or "b" or "c" argument must be specified ``` PR-URL: https://github.com/nodejs/node/pull/34022 Fixes: https://github.com/nodejs/node/issues/33930 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-06-19lib: remove NodeError from the prototype of errors with codeMichaël Zasso
Signed-off-by: Michaël Zasso <targos@protonmail.com> PR-URL: https://github.com/nodejs/node/pull/33857 Refs: https://github.com/nodejs/node/pull/33770 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-06-16quic: initial QUIC implementationJames M Snell
Co-authored-by: Anna Henningsen <anna@addaleax.net> Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com> Co-authored-by: gengjiawen <technicalcute@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com> Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com> Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com> Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com> Co-authored-by: Denys Otrishko <shishugi@gmail.com> PR-URL: https://github.com/nodejs/node/pull/32379 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-09zlib: add `maxOutputLength` optionunknown
Fixes: https://github.com/nodejs/node/issues/27253 PR-URL: https://github.com/nodejs/node/pull/33516 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-30errors: fully inspect errors on exitRuben Bridgewater
This makes sure errors are fully inspected during exit. That is important to provide as many debugging information to the user as possible. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33523 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-28events: initial implementation of experimental EventTargetJames M Snell
See documentation changes for details Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33556 Refs: https://github.com/nodejs/node/pull/33527 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-05-28module: remove dynamicInstantiate loader hookJan Krems
The dynamicInstantiate loader hook requires that the hooks run in the same global scope as the code being loaded. We don't want to commit to this being true in the future. It stops us from sharing hooks between multiple worker threads or isolating loader hook from the application code. Using `getSource` and `getGlobalPreloadCode` the same use cases should be covered. PR-URL: https://github.com/nodejs/node/pull/33501 Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-05-24inspector: throw error when activating an already active inspectorJoyee Cheung
When the user tries to activate the inspector that is already active on a different port and host, we previously just silently reset the port and host stored in the Environment without actually doing anything for that to be effective. After this patch, we throw an error telling the user to close the active inspector before invoking `inspector.open()` again. PR-URL: https://github.com/nodejs/node/pull/33015 Fixes: https://github.com/nodejs/node/issues/33012 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-23http: fixed socket.setEncoding fatal erroriskore
Applied updates from previous pull-requests to disallow socket.setEncoding before a http connection is parsed. Wrapped `socket.setEncoding` to throw an error. This previously resulted in a fatal error. PR-URL: https://github.com/nodejs/node/pull/33405 Fixes: https://github.com/nodejs/node/issues/18118 Refs: https://github.com/nodejs/node/pull/18178 Refs: https://github.com/nodejs/node/pull/19344 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-18errors: skip fatal error highlighting on windowsThomas
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: https://github.com/nodejs/node/pull/33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-16tools: enable no-else-return lint ruleLuigi Pinca
Refs: https://github.com/nodejs/node/pull/32644 Refs: https://github.com/nodejs/node/pull/32662 PR-URL: https://github.com/nodejs/node/pull/32667 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-05-16module: add specific error for dir importAntoine du HAMEL
PR-URL: https://github.com/nodejs/node/pull/33220 Fixes: https://github.com/nodejs/node/issues/33219 Reviewed-By: Guy Bedford <guybedford@gmail.com>
2020-05-15fs: forbid concurrent operations on Dir handleAnna Henningsen
libuv does not expect concurrent operations on `uv_dir_t` instances, and will gladly create memory leaks, corrupt data, or crash the process. This patch forbids that, and: - Makes sure that concurrent async operations are run sequentially - Throws an exception if sync operations are attempted during an async operation The assumption here is that a thrown exception is preferable to a potential hard crash. This fully fixes flakiness from `parallel/test-fs-opendir` when run under ASAN. PR-URL: https://github.com/nodejs/node/pull/33274 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-14src: add support for TLAGus Caplan
PR-URL: https://github.com/nodejs/node/pull/30370 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-28lib: fix validateport error message when allowZero is falserickyes
PR-URL: https://github.com/nodejs/node/pull/32861 Fixes: https://github.com/nodejs/node/issues/32857 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-28module: refactor conditionMyles Borins
PR-URL: https://github.com/nodejs/node/pull/32989 Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-04-23assert: port common.mustCall() to assertConorDavenport
Fixes: https://github.com/nodejs/node/issues/31392 PR-URL: https://github.com/nodejs/node/pull/31982 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-04-22module: improve error for invalid package targetsMyles Borins
For targets that are strings that do not start with `./` or `/` the error will now have additional information about what the programming error is. Closes: https://github.com/nodejs/node/issues/32034 PR-URL: https://github.com/nodejs/node/pull/32052 Fixes: https://github.com/nodejs/node/issues/32034 Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Signed-off-by: Myles Borins <myles.borins@gmail.com>
2020-04-15stream: simplify Transform stream implementationRobert Nagy
Significantly simplified Transform stream implementation by using mostly standard stream code. PR-URL: https://github.com/nodejs/node/pull/32763 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-17errors: drop pronouns from ERR_WORKER_PATH messagecjihrig
This commit drops pronouns from the ERR_WORKER_PATH message, and also shortens the text a bit. PR-URL: https://github.com/nodejs/node/pull/32285 Refs: https://github.com/nodejs/node/pull/31664 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-03-13esm: port loader code to JSAnna Henningsen
There is no reason for this to be in C++. Using JavaScript means that the code is more accessible to more developers, which is important for any Node.js feature. This also simplifies the code significantly in some areas. On the technical side, this potentially also enables making some of the file system operations that are involved asynchronous. PR-URL: https://github.com/nodejs/node/pull/32201 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2020-03-13worker: allow URL in Worker constructorAntoine du HAMEL
The explicit goal is to let users use `import.meta.url` to re-load thecurrent module inside a Worker instance. Fixes: https://github.com/nodejs/node/issues/30780 PR-URL: https://github.com/nodejs/node/pull/31664 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-03-05lib: move isLegalPort to validators, refactorJames M Snell
isLegalPort was used multiple places in the same way -- to validate the port and throw if necessary. Moved into internal/validators. PR-URL: https://github.com/nodejs/node/pull/31851 Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-02-28errors: remove unused ERR_SOCKET_CANNOT_SEND errorcjihrig
This error is no longer used within core. This commit removes it. PR-URL: https://github.com/nodejs/node/pull/31958 Refs: https://github.com/nodejs/help/issues/2484 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2020-02-26vm: implement vm.measureMemory() for per-context memory measurementJoyee Cheung
This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update. PR-URL: https://github.com/nodejs/node/pull/31824 Refs: https://github.com/ulan/performance-measure-memory Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-02-23tls: expose SSL_export_keying_materialsimon
Fixes: https://github.com/nodejs/node/issues/31802 PR-URL: https://github.com/nodejs/node/pull/31814 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-02-19worker: emit runtime error on loop creation failureHarshitha KP
Instead of hard asserting throw a runtime error, that is more consumable. Fixes: https://github.com/nodejs/node/issues/31614 PR-URL: https://github.com/nodejs/node/pull/31621 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-02-18module: package "exports" error refinementsGuy Bedford
PR-URL: https://github.com/nodejs/node/pull/31625 Reviewed-By: Jan Krems <jan.krems@gmail.com>
2020-02-13worker: add support for .cjs extensionAntoine du HAMEL
PR-URL: https://github.com/nodejs/node/pull/31662 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-02-13worker: properly handle env and NODE_OPTIONS in workersDenys Otrishko
PR-URL: https://github.com/nodejs/node/pull/31711 Fixes: https://github.com/nodejs/node/issues/30627 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-02-03worker: add ability to take heap snapshot from parent threadAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/31569 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-01-25fs: watch signals for recursive incompatibilityEran Levin
This pull request makes fs.watch throw exception, whenever it is used in an incompatible platform. For this change following changes were made to api: 1.a new error type has been introduced. 2.fs.watch has been changed accordingly. Users who use recursive on non-windows and osx platforms, will face a new exception. For this reason, it's a breaking change. Fixes: https://github.com/nodejs/node/issues/29901 PR-URL: https://github.com/nodejs/node/pull/29947 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-01-23errors: make use of "cannot" consistentTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/31420 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-01-22lib,src: switch Buffer::kMaxLength to size_tBen Noordhuis
Change the type of `Buffer::kMaxLength` to size_t because upcoming changes in V8 will allow typed arrays > 2 GB on 64 bits platforms. Not all platforms handle file reads and writes > 2 GB though so keep enforcing the 2 GB typed array limit for I/O operations. Fixes: https://github.com/nodejs/node/issues/31399 Refs: https://github.com/libuv/libuv/pull/1501 PR-URL: https://github.com/nodejs/node/pull/31406 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Shelley Vohr <codebytere@gmail.com>