Michaël Zasso
3831d87514
repl: show lexically scoped vars in tab completion
...
Use the V8 inspector protocol, if available, to query the list of
lexically scoped variables (defined with `let`, `const` or `class`).
PR-URL: https://github.com/nodejs/node/pull/16591
Fixes: https://github.com/nodejs/node/issues/983
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-10 03:09:43 -05:00
James M Snell
1ad7df6acc
http2: use aliased buffer for perf stats, add stats
...
Add an aliased buffer for session and stream statistics,
add a few more metrics
PR-URL: https://github.com/nodejs/node/pull/18020
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-01-10 01:42:29 -05:00
Vse Mozhet Byt
ef317014e2
doc: compact eslint directives in common/README
...
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-10 01:42:28 -05:00
Andreas Madsen
7bf6be0b7c
trace_events: stop tracing agent in process.exit()
...
PR-URL: https://github.com/nodejs/node/pull/18005
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-01-10 01:42:26 -05:00
Vse Mozhet Byt
b593d946e4
doc: re-alphabetise sections in common/README.md
...
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-10 01:42:26 -05:00
Vse Mozhet Byt
3bcdb3b996
doc: fix code nits in common/README
...
1. Sync comments and code
2. Fix typos
PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-10 01:42:25 -05:00
Matteo Collina
f1485565ef
fs: guarantee order of callbacks in ws.close
...
Refactor WriteStream.prototype.close and WriteStream.prototype._destroy
to always call the callback passed to close in order. Protects from
calling .close() without a callback.
Fixes: https://github.com/nodejs/node/issues/17951
See: https://github.com/nodejs/node/pull/15407
PR-URL: https://github.com/nodejs/node/pull/18002
Fixes: https://github.com/nodejs/node/issues/17951
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-10 01:42:24 -05:00
Anatoli Papirovski
0e116a01c8
perf_hooks: fix scheduling regression
...
Scheduling a PerformanceGCCallback should not keep the
loop alive but due to the recent switch to using the
native SetImmediate method, it does. Go back to using
uv_async_t and add a regression test.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/18051
Fixes: https://github.com/nodejs/node/issues/18047
Refs: https://github.com/nodejs/node/pull/18020
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-01-10 01:42:24 -05:00
James M Snell
6a67dfd927
http2: verify flood error and unsolicited frames
...
* verify protections against ping and settings flooding
* Strictly handle and verify handling of unsolicited ping and
settings frame acks.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17969
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:23 -05:00
James M Snell
6839283403
http2: verify that a dependency cycle may exist
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17968
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-01-10 01:42:22 -05:00
James M Snell
865da60e75
http2: implement maxSessionMemory
...
The maxSessionMemory is a cap for the amount of memory an
Http2Session is permitted to consume. If exceeded, new
`Http2Stream` sessions will be rejected with an
`ENHANCE_YOUR_CALM` error and existing `Http2Stream`
instances that are still receiving headers will be
terminated with an `ENHANCE_YOUR_CALM` error.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17967
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:21 -05:00
James M Snell
46f39b590b
doc: add docs for common/http2.js utility
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17942
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:21 -05:00
James M Snell
f17a5b92dc
http2: properly handle already closed stream error
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17942
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:20 -05:00
James M Snell
79d3198b7f
http2: add aligned padding strategy
...
Add a padding strategy option that makes a best attempt to ensure
that total frame length for DATA and HEADERS frames are aligned
on multiples of 8-bytes.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17938
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:20 -05:00
James M Snell
2b6a5d90bd
http2: add initial support for originSet
...
Add new properties to `Http2Session` to identify alpnProtocol,
and indicator about whether the session is TLS or not, and
initial support for origin set (preparinng for `ORIGIN` frame
support and the client-side `Pool` implementation.
The `originSet` is the set of origins for which an `Http2Session`
may be considered authoritative. Per the `ORIGIN` frame spec,
the originSet is only valid on TLS connections, so this is only
exposed when using a `TLSSocket`.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17935
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-01-10 01:42:19 -05:00
James M Snell
9ad7a9a333
http2: add altsvc support
...
Add support for sending and receiving ALTSVC frames.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:19 -05:00
James M Snell
e7a727e9ba
http2: strictly limit number on concurrent streams
...
Strictly limit the number of concurrent streams based on the
current setting of the MAX_CONCURRENT_STREAMS setting
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/16766
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com >
2018-01-10 01:42:18 -05:00
James M Snell
06aaaa8ad7
http2: perf_hooks integration
...
Collect and report basic timing information about `Http2Session`
and `Http2Stream` instances.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17906
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:18 -05:00
Kelvin Jin
1b7ce1ea02
http2: implement ref() and unref() on client sessions
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17620
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-01-10 01:42:17 -05:00
Anna Henningsen
b8deb7522f
http2: keep session objects alive during Http2Scope
...
Keep a local handle as a reference to the JS `Http2Session`
object so that it will not be garbage collected
when inside an `Http2Scope`, because the presence of the
latter usually indicates that further actions on
the session object are expected.
Strictly speaking, storing the `session_handle_` as a
property on the scope object is not necessary, but
this is not very costly and makes the code more
obviously correct.
Fixes: https://github.com/nodejs/node/issues/17840
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17863
Fixes: https://github.com/nodejs/node/issues/17840
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-01-10 01:42:17 -05:00
James M Snell
3a6b2ad19a
http2: convert Http2Settings to an AsyncWrap
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17763
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-10 01:42:16 -05:00
James M Snell
5abb60933e
http2: cleanup Http2Stream/Http2Session destroy
...
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17406
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
This is a significant cleanup and refactoring of the
cleanup/close/destroy logic for Http2Stream and Http2Session.
There are significant changes here in the timing and ordering
of cleanup logic, JS apis. and various related necessary edits.
2018-01-10 01:42:15 -05:00
Anna Henningsen
30e75e601b
http2: only schedule write when necessary
...
Introduce an `Http2Scope` class that, when it goes out of scope,
checks whether a write to the network is desired by nghttp2.
If that is the case, schedule a write using `SetImmediate()`
rather than a custom per-session libuv handle.
Backport-PR-URL: https://github.com/nodejs/node/pull/18050
PR-URL: https://github.com/nodejs/node/pull/17183
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-01-10 01:42:14 -05:00
Anatoli Papirovski
b313e81783
test: fix flaky test-http-pipeline-flood
...
PR-URL: https://github.com/nodejs/node/pull/17955
Refs: https://github.com/nodejs/node/issues/16317
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:55:04 -05:00
Todd Wong
d066db7014
cluster: support windowsHide option for workers
...
Fixes: https://github.com/nodejs/node/issues/17370
PR-URL: https://github.com/nodejs/node/pull/17412
Fixes: https://github.com/nodejs/node/issues/17370
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:55:03 -05:00
Tobias Nießen
51eab4b005
test: rename regression tests
...
PR-URL: https://github.com/nodejs/node/pull/17948
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:02 -05:00
Anatoli Papirovski
8806e54c24
test: fix flaky test-http-highwatermark
...
PR-URL: https://github.com/nodejs/node/pull/17949
Fixes: https://github.com/nodejs/node/issues/17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:02 -05:00
Anatoli Papirovski
3399e8ac5a
test: fix flaky test-pipe-unref
...
PR-URL: https://github.com/nodejs/node/pull/17950
Fixes: https://github.com/nodejs/node/issues/16875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:01 -05:00
Anatoli Papirovski
79980582b4
test: fix flaky http-writable-true-after-close
...
PR-URL: https://github.com/nodejs/node/pull/17952
Fixes: https://github.com/nodejs/node/issues/16321
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:01 -05:00
Tobias Nießen
591dd4e398
test: fix crypto test case to use correct encoding
...
The callback would have errored out anyway due to the incorrect
encoding, and that error is not the point of this test case.
PR-URL: https://github.com/nodejs/node/pull/17956
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:01 -05:00
Weijia Wang
f87a1a6ca8
test: simplify test-buffer-slice.js
...
Use forEach loop to reduce some redundant codes.
PR-URL: https://github.com/nodejs/node/pull/17962
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:00 -05:00
Anatoli Papirovski
3cc9882e8c
test: fix flaky test-resolve-async
...
PR-URL: https://github.com/nodejs/node/pull/17957
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:55:00 -05:00
Tobias Nießen
3927c6f64e
test: improve readability of some crypto tests
...
PR-URL: https://github.com/nodejs/node/pull/17904
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-01-09 04:32:49 -05:00
sreepurnajasti
2f4da8b801
test: use countdown in test file
...
Fixes: https://github.com/nodejs/node/issues/17169
PR-URL: https://github.com/nodejs/node/pull/17874
Fixes: https://github.com/nodejs/node/issues/17169
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-01-09 04:32:47 -05:00
Daniel Bevenius
ef533c99ba
test: add hasCrypto when using binding('crypto')
...
Currently, when configured --without-ssl tests that use
process.binding('crypto') fail with the following error:
=== release test-accessor-properties ===
Path: parallel/test-accessor-properties
node/test/parallel/test-accessor-properties.js:16
const crypto = process.binding('crypto');
^
Error: No such module: crypto
at Object.<anonymous> (test-accessor-properties.js:16:24)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:577:32)
at tryModuleLoad (module.js:517:12)
at Function.Module._load (module.js:509:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:645:3
This commit adds a hasCrypto check.
PR-URL: https://github.com/nodejs/node/pull/17867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:32:47 -05:00
sreepurnajasti
421eb750b2
test: improve to use template string
...
PR-URL: https://github.com/nodejs/node/pull/17895
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:32:46 -05:00
Rich Trott
275970973e
test: replace map() with forEach() where appropriate
...
Two tests were using Array.prototype.map() without returning values in
the callback. In other words, they were using it where a `.forEach()`
was called for. Change to `.forEach()`.
PR-URL: https://github.com/nodejs/node/pull/17858
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-09 04:32:45 -05:00
Rich Trott
f25bab5606
test: fix flaky test-benchmark-fs
...
Some benchmarks may return 0 operations with the new very short duration
provided by the test program. Set environment variable to allow that.
PR-URL: https://github.com/nodejs/node/pull/17885
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
2018-01-09 04:32:43 -05:00
Anna Henningsen
411e7724d4
test: make test-tls-invoke-queued use public API
...
`parallel/test-tls-invoke-queued` previously used the internal
`_write()` API to hook into the internals more directly, but this
invalidates the general assumption made by streams APIs that
only a single write is active at a time, and which is enforced
through the public API.
PR-URL: https://github.com/nodejs/node/pull/17864
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:32:42 -05:00
Anna Henningsen
1dd859d413
test: refactor test-tls-securepair-fiftharg
...
Assert the server name directly in the `SNICallback`,
since `common.mustCall()` already guarantees that the callback
is called exactly once, making `process.on('exit')` unnecessary.
PR-URL: https://github.com/nodejs/node/pull/17836
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:32:41 -05:00
Anna Henningsen
e69ea78974
tls: fix SNICallback without .server option
...
`options.server` only needs to be set when its
contents are actually being inspected.
PR-URL: https://github.com/nodejs/node/pull/17835
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:32:41 -05:00
XadillaX
f82439b6a0
http: add rawPacket in err of clientError event
...
The `rawPacket` is the current buffer that just parsed. Adding this
buffer to the error object of `clientError` event is to make it possible
that developers can log the broken packet.
PR-URL: https://github.com/nodejs/node/pull/17672
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:32:40 -05:00
Rich Trott
8b666d61c7
test: reduce scope of variable in common module
...
arrayBufferViews is used by only one function so scope it to that
function (in the common module).
PR-URL: https://github.com/nodejs/node/pull/17830
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-01-09 04:32:39 -05:00
Shobhit Chittora
2d07243cac
tools: autofixer for lowercase-name-for-primitive
...
PR-URL: https://github.com/nodejs/node/pull/17715
Refs: https://github.com/nodejs/node/issues/16636
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
2018-01-09 04:32:37 -05:00
Rich Trott
9110654965
test: remove undefined function
...
`common.fail()` no longer exists as its functionality is now in
`assert.fail()`. Replace only two instances in the code base with
`assert.fail()`.
PR-URL: https://github.com/nodejs/node/pull/17845
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2018-01-09 04:32:37 -05:00
Nicholas Drane
ca35d08291
test: remove ambiguous error messages from test_error
...
assert.strictEqual accepts 3 arguments, the last of which allows for
user-specified error message to be thrown when the assertion fails.
Unfortunately, this error message is less helpful than the default when
it is vague. This commit removes vague, user-specified error messages,
instead relying on clearer, default error messages.
PR-URL: https://github.com/nodejs/node/pull/17812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-01-09 04:32:36 -05:00
Rich Trott
ee4cbac52b
test: fix unreliable async-hooks/test-signalwrap
...
Use an interval to keep the event loop open so the test does not exit
before receiving all signals fom asynchronous `exec()` calls.
PR-URL: https://github.com/nodejs/node/pull/17827
Fixes: https://github.com/nodejs/node/issues/14070
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-01-09 04:32:36 -05:00
Rich Trott
fea5d08d65
test: fix flaky test-benchmark-fs
...
test-benchmark-fs uses common.tmpDir without first insuring it exists by
calling common.refreshTmpDir(). Add that function call.
PR-URL: https://github.com/nodejs/node/pull/17853
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-01-09 04:32:35 -05:00
Michaël Zasso
3b2d8cba23
module: print better message on esm import error
...
Use the same approach as a previous PR to include the offending line in
the output and underline imports of inexistent exports.
PR-URL: https://github.com/nodejs/node/pull/17786
Fixes: https://github.com/nodejs/node/issues/17785
Refs: https://github.com/nodejs/node/pull/17281
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-09 04:32:35 -05:00
Rich Trott
14eb97ebf7
benchmark: make temp file path configurable
...
In three fs benchmarks, a temp file is created in the source tree. For
tests, allow the location to be configurable so it gets written to the
test temp directory instead.
Additionally, shave about a second off the test running time by setting
`dur` to `0.1` instead of `1`.
PR-URL: https://github.com/nodejs/node/pull/17811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-01-09 04:32:34 -05:00