0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

22867 Commits

Author SHA1 Message Date
cjihrig
7ff50f9e9c
fs: undeprecate lchown()
uv_fs_lchown() exists, as of libuv 1.21.0. fs.lchown() can now
be undeprecated. This commit also adds tests, as there were
none.

PR-URL: https://github.com/nodejs/node/pull/21498
Fixes: https://github.com/nodejs/node/issues/19868
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-06-27 11:37:17 -04:00
Joyee Cheung
4750ce26f2
build: speed up startup with V8 code cache
This patch speeds up the startup time and reduce the startup memory
footprint by using V8 code cache when comiling builtin modules.

The current approach is demonstrated in the `with-code-cache`
Makefile target (no corresponding Windows target at the moment).

1. Build the binary normally (`src/node_code_cache_stub.cc` is used),
  by now `internalBinding('code_cache')` is an empty object
2. Run `tools/generate_code_cache.js` with the binary, which generates
  the code caches by reading source code of builtin modules off source
  code exposed by `require('internal/bootstrap/cache').builtinSource`
  and then generate a C++ file containing static char arrays of the
  code cache, using a format similar to `node_javascript.cc`
3. Run `configure` with the `--code-cache-path` option so that
  the newly generated C++ file will be used when compiling the
  new binary. The generated C++ file will put the cache into
  the `internalBinding('code_cache')` object with the module
  ids as keys
4. The new binary tries to read the code cache from
  `internalBinding('code_cache')` and use it to compile
  builtin modules. If the cache is used, it will put the id
  into `require('internal/bootstrap/cache').compiledWithCache`
  for bookkeeping, otherwise the id will be pushed into
  `require('internal/bootstrap/cache').compiledWithoutCache`

This patch also added tests that verify the code cache is
generated and used when compiling builtin modules.

The binary with code cache:

- Is ~1MB bigger than the binary without code cahe
- Consumes ~1MB less memory during start up
- Starts up about 60% faster

PR-URL: https://github.com/nodejs/node/pull/21405
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-27 21:11:31 +08:00
Bartosz Sosnowski
7c452845b8 build, win: make LTCG optional
Disables Link Time Code Generation by default. Adds ‘ltcg’ vcbuild
option to enable it. LTCG will be used by default by release and CI
builds.

PR-URL: https://github.com/nodejs/node/pull/21186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-06-27 11:00:56 +02:00
itaysabato
8d33bbf168 worker: support relative paths
This commit adds support for relative paths in Worker.
Paths are relative to the current working directory.

PR-URL: https://github.com/nodejs/node/pull/21407
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-06-27 10:38:01 +03:00
Daniel Bevenius
8326bea6c2 test: use aliases for smart pointers in fixture
PR-URL: https://github.com/nodejs/node/pull/21419
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-27 05:19:56 +02:00
Daniel Bevenius
d6f7a32570 test: make cctest fixture use node::NewIsolate
This commit updates the gtest fixture to use node::NewIsolate instead of
creating a new V8 Isolate using v8::Isolate::New.

The motivation for this is that without calling node::NewIsolate the
various callbacks set on the isolate, for example AddMessageListener,
SetFatalErrorHandler etc, would not get set. I don't think this is the
expected behaviour and I ran into this when writing a new cctest.

PR-URL: https://github.com/nodejs/node/pull/21419
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-27 05:19:30 +02:00
Gus Caplan
4f67c6f667
vm: add Script.createCodeCache()
PR-URL: https://github.com/nodejs/node/pull/20300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-06-26 16:38:13 -05:00
Keita Akutsu
a9d9d7689d
test: add some test cases for validateOffsetLengthWrite
PR-URL: https://github.com/nodejs/node/pull/21195
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-06-26 19:35:31 +02:00
Jo Colina
467a307986
doc: updated docs to include --experimental-worker flag
Updated worker-threads.md, cli.md and node.1 to include
--experimental-worker flag

