0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

8082 Commits

Author SHA1 Message Date
Ruben Bridgewater
9de08f773e
lib: update TODO comments
This removes one TODO comment and adds another that indicates that
readline is currently not able to trigger specific escape sequences.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33361
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-05-20 17:05:06 +02:00
Anna Henningsen
d2a6f06dce
worker: use _writev in internal communication
PR-URL: https://github.com/nodejs/node/pull/33454
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-20 12:37:25 +02:00
rickyes
1a12b82396
fs: refactor the import of internalUtil
PR-URL: https://github.com/nodejs/node/pull/33296
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-05-20 12:34:54 +02:00
Pranshu Srivastava
08308c7111
http2: do not modify explicity set date headers
Fixes: https://github.com/nodejs/node/issues/30894
Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-20 12:33:50 +02:00
Ruben Bridgewater
3a5158878b
util: mark classes while inspecting them
This outlines the basic class setup when inspecting a class.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/32332
Fixes: https://github.com/nodejs/node/issues/32270
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-05-20 12:32:22 +02:00
Daniel Bevenius
ff016fbd83 lib: update executionAsyncId/triggerAsyncId comment
This commit updates the comment referring to the
executionAsyncId/triggerAsyncId pair being stored in a std::stack.

It looks like this was changed from std::stack to AliasedFloat64Array in
Commit 83e5215a4e ("async_hooks: use
typed array stack as fast path").

PR-URL: https://github.com/nodejs/node/pull/33396
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-20 11:31:14 +02:00
delvedor
daa65fba7d http: added scheduling option to http agent
In some cases, it is preferable to use a lifo scheduling strategy
for the free sockets instead of default one, which is fifo.
This commit introduces a scheduling option to add the ability
to choose which strategy best fits your needs.

PR-URL: https://github.com/nodejs/node/pull/33278
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-05-20 11:00:14 +02:00
Pranshu Srivastava
ee8756760c
http2: comment on usage of Object.create(null)
Refs: https://github.com/nodejs/node/issues/29829

PR-URL: https://github.com/nodejs/node/pull/33183
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-19 23:58:10 +02:00
Robert Nagy
2361b5c041 stream: forward writableObjectMode
Duplex did not properly forward writableObjectMode.

Fixes: https://github.com/nodejs/node/issues/33388

PR-URL: https://github.com/nodejs/node/pull/33390
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-19 00:02:32 +02:00
Antoine du HAMEL
a12a2d892f repl: update deprecation codes
Refs: https://github.com/nodejs/node/pull/33294

PR-URL: https://github.com/nodejs/node/pull/33430
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-18 03:20:40 +02:00
Thomas
1c619143eb errors: skip fatal error highlighting on windows
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-18 02:31:30 +02:00
Ruben Bridgewater
ab7d5200cd
repl: deprecate repl._builtinLibs
This is a manually edited and outdated list of builtin modules.
Instead, it is better to rely upon the officially documented way
to get a list of builtin modules.

As a side by fix this makes sure all exports are in one place. Thus,
it is easier to see what parts are actually exported and which are
not.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-16 10:54:07 +02:00
Ruben Bridgewater
ee176f1205
repl: remove obsolete completer variable
It is also assigned in readline. There is not need to assign the
variable twice.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-16 10:53:58 +02:00
Ruben Bridgewater
e11b5d3d7d
repl: deprecate repl.inputStream and repl.outputStream
The stream is exposed twice. As such it's best to rely upon the
.input and .output properties set by readline.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-16 10:53:54 +02:00
Pranshu Srivastava
2b50cd7a6d
http: don't throw on Uint8Arrays for http.ServerResponse#write
Don't throw errors on Uint8Arrays and added test for all
valid types.

PR-URL: https://github.com/nodejs/node/pull/33155
Fixes: https://github.com/nodejs/node/issues/33379
Refs: https://github.com/nodejs/node/issues/29829
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-05-16 10:46:10 +02:00
Luigi Pinca
b533fb3508 tools: enable no-else-return lint rule
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-16 06:42:16 +02:00
Antoine du Hamel
1cb80d1e05 esm: improve commonjs hint on module not found
Adds hint when module specifier is a file URL.

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-15 19:09:01 -07:00
Antoine du HAMEL
985e9c5fe5 module: add specific error for dir import
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-15 19:08:39 -07:00
Anna Henningsen
d3a8a23089
fs: forbid concurrent operations on Dir handle
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-15 19:36:50 +02:00
Matteo Collina
2d5d77306f Revert "vm: add importModuleDynamically option to compileFunction"
This reverts commit 74c393dd93.

Fixes: https://github.com/nodejs/node/issues/33166

PR-URL: https://github.com/nodejs/node/pull/33364
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-05-15 12:14:35 +02:00
Ruben Bridgewater
24bf1adacc module: do not check circular dependencies for exported proxies
In case the exported module is a proxy that has the `getPrototypeOf`
or `setPrototypeOf` trap, skip the circular dependencies check.
It would otherwise be triggered by the check itself.

Fixes: https://github.com/nodejs/node/issues/33334

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33338
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-05-15 01:55:28 +02:00
Ruben Bridgewater
50ba066921 repl: improve repl autocompletion for require calls
This improves the autocompletion for require calls. It had multiple
small issues so far. Most important: it won't suggest completions for
require statements that are fully written out. Second, it'll detect
require calls that have whitespace behind the opening bracket. Third,
it makes sure node modules are detected as such instead of only
suggesting them as folders. Last, it adds suggestions for input that
starts with backticks.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33282
Fixes: https://github.com/nodejs/node/issues/33238
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-15 01:48:40 +02:00
Ruben Bridgewater
900daedbfe repl: replace hard coded core module list with actual list
This replaces the internally used hard coded Node.js core module
list with the actual internal existent modules. That way all modules
are automatically picked up instead of having to update the list
manually.

This currently only applies to the REPL and to the Node.js `eval`
functionality (User passed `-e` or `--eval` arguments to Node without
`-i` or `--interactive`).

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-15 01:48:17 +02:00
Ruben Bridgewater
b38d26a168 repl: show reference errors during preview
This aligns the behavior with the one in the Firefox console.
It will visualize ReferenceErrors in case the input has no possible
completion and no buffered input. That way typos can already be
highlighted before being evaluated.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-15 01:48:13 +02:00
Ruben Bridgewater
80913e655f repl: improve repl preview
This aligns the REPL preview with the one used in the Chrome
DevTools console. It will now preview the output for the input
including the completion suffix as input. When pressing enter while
previewing such data, it will automatically insert the suffix
before evaluating the input. When pressing escape, that behavior
is deactivated until the input is changed.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-15 01:48:08 +02:00
Gus Caplan
5ae5262f44
src: add support for TLA
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-05-14 12:39:23 -05:00
Alba Mendez
1dafaf03cb tls: fix --tls-keylog option
There's a typo that causes only the first socket to be logged
(i.e. when the warning is emitted).

In addition, server sockets aren't logged because `keylog` events
are not emitted on tls.Server, not the socket. This behaviour is
counterintuitive and has caused more bugs in the past, so make all
sockets (server or client) emit 'keylog'. tls.Server will just
re-emit these events.

Refs: https://github.com/nodejs/node/pull/30055
PR-URL: https://github.com/nodejs/node/pull/33366
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-05-14 16:52:52 +02:00
Daniel Bevenius
e1b90be3b7 src: add primordials to arguments comment
This commit adds the primordials argument to the comment of arguments
passed to bootstrap/node.js.

PR-URL: https://github.com/nodejs/node/pull/33318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-05-13 09:23:25 +02:00
Robert Nagy
b04e88439a http: don't destroy completed request
Calling destroy() on a completed ClientRequest, i.e.
once 'close' will be emitted should be a noop. Also
before emitting 'close' destroyed === true.

Fixes: https://github.com/nodejs/node/issues/32851

PR-URL: https://github.com/nodejs/node/pull/33120
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-05-11 18:02:32 +02:00
Robert Nagy
8a6fab02ad http: emit 'error' on aborted server request
Server requests aka. IncomingMessage emits 'aborted'
instead of 'error' which causes confusion when
the object is used as a regular stream, i.e. if
functions working on streams are passed a
server request object they might not work properly
unless they take this into account.

Refs: https://github.com/nodejs/web-server-frameworks/issues/41

PR-URL: https://github.com/nodejs/node/pull/33172
Fixes: https://github.com/nodejs/node/issues/28172
Refs: https://github.com/nodejs/node/pull/28677
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-10 22:11:21 +02:00
Daniel Bevenius
2fa86b818b
lib: fix typo in timers insert function comment
PR-URL: https://github.com/nodejs/node/pull/33301
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-10 14:09:39 +02:00
Michaël Zasso
1182539307
perf_hooks: fix error message for invalid entryTypes
Will now print a more meaningful value instead of always [object Object]

PR-URL: https://github.com/nodejs/node/pull/33285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-10 13:53:15 +02:00
cjihrig
94e5b5c77d
http: return this from OutgoingMessage#destroy()
This commit updates OutgoingMessage#destroy() to return `this`
for consistency with other writable streams.

PR-URL: https://github.com/nodejs/node/pull/32789
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-09 13:57:29 -04:00
cjihrig
cad76da198
http: return this from ClientRequest#destroy()
This commit updates ClientRequest#destroy() to return `this`
for consistency with other writable streams.

PR-URL: https://github.com/nodejs/node/pull/32789
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-09 13:57:28 -04:00
cjihrig
ff6535a433
http: return this from IncomingMessage#destroy()
This commit updates IncomingMessage#destroy() to return `this`
for consistency with other readable streams.

PR-URL: https://github.com/nodejs/node/pull/32789
Fixes: https://github.com/nodejs/node/issues/32772
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-09 13:57:28 -04:00
Nikolai Vavilov
339690ce9b
buffer: improve copy() performance
There is no need to create a slice when sourceEnd is out of bounds.

PR-URL: https://github.com/nodejs/node/pull/33214
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-05-09 08:04:10 +02:00
David Halls
ea465faf4a
tls: reset secureConnecting on client socket
secureConnecting is never set to false on client TLS sockets.
So if Http2Session constructor (in lib/internal/http2/core.js) is
called after secureConnect is emitted, then it will wrongly wait
for a secureConnect event.

This fix sets secureConnecting to false when a client TLS socket
has connected.

PR-URL: https://github.com/nodejs/node/pull/33209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-05-09 08:03:13 +02:00
rickyes
be7fd2d517
fs: add .ref() and .unref() methods to watcher classes
PR-URL: https://github.com/nodejs/node/pull/33134
Fixes: https://github.com/nodejs/node/issues/33096
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-09 07:59:08 +02:00
Robert Nagy
28e6626ce7
http: set IncomingMessage.destroyed
IncomingMessage is a Readable stream and should properly
set the destroyed property.

PR-URL: https://github.com/nodejs/node/pull/33131
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-05-09 07:57:45 +02:00
osher
96faea137e
http: expose http.validate-header-name/value
The use-case is for any framework that provides user mw a response
replacement, that collects the desired response state, and applies them
only on conclusion. As such a framework, I'd want to validate the
header names and values as soon as the user-code provides them.
This - to eliminate errors on response-send time, and provide developer
stack trace that contains the line that submits the offending values.

PR-URL: https://github.com/nodejs/node/pull/33119
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-05-09 07:55:55 +02:00
Ben Noordhuis
d8a380e136
zlib: reject windowBits=8 when mode=GZIP
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.

PR-URL: https://github.com/nodejs/node/pull/33045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-05-09 07:54:40 +02:00
Stephen Belanger
13c5a1629c
async_hooks: move PromiseHook handler to JS
This avoids the need to wrap every promise in an AsyncWrap and also
makes it easier to skip the machinery to track destroy events when
there's no destroy listener.

Co-authored-by: Andrey Pechkurov <apechkurov@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32891
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2020-05-09 07:52:22 +02:00
Yash Ladha
023bcdeb28
lib: refactored scheduling policy assignment
In previous implementation it was clubbed into declaration of scheduling
policies and fetching the schedulingPolicy. Now they are separate
variables, so that in future if one want to add new scheduling policy.
It is much simpler and not obsfucated.

PR-URL: https://github.com/nodejs/node/pull/32663
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-05-09 07:50:11 +02:00
Myles Borins
2c3c9f5a3f
module: better error for named exports from cjs
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-05-08 15:35:16 -04:00
Robert Nagy
d005f490a8 http: cleanup end argument handling
PR-URL: https://github.com/nodejs/node/pull/31818
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-08 19:57:58 +02:00
szTheory
4d4e3c3674
lib: fix grammar in internal/bootstrap/loaders.js
PR-URL: https://github.com/nodejs/node/pull/33211
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-05-08 01:24:52 +02:00
himself65
f153081d26
module: lazy load 'getOptionValue' in initializeLoader
This enables loading this module during early bootstrapping.

PR-URL: https://github.com/nodejs/node/pull/33212
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-05-08 01:11:45 +02:00
Robert Nagy
8607f9ec5c stream: make from read one at a time
Currently from will eagerly buffer up items
which means that errors are also eagerly
encountered and items which are buffer when
an error occurs will be discarded, which is
inconsistent with how generators work.

Fixes: https://github.com/nodejs/node/issues/29428

PR-URL: https://github.com/nodejs/node/pull/33201
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-06 22:39:33 +02:00
John Leidegren
26f150022f http: fixes memory retention issue with FreeList and HTTPParser
Fixes: https://github.com/nodejs/node/issues/29394
Refs: https://github.com/nodejs/node/pull/33167#issuecomment-622102450

PR-URL: https://github.com/nodejs/node/pull/33190
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-05-05 16:14:46 +02:00
Robert Nagy
027e1c706d http: ensure client request emits close
If socket creation failed then an error would be
emitted on the client request object, but not
'close' nor would destroyed be set to true.

PR-URL: https://github.com/nodejs/node/pull/33178
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-04 11:35:58 +02:00