0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

20447 Commits

Author SHA1 Message Date
Weijia Wang
d022cb1bdd lib: combine similar error codes
There two similar error codes in lib: "ERR_VALUE_OUT_OF_RANGE"
and "ERR_OUT_OF_RANGE". This change is to reduce them into
"ERR_VALUE_OUT_OF_RANGE"

Fixes: https://github.com/nodejs/node/issues/17603

PR-URL: https://github.com/nodejs/node/pull/17648
Fixes: https://github.com/nodejs/node/issues/17603
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-24 14:09:29 +08:00
sreepurnajasti
4d74b52979 test: use common module API in test-child-process-exec-stdout-stderr-data-string
PR-URL: https://github.com/nodejs/node/pull/17751
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>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-23 22:58:17 -05:00
Jon Moss
1dd9c826e0 lib, src: use process.config instead of regex
Is safer to use a `process.binding(config)` defined boolean, than to
regex on `process.execArgv`. Also, this better falls in line with the
conventions of checking flags passed to the executable.

PR-URL: https://github.com/nodejs/node/pull/17814
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-23 22:20:30 -05:00
Jon Moss
210c761d83 doc: mark DEP0002 as end of life
The deprecated module was removed via
84a23391f6.

PR-URL: https://github.com/nodejs/node/pull/17815
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.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: Luigi Pinca <luigipinca@gmail.com>
2017-12-23 21:53:30 -05:00
kysnm
b98aaa312e
net: migrate errors to internal/errors
Throw ERR_SOCKET_CLOSED and ERR_SERVER_NOT_RUNNING
instead of the old-style errors in net.js.

PR-URL: https://github.com/nodejs/node/pull/17766
Refs: https://github.com/nodejs/node/issues/17709
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-24 02:16:44 +08:00
Steven
8599465d33
fs: migrate errors to internal/errors
Throw ERR_INVALID_ARG_TYPE when validating arguments passed to
WriteStream.prototype._write.

Refs: https://github.com/nodejs/node/issues/17709
PR-URL: https://github.com/nodejs/node/pull/17719
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-24 01:42:59 +08:00
Nikolai Vavilov
ae2bed9938
doc: require CI status indicator in PRs
Commits are often landed despite failing on one or more CI platforms.
Having a CI status indicator in the PR should make this less likely to
happen.

PR-URL: https://github.com/nodejs/node/pull/17151
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-24 00:10:00 +08:00
Mir Mufaqam Ali
79261f3003
tls: migrate errors in _tls_wrap.js
This migrates the old style error in _tls_wrap.js to
the new style error ERR_TLS_RENEGOTIATION_DISABLED.

Refs: https://github.com/nodejs/node/issues/17709

PR-URL: https://github.com/nodejs/node/pull/17792
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-12-24 00:03:39 +08:00
sreepurnajasti
0b78895824
doc: use american spelling as per style guide
PR-URL: https://github.com/nodejs/node/pull/17818
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-23 13:59:07 +01:00
Timothy Gu
2cb2145162
vm: allow modifying context name in inspector
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.

PR-URL: https://github.com/nodejs/node/pull/17720
Refs: https://github.com/nodejs/node/pull/14231#issuecomment-315924067
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-23 14:05:18 +08:00
Rich Trott
c339931d8b test: do not open fixture files for writing
Use temp directory for open with `O_DSYNC` (which indicates a write may
occur) rather than `fixtures` directory. Additionally, test can be run
on macOS so allow that in addition to Linux.

PR-URL: https://github.com/nodejs/node/pull/17810
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-22 15:26:49 -08:00
Diego Rodríguez Baquero
66e6affb42 tools: fix man pages linking regex
The change to word boundary was breaking many doc pages. This reverts
the word boundary back to space.