PR-URL: https://github.com/nodejs/node/pull/21461
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
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: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-06-26 19:15:11 +02:00
Bartosz Sosnowski
4dece043ba win, build: generate .sln only when necessary
When generating sln, store flags passed to configure. Next time, if
node.sln exists and configure flags match those stored, skip building
.sln files.

Adds projgen vcbuild option to force .sln regeneration.

PR-URL: https://github.com/nodejs/node/pull/21284
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-26 19:07:27 +02:00
Timothy Gu
8836a0d780
inspector: add debugging for WebSocket messages
PR-URL: https://github.com/nodejs/node/pull/21473
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 23:18:11 -04:00
Timothy Gu
65f617314d
src: start annotating native code side effect
PR-URL: https://github.com/nodejs/node/pull/21458
Refs: https://github.com/nodejs/node/issues/20977
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 23:15:35 -04:00
Timothy Gu
cd8adfaf98
build: improve Travis CI settings
Remove macOS-specific steps, and reduce warnings due to compilation with
clang.

PR-URL: https://github.com/nodejs/node/pull/21459
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-25 21:56:05 -04:00
Benjamin Coe
ba4f5e9bb9
build: fail on instrumentation errors
nyc was silently failing to instrument new language features,
resulting in a failure to instrument console.js.

Refs: https://github.com/nodejs/node/issues/20952
PR-URL: https://github.com/nodejs/node/pull/21071
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rebecca Turner <me@re-becca.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-06-25 16:28:27 -07:00
Benjamin Coe
198c872990
doc: add bcoe as collaborator
PR-URL: https://github.com/nodejs/node/pull/21536
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-06-25 16:20:18 -07:00
Matheus Marchini
fc45b16e0f
deps: fix gypi sysroot settings on V8
On Node.js v8.x, gn will pass a sysroot parameter to clang to use a
downloaded sysroot files while running `make test-v8`. Recently,
chromium build tools switched to use Debian sid sysroot files instead of
Debian jessie. This patch updates our V8 GYP files to conform with those
changes.

Ref: https://github.com/nodejs/node/issues/21433

PR-URL: https://github.com/nodejs/node/pull/21494
Refs: https://github.com/nodejs/node/issues/21433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-06-25 15:05:21 -07:00
Ben Noordhuis
19fe5299d3 crypto: fix UB in computing max message size
Before this commit it computed `(1<<(8*(15-iv_len)))-1` for `iv_len>=11`
and that reduces to `(1<<32)-1` for `iv_len==11`.  Left-shifting past
the sign bit and overflowing a signed integral type are both undefined
behaviors.

This commit switches to fixed values and restricts the `iv_len==11`
case to `INT_MAX`, as was already the case for all `iv_len<=10`.

PR-URL: https://github.com/nodejs/node/pull/21462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-06-25 23:45:14 +02:00
Myles Borins
8b4af64f50
deps: float fix on node-gyp in npm tree
This is a fix for filenames that have spaces which currently breaks
node-gyp. npm has not yet updated the dependency to the latest version
in the mean time we should land this as a patch

PR-URL: https://github.com/nodejs/node/pull/21448
Refs: https://github.com/nodejs/node-gyp/pull/1436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2018-06-25 16:02:46 -04:00
Shivang Saxena
95205a6125 doc: clarify setServers() methods in dns.md
Added a note that that clarifies the fact that setServers() does not
check subsequent servers when the first one produces a NOTFOUND error.

PR-URL: https://github.com/nodejs/node/pull/21469
Refs: https://github.com/nodejs/node/issues/21391
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 21:03:21 +03:00
Gerhard Stoebich
8132413166
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: https://github.com/nodejs/node/pull/21296
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-06-24 23:57:20 -07:00
Rod Vagg
831821bcf5
deps: float 0c27d793 from openssl (ECDSA blinding)
Pending OpenSSL 1.1.0i release.

