Anna Henningsen
4d16d1ed34
zlib: generate error code names in C++
...
This makes it easier to implement the lookup in a way that targets
error codes from a specific compression library, as a way towards
supporting multiple ones (e.g. brotli).
PR-URL: https://github.com/nodejs/node/pull/23413
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-10-12 14:29:52 -07:00
Sagi Tsofan
82ea7058b6
lib: http server, friendly error messages
...
Improved error message description for the http server binding errors.
Currently changed only in `setupListenHandle`, but needs to be
change all over.
Added new `uvExceptionWithHostPort` function (+export) in
`lib/internal/error.js` that extracts the error message defined by
libuv, using the error code, and returns an error object with the
full error description.
example:
old error message: `listen EADDRINUSE`
new error message: `listen EADDRINUSE: Address already in use`
Removed exportable function `_exceptionWithHostPort` from
`lib/util.js` - exported by accident
Replaced `exceptionWithHostPort` to the new function
`uvExceptionWithHostPort` for a more detailed error.
Fixes: https://github.com/nodejs/node/issues/22936
PR-URL: https://github.com/nodejs/node/pull/22995
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-11 21:21:36 -07:00
Ouyang Yadong
e4dea40ce7
tls: make StreamWrap work correctly in "drain" callback
...
When an instance of StreamWrap is shutting down and a "drain" event
is emitted, the instance will abort as its
`this[kCurrentShutdownRequest]` is already set. The following test
will fail before this commit.
PR-URL: https://github.com/nodejs/node/pull/23294
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-10-12 05:17:22 +02:00
John-David Dalton
b6dcf8c012
Revert "module: fix inconsistency between load and _findPath"
...
This reverts commit 1b92214
from PR #22382 .
See the discussion at
https://github.com/nodejs/citgm/issues/604
PR-URL: https://github.com/nodejs/node/pull/23228
Refs: https://github.com/nodejs/node/pull/22382
Fixes: https://github.com/nodejs/node/issues/4778
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-10-10 11:07:38 +02:00
Bastian Krol
eb9748d222
async_hooks: add missing async_hooks destroys in AsyncReset
...
This adds missing async_hooks destroy calls for sockets (in
_http_agent.js) and HTTP parsers. We need to emit a destroy in
AsyncWrap#AsyncReset before assigning a new async_id when the instance
has already been in use and is being recycled, because in that case, we
have already emitted an init for the "old" async_id.
This also removes a duplicated init call for HTTP parser: Each time a
new parser was created, AsyncReset was being called via the C++ Parser
class constructor (super constructor AsyncWrap) and also via
Parser::Reinitialize.
PR-URL: https://github.com/nodejs/node/pull/23272
Fixes: https://github.com/nodejs/node/issues/19859
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-10 08:45:56 +02:00
Jackson Tian
45c70b0ce7
net: use connect() instead of connect.call()
...
Use socket.connect() directly.
PR-URL: https://github.com/nodejs/node/pull/23289
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Thomas Watson <w@tson.dk >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-10 08:38:53 +02:00
Masashi Hirano
d71dd97263
util: support BigInt in util.format
...
`util.format` and `console.log` now support BigInt via the existing
format specifiers `%i` and `%d`.
PR-URL: https://github.com/nodejs/node/pull/22097
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-09 20:11:48 +02:00
Brandon Smith
13340d47fc
benchmark,doc,lib,src,test,tools: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/23302
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-10-09 16:53:12 +03:00
Rich Trott
4d58c08865
assert: remove internal errorCache property
...
The internal assert module exposed an errorCache property solely for
testing. It is no longer necessary. Remove it.
PR-URL: https://github.com/nodejs/node/pull/23304
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-10-09 06:39:46 -07:00
cjihrig
2ec57a7134
buffer: unconditionally use internalBinding
...
With the removal of test-buffer-bindingobj-no-zerofill.js,
internalBinding can be used unconditionally to assign
isAnyArrayBuffer().
PR-URL: https://github.com/nodejs/node/pull/23234
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-10-08 23:43:00 -04:00
cjihrig
2498c7b18b
icu: make process.binding('icu') internal
...
PR-URL: https://github.com/nodejs/node/pull/23234
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-10-08 23:42:52 -04:00
Gus Caplan
8bce9e8f19
streams: refactor ReadableStream asyncIterator creation and a few fixes
...
Closes: https://github.com/nodejs/node/issues/23041
- Rewrite `ReadableAsyncIterator` class into
`ReadableStreamAsyncIteratorPrototype` which contains no constructor and
inherits from `%AsyncIteratorPrototype%`.
- Rewrite `AsyncIteratorRecord` into dumb function.
PR-URL: https://github.com/nodejs/node/pull/23042
Fixes: https://github.com/nodejs/node/issues/23041
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-10-08 22:17:29 -05:00
Anna Henningsen
e688fe6b7e
zlib: simplify flushing mechanism
...
Previously, flushing on zlib streams was implemented through
stream 'drain' handlers. This has a number of downsides; in
particular, it is complex, and could lead to unpredictable
behaviour, since it meant that in a sequence like
```js
compressor.write('abc');
compressor.flush();
waitForMoreDataAsynchronously(() => {
compressor.write('def');
});
```
it was not fully deterministic whether the flush happens after
the second chunk is written or the first one.
This commit replaces this mechanism by one that piggy-backs
along the stream’s write queue, using a “special” `Buffer`
instance that signals that a flush is currently due.
PR-URL: https://github.com/nodejs/node/pull/23186
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-08 20:06:45 -07:00
James M Snell
0ad8c7319d
http2: add RFC 8441 extended connect protocol support
...
PR-URL: https://github.com/nodejs/node/pull/23284
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-10-08 08:41:35 -07:00
Beni von Cheni
f5ab9d1765
tls: update test & docs for ArrayBuffer/DataView
...
In tls module, accept ArrayBuffer/DataView in place of isUint8Array in
the source code & related test code in "test-tls-basic-validations.js",
per the "tls" item in the checklist of the comment in #1826 .
PR-URL: https://github.com/nodejs/node/pull/23210
Refs: https://github.com/nodejs/node/issues/1826
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-10-08 08:29:33 +02:00
Anna Henningsen
a9bb653ecc
zlib: use common owner symbol to access JS wrapper
...
Use the same symbol that other `AsyncWrap` instances also use
for accessing the JS wrapper.
PR-URL: https://github.com/nodejs/node/pull/23189
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-10-07 15:28:36 -07:00
Gus Caplan
4c37df779c
vm: add dynamic import support
...
PR-URL: https://github.com/nodejs/node/pull/22381
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-10-06 17:33:25 -05:00
Ouyang Yadong
26af728994
dns: deprecate passing falsy hostname to dns.lookup
...
We can `dns.lookup` a falsy `hostname` like `dns.lookup(false)`
for the reason of backwards compatibility long before(see #13119
for detail). This behavior is undocumented and seems useless in
real world apps.
We could also make invalid `hostname` throw in the future and the
change might be semver-major.
Fixes: https://github.com/nodejs/node/issues/13119
PR-URL: https://github.com/nodejs/node/pull/23173
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-10-04 14:51:02 -07:00
Anna Henningsen
cbc3ef64ce
process: allow reading from stdout/stderr sockets
...
Allow reading from stdio streams that are conventionally
associated with process output, since this is only convention.
This involves disabling the oddness around closing stdio
streams. Its purpose is to prevent the file descriptors
0 through 2 from being closed, since doing so can lead
to information leaks when new file descriptors are being
opened; instead, not doing anything seems like a more
reasonable choice.
Fixes: https://github.com/nodejs/node/issues/21203
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-04 09:20:24 -07:00
Anna Henningsen
c7405fe9cb
Revert "tty: make _read throw ERR_TTY_WRITABLE_NOT_READABLE"
...
This reverts commit 91eec00ca2 .
Refs: https://github.com/nodejs/node/pull/21654
Refs: https://github.com/nodejs/node/issues/21203
PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-04 09:20:21 -07:00
Joyee Cheung
92fa0fcdb7
src: name EmbededderGraph edges and use class names for nodes
...
This patch:
- Refactors the `MemoryRetainer` API so that the impementer no longer
calls `TrackThis()` that sets the size of node on the top of the
stack, which may be hard to understand. Instead now they implements
`SelfSize()` to provide their self sizes. Also documents
the API in the header.
- Refactors `MemoryTracker` so it calls `MemoryInfoName()` and
`SelfSize()` of `MemoryRetainer` to retrieve info about them, and
separate `node_names` and `edge_names` so the edges can be properly
named with reference names and the nodes can be named with class
names. (Previously the nodes are named with reference names while the
edges are all indexed and appear as array elements).
- Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and
`SET_NO_MEMORY_INFO()` convenience macros
- Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track
their references properly.
- Refactors the heapdump tests to check both node names and edge names,
distinguishing between wrapped JS nodes (without prefixes)
and embedder wrappers (prefixed with `Node / `).
PR-URL: https://github.com/nodejs/node/pull/23072
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-10-04 15:32:30 +02:00
Anna Henningsen
c0c58d5660
zlib: move, rename, document internal params() cb
...
Give the callback a more specific name, explain what it does
and why it is necessary, and move it to a location much closer
to its use site.
PR-URL: https://github.com/nodejs/node/pull/23187
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-04 15:24:50 +02:00
Gus Caplan
e7f710c1d4
bootstrapper: move internalBinding to NativeModule
...
internalBinding is used so often that it should just automatically be
available for usage in internals.
PR-URL: https://github.com/nodejs/node/pull/23025
Refs: https://github.com/nodejs/node/commit/2a9eb31
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-10-04 11:55:34 +02:00
Anna Henningsen
d527dde360
src: use JS inheritance for AsyncWrap
...
For all classes descending from `AsyncWrap`, use JS inheritance
instead of manually adding methods to the individual classes.
This allows cleanup of some code around transferring handles
over IPC.
PR-URL: https://github.com/nodejs/node/pull/23094
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-03 13:43:42 -07:00
André Cruz
1bfd03565b
http2: don't send trailers on a closed connection
...
There is a race condition between onStreamCloseResponse(), which
removes the wantTrailers listener, and Http2Stream.close(), which
will invalidate the connection. IE, sendTrailers can be called on
a closed connection which would crash with a:
Error [ERR_HTTP2_INVALID_STREAM]: The stream has been destroyed
PR-URL: https://github.com/nodejs/node/pull/23146
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-10-03 08:25:27 +02:00
Daniel Bevenius
b25e6abc68
crypto: extract throwInvalidArgType function
...
This commit extracts the throwing of ERR_INVALID_ARG_TYPE which is done
in identical ways in a few places in cipher.js.
The motivation for this is that I think it improves readability enough to
warrant a commit even though I'm aware that we should avoid commits with
only these sort of refactoring.
PR-URL: https://github.com/nodejs/node/pull/22947
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-10-03 08:08:21 +02:00
Ruben Bridgewater
1a1fe53e3d
util: change %o depth default
...
Since the default for depth is changed to `20` it is logical
to change the %o default as well. It will now always use the
default depth.
PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693
PR-URL: https://github.com/nodejs/node/pull/22846
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-10-02 22:43:10 +02:00
Ruben Bridgewater
ac7450a09a
util: change util.inspect depth default
...
The current default is not ideal in most use cases. Therefore it is
changed to inspect objects to a maximum depth of 20 in case
util.inspect is called with it's defaults. The default is kept at 2
when using console.log() and similar in the repl.
PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693
PR-URL: https://github.com/nodejs/node/pull/22846
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-10-02 22:43:09 +02:00
Rich Trott
83d0404971
repl: do not swallow errors in nested REPLs
...
For tab completion, a REPLServer instance will sometimes create another
REPLServer instance. If a callback is sent to the `.complete()` function
and that callback throws an error, it will be swallowed by the nested
REPLs domain. Re-throw the error so that processes don't silently exit
without any indication of an error (including a status code).
Fixes: https://github.com/nodejs/node/issues/21586
PR-URL: https://github.com/nodejs/node/pull/23004
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-10-02 13:07:18 -07:00
Anto Aravinth
f4e4ef5cad
util: handle null prototype on inspect
...
This makes sure the `null` prototype is always detected properly.
PR-URL: https://github.com/nodejs/node/pull/22331
Fixes: https://github.com/nodejs/node/issues/22141
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: John-David Dalton <john.david.dalton@gmail.com >
2018-10-02 18:24:10 +02:00
Tobias Nießen
0a1c65079a
crypto: add support for PEM-level encryption
...
This adds support for PEM-level encryption as defined in RFC 1421.
PEM-level encryption is intentionally unsupported for PKCS#8 private
keys since PKCS#8 defines a newer encryption format.
PR-URL: https://github.com/nodejs/node/pull/23151
Refs: https://github.com/nodejs/node/pull/22660
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-02 11:32:16 +02:00
Ruben Bridgewater
9c3c0f4273
stream: improve buffer list inspection
...
This makes sure the indentation level is correct, no matter if the
inspected buffer list is inspected on a deeper level and custom
inspect options are now passed through to the actual inspection.
PR-URL: https://github.com/nodejs/node/pull/23109
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-02 10:34:34 +02:00
Ruben Bridgewater
d8baf67d4a
timers: use custom inspection for linked lists
...
Inspecting linked lists is something that is not really useful.
Instead, just use a custom inspection function and hide everything
besides the first level.
PR-URL: https://github.com/nodejs/node/pull/23108
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-10-02 05:33:57 +02:00
cjihrig
47a0a0b503
cluster: move handle tracking out of utils
...
internal/cluster/utils.js exported a handles object, which was
used in a test. That test, test-cluster-disconnect-handles.js,
was removed in https://github.com/nodejs/node/pull/12495 . This
commit moves the handles object to the only file in the codebase
that still uses it.
PR-URL: https://github.com/nodejs/node/pull/23131
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-01 08:58:24 -04:00
Ruben Bridgewater
5e6940d4f6
util: set super_ property to non-enumerable
...
Using `util.inherits()` adds a `super_` property to the constructor
and inspecting that constructor is going to show that property even
though it's not useful for the user.
Therefore the property is now set as non-enumerable and such entries
are not visible by default when using `console.log()` or
`util.inspect()`.
PR-URL: https://github.com/nodejs/node/pull/23107
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-01 12:38:37 +02:00
cjihrig
847037eaed
cluster: use Map to track handles in master
...
PR-URL: https://github.com/nodejs/node/pull/23125
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-30 11:04:10 -04:00
cjihrig
5a50989f5b
cluster: use Map to track handles in cluster child
...
PR-URL: https://github.com/nodejs/node/pull/23125
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-30 11:04:05 -04:00
cjihrig
aa899aa6d0
cluster: use Map to track indexes
...
PR-URL: https://github.com/nodejs/node/pull/23125
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-30 11:04:00 -04:00
cjihrig
6654c59452
cluster: use Map to track round robin workers
...
PR-URL: https://github.com/nodejs/node/pull/23125
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-30 11:03:54 -04:00
cjihrig
97dad7e33b
cluster: use Map to track callbacks
...
Use a Map to avoid delete operations in callback tracking.
PR-URL: https://github.com/nodejs/node/pull/23125
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-30 11:03:30 -04:00
Gireesh Punathil
0f78b9a26c
lib: reword help text for clarity
...
modified the `-` CLI option help text for
improved readability.
PR-URL: https://github.com/nodejs/node/pull/23016
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-28 04:15:06 -04:00
Klaus Meinhardt
83864b3bb0
fs: consistently return symlink type from readdir
...
Use 'lstat' to determine type of directory entry.
This is more consistent with the type returned from the readdir binding.
Also use 'path.join' over 'path.resolve' because 'name' is not absolute.
PR-URL: https://github.com/nodejs/node/pull/22808
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-09-27 15:44:24 -04:00
Anna Henningsen
709b3b1e1c
crypto: downgrade DEP0115 to --pending-deprecation only
...
Aliases are very cheap to maintain, so an unconditional runtime
deprecation that affects existing ecosystem code is not
a good idea. This commit turns the runtime deprecation into
a `--pending-deprecation` one.
Fixes: https://github.com/nodejs/node/issues/23013
PR-URL: https://github.com/nodejs/node/pull/23017
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-27 08:43:05 -04:00
Ruben Bridgewater
eccc65919a
assert: add comments for diff algorithm
...
It became hard to follow what was actually happening in the
algorithm. This adds comments to improve the situation.
PR-URL: https://github.com/nodejs/node/pull/23048
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-27 13:36:24 +02:00
Ruben Bridgewater
02c44a4894
assert: reduce diff noise
...
Assertion errors that produce a diff show a diff for identical entries
in case one side of the comparison has more object properties than the
other one. Those lines are now taken into account and will not show up
as diverging lines anymore.
Refs: https://github.com/nodejs/node/issues/22763
PR-URL: https://github.com/nodejs/node/pull/23048
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-27 13:36:23 +02:00
Ruben Bridgewater
b8a8eedf32
assert: switch inputs to values
...
The wording seems clearer when using `values` instead of `inputs`.
PR-URL: https://github.com/nodejs/node/pull/23056
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-27 13:25:18 +02:00
Ruben Bridgewater
be26c76114
assert: improve the strict equal messages
...
In case reference (un)equal objects fail in assertion, it should be
clear that it is about the reference equality and not about the
object properties. This is fixed by improving the message in such
cases.
Refs: https://github.com/nodejs/node/issues/22763
PR-URL: https://github.com/nodejs/node/pull/23056
Refs: https://github.com/nodejs/node/issues/22763
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-27 13:25:17 +02:00
ZYSzys
0f841208d2
lib: change abstract equal to strict equal
...
PR-URL: https://github.com/nodejs/node/pull/22974
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-27 05:30:34 +02:00
Rich Trott
f8d69911be
errors: use ERR_OUT_OF_RANGE for index errors
...
Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is
capable of providing more detail. (In one instance, use
ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.)
PR-URL: https://github.com/nodejs/node/pull/22969
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
2018-09-26 19:36:50 -07:00
cjihrig
af5d98641d
http2: close fd in doSendFileFD()
...
This commit closes the file descriptor in two code paths that
return from doSendFileFD().
PR-URL: https://github.com/nodejs/node/pull/23047
Fixes: https://github.com/nodejs/node/issues/23029
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
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: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-26 08:25:36 -04:00