Граф коммитов

23316 Коммитов

Автор SHA1 Сообщение Дата
Anna Henningsen ae34e837f3
doc: clarify git config name/email requirements
The previous wording sounded like this was a necessary for
contributing. This clarifies that it is not, and tells people what
we do use their info for.

PR-URL: https://github.com/nodejs/node/pull/22433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-09-06 08:52:21 +02:00
Sarat Addepalli 10b740479d
doc: document removed error codes
PR-URL: https://github.com/nodejs/node/pull/22100
Fixes: https://github.com/nodejs/node/issues/22061
Refs: https://github.com/nodejs/node/pull/21491
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-06 08:52:21 +02:00
Sarat Addepalli 060a62f9de
doc: support 'removed' field in doc YAML sections
PR-URL: https://github.com/nodejs/node/pull/22100
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-06 08:52:21 +02:00
Michaël Zasso 2e0652d807
tools: add missing package-lock to clang-format
`npm ci` fails where there is no package-lock.json.
Also add the `node_modules` directory to .gitignore.

PR-URL: https://github.com/nodejs/node/pull/22500
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:52:21 +02:00
Joyee Cheung de1d8e8e75
test: move custom WHATWG URL tests into separate files
To enable automatic update of WPT, move all our custom
WHATWG URL tests that are not present in the upstream into
files starting with `test-whatwg-url-custom-`, so it's easier
to identify test cases that can be upstreamed and test cases
that should be rolled into our repo (possibly with automation).

PR-URL: https://github.com/nodejs/node/pull/22442
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-09-06 08:52:21 +02:00
Ujjwal Sharma cd5c672cfc
gyp: muffle xcodebuild warnings
Muffle xcodebuild warnings by introducing an alternative quieter
alternative to GetStdout, called GetStdoutQuiet, and call it selectively
in particularly noisy xcodebuild commands.

Co-authored-by: Gibson Fahnestock <gibfahn@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/21999
Original-PR-URL: https://github.com/nodejs/node-gyp/pull/1370
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-06 08:52:21 +02:00
Neeraj Laad e09296be81
test: remove third argument from strictEqual()
test: remove third argument from assert.strictEqual()

PR-URL: https://github.com/nodejs/node/pull/22451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-06 08:52:21 +02:00
James M Snell 803b3249a9
test: move common.isCPPSymbolsNotMapped to tick-processor tests
`common.isCPPSymbolsNotMapped` is used only by the tests in the
`test/tick-processor` folder. Move it local to those to get it
out of `common`.

PR-URL: https://github.com/nodejs/node/pull/22459
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-06 08:52:21 +02:00
Benjamin Chen a704ed8453
test: improve code coverage for string decoder
PR-URL: https://github.com/nodejs/node/pull/22306
Reviewed-By: Colin Ihrig <cjihrig@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>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-06 08:52:21 +02:00
Denys Otrishko c91472e0c6
test: add streams benchmark test
Refs: https://github.com/nodejs/node/issues/12068

PR-URL: https://github.com/nodejs/node/pull/22335
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-06 08:52:21 +02:00
Denys Otrishko caaac3f38e
test: add vm benchmark test
Refs: https://github.com/nodejs/node/issues/12068

PR-URL: https://github.com/nodejs/node/pull/22335
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-06 08:52:21 +02:00
Denys Otrishko 594b2377bc
test: add v8 benchmark test
Refs: https://github.com/nodejs/node/issues/12068

PR-URL: https://github.com/nodejs/node/pull/22335
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-06 08:52:21 +02:00
James M Snell c9c8b290a3
test: move common.onGC to individual module
Incrementally making `require('../common')` less of a monolith.
Move the `common.onGC()` utility to a separate standalone module
that is only imported when it's actually needed.

PR-URL: https://github.com/nodejs/node/pull/22446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-06 08:52:21 +02:00
Refael Ackermann c04f1f315e
test: flaky everywhere test-trace-events-fs-sync
Refs: https://github.com/nodejs/node/issues/21038

PR-URL: https://github.com/nodejs/node/pull/22483
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:52:21 +02:00
James M Snell 07ceb545bd
test: move hijackstdio out of require('common')
Move the hijackstdio functions out of common so that they are
imported only into the tests that actually need them

PR-URL: https://github.com/nodejs/node/pull/22462
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-06 08:52:21 +02:00
Jon Moss f0153d018b
lib: extract validateNumber validator
Pulls out another common argument validator to `internal/validators`

PR-URL: https://github.com/nodejs/node/pull/22249
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.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-09-06 08:52:21 +02:00
cjihrig 219da67e2e
os: add os.{get,set}Priority()
PR-URL: https://github.com/nodejs/node/pull/22407
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-03 17:56:53 +02:00
Ruben Bridgewater 5b14066c14
util: restore all information in inspect
The former implementation lacked symbols on the iterator objects
without prototype. This is now fixed.
The special handling for overriding `Symbol.iterator` was removed as
it's very difficult to deal with this properly. Manipulating the
symbols is just not supported.