Refs: https://www.nccgroup.trust/us/our-research/technical-advisory-return-of-the-hidden-number-problem/
PR-URL: https://github.com/nodejs/node/pull/21345
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Upstream: https://github.com/openssl/openssl/commit/0c27d793

Original commit message:
    Add blinding to an ECDSA signature

    Keegan Ryan (NCC Group) has demonstrated a side channel attack on an
    ECDSA signature operation. During signing the signer calculates:

    s:= k^-1 * (m + r * priv_key) mod order

    The addition operation above provides a sufficient signal for a
    flush+reload attack to derive the private key given sufficient signature
    operations.

    As a mitigation (based on a suggestion from Keegan) we add blinding to
    the operation so that:

    s := k^-1 * blind^-1 (blind * m + blind * r * priv_key) mod order

    Since this attack is a localhost side channel only no CVE is assigned.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-06-24 23:27:12 -07:00
Michaël Zasso
c7c52127ec
doc: update AUTHORS list
PR-URL: https://github.com/nodejs/node/pull/21468
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@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: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-24 23:14:38 -07:00
Ruben Bridgewater
b26506b95f
util: recover from maximum call stack size
Using util.inspect should still return values in case the maximum
call stack size is reached. This is important to inspect linked
lists and similar.

PR-URL: https://github.com/nodejs/node/pull/20725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 23:11:52 -07:00
Bartosz Sosnowski
43a2091187
win, build: fix building on 32-bit machines
Fixes: https://github.com/nodejs/node/issues/21402

PR-URL: https://github.com/nodejs/node/pull/21437
Fixes: https://github.com/nodejs/node/issues/21402
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-24 23:06:24 -07:00
Anna Henningsen
018d6186a7
src: add native debugging code to workers
Now that we have better native debugging utilities in core,
let’s use them :)

PR-URL: https://github.com/nodejs/node/pull/21423
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-06-24 23:04:55 -07:00
Bartosz Sosnowski
c403eeb7fd
build: build addons in parallel on Windows
Port https://github.com/nodejs/node/pull/21155 to vcbuild.bat

PR-URL: https://github.com/nodejs/node/pull/21403
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-24 22:56:10 -07:00
Anna Henningsen
15c627f185
http2: track memory allocated by nghttp2
Provide a custom memory allocator for nghttp2, and track
memory allocated by the library with it.

This makes the used-memory-per-session estimate more
accurate, and allows us to track memory leaks either
in nghttp2 itself or, more likely, through faulty
usage on our end.

It also allows us to make the per-session memory limit
more accurate in the future; currently, we are not
handling this in an ideal way, and instead let nghttp2
allocate what it wants, even if that goes over our limit.

PR-URL: https://github.com/nodejs/node/pull/21374
Refs: https://github.com/nodejs/node/pull/21373
Refs: https://github.com/nodejs/node/pull/21336
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-24 22:54:49 -07:00
Anatoli Papirovski
bfcf5b01bb
src: remove tick_info->has_thrown
This is no longer necessary in the only place it was used (timers).

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:35:11 -07:00
Anatoli Papirovski
2930bd1317
src: refactor timers to remove TimerWrap
Refactor Timers to behave more similarly to Immediates by having
a single uv_timer_t handle which is stored on the Environment.

No longer expose timers in a public binding and instead make
it part of the internalBinding.

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:35:05 -07:00
Anatoli Papirovski
6f63f8d730
test: remove outdated, non-functioning test
The timers directory test, utilizing FakeTime, has not worked in
quite a while and is not truly testing Node.js behaviour. If a
similar test is necessary it would be better suited to libuv
on which Node.js relies for timers functionality.

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:34:59 -07:00
Rich Trott
1e7ff81e47 doc: update LICENSE file
Running `license-builder.sh` seems to indicate that there have been some
license changes that have not been propagated to our LICENSE file yet.
Here they are.

