summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-02-04test: verify the shell option works properly on execFilejvelezpo
Useful for executing in a shell because it accepts arguments as an array instead of a string as exec does. Depending on the circumstances, that can prove to be useful if the arguments are already prepared. PR-URL: https://github.com/nodejs/node/pull/18384 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04timers: remove domain specific codeAnatoli Papirovski
It is no longer necessary to explicitly set the handle to inherit the Timeout domain. PR-URL: https://github.com/nodejs/node/pull/18477 Refs: https://github.com/nodejs/node/pull/16222 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04test: add test for tls benchmarksAnatoli Papirovski
PR-URL: https://github.com/nodejs/node/pull/18489 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-03vm: flip Module#link's signatureGus Caplan
The specifier parameter is deemed to be more essential than referencingModule. Flipping the parameter order allows developers to write simple linker functions that only take in a specifier. PR-URL: https://github.com/nodejs/node/pull/18471 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> 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-02string_decoder: reset decoder on endJustin Ridgewell
This resets the StringDecoder's state after calling `#end`. Further writes to the decoder will act as if it were a brand new instance, allowing simple reuse. PR-URL: https://github.com/nodejs/node/pull/18494 Fixes: https://github.com/nodejs/node/issues/16564 Refs: https://github.com/nodejs/node/pull/16594 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-02timers: runtime-deprecate {un}enroll()Jeremiah Senkpiel
This was never a Very Good API, and generally just left so many open ends for inconsistent behavior. The "optimization" benefit of this API is little to none. Makes a starting step towards removing it so that in the future timers, especially in their async_hooks interactions, can be simplified. PR-URL: https://github.com/nodejs/node/pull/18066 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02assert: deprecate assert.fail partiallyRuben Bridgewater
Using `assert.fail()` with more than one argument is not intuitive to use and has no benefit over using a message on its own. Therefore this introduces a runtime deprecation in case it is used in that way. PR-URL: https://github.com/nodejs/node/pull/18418 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-02process: fix reading zero-length env vars on win32Anna Henningsen
Up until now, Node did not clear the current error code attempting to read environment variables on Windows. Since checking the error code is the way we distinguish between missing and zero-length environment variables, this could lead to a false positive when the error code was still tainted. In the simplest case, accessing a missing variable and then a zero-length one would lead Node to believe that both calls yielded an error. Before: > process.env.I=''; process.env.Q; process.env.I undefined > process.env.I=''; /*process.env.Q;*/ process.env.I '' After: > process.env.I=''; process.env.Q; process.env.I '' > process.env.I=''; /*process.env.Q;*/ process.env.I '' This only affects Node 8 and above, since before 1aa595e5bd64241451b3884d3029b9b9aa97c42d we always constructed a `v8::String::Value` instance for passing the lookup key to the OS, which in in turn always made a heap allocation and therefore reset the error code. PR-URL: https://github.com/nodejs/node/pull/18463 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02crypto: docs-only deprecate crypto.fips, replaceJames M Snell
Docs-only deprecate the getter/setter crypto.fips and replace with crypto.setFips() and crypto.getFips() This is specifically in preparation for ESM module support PR-URL: https://github.com/nodejs/node/pull/18335 Refs: https://github.com/nodejs/node/pull/18131 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01test: mark test-inspector-stop-profile-after-done flakyMyles Borins
This test is consistently failing and making CI red. PR-URL: https://github.com/nodejs/node/pull/18491 Refs: https://github.com/nodejs/node/issues/16772 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01src,lib: implement import.metaMichaël Zasso
Implement the C++ callback that is required to configure the `import.meta` object and add one property: - url: absolute URL of the module PR-URL: https://github.com/nodejs/node/pull/18368 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@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: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-01src: allow --perf-(basic-)?prof in NODE_OPTIONSLeko
PR-URL: https://github.com/nodejs/node/pull/17600 Reviewed-By: Richard Lau <riclau@uk.ibm.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> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-01test: fix buildsRuben Bridgewater
A former commit changed the tmpDir behavior and that broke this test. PR-URL: https://github.com/nodejs/node/pull/18500 Refs: https://github.com/nodejs/node/commit/bf6ce47259ebfe9f6349c223cc1735726aee062d Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-01util: add bigint formatting to util.inspectGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18412 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.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: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-01test: fix test-tty-get-color-depthBartosz Sosnowski
If getTTYfd returns 0, and stdin is not writable (like on Windows), trying to create WriteStream will fail. This commit fixes that by skipping fd 0. PR-URL: https://github.com/nodejs/node/pull/18478 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01test: show pending exception error in napi testsBen Wilcox
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: https://github.com/nodejs/node/pull/18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01test: speed up parallel/test-tls-session-cacheAnna Henningsen
This test had some unnecessary timeouts that made it run for a much longer time than necessary (about 9 s rather than 0.2 s). PR-URL: https://github.com/nodejs/node/pull/18424 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01tools: auto fix custom eslint ruleShobhit Chittora
1. Extends tests 2. Refactors code 3. Adds fixer Refs: #16636 PR-URL: https://github.com/nodejs/node/pull/16652 Refs: https://github.com/nodejs/node/issues/16636 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-01fs: partition readFile against pool exhaustionJamie Davis
Problem: Node implements fs.readFile as: - a call to stat, then - a C++ -> libuv request to read the entire file using the stat size Why is this bad? The effect is to place on the libuv threadpool a potentially-large read request, occupying the libuv thread until it completes. While readFile certainly requires buffering the entire file contents, it can partition the read into smaller buffers (as is done on other read paths) along the way to avoid threadpool exhaustion. If the file is relatively large or stored on a slow medium, reading the entire file in one shot seems particularly harmful, and presents a possible DoS vector. Solution: Partition the read into multiple smaller requests. Considerations: 1. Correctness I don't think partitioning the read like this raises any additional risk of read-write races on the FS. If the application is concurrently readFile'ing and modifying the file, it will already see funny behavior. Though libuv uses preadv where available, this doesn't guarantee read atomicity in the presence of concurrent writes. 2. Performance Downside: Partitioning means that a single large readFile will require into many "out and back" requests to libuv, introducing overhead. Upside: In between each "out and back", other work pending on the threadpool can take a turn. In short, although partitioning will slow down a large request, it will lead to better throughput if the threadpool is handling more than one type of request. Fixes: https://github.com/nodejs/node/issues/17047 PR-URL: https://github.com/nodejs/node/pull/17054 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01src: refactor stream callbacks and ownershipAnna Henningsen
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: https://github.com/nodejs/node/pull/18334 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-01http: process headers after setting up agentRod Vagg
Added tests to clarify the implicit behaviour of array header setting vs object header setting PR-URL: https://github.com/nodejs/node/pull/16568 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-01test: fix flaky test-http-dns-errorBryan English
Under some conditions, the error received from getaddrinfo might actually be EAGAIN, meaning the request should be retried. Allowing for 5 retries before erroring out. Also replace one-off function with common.mustNotCall(). PR-URL: https://github.com/nodejs/node/pull/16534 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01build: make gyp user defined variables lowercaseDaniel Bevenius
I mistakenly introduced user defined variables using uppercase characters, reading the gyp documentation they state: "Predefined variables. By convention, these are named with CAPITAL_LETTERS. Predefined variables are set automatically by GYP" and also "By convention, user-defined variables are named with lowercase_letters." This commit renames the user defined variables to lowercase to follow the above mentioned convention. PR-URL: https://github.com/nodejs/node/pull/16238 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01assert: use a default message in assertRuben Bridgewater
In case no arguments are passed to `assert.ok` it should just use a default message. Otherwise `assert.ok` can not be used as a callback. PR-URL: https://github.com/nodejs/node/pull/18319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-01fs: throw errors from fs.fsyncSync in JSJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18348 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01fs: throw errors from fs.fdatasyncSync in JSJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18348 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01fs: throw errors from fs.ftruncateSync in JSJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18348 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-31test: move tmpdir to submodule of commonRich Trott
Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-31crypto: runtime deprecate DEFAULT_ENCODINGJames M Snell
Runtime deprecate the crypto.DEFAULT_ENCODING property. This is specifically in preparation for eventual ESM support Refs: https://github.com/nodejs/node/pull/18131 PR-URL: https://github.com/nodejs/node/pull/18333 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-31module: enable dynamic import flag for esmodulesMyles Borins
currently if you want to use dynamic import you must use both the `--experimental-modules` and the `--harmony-dynamic-imports` flags. Chrome is currently shipping dynamic import unflagged, the flag only remains in V8 to guard embedders who have not set the appropriate callback from throwing an unhandled rejection when the feature is used. As such it is reasonable to enable the flag by default for `--experimental-modules` PR-URL: https://github.com/nodejs/node/pull/18387 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-31perf_hooks: add warning when too many entries in the timelineJames M Snell
PR-URL: https://github.com/nodejs/node/pull/18087 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-31n-api: change assert ok check to notStrictEqual.Aaron Kau
PR-URL: https://github.com/nodejs/node/pull/18414 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-31url: expose the WHATWG URL API globallyMichaël Zasso
Install URL and URLSearchParams on the global object, like they can be found in browser environments. PR-URL: https://github.com/nodejs/node/pull/18281 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-30test: fix flaky test-process-fatal-execption-tickRich Trott
Use common.busyLoop() which happens to make the test robust. PR-URL: https://github.com/nodejs/node/pull/18461 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-30vm: add modulesGus Caplan
Adds vm.Module, which wraps around ModuleWrap to provide an interface for developers to work with modules in a more reflective manner. Co-authored-by: Timothy Gu <timothygu99@gmail.com> PR-URL: https://github.com/nodejs/node/pull/17560 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-30stream: avoid writeAfterEnd() while ending陈刚
Calling `writable.end()` will probably synchronously call `writable.write()`, in such a situation the `state.ended` is false and `writable.write()` doesn't trigger `writeAfterEnd()`. PR-URL: https://github.com/nodejs/node/pull/18170 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-30test: adds tests for vm invalid argumentsGilles De Mey
PR-URL: https://github.com/nodejs/node/pull/18282 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-29domain: further abstract usage in C++Anatoli Papirovski
Move the majority of C++ domain-related code into JS land by introducing a top level domain callback which handles entering & exiting the domain. Move the rest of the domain necessities into their own file that creates an internal binding, to avoid exposing domain-related code on the process object. Modify an existing test slightly to better test domain-related code. PR-URL: https://github.com/nodejs/node/pull/18291 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-29stream: add type and range check for highWaterMarkTobias Nießen
The (h|readableH|writableH)ighWaterMark options should only permit positive numbers and zero. PR-URL: https://github.com/nodejs/node/pull/18098 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-29cluster: add cwd to cluster.settingscjihrig
This commit allows cluster workers to be created with configurable working directories. Fixes: https://github.com/nodejs/node/issues/16388 PR-URL: https://github.com/nodejs/node/pull/18399 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-29stream: do not emit readable if the stream endedMathias Buus
Fixes a regression introduced by the once-per-microtick 'readable' event emission. See: https://github.com/nodejs/node/pull/17979 PR-URL: https://github.com/nodejs/node/pull/18372 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-29benchmark: implement duration in http test doubleJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18380 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-29module: validate request in require.resolve.pathsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18359 Fixes: https://github.com/nodejs/node/issues/18352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-29module: validate request in require.resolveJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18359 Fixes: https://github.com/nodejs/node/issues/18352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-29module: use internal/errors.js in module.requireJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18359 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-29errors: improve the description of ERR_INVALID_ARG_VALUEJoyee Cheung
- Allow user to customize why the argument is invalid - Display the argument with util.inspect so null bytes can be displayed properly. PR-URL: https://github.com/nodejs/node/pull/18358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-01-29test: fix flaky test-fs-writeJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18374 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-26timers: add internal [@@ refresh()] functionJeremiah Senkpiel
Hidden via a symbol because I'm unsure exactly what the API should look like in the end. Removes the need to use _unrefActive for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced with insert() directly if it were in the same file. PR-URL: https://github.com/nodejs/node/pull/18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-01-26test: refactor addons-napi/test_exception/test.jsRich Trott
* provide block scoping to prevent unintended side effects * remove confusing and unnecessary assertion message * use consisitent `actual, expected` argument order for assertions PR-URL: https://github.com/nodejs/node/pull/18340 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-26test: fix test-tls-server-verify.js on Windows CIRich Trott
The test runs two test cases at a time. This is not relevant to what the test is actually testing. Not sure why doing it that way causes a deadlock on some Windows servers, but running one at a time fixes it. Fixes: https://github.com/nodejs/node/issues/18269 PR-URL: https://github.com/nodejs/node/pull/18382 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>