PR-URL: https://github.com/nodejs/node/pull/22437
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-03 17:56:53 +02:00
Masashi Hirano fcf059a667
test: add test unknown credential error of process.setgroups
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to
increase coverage.

PR-URL: https://github.com/nodejs/node/pull/22368
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@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: Anna Henningsen <anna@addaleax.net>
2018-09-03 17:56:53 +02:00
Masashi Hirano ae016c8e6d
test: add tests for dnsPromises.lookup
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.

PR-URL: https://github.com/nodejs/node/pull/21559
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-03 17:56:53 +02:00
Matteo Collina 7794d4e0b8
test,stream: fix pipeline test so it runs well on Windows in older nodes
This test is ported automatically in readable-stream, and it fails there
on Windows and older Node.js versions because of some bad interactions
between the code and the event loop on Windows.

See: https://github.com/nodejs/readable-stream/issues/353

PR-URL: https://github.com/nodejs/node/pull/22456
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-03 17:56:53 +02:00
ZYSzys e2541303f3
doc: tweak macOS-firewall note position
Move the macOS-firewall note to the end of "Building Node.js"
and above "Running Tests".

I think it's more reasonable when user prepare to build node
step by step. Just read and build from top to end in case ignore
the note.

PR-URL: https://github.com/nodejs/node/pull/22440
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-09-03 17:56:53 +02:00
Rich Trott 9d246f97d1
tools: update ESLint to 5.4.0
Update ESLint from 5.3.0 to 5.4.0.

PR-URL: https://github.com/nodejs/node/pull/22454
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-09-03 17:56:53 +02:00
James M Snell 98af1704ae
test: move common.ArrayStream to separate module
In a continuing effort to de-monolithize `require('../common')`,
move `common.ArrayStream` out to a separate module that is
imported only when it is needed.

PR-URL: https://github.com/nodejs/node/pull/22447
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-03 17:56:53 +02:00
James M Snell e68438246e
test: remove isGlibc from common
The `common.isGlibc()` function is called exactly once from only
one test. There's no reason for it to be in `require('../common')`
at the current time. If it ends up needing to be used by multiple
tests, it can easily be moved into it's own common sub-module
(e.g. `require('../common/isglibc')` ... for now tho, just move
it into the one test that uses it and simplify the implementation
a bit to remove unnecessary caching.

PR-URL: https://github.com/nodejs/node/pull/22443
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-09-03 17:56:53 +02:00
Kyle Fuller efe71e9e31
build: Don't set `-fno-threadsafe-statics` on macOS
This flag is not set on other platforms so it can produce inconsistent
behaviour across platforms. For example, if you build an async node
add-on which uses statics you can get race conditions due to static
not supporting threads if the node add-on inherits from the Node
common.gypi config. It is not disabled on other platforms such as
Linux, it is not disabled by default in Xcode or clang.

This setting has been there since the initial commit that introduces
`common.gypi` and thus has been there since the start, it doesn't seem
to be have added for any particular reason other than to potentially
match the Xcode defaults at the time.

PR-URL: https://github.com/nodejs/node/pull/22198
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-03 17:56:53 +02:00
Ouyang Yadong 887c43ffa7
worker: remove redundant function call to `setupPortReferencing`
There is no need to call `setupPortReferencing` in `setupChild`
as which has been called with the same arguments in the `oninit`
prototype method of `MessagePort`.

PR-URL: https://github.com/nodejs/node/pull/22298
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-03 17:56:53 +02:00
Denys Otrishko 6228433926
doc: add lundibundi to collaborators
PR-URL: https://github.com/nodejs/node/pull/22491
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-03 17:56:23 +02:00
Refael Ackermann 3915537c13
build,tools: tweak the travis config
PR-URL: https://github.com/nodejs/node/pull/22417
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-03 17:56:23 +02:00
Ruben Verborgh 2a849ba241
doc: state callback behavior on empty buffer
PR-URL: https://github.com/nodejs/node/pull/22461
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-09-03 17:56:23 +02:00
Anto Aravinth e2a801a5e6
async_hooks: adding regression test case for async/await
The actual bug was fixed by a V8 update in Node v10.4.0.

See: https://github.com/nodejs/node/pull/19989
PR-URL: https://github.com/nodejs/node/pull/22374
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-03 17:56:23 +02:00
MaleDong f27a25472c
doc: make createPushResponse() more detailled
We don't know what will return when successful or failure for
the callback of the function. So this commit makes it more detailled.

PR-URL: https://github.com/nodejs/node/pull/22366
Refs: https://github.com/nodejs/node/issues/22322
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-03 17:56:23 +02:00
Refael Ackermann fc1259bf56
build: use `npm ci`
* remove obsolete `node_modules/js-yaml/package.json` target
* remove `@touch` since `npm ci` is always destructive

PR-URL: https://github.com/nodejs/node/pull/22399
Refs: https://github.com/nodejs/node/pull/21802
Refs: https://github.com/nodejs/node/pull/21490
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-09-03 17:56:23 +02:00
Ruben Bridgewater 0b340ab5e7
repl: tab auto complete big arrays
Due to a new API it's possible to skip the indices. That allows to
use auto completion with big (typed) arrays.

PR-URL: https://github.com/nodejs/node/pull/22408
Fixes: https://github.com/nodejs/node/issues/21446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-03 17:56:23 +02:00
Ruben Bridgewater acfb29cbd8
test: harden sequential/test-performance
1) This adds a better error logging so we are able to address further
   failures easier.