PR-URL: https://github.com/nodejs/node/pull/17724
Fixes: https://github.com/nodejs/node/issues/17694
Refs: https://github.com/nodejs/node/pull/17479
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 17:25:26 -05:00
Vse Mozhet Byt
4d1baf82ae doc: fix links in errors.md
PR-URL: https://github.com/nodejs/node/pull/17829
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-23 00:22:09 +02:00
Ali Ijaz Sheikh
f454e14b22 deps: V8: cherry-pick ac0fe8ec from upstream
Original commit message:
  [interpreter] Remove TryInstallOptimizedCode

  Removes the interrupt check and runtime call to TryInstallOptimizedCode
  from the optimization marker checks (i.e. CompileLazy and
  InterpreterEntryTrampoline). Instead, we rely on the other interrupt
  sources (in particular stack checks at function entries and loop
  headers) to install optimized code for us.

  This will hopefully not cause regressions, as we have plenty of other
  interrupt checks, but it may delay optimized code execution for
  some function by one function call.

  Bug:  v8:6933
  Change-Id: Ieadfff7ae2078d2a84085294158ad9a706eb9c64
  Reviewed-on: https://chromium-review.googlesource.com/723475
  Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
  Commit-Queue: Leszek Swirski <leszeks@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#48667}

Ref: https://bugs.chromium.org/p/v8/issues/detail?id=6933
Ref: ac0fe8ec8a
PR-URL: https://github.com/nodejs/node/pull/17695
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 13:40:23 -08:00
James M Snell
bbaea1236f http2: convert Http2Settings to an AsyncWrap
PR-URL: https://github.com/nodejs/node/pull/17763
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-22 12:54:13 -08:00
James M Snell
6100e12667 fs: move type checking to js
PR-URL: https://github.com/nodejs/node/pull/17667
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-22 12:49:10 -08:00
Rich Trott
92fc14a459 test: do not open fixture files for writing
test-fs-fsync makes a copy of a fixture file, but then doesn't do
anything with it and instead operates on the original fixture file. This
appears to be in error, and this change fixes that.

PR-URL: https://github.com/nodejs/node/pull/17808
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 10:43:02 -08:00
kysnm
ab5a2aba38 repl: migrate errors to internal/errors
PR-URL: https://github.com/nodejs/node/pull/17716
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-22 13:27:25 -05:00
Waleed Ashraf
0b0a4fc8ec doc: removed extra explanation in api/buffer.md
PR-URL: https://github.com/nodejs/node/pull/17796
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-22 12:59:44 -05:00
Myles Borins
b5d415311b
deps: patch V8 to 6.3.292.48
Refs: https://github.com/v8/v8/compare/6.3.292.46...6.3.292.48
PR-URL: https://github.com/nodejs/node/pull/17773
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-12-22 11:20:48 -05:00
Tobias Nießen
1a396bbd6b
crypto: warn on invalid authentication tag length
PR-URL: https://github.com/nodejs/node/pull/17566
Refs: https://github.com/nodejs/node/issues/17523
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 15:50:06 +01:00
Tobias Nießen
e565534510
test: use valid authentication tag length
Using authentication tags of invalid length does not conform to NIST
standards.

PR-URL: https://github.com/nodejs/node/pull/17566
Refs: https://github.com/nodejs/node/issues/17523
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 15:50:02 +01:00
Thomas Watson
f4ab20412f doc: improve module.builtinModules documentation
PR-URL: https://github.com/nodejs/node/pull/17712
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-22 09:09:42 -05:00
xortiz
4dc930147e tls: comment about old-style errors
Old style errors are being migrated to internal/errors.js, however, due
to depreciation of _tls_legacy.js, it isn't worth the effort to migrate
and potentially force users to update their code for this error change.

This comment clarifies the reason why this error is not migrated.

PR-URL: https://github.com/nodejs/node/pull/17759
Refs: https://github.com/nodejs/node/issues/17709
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-22 09:02:05 -05:00
Rich Trott
1d8789188f test: improve flaky test-listen-fd-ebadf.js
Find an invalid file descriptor rather than assuming 42 will be invalid.