PR-URL: https://github.com/nodejs/node/pull/21472
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-06-24 20:41:58 -07:00
cjihrig
537a4baa44
deps: upgrade to libuv 1.21.0
Notable changes:

- Building via cmake is now supported.
  PR-URL: https://github.com/libuv/libuv/pull/1850
- Stricter checks have been added to prevent watching the same
  file descriptor multiple times.
  PR-URL: https://github.com/libuv/libuv/pull/1851
  Refs: https://github.com/nodejs/node/issues/3604
- An IPC deadlock on Windows has been fixed.
  PR-URL: https://github.com/libuv/libuv/pull/1843
  Fixes: https://github.com/nodejs/node/issues/9706
  Fixes: https://github.com/nodejs/node/issues/7657
- uv_fs_lchown() has been added.
  PR-URL: https://github.com/libuv/libuv/pull/1826
  Refs: https://github.com/nodejs/node/issues/19868
- uv_fs_copyfile() sets errno on error.
  PR-URL: https://github.com/libuv/libuv/pull/1881
  Fixes: https://github.com/nodejs/node/issues/21329
- uv_fs_fchmod() supports -A files on Windows.
  PR-URL: https://github.com/libuv/libuv/pull/1819
  Refs: https://github.com/nodejs/node/issues/12803

PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:54:34 -04:00
Santiago Gimeno
49e5f0a10f
test: fix test-net-socket-constructor
So it doesn't fail when creating a socket whose `fd` is already
being watched. Test that functionality now inside a cluster
worker.

Refs: https://github.com/libuv/libuv/pull/1851
Refs: https://github.com/libuv/libuv/issues/1897
PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:54:08 -04:00
cjihrig
cb261c8648
process: avoid using the same fd for ipc and stdio
There is already a check in place to prevent stdin and the IPC
channel from sharing a file descriptor. This commit adds a
similar check to stdout and stderr.

Refs: https://github.com/libuv/libuv/pull/1851
Refs: https://github.com/libuv/libuv/issues/1897
PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:53:46 -04:00
Timothy Gu
6396574cde
crypto: remove outdated comment
PR-URL: https://github.com/nodejs/node/pull/21511
Fixes: https://github.com/nodejs/node/issues/21488
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-24 18:02:10 -04:00
Vse Mozhet Byt
28100bbe6d doc: fix sort in sections, lists, tables of dns.md
`dns.resolveAny()`, `dnsPromises.resolveAny()`,
`dns.setServers()`, `dnsPromises.setServers()`
were out of ABC order in some places.

PR-URL: https://github.com/nodejs/node/pull/21505
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-24 23:49:45 +03:00
Thomas Watson
e22d70924b
doc: show options arg to new Worker is optional
PR-URL: https://github.com/nodejs/node/pull/21508
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-24 21:08:39 +02:00
Robert Nagy
8ab7ea6eed doc: fix HTTP req/res 'close' description
PR-URL: https://github.com/nodejs/node/pull/21047
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 09:47:27 -07:00
cjihrig
7a3bbbf41b
tools: update ESLint to 5.0.0
This is a new major release of ESLint.

PR-URL: https://github.com/nodejs/node/pull/20855
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-24 12:43:54 -04:00
cjihrig
d5316bc27d
test: lint fixes for ESLint update
This commit introduces changes required for the ESLint 5 update.

PR-URL: https://github.com/nodejs/node/pull/20855
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-24 12:43:42 -04:00
Rich Trott
1ee4703974
test: move net bytes-per-chunk test to sequential
The test is timing out on FreeBSD 10 in CI. It takes less than half as
long to run when it is in sequential on that platform instead of
parallel.

Refs: https://github.com/nodejs/node/pull/21322#issuecomment-399311718

PR-URL: https://github.com/nodejs/node/pull/21457
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 15:55:27 +02:00
Renée Kooi
686cb4dbd0
util: fix comment typos
When the deep(Strict)Equal comparison functions were moved to an
internal module, a variable named `current` was replaced with `val1`.
That accidentally also replaced a few "currently"s in comments.

