Michaël Zasso
df08779e0d
test: make crashOnUnhandleRejection opt-out
...
This commit removes `common.crashOnUnhandledRejection()` and adds
`common.disableCrashOnUnhandledRejection()`.
To reduce the risk of mistakes and make writing tests that involve
promises simpler, always install the unhandledRejection hook in tests
and provide a way to disable it for the rare cases where it's needed.
PR-URL: https://github.com/nodejs/node/pull/21849
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-19 08:47:28 +02:00
Bruno Pinho
373aae1f86
test: refactor test-module-loading assertions
...
When there are three arguments in strictEqual() call and
AssertionError exists, the previous two values are not printed.
This improves debugging messages visibility
when there is a fail.
The messages were removed where the instruction
is self-explanatory.
PR-URL: https://github.com/nodejs/node/pull/21833
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-18 15:22:31 -07:00
Peter Marshall
6dbaea779f
benchmark: remove arrays benchmark
...
PR-URL: https://github.com/nodejs/node/pull/21831
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-18 15:20:15 -07:00
Michaël Zasso
bb87e41696
2018-07-18, Version 10.7.0 (Current)
...
Notable changes:
* console:
* The `console.timeLog()` method has been implemented.
(https://github.com/nodejs/node/pull/21312 )
* deps:
* Upgrade to libuv 1.22.0. (https://github.com/nodejs/node/pull/21731 )
* Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1).
(https://github.com/nodejs/node/pull/21728 )
* http:
* Added support for passing both `timeout` and `agent` options to
`http.request`. (https://github.com/nodejs/node/pull/21204 )
* inspector:
* Expose the original console API in `require('inspector').console`.
(https://github.com/nodejs/node/pull/21659 )
* napi:
* Added experimental support for functions dealing with bigint numbers.
(https://github.com/nodejs/node/pull/21226 )
* process:
* The `process.hrtime.bigint()` method has been implemented.
(https://github.com/nodejs/node/pull/21256 )
* Added the `--title` command line argument to set the process title on
startup. (https://github.com/nodejs/node/pull/21477 )
* trace_events:
* Added process_name metadata.
(https://github.com/nodejs/node/pull/21477 )
* Added new collaborators
* codebytere - Shelley Vohr
PR-URL: https://github.com/nodejs/node/pull/21851
2018-07-18 20:17:23 +02:00
Kevin Simper
614c4c176d
doc: add missing require to example in http2.md
...
PR-URL: https://github.com/nodejs/node/pull/21858
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-18 20:57:11 +03:00
Rich Trott
e406cca5c3
doc: make minor improvements to collab guide
...
PR-URL: https://github.com/nodejs/node/pull/21862
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-18 17:52:59 +02:00
Gus Caplan
9cd932f435
test: fix faulty relpath test
...
PR-URL: https://github.com/nodejs/node/pull/20954
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 10:47:22 -05:00
Sakthipriyan Vairamani (thefourtheye)
42be4c3bef
doc: fix worker example to receive message
...
`require('worker_threads')` is not an instance of `EventEmitter`. So
`on` method would not be in it. The correct way to receive the message
would be to attach a listener to the `message` event on the
`parentPort`.
PR-URL: https://github.com/nodejs/node/pull/21486
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-18 17:45:30 +02:00
prayag21
39902e288e
tls: named anonymous functions in _tls_wrap.js
...
PR-URL: https://github.com/nodejs/node/pull/21756
Refs: https://github.com/nodejs/node/issues/8913
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-18 17:34:07 +02:00
James M Snell
ededb4b510
trace_events: add more process metadata
...
Now that TracedValue has landed, add more detailed
process `__metadata` including versions, arch, platform,
release detail, and argv/execArgv to the trace event
log.
PR-URL: https://github.com/nodejs/node/pull/21785
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-18 17:23:55 +02:00
Ruben Bridgewater
81bc23fe61
util: improve display of iterators and weak entries
...
This adds the number of not visible elements when inspecting iterators
while exceeding `maxArrayLength`.
It also fixes a edge case with `maxArrayLength` and the map.entries()
iterator. Now the whole entry will be visible instead of only the key
but not the value of the first entry.
Besides that it uses a slighly better algorithm that improves the
performance by skipping unnecessary steps.
PR-URL: https://github.com/nodejs/node/pull/20961
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-18 17:21:14 +02:00
mariotsi
caf2335a47
stream: name anonymous function in _stream_writable.js
...
PR-URL: https://github.com/nodejs/node/pull/21753
Refs: https://github.com/nodejs/node/issues/8913
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-18 17:18:29 +02:00
Simionescu, Radu
7e4e04d22f
stream: named anonymous functions in _stream_readable.js
...
PR-URL: https://github.com/nodejs/node/pull/21750
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-18 17:13:12 +02:00
Tobias Nießen
7b6e2fc114
src: avoid unnecessarily formatting a warning
...
ProcessEmitWarning will already format the message, there is no
need to call snprintf here.
PR-URL: https://github.com/nodejs/node/pull/21832
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 15:47:05 +02:00
Anna Henningsen
e9b22e9569
crypto: add better scrypt option aliases
...
Make parameter names available in a human-readable way, for
more accessible/self-documenting usage of the `scrypt` functions.
This implements a review comment from the original PR that has
not been addressed.
Refs: https://github.com/nodejs/node/pull/20816#discussion_r189220776
PR-URL: https://github.com/nodejs/node/pull/21525
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-18 14:18:01 +02:00
Kevin Lacabane
07c514ce29
tls: name anonymous function in tls.js
...
Refs: https://github.com/nodejs/node/issues/8913
PR-URL: https://github.com/nodejs/node/pull/21754
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-07-18 05:01:28 -07:00
Petras
72624fdd53
http: name anonymous function in _http_common.js
...
Refs: https://github.com/nodejs/node/issues/8913
PR-URL: https://github.com/nodejs/node/pull/21755
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-18 04:50:27 -07:00
hectorcoronado
cfe0c024fc
test: remove 3rd arg from to assert.strictEqual()
...
prevents AssertionError from reporting string literal,
instead displays values of first 2 args passed to
assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/21828
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 04:43:00 -07:00
Tobias Nießen
b3f459e6cf
crypto: add support for OCB mode for AEAD
...
PR-URL: https://github.com/nodejs/node/pull/21447
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 13:10:10 +02:00
Antoine du HAMEL
b75bde3bc5
test: add support for NODE_TEST_DIR on a separate mount point
...
Linux permits a filesystem to be mounted at multiple points, but
`fs.renameSync` does not work across different mount points, even if the
same filesystem is mounted on both.
This fixes failing tests when NODE_TEST_DIR mount point is different
from the one on which the tests are executed (E.G. on a separate
partition).
Ref: http://man7.org/linux/man-pages/man2/rename.2.html
PR-URL: https://github.com/nodejs/node/pull/21552
Refs: http://man7.org/linux/man-pages/man2/rename.2.html
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2018-07-17 19:10:25 -07:00
Tobias Nießen
43cc6bc9f3
crypto: prevent Sign::SignFinal from crashing
...
The validation logic could be tricked into assuming an option was
valid using malicious getters, leading to an invalid value being
passed to the C++ layer, thus crashing the process.
PR-URL: https://github.com/nodejs/node/pull/21815
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-07-18 00:34:54 +02:00
Tobias Nießen
3504850a00
buffer: remove superfluous assignment
...
PR-URL: https://github.com/nodejs/node/pull/21844
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-17 21:45:27 +02:00
Anna Henningsen
cf37945b12
src: include cwd in chdir error message
...
Include the current working directory in the error
message for a failing `process.chdir()` since that is
usually information relevant for debugging.
This is semver-major because it moves properties
of the error message object.
Inspired by https://github.com/nodejs/help/issues/1355 .
PR-URL: https://github.com/nodejs/node/pull/21526
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-07-17 13:57:11 +02:00
Anna Henningsen
4107bb463e
test: move inspector test back to parallel, unmark flaky
...
After https://github.com/nodejs/node/pull/21182 , the test is
no longer flaky.
Since it doesn’t use a static port, moving it to parallel
seems justified.
PR-URL: https://github.com/nodejs/node/pull/21806
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-17 13:56:17 +02:00
Rich Trott
ab10bfe376
lib: update punycode to 2.1.1
...
PR-URL: https://github.com/nodejs/node/pull/21768
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-16 15:55:15 -07:00
Anna Henningsen
210fea51f4
test: fix build warnings in bigint N-API test
...
PR-URL: https://github.com/nodejs/node/pull/21796
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-16 20:53:05 +02:00
Anna Henningsen
9a34c5b8d5
test: refactor test-tls-connect-memleak, move to parallel
...
This enables the test to run as part of the regular test suite.
PR-URL: https://github.com/nodejs/node/pull/21794
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-16 20:48:16 +02:00
Anna Henningsen
d06142af36
test: refactor test-net-connect-memleak, move to parallel
...
This enables the test to run as part of the regular test suite.
PR-URL: https://github.com/nodejs/node/pull/21794
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-16 20:48:15 +02:00
Anna Henningsen
d37a47754d
test: add gc tracking to common API
...
PR-URL: https://github.com/nodejs/node/pull/21794
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-16 20:48:14 +02:00
Anna Henningsen
d94950e960
http2: fix issues with aborted respondWithFile()s
...
PR-URL: https://github.com/nodejs/node/pull/21561
Fixes: https://github.com/nodejs/node/issues/20824
Fixes: https://github.com/nodejs/node/issues/21560
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-16 20:20:39 +02:00
Anna Henningsen
31ecf630d0
build: account for pure C sources in build-addons-napi
...
PR-URL: https://github.com/nodejs/node/pull/21797
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-16 20:07:34 +02:00
Ruben Bridgewater
bd1f355fc5
lib,src: replace all C++ promises with JS promises
...
C++ promises can not be properly optimized by V8. They also behave
a tiny bit different than "regular" promises.
PR-URL: https://github.com/nodejs/node/pull/20830
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-07-16 16:45:48 +02:00
Andreas Madsen
b70367e8cf
doc: add documentation for buffer.byteOffset
...
Also document a common issue when casting a Buffer object to a
TypedArray object.
Fixes: https://github.com/nodejs/node/issues/19301
PR-URL: https://github.com/nodejs/node/pull/21718
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-16 16:33:56 +02:00
Ruben Bridgewater
9c5019995c
test: improve inspect readability
...
The string escaping is hard to read. This changes all those escaped
strings to use double quotes instead so no escaping is necessary.
PR-URL: https://github.com/nodejs/node/pull/21624
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-16 14:18:27 +02:00
Ruben Bridgewater
b3e93a91eb
util: do not escape single quotes if not necessary
...
Right now util.inspect will always escape single quotes. That is not
necessary though in case the string that will be escaped does not
contain double quotes. In that case the string can simply be wrapped
in double quotes instead.
If the string contains single and double quotes and it does not
contain `${` as part of the string, backticks will be used instead.
That makes sure only very few strings have to escape quotes at all.
Thus it increases the readability of these strings.
PR-URL: https://github.com/nodejs/node/pull/21624
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-16 14:18:25 +02:00
Ruben Bridgewater
49681e7414
process: refactor emitWarning
...
Remove a couple of obsolete checks by refactoring the code with else.
Also remove the possibility of an undefined warning. That is neither
documented nor does it result in a usable warning.
PR-URL: https://github.com/nodejs/node/pull/20726
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-16 11:36:45 +02:00
Ruben Bridgewater
43ee4d692a
assert: improve simple assert
...
1) If simple assert is called in the very first line of a file and
it causes an error, it used to report the wrong code. The reason
is that the column that is reported is faulty. This is fixed by
subtracting the offset from now on in such cases.
2) The actual code read is now limited to the part that is actually
required to visualize the call site. All other code in e.g. minified
files will not cause a significant overhead anymore.
3) The number of allocations is now significantly lower than it used
to be. The buffer is reused until the correct line in the code is
found. In general the algorithm tries to safe operations where
possible.
4) The indentation is now corrected depending on where the statement
actually beginns.
5) It is now possible to handle `.call()` and `.apply()` properly.
6) The user defined function name will now always be used instead of
only choosing either `assert.ok()` or `assert()`.
PR-URL: https://github.com/nodejs/node/pull/21626
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-16 11:30:55 +02:00
Ruben Bridgewater
7eeb7948b3
console: fix timeEnd() not coercing the input
...
The input of console.timeEnd() was not coerced to a string. That way
labels were not found and the entry was not removed anymore.
PR-URL: https://github.com/nodejs/node/pull/21779
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-16 11:24:34 +02:00
Anna Henningsen
db49589624
console,util: avoid pair array generation in C++
...
Use a plain `[key, value, key, value]`-style list instead
of an array of pairs for inspecting collections.
This also fixes a bug with `console.table()` where
inspecting a non-key-value `MapIterator` would have
led to odd results.
PR-URL: https://github.com/nodejs/node/pull/20831
Refs: https://github.com/nodejs/node/pull/20719#discussion_r189342513
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-16 10:46:09 +02:00
Rich Trott
df97126173
test: fix flaky test-debug-prompt
...
Be sure to send `.exit` only once to avoid spurious EPIPE and possibly
other errors.
Fixes: https://github.com/nodejs/node/issues/21724
PR-URL: https://github.com/nodejs/node/pull/21826
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-07-15 22:50:16 -07:00
Ryuichi Sakagami
a8ec288884
test: fix comment of fs.promises write
...
PR-URL: https://github.com/nodejs/node/pull/21708
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-16 01:51:50 +02:00
Ryuichi Sakagami
c596eb2673
test: add test of fs.promises write for non-string buffers
...
PR-URL: https://github.com/nodejs/node/pull/21708
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-16 01:51:49 +02:00
RidgeA
8babbc5e45
http2: remove waitTrailers listener after closing a stream
...
When `writeHeader` of `Http2ServerResponse` instance are called with
204, 205 and 304 status codes an underlying stream closes.
If call `end` method after sending any of these status codes it will
cause an error `TypeError: Cannot read property 'Symbol(trailers)' of
undefined` because a reference to `Http2ServerResponse` instance
associated with Http2Stream already was deleted.
The closing of stream causes emitting `waitTrailers` event and, when
this event handles inside `onStreamTrailerReady` handler, there is
no reference to Http2ServerResponse instance.
Fixes: https://github.com/nodejs/node/issues/21740
PR-URL: https://github.com/nodejs/node/pull/21764
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-07-16 01:49:05 +02:00
Javier Gonzalez
fb87d8aa12
src: fix async hooks crashing when there is no node context
...
PR-URL: https://github.com/nodejs/node/pull/19134
Fixes: https://github.com/nodejs/node/issues/19104
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-16 01:44:21 +02:00
Michaël Zasso
d279a8fcee
doc: fix vm.runInNewContext signature
...
The `options` parameter cannot be passed without `sandbox`.
PR-URL: https://github.com/nodejs/node/pull/21824
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-16 01:31:58 +02:00
Sam Ruby
6a99e3e21c
doc: make markdown input compliant
...
PR-URL: https://github.com/nodejs/node/pull/21780
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-16 00:04:56 +03:00
Sam Ruby
40c85ff063
doc: declare all parameter types
...
PR-URL: https://github.com/nodejs/node/pull/21782
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-07-15 23:57:35 +03:00
Anna Henningsen
1009118d27
test: add heap snapshot tests
...
Add a number of tests that validate that heap snapshots
contain what we expect them to contain, and cross-check
against a JS version of our own embedder graphs.
PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-07-15 20:35:44 +02:00
Anna Henningsen
45ad8df318
src: make heap snapshot & embedder graph accessible for tests
...
Add methods that allow inspection of heap snapshots and a JS
version of our own embedder graph.
These can be used in tests and might also prove useful for
ad-hoc debugging. Usage requires `--expose-internals` and
prints a warning similar to our other modules whose primary
purpose is test support.
PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-07-15 20:35:41 +02:00
Anna Henningsen
266a7e6258
src: use V8 graph heap snapshot API
...
Transition to a newer, more flexible API for
heap snapshot creation.
This addresses a currently pending deprecation in the V8 API.
PR-URL: https://github.com/nodejs/node/pull/21741
Fixes: https://github.com/nodejs/node/issues/21633
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-07-15 20:35:35 +02:00