himself65
2c4f30deea
fs: fix when path is buffer on fs.symlinkSync
...
PR-URL: https://github.com/nodejs/node/pull/34540
Fixes: https://github.com/nodejs/node/issues/34514
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
2020-07-31 01:38:05 +08:00
Gireesh Punathil
4692e284e3
lib: absorb path error cases
...
Absorb low level libuv failure in
the process initialization phase
Fixes: https://github.com/nodejs/node/issues/33759
Refs: https://github.com/nodejs/node/issues/33759#issuecomment-663980558
PR-URL: https://github.com/nodejs/node/pull/34519
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
2020-07-30 13:44:17 +05:30
Guy Bedford
1fe39f0b4b
module: disable cjs snapshotting into esm loader
...
PR-URL: https://github.com/nodejs/node/pull/34467
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-07-29 16:29:18 -07:00
unknown
fe2a7f052f
util: print External address from inspect
...
Fixes: https://github.com/nodejs/node/issues/28250
PR-URL: https://github.com/nodejs/node/pull/34398
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-07-28 14:30:52 +02:00
James M Snell
1f94b89309
quic: refactor ocsp to use async function rather than event/callback
...
PR-URL: https://github.com/nodejs/node/pull/34498
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-27 13:33:14 -07:00
James M Snell
06664298fa
quic: remove no-longer relevant TODO statements
...
PR-URL: https://github.com/nodejs/node/pull/34498
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-27 13:33:12 -07:00
James M Snell
2fb92f4cc6
quic: remove extraneous unused debug property
...
PR-URL: https://github.com/nodejs/node/pull/34498
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-27 13:33:10 -07:00
Daniele Belardi
ec2ffd6b9d
module: self referential modules in repl or -r
...
Load self referential modules from the repl and using the preload flag
`-r`. In both cases the base path used for resolution is the current
`process.cwd()`. Also fixes an internal cycle bug in the REPL exports
resolution.
PR-URL: https://github.com/nodejs/node/pull/32261
Fixes: https://github.com/nodejs/node/issues/31595
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2020-07-23 07:50:01 -07:00
James M Snell
b06fe33de1
quic: use async _construct for QuicStream
...
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:59 -07:00
James M Snell
086c916997
quic: extensive refactoring of QuicStream lifecycle
...
This one was a bit of a rabbit hole... but, with this set of
changes, `QuicStream` should now work with autoDestroy, supports
a promisified `close()`, and fixes a number of other internal
bugs that were spotted trying to get it to work.
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:53 -07:00
James M Snell
83bf0d7e8c
quic: remove unneeded quicstream.aborted and fixup docs
...
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:47 -07:00
James M Snell
a65296db2c
quic: remove stream pending code
...
Removing no longer needed code
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:45 -07:00
James M Snell
da20287e1a
quic: simplify QuicStream construction logic
...
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:42 -07:00
James M Snell
6e30fe7a7f
quic: convert openStream to Promise
...
Although most of the time openStream will be able to create the stream
immediately, when a stream is opened before the handshake is complete
we have to wait for the handshake to be complete before continuing.
PR-URL: https://github.com/nodejs/node/pull/34351
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-23 06:52:40 -07:00
Anna Henningsen
459d3a015a
worker: make MessagePort inherit from EventTarget
...
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.
PR-URL: https://github.com/nodejs/node/pull/34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-07-22 22:59:11 +02:00
Anna Henningsen
16b11cd2ad
events: expand NodeEventTarget functionality
...
Enable `NodeEventTarget` as a base class for `MessagePort`,
by enabling special processing of events for Node.js listeners,
and removing implicit constructors/private properties so that
classes can be made subclasses of `NodeEventTarget` after they
are created.
PR-URL: https://github.com/nodejs/node/pull/34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-07-22 22:59:04 +02:00
Anna Henningsen
7603c7e50c
worker: set trackUnmanagedFds to true by default
...
This prevents accidental resource leaks when terminating or exiting
Worker that own FDs opened through `fs.open()`.
Refs: https://github.com/nodejs/node/pull/34303
PR-URL: https://github.com/nodejs/node/pull/34394
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2020-07-22 07:30:32 -07:00
Anna Henningsen
08b6335c9c
events: re-use the same isTrusted getter
...
Creating a new function each time the property descriptor is set
comes with performance overhead, since these functions have different
identities, even if they contain the same code.
Refs: https://twitter.com/tverwaes/status/1285496612618473472
PR-URL: https://github.com/nodejs/node/pull/34459
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2020-07-21 16:09:27 -07:00
Robert Nagy
02c4869bee
stream: fix Duplex._construct race
...
Ensures that _construct has finished before invoking
_destroy.
The 'constructed' property was not properly set to false
for both writable and readable state.
Fixes: https://github.com/nodejs/node/issues/34448
PR-URL: https://github.com/nodejs/node/pull/34456
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-07-21 11:00:39 -07:00
sapics
50bc7adcf7
lib: simplify assignment
...
PR-URL: https://github.com/nodejs/node/pull/33718
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-20 18:22:12 +02:00
AshCripps
242bfb6bfc
src: allow setting a dir for all diagnostic output
...
Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings
Refs: https://github.com/nodejs/node/pull/33010#issuecomment-618544792
PR-URL: https://github.com/nodejs/node/pull/33584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-20 18:20:18 +02:00
Ruben Bridgewater
2e82982984
util: improve getStringWidth performance
...
This makes sure the common path does not normalize the input string.
It's only required for characters that are outside of the ASCII range.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/33674
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-07-20 18:17:06 +02:00
Myles Borins
da95dd7732
Revert "module: fix check for package.json at volume root"
...
This reverts commit 51af89fe45 .
This has needed to be backed out of both the 14.5.0 and 14.6.0
releases due to creating regressions across multiple projects
including:
* coffeescript
* JSONStream
* gulp
* and more
We should reopen a PR to figure out how to land this in a way
that is non-breaking.
Refs: https://github.com/nodejs/node/pull/33476
PR-URL: https://github.com/nodejs/node/pull/34403
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-07-20 12:08:36 -04:00
Joyee Cheung
b1c3909bd7
lib: initialize instance members in class constructors
...
Since V8 snapshot does not currently support instance member
initialization, initialize them in ordianry class constructors
for now so that these classes can be included in the snapshot.
This may be reverted once
https://bugs.chromium.org/p/v8/issues/detail?id=10704
is fixed and backported.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:23:20 +08:00
Joyee Cheung
f8bde7ce06
bootstrap: build fast APIs in pre-execution
...
Fast APIs need to work with ArrayBuffers which we need
to rebuild connections to after deserializing them
from the snapshot. For now, postpone their creation
until pre-execution to simplify the process.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:23:18 +08:00
Joyee Cheung
c943cb4809
src: reset zero fill toggle at pre-execution
...
The connection between the JS land zero fill toggle and the
C++ one in the NodeArrayBufferAllocator gets lost if the toggle
is deserialized from the snapshot, because V8 owns the underlying
memory of this toggle. This resets the connection at pre-execution.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:23:16 +08:00
Joyee Cheung
7ecb285842
src: make code cache test work with snapshots
...
Keep track of snapshotted modules in JS land, and move
bootstrap switches into StartExecution() so that
they are not included into part of the environment-independent
bootstrap process.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:23:13 +08:00
Robert Nagy
08e8997d54
stream: simpler and faster Readable async iterator
...
Reimplement as an async generator instead of a custom
iterator class.
PR-URL: https://github.com/nodejs/node/pull/34035
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-17 09:06:27 +02:00
Stewart Addison
9cb72930e5
net: allow wider regex in interface name
...
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.
Ref: https://github.com/nodejs/node/pull/14500
Signed-off-by: Stewart Addison <sxa@uk.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/34364
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-07-16 18:32:25 -04:00
Robert Nagy
a55b77d2d3
stream: finished on closed OutgoingMessage
...
finished should invoke callback on closed OutgoingMessage the
same way as for regular streams.
Fixes: https://github.com/nodejs/node/issues/34301
PR-URL: https://github.com/nodejs/node/pull/34313
Fixes: https://github.com/nodejs/node/issues/34274
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-07-16 08:37:01 +02:00
James M Snell
ed4882241c
quic: properly pass readable/writable constructor options
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:17:04 -07:00
James M Snell
57c1129508
quic: implement QuicSession close as promise
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:17:01 -07:00
James M Snell
8e5c5b16ab
quic: cleanup QuicClientSession constructor
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:59 -07:00
James M Snell
fe4e7e4598
quic: use promisified dns lookup
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:57 -07:00
James M Snell
346aeaf874
quic: eliminate "ready"/"not ready" states for QuicSession
...
QuicClientSession and QuicServerSessions are now always immediately
ready for use when they are created, so no more need to track
ready state.
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:55 -07:00
James M Snell
6665dda9f6
quic: implement QuicSocket Promise API, part 2
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:52 -07:00
James M Snell
79c0e892dd
quic: implement QuicSocket Promise API, part 1
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:50 -07:00
James M Snell
53b12f0c7b
quic: implement QuicEndpoint Promise API
...
This is the start of a conversion over to a fully Promise-centric API
for the QUIC implementation.
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:48 -07:00
James M Snell
16b32eae3e
quic: handle unhandled rejections on QuicSession
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:45 -07:00
James M Snell
e5d963e24d
quic: fixup kEndpointClose
...
Ensure that the QuicSocket is properly destroyed if the QuicEndpoint
is destroyed directly rather than through QuicSocket destroy
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:43 -07:00
James M Snell
9f552df5b4
quic: fix endpointClose error handling, document
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:41 -07:00
James M Snell
b80108c033
quic: restrict addEndpoint to before QuicSocket bind
...
Restricting this to pre-bind keeps things simple
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:39 -07:00
James M Snell
81c01bbdba
quic: use a getter for stream options
...
Doesn't need to be a function
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:37 -07:00
James M Snell
b8945ba2ab
quic: clarifying code comments
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:35 -07:00
James M Snell
429ab1dce6
quic: minor reduction in code duplication
...
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:32 -07:00
James M Snell
aafdc2fcad
quic: replace ipv6Only option with 'udp6-only' type
...
Since the `ipv6Only` option was mutually exclusive with
using `'udp6'`, making it it's own type simplifies things
a bit.
PR-URL: https://github.com/nodejs/node/pull/34283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-15 17:16:30 -07:00
rickyes
48404a179f
stream: rename opts to options
...
PR-URL: https://github.com/nodejs/node/pull/34339
Refs: https://nodejs.org/dist/latest-v14.x/docs/api/stream.html#stream_stream_finished_stream_options_callback
Reviewed-By: Robert Nagy <ronagy@icloud.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 >
2020-07-16 00:28:13 +02:00
Anna Henningsen
e876c0c308
http2: add support for sensitive headers
...
Add support for “sensitive”/“never-indexed” HTTP2 headers.
Fixes: https://github.com/nodejs/node/issues/34091
PR-URL: https://github.com/nodejs/node/pull/34145
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-07-16 00:25:47 +02:00
Beth Griggs
128ed10fc4
module: update expected module.parent DEP number
...
PR-URL: https://github.com/nodejs/node/pull/34368
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2020-07-15 11:37:39 -04:00
Bradley Farias
66810a0d47
policy: add startup benchmark and make SRI lazier
...
PR-URL: https://github.com/nodejs/node/pull/29527
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-14 13:03:04 -05:00