Bartosz Sosnowski
ea1a07656e
doc: mark accessing IPC channel fd as undefined
...
Adds note that accessing the fd of the IPC channel in any other way
than process.send, or using the IPC channel with child processes that
is not Node.js is not supported.
PR-URL: https://github.com/nodejs/node/pull/17545
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-17 15:24:38 +01:00
Luigi Pinca
33103e9758
test: refactor stream-*-constructor-set-methods
...
- Use `common.mustCall()` to ensure that callbacks are called.
- Remove no longer needed variables.
- Remove unnecessary `process.on('exit')` usage.
PR-URL: https://github.com/nodejs/node/pull/18817
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-02-17 15:22:14 +01:00
Myles Borins
81232320aa
deps: patch V8 to 6.4.388.46
...
PR-URL: https://github.com/nodejs/node/pull/18827
Refs: https://github.com/v8/v8/compare/6.4.388.45...6.4.388.46
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-02-17 15:19:52 +01:00
Rich Trott
2fbe15b82c
doc: fix minor typos in GOVERNANCE.md
...
PR-URL: https://github.com/nodejs/node/pull/18829
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-02-17 15:16:56 +01:00
Bartosz Sosnowski
1bda746c1b
test: stdio pipe behavior tests
...
Add two regression tests for stdio over pipes.
test-stdio-pipe-access tests if accessing stdio pipe that is being read
by another process does not deadlocks Node.js. This was reported in
https://github.com/nodejs/node/issues/10836 and was fixed in v8.3.0.
The deadlock would happen intermittently, so we run the test 5 times.
test-stdio-pipe-redirect tests if redirecting one child process stdin to
another process stdout does not crash Node as reported in
https://github.com/nodejs/node/issues/17493 . It was fixed in
https://github.com/nodejs/node/pull/18019 .
PR-URL: https://github.com/nodejs/node/pull/18614
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-17 14:57:00 +01:00
Sergey Golovin
b404aa56c0
path: replace duplicate conditions by functions
...
It will also remove useless "code" variables by inlining
path.charCodeAt.
PR-URL: https://github.com/nodejs/node/pull/18693
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-17 14:53:58 +01:00
Anna Henningsen
590eacecaa
net: simplify net.Socket#end()
...
`writable` is already set by the streams side, and
there is a handler waiting for the writable side to finish
which already takes care of the other cleanup code that
was previously there; both of these things can therefore be removed.
PR-URL: https://github.com/nodejs/node/pull/18708
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-17 14:37:35 +01:00
Myles Borins
99d693da5c
lib: replace eval with vm.runInThisContext
...
PR-URL: https://github.com/nodejs/node/pull/18623
Refs: https://github.com/nodejs/node/pull/18212#pullrequestreview-94616927
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-17 14:35:34 +01:00
killagu
38f04d4da1
tools, test: fix prof polyfill readline
...
`node --prof foo.js` may not print the full profile log file, leaving
the last line broken (for example `tick,`. When that happens, `readline`
will be stuck in an infinite loop. This patch fixes it.
Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code
on tick-processor tests.
PR-URL: https://github.com/nodejs/node/pull/18641
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-17 10:06:53 -02:00
Michaël Zasso
513d939720
fs: move fs.promises API to fs/promises
...
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-02-17 10:15:20 +01:00
Michaël Zasso
2620358624
fs: move utility functions to internal/fs
...
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-02-17 10:09:22 +01:00
Yihong Wang
6c9774fd94
doc: add Yihong Wang to collaborators
...
Signed-off-by: Yihong Wang <yh.wang@ibm.com >
PR-URL: https://github.com/nodejs/node/pull/18824
Refs: https://github.com/nodejs/node/issues/18533
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-02-16 21:14:59 -08:00
juggernaut451
760f86c75b
test: refactor parallel/test-tls-0-dns-altname
...
PR-URL: https://github.com/nodejs/node/pull/18803
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 16:18:23 -08:00
Myles Borins
1fd69872e6
test: add common.skipIfEslintMissing
...
We've added a number of tests that hook into ESLint which can error
when running the test suite with the distributed tarball. This PR
adds a new test helper `common.skipIfEslintMissing` and will skip
remaining tests in a file when `ESLint` is not available at
`tools/node_modules/eslint`
PR-URL: https://github.com/nodejs/node/pull/18807
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
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: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 15:54:56 -08:00
Ali Ijaz Sheikh
6ab288f3b8
test: fix warnings in addon tests
...
The legacy MakeCallback deprecation was resulting in compile time
warnings in adddon tests. Fix them.
Ref: https://github.com/nodejs/node/pull/18632
PR-URL: https://github.com/nodejs/node/pull/18810
Refs: https://github.com/nodejs/node/pull/18632
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-02-16 15:47:07 -08:00
Jimmy Thomson
197258bda7
src: changing node_file's usage of v8::Resolver
...
node_file was casting back and forth between v8::Resolver and
v8::Promise. This is unnecessary; most of the time it just wants the
v8::Resolver, converting to the v8::Promise only as a return value.
PR-URL: https://github.com/nodejs/node/pull/18765
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
2018-02-16 15:03:17 -08:00
Anna Henningsen
cbe6d5c519
doc: warn against concurrent http2stream.respondWithFD
...
Upcoming changes to move away from synchronous I/O on the main
thread will imply that using the same file descriptor to
respond on multiple HTTP/2 streams at the same time is invalid,
because at least on Windows `uv_fs_read()` is race-y.
Therefore, warn against such usage.
PR-URL: https://github.com/nodejs/node/pull/18762
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-02-16 13:54:14 -08:00
Ivan Filenko
755d805bf4
doc: add fs declarations to stream doc js examples
...
PR-URL: https://github.com/nodejs/node/pull/18804
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-02-16 23:34:32 +02:00
Anatoli Papirovski
94e8d2a5ff
test: fix unrelated variable name changes
...
PR-URL: https://github.com/nodejs/node/pull/18823
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 22:02:22 +01:00
Ruben Bridgewater
69f7ce9cea
doc: activate no-multiple-empty-lines rule
...
This enables the `no-multiple-empty-lines` eslint rule for the docs.
PR-URL: https://github.com/nodejs/node/pull/18747
Reviewed-By: Weijia Wang <starkwang@126.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: Matheus Marchini <matheus@sthima.com >
2018-02-16 21:58:26 +01:00
Anatoli Papirovski
e9ac80bb39
async_hooks: clean up usage in internal code
...
Instead of exposing internals of async_hooks & async_wrap throughout
the code base, create necessary helper methods within the internal
async_hooks that allows easy usage by Node.js internals. This stops
every single internal user of async_hooks from importing a ton of
functions, constants and internal Aliased Buffers from C++ async_wrap.
Adds functions initHooksExist, afterHooksExist, and destroyHooksExist
to determine whether the related emit methods need to be triggered.
Adds clearDefaultTriggerAsyncId and clearAsyncIdStack on the JS side
as an alternative to always calling C++.
Moves async_id_symbol and trigger_async_id_symbol to internal
async_hooks as they are never used in C++.
Renames newUid to newAsyncId for added clarity of its purpose.
Adjusts usage throughout the codebase, as well as in a couple of tests.
PR-URL: https://github.com/nodejs/node/pull/18720
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-02-16 14:23:14 -05:00
Guy Bedford
7748865cd3
module: fix main lookup regression from #18728
...
PR-URL: https://github.com/nodejs/node/pull/18788
Refs: https://github.com/nodejs/node/pull/18728
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 19:46:28 +01:00
Gibson Fahnestock
61e3e6d56f
doc: note that linting is required in releases.md
...
Refs: https://github.com/nodejs/node/pull/18769
PR-URL: https://github.com/nodejs/node/pull/18776
Refs: https://github.com/nodejs/node/pull/18769
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 19:41:19 +01:00
Sho Miyamoto
9a18b0e668
doc: add missing Returns in fs & util
...
PR-URL: https://github.com/nodejs/node/pull/18775
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-02-16 19:40:06 +01:00
Sho Miyamoto
ff471da1a8
doc: fix a typo in util.isDeepStrictEqual
...
PR-URL: https://github.com/nodejs/node/pull/18775
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-02-16 19:40:05 +01:00
Ruben Bridgewater
463d1a490f
test,benchmark,doc: enable dot-notation rule
...
This enables the eslint dot-notation rule for all code instead of
only in /lib.
PR-URL: https://github.com/nodejs/node/pull/18749
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-02-16 19:37:43 +01:00
Myles Borins
36386dc4e3
deps: patch V8 to 6.4.388.45
...
Refs: https://github.com/v8/v8/compare/6.4.388.44...6.4.388.45
PR-URL: https://github.com/nodejs/node/pull/18751
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 19:35:11 +01:00
juggernaut451
181209c3bd
test: refactor parallel/test-tls-addca
...
PR-URL: https://github.com/nodejs/node/pull/18798
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-02-16 19:33:08 +01:00
Sergey Golovin
c86fe511f4
module: replace magic numbers by constants
...
- add new constants
- replace "magic" numbers in "module" by constants
PR-URL: https://github.com/nodejs/node/pull/18785
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-02-16 19:32:03 +01:00
juggernaut451
2960096a91
test: refactor of test-tls-over-http-tunnel
...
PR-URL: https://github.com/nodejs/node/pull/18784
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-02-16 19:29:24 +01:00
Seth Brenith
862389b0aa
http: simplify checkInvalidHeaderChar
...
In the spirit of [17399](https://github.com/nodejs/node/pull/17399 ),
we can also simplify checkInvalidHeaderChar to use regex matching
instead of a loop. This makes it faster on long matches and slower
on short matches or non-matches. This change also includes some
sample data from an AcmeAir benchmark run, as a rough proxy for
real-world data.
PR-URL: https://github.com/nodejs/node/pull/18381
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-02-16 19:27:28 +01:00
Ben Noordhuis
3c29adb84f
test: make tls test more rigorous
...
* exit naturally, don't use process.exit()
* ensure callbacks are actually called
PR-URL: https://github.com/nodejs/node/pull/18792
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-02-16 19:23:29 +01:00
juggernaut451
85893afb05
test: reduce benchmark test run time
...
The `millions` argument was missing.
PR-URL: https://github.com/nodejs/node/pull/18787
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-02-16 19:18:27 +01:00
Leko
befe675af8
test: try to connect after server was closed
...
PR-URL: https://github.com/nodejs/node/pull/18257
Reviewed-By: Joyee Cheung <joyeec9h3@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: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 19:12:50 +01:00
Santiago Gimeno
b74a6da5d0
child_process: fix stdio sockets creation
...
`readable` and `writable` properties can be passed directly to the
`net.Socket` constructor. This change also avoids an unnecessary call
to `read(0)` on the `stdin` socket. This behavior was disclosed when
trying to merge `libuv@1.19 .0` and specifically this commit:
https://github.com/libuv/libuv/commit/fd049399aa4ed8495928e375466970d98cb42e17 .
PR-URL: https://github.com/nodejs/node/pull/18701
Refs: https://github.com/libuv/libuv/pull/1655
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-02-16 19:11:03 +01:00
Matheus Marchini
f25104e136
doc: remove extra space in README.md
...
PR-URL: https://github.com/nodejs/node/pull/18822
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 15:42:36 -02:00
Bamieh
941bc93f22
test: wrap countdown callback in common.mustCall
...
This adds a implicit common.mustCall to the callback provided to
the countdown.
PR-URL: https://github.com/nodejs/node/pull/18506
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 18:32:59 +01:00
Ruben Bridgewater
96c57fbfaa
lib: switch to Number.isNaN
...
Number.isNaN is now as fast as `val !== val`. Switch to the more
readable version. Also switch all `isNaN` to `Number.isNaN`.
PR-URL: https://github.com/nodejs/node/pull/18744
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-02-16 18:09:56 +01:00
Ruben Bridgewater
43b8ce4ce7
buffer: remove obsolete NaN check
...
These two NaN entries are not necessary and we can safely remove them.
PR-URL: https://github.com/nodejs/node/pull/18744
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-02-16 18:09:55 +01:00
Aaron Bieber
ef0e92eb82
test: update a few tests to work on OpenBSD
...
PR-URL: https://github.com/nodejs/node/pull/18543
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 18:02:29 +01:00
Aaron Bieber
bd4350ca08
lib: set process.execPath on OpenBSD
...
PR-URL: https://github.com/nodejs/node/pull/18543
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 18:02:28 +01:00
Jose M. Palacios Diaz
916cfeca77
lib,src: audit process.env in lib/ for setuid binary
...
Wrap SafeGetenv() in util binding with the purpose of protecting
the cases when env vars are accessed with the privileges of another
user in jsland.
PR-URL: https://github.com/nodejs/node/pull/18511
Fixes: https://github.com/nodejs/node/issues/9160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-02-16 17:42:21 +01:00
Yihong Wang
ec9e7922bb
test: add lib path env when node_shared=true
...
When building the node with `--shared` option, the major output is the
shared library. However, we still build a node executable which links
to the shared lib. It's for testing purpose. When testing with the
executable, some test cases move/copy the executable, change the
relative path to the shared library and fail. Using lib path env would
solve the issue. However, in macOS, need to change the install name for
the shared library and use rpath in the executable. In AIX, `-brtl`
linker option rebinds the symbols in the executable and addon modules
could use them.
Signed-off-by: Yihong Wang <yh.wang@ibm.com >
PR-URL: https://github.com/nodejs/node/pull/18626
Refs: https://github.com/nodejs/node/issues/18535
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-16 17:30:16 +01:00
Anna Henningsen
3e1e450f92
fs: use Persistent::Reset() for resetting handles
...
PR-URL: https://github.com/nodejs/node/pull/18650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 17:26:21 +01:00
Ruben Bridgewater
703e37cf3f
process: deprecate process.assert()
...
This was never documented and the `assert` module should be used
instead.
PR-URL: https://github.com/nodejs/node/pull/18666
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 17:02:38 +01:00
Ruben Bridgewater
1bd32087ee
doc: fix deprecation number
...
PR-URL: https://github.com/nodejs/node/pull/18818
Refs: https://github.com/nodejs/node/commit/efb32592e1b78ec2559e1a409faa049e756a9501
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-02-16 16:59:40 +01:00
Ruben Bridgewater
15bb8437fd
tools: add assert.doesNotThrow eslint rule
...
Prohibit the usage of `assert.doesNotThrow()`.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-16 16:54:57 +01:00
Ruben Bridgewater
644fdd60d4
test: minor refactoring
...
Add punctuation and comments about code that should not throw.
Also remove a obsolete test and refactor some tests.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-16 16:54:07 +01:00
Ruben Bridgewater
caee112e52
test: remove assert.doesNotThrow()
...
There is actually no reason to use `assert.doesNotThrow()` in the
tests. If a test throws, just let the error bubble up right away
instead of first catching it and then rethrowing it.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-16 16:53:47 +01:00
Ruben Bridgewater
4d3c3f039a
tools: enable no-unsafe-finally
...
This enables the `no-unsafe-finally` eslint rule to make sure we
have a proper control flow in try / catch.
PR-URL: https://github.com/nodejs/node/pull/18745
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-16 16:42:43 +01:00