summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-06-14fs: add *timeNs properties to BigInt Stats objectsJoyee Cheung
- Extend the aliased buffer for stats objects to contain the entire time spec (seconds and nanoseconds) for the time values instead of calculating the milliseconds in C++ and lose precision there. - Calculate the nanosecond-precision time values in JS and expose them in BigInt Stats objects as `*timeNs`. The millisecond-precision values are now calculated from the nanosecond-precision values. PR-URL: https://github.com/nodejs/node/pull/21387 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2019-06-12domain: error handler runs outside of its domainJulien Gilli
Before this change, domains' error handlers would run with the corresponding domain as the active domain. This creates the possibility for domains' error handlers to call themselves recursively if an event emitter created in the error handler emits an error, or if the error handler throws an error. This change sets the active domain to be the domain's parent (or null if the domain for which the error handler is called has no parent) to prevent that from happening. Fixes: https://github.com/nodejs/node/issues/26086 PR-URL: https://github.com/nodejs/node/pull/26211 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12tls: rename validateKeyCert in _tls_common.jsDaniel Bevenius
This commit renames validateKeyCert to validateKeyCertArg to avoid confusing this with something that would validate the actual key or certificate. PR-URL: https://github.com/nodejs/node/pull/28116 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12assert: add partial support for evaluated code in simple assertRuben Bridgewater
This makes sure using `assert.ok()` in `new Function()` statements visualizes the actual call site in the error message. PR-URL: https://github.com/nodejs/node/pull/27781 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12assert: improve regular expression validationRuben Bridgewater
This makes sure `assert.throws()` and `assert.rejects()` result in an easy to understand error message instead of rethrowing the actual error. This should significantly improve the debugging experience in case people use an regular expression to validate their errors. This also adds support for primitive errors that would have caused runtime errors using the mentioned functions. The input is now stringified before it's passed to the RegExp to circumvent that. As drive-by change this also adds some further comments and renames a variable for clarity. PR-URL: https://github.com/nodejs/node/pull/27781 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12assert: print more lines in the error diffRuben Bridgewater
So far consequitive identical lines were collapsed if there were at least three. Now they are only collapsed from five identical lines on. This also simplifies the implementation a tiny bit by abstracting some logic. PR-URL: https://github.com/nodejs/node/pull/28058 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12assert: fix error diffRuben Bridgewater
In some edge cases an identical line could be printed twice. This is now fixed by changing the algorithm a bit. It will now verify how many lines were identical before the current one. PR-URL: https://github.com/nodejs/node/pull/28058 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-12assert: limit string inspection when logging assertion errorsRuben Bridgewater
This makes sure long strings as `actual` or `expected` values on an `AssertionError` won't be logged completely. This is important as the actual value is somewhat redundant in combination with the error message which already logs the difference between the input values. PR-URL: https://github.com/nodejs/node/pull/28058 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-11module: handle empty require.resolve() optionscjihrig
If require.resolve() is passed an options object, but the paths option is not present, then use the default require.resolve() paths. PR-URL: https://github.com/nodejs/node/pull/28078 Fixes: https://github.com/nodejs/node/issues/28077 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-11util: refactor inspecting long linesRuben Bridgewater
Using the `util.inspect` `compact` mode set to something else than `true` resulted in breaking long lines in case the line would exceed the `breakLength` option and if it contained whitespace and or new lines. It turned out that this behavior was less useful than originally expected and it is now changed to only break on line breaks if the `breakLength` option is exceeded for the inspected string. This should be align better with the user expectation than the former behavior. PR-URL: https://github.com/nodejs/node/pull/28055 Fixes: https://github.com/nodejs/node/issues/27690 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-10readline: error on falsy values for callbackSam Roberts
It was intended, according to in-test comments and common behaviour, that callbacks be either `undefined` or a function, but falsy values were being accepted as meaning "no callback". PR-URL: https://github.com/nodejs/node/pull/28109 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-10dgram: fix abort on bad argscjihrig
This commit fixes a C++ abort for connected dgram sockets by improving input validation in the JS layer. Fixes: https://github.com/nodejs/node/issues/28126 PR-URL: https://github.com/nodejs/node/pull/28135 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-10http2: do not register unnecessary listenersAntonio Kukas
PR-URL: https://github.com/nodejs/node/pull/27987 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-10process: improve queueMicrotask performanceAnatoli Papirovski
Optimize the hot code paths of queueMicrotask by not creating unnecessary objects, not looking up properties on frozen primordials, etc. PR-URL: https://github.com/nodejs/node/pull/28093 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-06-10crypto: add debug info client emit secureConnectDaniel Bevenius
Currently, when debugging a TLS connection there might be multiple debug statements 'client emit secureConnect' for the 'secureConnect` event when using NODE_DEBUG='tls'. While it is possible to step through this with a debugger that is not always the fastest/easiest to do if debugging remote code. This commit adds some additional information to the debug statements to make it easier to distinguish where the debug statements are coming from. PR-URL: https://github.com/nodejs/node/pull/28067 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-09util: use Set to store deprecation codesDaniel Nalborczyk
PR-URL: https://github.com/nodejs/node/pull/28113 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-09util: special handle `maxArrayLength` while grouping arraysRuben Bridgewater
This makes sure that large arrays with lots of small entries ignore the `... n more item(s)` part since it often resulted in output that users did not expect. Now that part is printed on a separate line to indicate extra entries. PR-URL: https://github.com/nodejs/node/pull/28059 Refs: https://github.com/nodejs/node/issues/27690 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-09src: only run preloadModules if the preload array is not emptySamuel Attard
PR-URL: https://github.com/nodejs/node/pull/28012 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-09process: code cleanup for nextTickAnatoli Papirovski
Fix a few edge cases and non-obvious issues with nextTick: 1. Emit destroy hook in a try-finally rather than triggering it before the callback runs. 2. Re-word comment for processPromiseRejections and make sure it returns true in the rejectionHandled case too. 3. Small readability improvements. PR-URL: https://github.com/nodejs/node/pull/28047 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-08util: support AsyncGeneratorFunction in .inspectRuben Bridgewater
This makes sure async generator functions are properly detected while using `util.inspect`. PR-URL: https://github.com/nodejs/node/pull/28056 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-08http: remove default 'timeout' listener on upgradeLuigi Pinca
Remove the default listener of the `'timeout'` event from the socket before emitting the `'connect'` or `'upgrade'` event. PR-URL: https://github.com/nodejs/node/pull/26030 Fixes: https://github.com/nodejs/node/issues/23857 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-05trace_events: respect inspect() depthcjihrig
This commit causes the Tracing class to account for util.inspect() depth. PR-URL: https://github.com/nodejs/node/pull/28037 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-04net: make writeAfterFIN() return falseLuigi Pinca
If `false` is not returned a readable stream piped into the socket might continue reading indefinitely until the process goes out of memory. PR-URL: https://github.com/nodejs/node/pull/27996 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-02stream: convert string to Buffer when calling `unshift(<string>)`Marcos Casagrande
`readable.unshift` can take a string as an argument, but that string wasn't being converted to a Buffer, which caused a <TypeError: Argument must be a buffer> in some cases. Also if a string was passed, that string was coerced to utf8 encoding. A second optional argument `encoding` was added to `unshift` to fix the encoding issue. Fixes: https://github.com/nodejs/node/issues/27192 PR-URL: https://github.com/nodejs/node/pull/27194 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: Rich Trott <rtrott@gmail.com>
2019-06-02child_process: move exports to bottom for consistent code stylehimself65
PR-URL: https://github.com/nodejs/node/pull/27845 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-02http: fix deferToConnect commentsRobert Nagy
PR-URL: https://github.com/nodejs/node/pull/27876 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-02http: fix socketOnWrap edge casesAnatoli Papirovski
Properly handle prependListener wrapping on http server socket, in addition to on and addListener. PR-URL: https://github.com/nodejs/node/pull/27968 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-01http2: respect inspect() depthcjihrig
This commit causes Http2Stream and Http2Session to account for inspect() depth. PR-URL: https://github.com/nodejs/node/pull/27983 Fixes: https://github.com/nodejs/node/issues/27976 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-01lib: no need to strip BOM or shebang for scriptsRefael Ackermann
PR-URL: https://github.com/nodejs/node/pull/27375 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-01http: call write callback even if there is no message bodyLuigi Pinca
Ensure that the callback of `OutgoingMessage.prototype.write()` is called when `outgoingMessage._hasBody` is `false` (HEAD method, 204 status code, etc.). Refs: https://github.com/nodejs/node/pull/27709 PR-URL: https://github.com/nodejs/node/pull/27777 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-31errors: create internal connResetExceptionRich Trott
Replace various instances of errors that use code ECONNRESET with a single centralized factory function to create the errors. (While making changes to _tls_wrap.js, this also takes the opportunity to make trailing commas consistent on multi-line arrays. One had a trailing comma and one didn't. This adds a traiiling comma to the one that didn't.) PR-URL: https://github.com/nodejs/node/pull/27953 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-05-31child_process: runtime deprecate _channelcjihrig
This commit moves DEP0129 to a runtime deprecation. PR-URL: https://github.com/nodejs/node/pull/27949 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-31module: runtime deprecate createRequireFromPath()cjihrig
This commit moves DEP0130 to a runtime deprecation. PR-URL: https://github.com/nodejs/node/pull/27951 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-30crypto: fix KeyObject handle type error messageAlexander Avakov
Fix KeyObject handle type error message. Add test to cover KeyObject ERR_INVALID_ARG_TYPE exception. PR-URL: https://github.com/nodejs/node/pull/27904 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-30src: export number_of_native_contexts and number_of_detached_contextsYuriy Vasiyarov
export number_of_native_contexts and number_of_detached_contexts as part of v8.getHeapStatistics() PR-URL: https://github.com/nodejs/node/pull/27933 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-30stream: convert existing buffer when calling .setEncodingAnna Henningsen
Convert already-stored chunks when `.setEncoding()` is called so that subsequent `data` events will receive decoded strings, as they expect. Fixes: https://github.com/nodejs/node/issues/27932 PR-URL: https://github.com/nodejs/node/pull/27936 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-30lib: removed unnecessary fs.realpath `options` arg check + testsAlex Pry
Removed duplicated check for options argument of fs.realpath. Added some tests which covering the cases for passing options arg as null. PR-URL: https://github.com/nodejs/node/pull/27909 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-30console: fix table() outputBrian White
Fixes: https://github.com/nodejs/node/issues/27915 PR-URL: https://github.com/nodejs/node/pull/27917 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-29inspector: removing checking of non existent field in lib/inspector.jsKeroosha
Seems like sessionAttached doesn't exist and no more assigned anywhere PR-URL: https://github.com/nodejs/node/pull/27919 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-05-27child_process: simplify spawn argument parsingcjihrig
This commit simplifies the object returned by normalizeSpawnArguments(). This does impact monkey patching, as illustrated by the changes in tests. PR-URL: https://github.com/nodejs/node/pull/27854 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-26lib: rework logic of stripping BOM+Shebang from commonjsGus Caplan
Fixes https://github.com/nodejs/node/issues/27767 PR-URL: https://github.com/nodejs/node/pull/27768 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-05-26Revert "lib: print to stdout/stderr directly instead of using console"Richard Lau
This reverts commit 2b24ffae2240163a74ae11e49ee198e98abb07dc. Fixes: https://github.com/nodejs/node/issues/27819 PR-URL: https://github.com/nodejs/node/pull/27823 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-25assert: remove unreachable codeRich Trott
There is only one entry in `kReadableOperator` that ends in `Unequal`. So the value assigned on line 392 can only be truthy if `operator` is `notDeepEqual`. Therefore, the ternary condition on line 394 is always true. Remove the ternary. Coverage reports confirm that the removed code is unused. PR-URL: https://github.com/nodejs/node/pull/27840 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-25tls: support the hints optionLuigi Pinca
Make `tls.connect()` support the `hints` option for feature parity with `net.connect()`. PR-URL: https://github.com/nodejs/node/pull/27816 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-24esm: refactor createDynamicModule()cjihrig
This commit refactors createDynamicModule() for readability: - The map() callback functions are named and moved to a higher scope. - The two export map() loops are combined. - JSON.stringify() is only called once per import. PR-URL: https://github.com/nodejs/node/pull/27809 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-24child_process: remove extra shallow copyzero1five
PR-URL: https://github.com/nodejs/node/pull/27801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-23assert: remove unreachable codeRich Trott
In lib/internal/assert/assertion_error.js, line 391 assures that `operator` is 'deepEqual' so there is no need to check the value of `operator` in a ternary on the next line (line 392). Remove the ternary. PR-URL: https://github.com/nodejs/node/pull/27786 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-23http2: support net.Server optionsLuigi Pinca
Make `http2.createServer()` support `net.Server` options. PR-URL: https://github.com/nodejs/node/pull/27782 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-23tls: set tlsSocket.servername as early as possibleoyyd
This commit makes `TLSSocket` set the `servername` property on `SSL_CTX_set_tlsext_servername_callback` so that we could get it later even if errors happen. Fixes: https://github.com/nodejs/node/issues/27699 PR-URL: https://github.com/nodejs/node/pull/27759 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-05-22esm: remove experimental status from JSON modulesMyles Borins
The HTML spec has officially landed JSON Modules and as such I think we can move them out of the "experimental" status. They will still be behind the `--experimental-modules` flag until the entire esm implementation moves out of experimental. Refs: https://html.spec.whatwg.org/#creating-a-json-module-script PR-URL: https://github.com/nodejs/node/pull/27752 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>