2) It adds a extra epsilon so the test runs into less issues in case
   the machine is under heavy load.
3) The epsilon in increased if the CPU is under heavy load.
4) The total startup epsilon was reduced due to recent startup time
   improvements.

PR-URL: https://github.com/nodejs/node/pull/22404
Fixes: https://github.com/nodejs/node/issues/19197
Refs: https://github.com/nodejs/reliability/issues/14
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-03 17:56:23 +02:00
Bryan English 38b0c1f04d
test: remove redundant cli tests
test/parallel/test-cli-eval.js covers them, and many more things.

PR-URL: https://github.com/nodejs/node/pull/22355
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-09-03 17:56:23 +02:00
Anto Aravinth c07a065699
http: adding doc and debug for calling empty string on write function
PR-URL: https://github.com/nodejs/node/pull/22118
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-03 17:56:23 +02:00
Matteo Collina 53fb7af1b2
stream: restore flow if there are 'data' handlers after once('readable')
Fixes: https://github.com/nodejs/node/issues/21398
See: https://github.com/nodejs/node/pull/21696

PR-URL: https://github.com/nodejs/node/pull/22209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
2018-09-03 17:56:23 +02:00
James M Snell 107c8c0d4d
perf_hooks: move strings to env
Move repeatedly created strings to env

PR-URL: https://github.com/nodejs/node/pull/22401
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-03 17:56:23 +02:00
Gabriel Schulhof 282a45d042
doc: update wrapping-related documentation
Update the N-API documentation to reflect that wrapping no longer
affects the object's prototype chain.

PR-URL: https://github.com/nodejs/node/pull/22363
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-03 17:56:23 +02:00
Michaël Zasso 611f423e1b
deps: patch V8 to 6.8.275.30
Refs: https://github.com/v8/v8/compare/6.8.275.24...6.8.275.30

PR-URL: https://github.com/nodejs/node/pull/22125
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-09-03 17:56:23 +02:00
MaleDong f86ca8948a
util: Fix number format for `pad`
`pad` is now using `toString(10)`, actually we don't need to do this. As for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString, `toString(N)` is a radix converter, which isn't proper here for time conversion.

PR-URL: https://github.com/nodejs/node/pull/21906
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: Sam Ruby <rubys@intertwingly.net>
2018-09-03 17:56:23 +02:00
Rich Trott e8e014a8dc
test: improve assert message in http timeout test
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-03 17:56:23 +02:00
Rich Trott 22adebfc9a
test: move http timeout test to parallel
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.

PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-03 17:56:23 +02:00
Rich Trott 5aa3100c29
test: fix flaky http timeout test
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.

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

PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-03 17:56:23 +02:00
Dzmitry_Prudnikau 33994d896a
test: remove third argument from assert.strictEqual()
`test/parallel/test-util-inspect.js` has a call to
`assert.strictEqual()` that receives three arguments.
The third argument is a string literal. Unfortunately,
calling assert.strictEqual() this way means that if
there is an AssertionError, the value of the variables
pos and npos are not reported.
This PR removes this argument.

PR-URL: https://github.com/nodejs/node/pull/22371
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-09-03 17:56:23 +02:00
Daniel Bevenius 660c515e60
build: move available-node variable to top
Currently node_use_openssl uses the available-node variable before it is
defined causing the conditions that use it before that point to
evaluate incorrectly. As an example running the target
test/addons/.docbuildstamp will currently be skipped:

$ make test/addons/.docbuildstamp
Skipping .docbuildstamp (no crypto)

With this commit the target will only be skipped if configured --without-ssl.

PR-URL: https://github.com/nodejs/node/pull/22356
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-03 17:56:23 +02:00
cjihrig fbc189b9eb
test: cover error case in os getCheckedFunction()
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.

PR-URL: https://github.com/nodejs/node/pull/22394
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-09-03 17:56:23 +02:00
cjihrig 30b22a676d
os: destructure ERR_SYSTEM_ERROR properly
PR-URL: https://github.com/nodejs/node/pull/22394
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-09-03 17:56:23 +02:00
Ruben Bridgewater 3b44053ce8
os: improve networkInterfaces performance
This algorithm uses less data transformations and is therefore
significantly faster than the one before.

PR-URL: https://github.com/nodejs/node/pull/22359
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-03 17:56:23 +02:00