Ruben Bridgewater
48d1ea5e7f
assert: special handle identical error names in instance checks
...
This makes sure that using `assert.throws()` or `assert.rejects()`
in combination with Error classes log appropriate error messages
in case the expected and received constructor name are identical
but not part of the same prototype chain.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:56:01 +02:00
Ruben Bridgewater
97c52ca5dc
assert: add more information to AssertionErrors
...
This adds information about the actual thrown error to the
AssertionError's message property.
It also improves the logged error instances error name by using the
constructors name, if available.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:56:01 +02:00
Ruben Bridgewater
5700cd17dd
assert: do not repeat .throws() code
...
This refactors some code for less duplication.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:55:40 +02:00
Ruben Bridgewater
d47b6786c9
assert: wrap validation function errors
...
This makes sure that validation function used by `assert.throws` and
`assert.rejects` always throw validatin errors instead of rethrowing
the received error.
That should improve the debugging experience for developers since
they have a better context where the error is coming from and they
also get to know what triggered it.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:55:11 +02:00
Ruben Bridgewater
0b3242c3ce
assert: fix generatedMessage property
...
This makes sure the `generatedMessage` property is always set as
expected. This was not the case some `assert.throws` and
`assert.rejects` calls.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:55:11 +02:00
Ruben Bridgewater
ace3f16917
assert: improve class instance errors
...
This improves `assert.throws()` and `assert.rejects()` in case error
classes are used as validation for the expected error.
In case of a failure it will now throw an `AssertionError` instead
of the received error if the check fails. That error has the received
error as actual property and the expected property is set to the
expected error class.
The error message should help users to identify the problem faster
than before by providing extra context what went wrong.
PR-URL: https://github.com/nodejs/node/pull/28263
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:55:07 +02:00
Ruben Bridgewater
eb05d68815
crypto: refactor array buffer view validation
...
This is just a refactoring to reduce code and computational overhead.
PR-URL: https://github.com/nodejs/node/pull/29683
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-01 22:39:37 +02:00
Ruben Bridgewater
204248a0c3
console: update time formatting
...
This improves the readability of the `console.timeEnd()` output
while keeping a higher output's precision in multiple cases.
Instead of e.g. '1.005min' it will print '1:00.300 (m:ss.mmm)'.
PR-URL: https://github.com/nodejs/node/pull/29629
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-10-01 21:13:53 +02:00
Alex Aubuchon
15fb02a515
src: rename --loader to --experimental-loader
...
Renames the `--loader` cli argument to `--experimental-loader`. This is
to clearly indicate the esm loader feature as experimental even after
esm is no longer experimental.
Also minorly alters the `--experimental-loader` docs to say that the
passed loader can be an esm module.
Refs: https://github.com/nodejs/modules/issues/351#issuecomment-535189524
PR-URL: https://github.com/nodejs/node/pull/29752
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-30 21:47:01 -07:00
Robert Nagy
f663b31cc2
stream: always invoke callback before emitting error
...
Ensure the callback is always invoked before emitting
the error in both sync and async case.
PR-URL: https://github.com/nodejs/node/pull/29293
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-30 10:56:29 -07:00
Guy Bedford
c42ab995c1
module: pass full URL to loader for top-level load
...
PR-URL: https://github.com/nodejs/node/pull/29736
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2019-09-29 20:12:24 -07:00
cjihrig
82f89ec8c1
tls: simplify setSecureContext() option parsing
...
The following pattern is redundant, so remove it:
if (options.foo !== undefined)
this.foo = options.foo;
else
this.foo = undefined;
PR-URL: https://github.com/nodejs/node/pull/29704
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-09-29 08:23:37 -04:00
Robert Nagy
ce62e963a1
stream: remove ambiguous code
...
PR-URL: https://github.com/nodejs/node/pull/29664
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-09-29 18:42:55 +09:00
Guy Bedford
2825e1183d
module: move cjs type check behind flag
...
PR-URL: https://github.com/nodejs/node/pull/29732
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-09-28 11:56:39 -07:00
Richard Lau
95792a7989
Revert "stream: invoke callback before emitting error always"
...
This reverts commit 3de5eae6db .
PR-URL: https://github.com/nodejs/node/pull/29741
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-28 06:53:52 -07:00
Ruben Bridgewater
aea9a0f77d
worker: fix process._fatalException return type
...
This makes sure `process._fatalException()` returns a boolean when
run inside of a worker.
PR-URL: https://github.com/nodejs/node/pull/29706
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-09-27 16:26:42 -07:00
Anton Gerasimov
c2ce8d0547
tls: add option for private keys for OpenSSL engines
...
Add `privateKeyIdentifier` and `privateKeyEngine` options
to get private key from an OpenSSL engine in tls.createSecureContext().
PR-URL: https://github.com/nodejs/node/pull/28973
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-09-27 15:50:56 -07:00
Robert Nagy
3de5eae6db
stream: invoke callback before emitting error always
...
Ensure the callback is always invoked before emitting
the error in both sync and async case.
PR-URL: https://github.com/nodejs/node/pull/29293
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-27 15:45:17 -07:00
rickyes
322e1e15d5
http2: optimize the altsvc Max bytes limit, define and use constants
...
PR-URL: https://github.com/nodejs/node/pull/29673
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-25 22:31:37 -07:00
61743063cc
crypto: use byteLength in timingSafeEqual
...
PR-URL: https://github.com/nodejs/node/pull/29657
Co-authored-by: ZaneHannanAU <ZaneHannanAU@users.noreply.github.com >
Co-authored-by: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-09-25 15:58:15 -03:00
Matteo Collina
c5f5f84a33
events: improve performance of EventEmitter.emit
...
This restore some performance we lost when we introduced primordialias.
Improvements are up to +100%.
PR-URL: https://github.com/nodejs/node/pull/29633
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-09-24 09:12:59 +02:00
Ruben Bridgewater
1fa403762c
console,util: fix missing recursion end while inspecting prototypes
...
This makes sure prototypes won't be inspected infinitely for some
obscure object creations. The depth is now taken into account and
the recursion ends when the depth limit is reached.
PR-URL: https://github.com/nodejs/node/pull/29647
Fixes: https://github.com/nodejs/node/issues/29646
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-09-23 23:42:10 -07:00
Anton Gerasimov
0c32ca96c8
tls: add option to override signature algorithms
...
Passes the list down to SSL_CTX_set1_sigalgs_list.
Option to get the list of shared signature algorithms
from a TLS socket added as well for testing.
Signed-off-by: Anton Gerasimov <agerasimov@twilio.com >
PR-URL: https://github.com/nodejs/node/pull/29598
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-09-23 23:32:45 -07:00
Chetan Karande
fed05cc414
stream: cleanup use of internal ended state
...
PR-URL: https://github.com/nodejs/node/pull/29645
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-09-24 06:42:56 +02:00
Shobhit Chittora
fdd5d4ad4a
bootstrap: add exception handling for profiler bootstrap
...
Add exception handling for the case when profile is
not bootstrapped when coverage is enabled.
Fixes: https://github.com/nodejs/node/issues/29542
PR-URL: https://github.com/nodejs/node/pull/29552
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-09-23 12:04:20 +02:00
Robert Nagy
d398b8f02b
stream: make _write() optional when _writev() is implemented
...
When implementing _writev, _write should be optional.
PR-URL: https://github.com/nodejs/node/pull/29639
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-22 19:07:35 -07:00
Robert Nagy
e573c39b88
http: don't emit 'data' after 'error'
...
PR-URL: https://github.com/nodejs/node/pull/28711
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-22 18:08:20 -07:00
Robert Nagy
1665a9330c
stream: apply special logic in removeListener for readable.off()
...
We have special logic in removeListener() which must apply
to off() as well.
PR-URL: https://github.com/nodejs/node/pull/29486
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-22 18:05:54 -07:00
Jenia
34a61d5630
events: add support for EventTarget in once
...
PR-URL: https://github.com/nodejs/node/pull/29498
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-09-22 17:48:21 -07:00
Robert Nagy
aa32e13968
stream: do not flush destroyed writable
...
It doesn't make much sense to flush a stream which has been destroyed.
PR-URL: https://github.com/nodejs/node/pull/29028
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-09-22 16:25:50 -07:00
Robert Nagy
95d6ad67bf
fs: remove unnecessary argument check
...
Writable already assures that only Buffer's are passed to _write. Also
this is not the "correct" way to handle errors inside _write.
PR-URL: https://github.com/nodejs/node/pull/29043
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-09-22 16:23:02 -07:00
Jeremiah Senkpiel
a861b84d5d
timers: set _destroyed even if there are no destroy-hooks
...
Required for other potential changes.
This should make it so we can always just check _destroyed to
check if a timer has been ended.
PR-URL: https://github.com/nodejs/node/pull/29595
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-22 16:19:26 -07:00
Robert Nagy
ec390b63a1
stream: do not call _read() after destroy()
...
PR-URL: https://github.com/nodejs/node/pull/29491
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2019-09-22 15:55:15 -07:00
Robert Nagy
8709a408d2
stream: use more accurate end-of-stream writable and readable detection
...
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.
Refs: https://github.com/nodejs/node/issues/29395
PR-URL: https://github.com/nodejs/node/pull/29409
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-22 15:47:40 -07:00
Robert Nagy
bd02775af8
stream: optimize creation
...
PR-URL: https://github.com/nodejs/node/pull/29135
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-09-22 21:46:58 +08:00
Gus Caplan
8235ffd786
console: skip/strip %c formatting
...
Fixes: https://github.com/nodejs/node/issues/29605
Refs: https://console.spec.whatwg.org
PR-URL: https://github.com/nodejs/node/pull/29606
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-22 00:42:22 +02:00
Benjamin Coe
8f06773a8c
process: initial SourceMap support via NODE_V8_COVERAGE
...
PR-URL: https://github.com/nodejs/node/pull/28960
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2019-09-22 00:39:41 +02:00
Anna Henningsen
ac59dc42ed
http: remove legacy parser
...
Remove the legacy `http_parser` implementation as a dependency
and all code that uses it in favor of llhttp, given that the latter
has been the default for all of Node 12 with no outstanding issues.
PR-URL: https://github.com/nodejs/node/pull/29589
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-09-20 20:18:35 +02:00
Robert Nagy
ba3be578d8
stream: don't emit finish on error
...
After 'error' only 'close' should be emitted.
PR-URL: https://github.com/nodejs/node/pull/28979
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-20 11:22:31 +02:00
Guy Bedford
4396bebfe1
module: error for CJS .js load within type: module
...
PR-URL: https://github.com/nodejs/node/pull/29492
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2019-09-19 15:24:50 -07:00
Lucas Holmquist
ac41959922
repl: convert var to let and const
...
Refs: https://github.com/nodejs/node/pull/29535
This PR replaces the instances of var with let/const.
PR-URL: https://github.com/nodejs/node/pull/29575
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-09-18 17:04:55 -07:00
Gus Caplan
1ec4154e50
src: re-delete Atomics.wake
...
PR-URL: https://github.com/nodejs/node/pull/29586
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2019-09-18 16:09:20 -05:00
Jeremiah Senkpiel
4d798e1b1b
bootstrap: provide usable error on missing internal module
...
Due to how bootstrap/loaders.js itself is loaded and invoked,
stacktraces from it are munged and no longer point back to the error
source.
That resulted in the following unhelpful error if an internal module
was missing or misnamed:
```
internal/bootstrap/loaders.js:190
return mod.compile();
^
TypeError: Cannot read property 'compile' of undefined
```
This changes that to at least print the id that was attempted to be
loaded:
```
internal/bootstrap/loaders.js:189
if (!mod) throw new TypeError(`Missing internal module '${id}'`);
^
TypeError: Missing internal module 'internal/a'
```
PR-URL: https://github.com/nodejs/node/pull/29593
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-09-18 08:18:38 -07:00
Giorgos Ntemiris
2daf883a18
http: throw if 'host' agent header is not a string value
...
If the 'host' agent header is an array or other non-string value, throw.
PR-URL: https://github.com/nodejs/node/pull/29568
Fixes: https://github.com/nodejs/node/issues/29408
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-09-18 06:08:52 -07:00
zhangyongsheng
2f497a67ad
repl: fix bug in fs module autocompletion
...
PR-URL: https://github.com/nodejs/node/pull/29555
Fixes: https://github.com/nodejs/node/issues/29424
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-09-18 09:58:59 +08:00
Guy Bedford and Geoffrey Booth
3f3ad38c87
module: reintroduce package exports dot main
...
This reintroduces the dot main in exports as discussed in the previous
Node.js modules meeting.
The implementation includes both CommonJS and ES module resolution with
the associated documentation and resolver specification changes.
In addition to the dot main, "exports" as a string or direct fallback
array is supported as well.
Co-Authored-By: Geoffrey Booth <GeoffreyBooth@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/29494
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-09-17 18:54:44 -07:00
himself65
7fa03b54c8
lib: remove the use of util.isFunction
...
PR-URL: https://github.com/nodejs/node/pull/29566
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-09-17 18:41:20 -07:00
Eugene Ostroukhov
3d841fe20d
inspector: new API - Session.connectToMainThread
...
This API is designed to enable worker threads use Inspector protocol
on main thread (and other workers through NodeWorker domain).
Note that worker can cause dead lock by suspending itself. I will
work on a new API that will allow workers to be hidden from the
inspector.
Fixes: https://github.com/nodejs/node/issues/28828
PR-URL: https://github.com/nodejs/node/pull/28870
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-09-16 09:01:55 -07:00
Aditya
70abb4ffe4
tty: add color support for mosh
...
PR-URL: https://github.com/nodejs/node/pull/27843
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-09-15 21:54:58 -07:00
Robert Nagy
627bb6bf87
http: refactor responseKeepAlive()
...
This tries to simplify the code and make it easier to understand. Took
me a while to get my head around the previous implementation.
Also minor perf improvement.
PR-URL: https://github.com/nodejs/node/pull/28700
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-15 21:50:03 -07:00