PR-URL: https://github.com/nodejs/node/pull/17797
Fixes: https://github.com/nodejs/node/issues/17762
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 15:12:44 -08:00
Rich Trott
c90b10d9f2 test: refactor test-repl-definecommand
The test was writing to both REPL input and output but only checking
output. Sending output to both streams seems like it was an error.

PR-URL: https://github.com/nodejs/node/pull/17795
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-21 15:10:02 -08:00
Anna Henningsen
901e9a1983
src: remove redundant JSStream::DoAfterWrite
`Finish<WriteWrap>` already does the same thing and is
called immediately afterwards anyway.

PR-URL: https://github.com/nodejs/node/pull/17713
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-21 20:56:13 +01:00
Rich Trott
1af82f3d0e test: fix buggy getTTYfd() implementation
PR-URL: https://github.com/nodejs/node/pull/17781
Ref: https://github.com/nodejs/node/pull/17781#discussion_r158030728
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 10:11:46 -08:00
Rich Trott
40bab30067 test: move firstInvalidFD() out of common module
common.firstInvalidFD() is used in only one test. Move it out of the
common module and into the one test that uses it.

PR-URL: https://github.com/nodejs/node/pull/17781
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 10:11:42 -08:00
Rich Trott
ddf3655f2b test: remove getTTYfd() from common module
common.getTTYfd() is used in one test only. Move it's definition to that
test and out of the common module.

PR-URL: https://github.com/nodejs/node/pull/17781
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 10:11:38 -08:00
Rich Trott
fc8e8215f6 test: remove common.projectDir
common.projectDir is used in one test, so it's not so common. Remove
from common module to the one test file that needs it.

PR-URL: https://github.com/nodejs/node/pull/17781
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 10:11:32 -08:00
James M Snell
a4f44acd69 doc: warn about using util.inspect/util.format
Because of the potential performance bottlenecks that may be introduced
by `util.inspect()` and `util.format()` in production hot path code.

Based on real user feedback, it is not obvious that these are intended
to be debugging tools.

PR-URL: https://github.com/nodejs/node/pull/17791
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-21 07:56:18 -08:00
Michael Dawson
7a0f774bb5 doc: instructions on how to make membership public
PR-URL: https://github.com/nodejs/node/pull/17688
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 09:44:56 -05:00
Evan Lucas
35511c8ba1 doc: improve fs api descriptions
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir
along with their *Sync counterparts.

PR-URL: https://github.com/nodejs/node/pull/17679
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-21 09:42:13 -05:00
Anna Henningsen
7352bf2f7c test: refactor test-net-connect-buffer
- Use arrow functions, `common.mustCall()`
- Remove redundant `console.log()`s/turn them into assertions
- Use `common.expectsError()`

PR-URL: https://github.com/nodejs/node/pull/17710
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-21 09:39:55 -05:00
Leko
410ce2164e test: increase diffie-hellman test coverage
PR-URL: https://github.com/nodejs/node/pull/17728
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-21 09:38:19 -05:00
Michaël Zasso
416c0ec952 repl: show lexically scoped vars in tab completion
Use the V8 inspector protocol, if available, to query the list of
lexically scoped variables (defined with `let`, `const` or `class`).

PR-URL: https://github.com/nodejs/node/pull/16591
Fixes: https://github.com/nodejs/node/issues/983
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 14:47:29 +01:00
Michaël Zasso
d1d6b54b69 deps: cherry-pick 50f7455 from upstream V8
Original commit message:

    [inspector] added Runtime.globalLexicalScopeNames method

    The method returns names for all available top-level scope variables
    in giving context.

    R=dgozman@chromium.org,jgruber@chromium.org

    Bug: chromium:681333
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: I2d0b600e1afbfef9087f53ea9c26abe1e112047c
    Reviewed-on: https://chromium-review.googlesource.com/719409
    Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48618}

Refs: 50f7455cd9