Refs: https://github.com/nodejs/node/pull/16084

PR-URL: https://github.com/nodejs/node/pull/21436
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-24 15:45:30 +02:00
Tobias Nießen
193d6d1bda
doc: update notes about GCM decryption
Given that https://github.com/nodejs/node/pull/17825 and
https://github.com/nodejs/node/pull/20039 have landed on master, this
statement is no longer true.

PR-URL: https://github.com/nodejs/node/pull/21445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-24 15:43:22 +02:00
Fernando Doglio
fd520e7b43
test: remove string error from strictEqual
Removes the string error from the assertion call to improve the error
message shown on screen when the test fails.

PR-URL: https://github.com/nodejs/node/pull/21292
Reviewed-By: Luigi Pinca <luigipinca@gmail.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-06-24 15:35:21 +02:00
ZaneHannanAU
c041fd2dc7 doc: correct parameters, return types in crypto.md
PR-URL: https://github.com/nodejs/node/pull/21420
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 15:59:08 +03:00
Сковорода Никита Андреевич
cdb59854ee doc: restore documentation for two error codes
ERR_HTTP2_ERROR and ERR_UNKNOWN_BUILTIN_MODULE error codes documentation
seem to have been accidentally removed in commit
1cdb41f287 (pull request #15160).

This reverts that removal, restoring the documentation for those two
error codes.

Those error codes are used from lib/ folder.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21484
Refs: https://github.com/nodejs/node/pull/21470
Refs: https://github.com/nodejs/node/issues/21440
Refs: https://github.com/nodejs/node/pull/15160
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@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>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 13:07:58 +03:00
Сковорода Никита Андреевич
5ab3db75bb doc: sort error codes in errors.md
A single exception is that ERR_HTTP2_* comes after ERR_HTTP_*.

Actual content not changed, just some blocks are moved around.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21485
Refs: https://github.com/nodejs/node/pull/21470
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 12:49:01 +03:00
Сковорода Никита Андреевич
baca6d337f doc: add a missing anchor to error codes
Only one error code was missing an appropriate anchor, and it was
ERR_SCRIPT_EXECUTION_TIMEOUT. This commit adds that missing anchor.

This is a part of the fixes hinted by #21470, which includes some tests
for error codes usage and documentation and enforces a stricter format.

PR-URL: https://github.com/nodejs/node/pull/21483
Refs: https://github.com/nodejs/node/pull/21470
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-24 12:34:30 +03:00
Daniel Bevenius
6ced651b6c build: add crypto check to markdown lint target
Currently, if configured --without-ssl the following error will be
repored by remark-cli:

Running Markdown linter on misc docs...
internal/util.js:100
    throw new ERR_NO_CRYPTO();
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support
    at assertCrypto (internal/util.js💯11)
    at crypto.js:31:1
    at NativeModule.compile (internal/bootstrap/loaders.js:235:7)
    at Function.NativeModule.require
      (internal/bootstrap/loaders.js:155:18)
    at Function.Module._load (internal/modules/cjs/loader.js:530:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous>
      (/node/tools/remark-cli/node_modules/math-random/node.js:1:76)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js
      (internal/modules/cjs/loader.js:713:10)
make[1]: *** [tools/.miscmdlintstamp] Error 1
make: *** [lint] Error 2

This commit adds a check for crypto to avoid this error when node has
been configured without crypto support. The alternative was to try to
fix this in randomatic but that lead to another dependency failing
(uuid) and felt like this might be simpler.

PR-URL: https://github.com/nodejs/node/pull/21326
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@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-06-24 06:47:37 +02:00
Vse Mozhet Byt
a40e06233e doc: fix list format in cli.md
PR-URL: https://github.com/nodejs/node/pull/21467
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-22 23:41:12 +03:00