Rich Trott
4c5fc5c7ce
build: move to npm ci where possible
...
Recent events (involving a maliciously published version of a popular
module's dependency) have reinvigorated my interest in seeing us move to
`npm ci` instead of `npm install`. This moves us to `npm ci` where
possible in Makefile and vcbuild.bat.
PR-URL: https://github.com/nodejs/node/pull/21802
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-20 18:38:29 +02:00
Anna Henningsen
1e15581823
http2: remove unused nghttp2 error list
...
Remove a list of HTTP2 errors as well as `nghttp2_errname()`
that converted an integer nghttp2 error code to a string
representation.
We already use `nghttp2_strerror()` for this, which
is provided by nghttp2 returns a better error string anyway.
PR-URL: https://github.com/nodejs/node/pull/21827
Reviewed-By: Colin Ihrig <cjihrig@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 >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-20 18:38:29 +02:00
silverwind
6b925ebaba
tools: make getnodeversion.py python3-compatible
...
PR-URL: https://github.com/nodejs/node/pull/21872
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-20 18:38:29 +02:00
Anna Henningsen
d0f8af021f
src: use offset calc. instead of req->data in node_file
...
A small refactor – this removes one layer of pointer indirection.
(The performance gain is likely negligible, the main point here
being that this encapsulates libuv request management a bit more.)
PR-URL: https://github.com/nodejs/node/pull/21839
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-07-20 18:38:29 +02:00
Michael Achenbach
ff5c6dcd1b
tools: properly convert .gypi in install.py
...
It was breaking during install when .gypi strings had quotes in
them. e.g.: 'foo': 'bar="baz"'
2018-07-20 18:38:29 +02:00
Michaël Zasso
484140e223
fs: stop lazy loading stream constructors
...
Fixes: https://github.com/nodejs/node/issues/21489
PR-URL: https://github.com/nodejs/node/pull/21776
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-19 11:08:32 +02:00
Michaël Zasso
ec0ff7008a
deps: cherry-pick 907d7bc from upstream V8
...
Original commit message:
[promise] Implement Swallowed Rejection Hook.
This extends the current Promise Rejection Hook with two new events
kPromiseRejectAfterResolved
kPromiseResolveAfterResolved
which are used to detect (and signal) misuse of the Promise constructor.
Specifically the common bug like
new Promise((res, rej) => {
res(1);
throw new Error("something")
});
where the error is silently swallowed by the Promise constructor without
the user ever noticing can be caught via this hook.
Doc: https://goo.gl/2stLUY
Bug: v8:7919
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
Reviewed-on: https://chromium-review.googlesource.com/1126099
Reviewed-by: Maya Lekova <mslekova@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Cr-Commit-Position: refs/heads/master@{#54309}
Refs: https://github.com/v8/v8/commit/907d7bcd18c13a04a14eea6699e54167494bf9f9
PR-URL: https://github.com/nodejs/node/pull/21838
Refs: https://github.com/nodejs/promises-debugging/issues/8
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
2018-07-19 09:49:29 +02:00
Michaël Zasso
c23e8b51ea
deps: cherry-pick 2075910 from upstream V8
...
Original commit message:
[turbofan] Remove optimization of default Promise capability functions.
The JSCallReducer could in theory inline the default resolve and reject
functions passed to the executor in the Promise constructor. But that
inlining is almost never triggered because we don't have SFI based feedback
in the CallIC. Also the use of the Promise constructor is discouraged,
so we shouldn't really need to squeeze the last bit of performance out
of this even in the future.
Getting rid of this optimization will make significantly easier to
implement the Swallowed Rejection Hook, as there's less churn on the
TurboFan side then.
Bug: v8:7919
Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
Reviewed-on: https://chromium-review.googlesource.com/1125926
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org >
Cr-Commit-Position: refs/heads/master@{#54210}
Refs: https://github.com/v8/v8/commit/2075910f3d070159bebd80e128dd09fdd87be56e
PR-URL: https://github.com/nodejs/node/pull/21838
Refs: https://github.com/nodejs/promises-debugging/issues/8
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
2018-07-19 09:49:29 +02:00
Benedikt Meurer
41ff1bb9c7
src: prepare for V8 Swallowed Rejection Hook
...
This is done in preparation for landing
https://chromium-review.googlesource.com/c/v8/v8/+/1126099
on the V8 side, which extends the existing PromiseRejectEvent mechanism
with new hooks for reject/resolve after a Promise was previously
resolved already.
Refs: https://github.com/nodejs/promises-debugging/issues/8
Design: https://goo.gl/2stLUY
PR-URL: https://github.com/nodejs/node/pull/21838
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
2018-07-19 09:49:29 +02:00
Bruno Pinho
756dff498a
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-19 09:36:06 +02:00
Peter Marshall
335575e49b
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-19 09:36:06 +02:00
Kevin Simper
4d78a21d8c
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-19 09:36:06 +02:00
Rich Trott
ab0da57150
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-19 09:36:06 +02:00
Gus Caplan
292aa42bd1
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-19 09:36:06 +02:00
Sakthipriyan Vairamani (thefourtheye)
b510cdc756
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-19 09:36:06 +02:00
prayag21
580071dde4
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-19 09:35:56 +02:00
James M Snell
d7edee4954
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-19 09:35:56 +02:00
mariotsi
6af4f1f515
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-19 09:35:56 +02:00
Simionescu, Radu
d0c16f4b2a
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-19 09:35:56 +02:00
Tobias Nießen
c45623a548
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-19 09:35:10 +02:00
Kevin Lacabane
0f70017f35
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-19 09:35:08 +02:00
Petras
a5928712c9
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-19 09:34:51 +02:00
hectorcoronado
a086604f8f
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-19 09:34:51 +02:00
Michaël Zasso
6487d8dcb4
Working on v10.7.1
...
PR-URL: https://github.com/nodejs/node/pull/21851
2018-07-18 20:14:33 +02:00
Michaël Zasso
991bb95384
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
v10.7.0
2018-07-18 13:19:10 +02:00
Vse Mozhet Byt
506631a9f9
doc: fix structure and formatting in inspector.md
...
1. Reorder some sections alphabetically.
2. Fix some heading levels.
3. Express a type of a property more formally.
PR-URL: https://github.com/nodejs/node/pull/21709
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-07-18 13:02:10 +02:00
Matteo Collina
2922028362
inspector: expose original console
...
Adds require('inspector').console, mapping it to the original
global.console of V8. This enables applications to send messages to
the inspector console programmatically.
Fixes: https://github.com/nodejs/node/issues/21651
PR-URL: https://github.com/nodejs/node/pull/21659
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-18 13:01:17 +02:00
Antoine du HAMEL
0108ff6b51
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-18 13:00:01 +02:00
Tobias Nießen
d9825c7a16
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 13:00:01 +02:00
Tobias Nießen
576f1ea978
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-18 13:00:01 +02:00
Joyee Cheung
581390c59d
process: split bootstrappers by threads that can run them
...
This patch split part of the bootstrappers into three files:
- `lib/internal/process/main_thread_only.js`: contains bootstrappers
that can only be run in the main thread, including
- `setupStdio` for the main thread that sets up `process.stdin`,
`process.stdout`, `process.error` that may interact with external
resources, e.g. TTY/File/Pipe/TCP sockets
- `setupProcessMethods` that setup methods changing process-global
states, e.g. `process.chdir`, `process.umask`, `process.setuid`
- `setupSignalHandlers`
- `setupChildProcessIpcChannel` that setup `process.send` for
child processes.
- `lib/internal/process/worker_thread_only.js`: contains bootstrappers
that can only be run in the worker threads, including
- `setupStdio` for the worker thread that are streams to be
manipulated or piped to the parent thread
- `lib/internal/process/per_thread.js`: contains bootstrappers
that can be run in all threads, including:
- `setupAssert` for `process.assert`
- `setupCpuUsage` for `process.cpuUsage`
- `setupHrtime` for `process.hrtime` and `process.hrtime.bigint`
- `setupMemoryUsage` for `process.memoryUsage`
- `setupConfig` for `process.config`
- `setupKillAndExit` for `process.kill` and `process.exit`
- `setupRawDebug` for `process._rawDebug`
- `setupUncaughtExceptionCapture` for
`process.setUncaughtExceptionCaptureCallback` and
`process.hasUncaughtExceptionCaptureCallback`
Hopefully in the future we can sort more bootstrappers in
`boostrap/node.js` into these three files and further group
them into functions that can be run before creating the
snapshot / after loading the snapshot.
This patch also moves most of the `isMainThread` conditionals
into the main bootstrapper instead of letting them scattered around
special-casing different implementations.
PR-URL: https://github.com/nodejs/node/pull/21378
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/21866
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-07-18 12:59:32 +02:00
Anna Henningsen
eef975ebae
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 14:08:55 +02:00
Rich Trott
4ed4bf3bdd
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-17 14:08:55 +02:00
Anna Henningsen
67908e9933
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 21:26:29 +02:00
Anna Henningsen
6b72583bf8
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 21:26:29 +02:00
Anna Henningsen
174a9db51a
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 21:26:29 +02:00
Anna Henningsen
b338ff54bb
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 21:26:29 +02:00
Anna Henningsen
0b3c80ca31
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 21:14:20 +02:00
Anna Henningsen
6bb2b5a51d
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 21:14:20 +02:00
Andreas Madsen
53b587a5af
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 21:14:20 +02:00
Ruben Bridgewater
8c97ffb2f5
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 21:14:20 +02:00
Ruben Bridgewater
2a0862cec9
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 21:14:20 +02:00
Anna Henningsen
73cafd853c
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 21:14:20 +02:00
Rich Trott
4e60ce8f87
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-16 21:14:20 +02:00
Ryuichi Sakagami
a2edb59870
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 21:14:20 +02:00
Ryuichi Sakagami
32ad163038
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 21:14:20 +02:00
RidgeA
238ef58841
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 21:14:20 +02:00
Javier Gonzalez
1019c2d317
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 21:13:21 +02:00
Michaël Zasso
51dfebf9ac
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 21:12:53 +02:00
Sam Ruby
10f9374ea3
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 21:12:35 +02:00