PR-URL: https://github.com/nodejs/node/pull/16591
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21 14:47:29 +01:00
Leko
d50e1a2916
test: increase pbkdf2 test coverage
PR-URL: https://github.com/nodejs/node/pull/17730
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-21 13:00:52 +01:00
Bartosz Sosnowski
a3497b3e92 net: remove ADDRCONFIG DNS hint on Windows
On Windows setting ADDRCONFIG causes localhost resolution to fail if there are
no network connections. This removes that flag on Windows.

Fixes: https://github.com/nodejs/node/issues/17641
PR-URL: https://github.com/nodejs/node/pull/17662
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-12-21 12:47:05 +01:00
Ruben Bridgewater
439c18578b
util: fix custom inspect description
Using a custom inspect function on the inspected object is
deprecated. Remove the reference from the option description
to make sure the user will read about the deprecation in the
more detailed description.

PR-URL: https://github.com/nodejs/node/pull/17576
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-21 03:45:34 -03:00
Ruben Bridgewater
353cc3d35a
util: rename util.inspect argument
util.inspect can actually receive any property and the description
was wrong so far. This fixes it by renaming the argument to
value and also updating the description.

PR-URL: https://github.com/nodejs/node/pull/17576
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-21 03:45:26 -03:00
Ruben Bridgewater
c2203cb4dd
util: add util.inspect compact option
The current default formatting is not ideal and this improves
the situation by formatting the output more intuitiv.

1) All object keys are now indented by 2 characters instead of
   sometimes 2 and sometimes 3 characters.
2) Each object key will now use an individual line instead of
   sharing a line potentially with multiple object keys.
3) Long strings will now be split into multiple lines in case
   they exceed the "lineBreak" option length (including the
   current indentation).
4) Opening braces are now directly behind a object property
   instead of using a new line.
5) Switch inspect "base" order. In case the compact option is set
   to `false`, inspect will now print
     "[Function: foo] {\n  property: 'data'\n}"
   instead of
     "{ [Function: foo]\n  property: 'data'\n}".

PR-URL: https://github.com/nodejs/node/pull/17576
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-21 03:45:25 -03:00
Ruben Bridgewater
2d374916eb
assert: .throws accept objects
From now on it is possible to use a validation object in throws
instead of the other possibilites.

PR-URL: https://github.com/nodejs/node/pull/17584
Refs: https://github.com/nodejs/node/pull/17557
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-12-21 03:01:02 -03:00
Jeremiah Senkpiel
fc61ee32fe http2: use session kUpdateTimer from kUpdateTimer
Reduces duplicated logic.

PR-URL: https://github.com/nodejs/node/pull/17704
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-20 18:28:11 -05:00
Jeremiah Senkpiel
93eb68e6d2 http2: use actual Timeout instances
This makes `Http2Stream`s and `Http2Session`s use actual Timeout
objects in a [kTimeout] symbol property, rather than making the
stream/session itself a timer and appending properties to it directly.

PR-URL: https://github.com/nodejs/node/pull/17704
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-20 18:28:11 -05:00
Jeremiah Senkpiel
593941ac0b timers: extract enroll() validation into a fn
This should help keep everything consistent.

PR-URL: https://github.com/nodejs/node/pull/17704
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-20 18:28:11 -05:00
Jeremiah Senkpiel
24dd92e77f net: use actual Timeout instance on Sockets
This makes `net.Sockets` use actual Timeout objects in a `[kTimeout]`
symbol property, rather than making the socket itself a timer and
appending properties to it directly.

This should make the code generally easier to understand, and might
also prevent some deopts from properties being changes on the socket
itself.

Also moves the Timeout constructor into an internal module.

PR-URL: https://github.com/nodejs/node/pull/17704
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-20 18:28:11 -05:00
Rich Trott
d6b1b84ca0 test: fix typo in test-inspector-cluster-port-clash.js
PR-URL: https://github.com/nodejs/node/pull/17782
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-20 08:46:04 -08:00
Tobias Nießen
0298f4480e
crypto: reuse variable instead of reevaluation
PR-URL: https://github.com/nodejs/node/pull/17735
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-20 17:16:38 +01:00