- Mar 01, 2019
-
-
Ruben Bridgewater authored
1) Consolidate format to a single function. 2) Move some code that can only be reached in some code branches that was formerly executed in all cases. 3) Explicitly check for the string length of zero instead of converting the string to a boolean. 4) Consolidate nested if statements if possible e.g., if (foo) { if (bar) { /* do stuff */ } } to reduce indentation depth. 5) Simplify checks by removing extra length checks when comparing two strings. 6) Use object shorthand notation where possible. PR-URL: https://github.com/nodejs/node/pull/25278 Reviewed-By:Michaël Zasso <targos@protonmail.com>
-
Ruben Bridgewater authored
1) Refactor for loops to while loops that were only meant to count up a variable. 2) Refactor some `var` statements to `let` / `const`. 3) Simplify return conditions. 4) Use template strings where possible instead of concat. 5) Use ternary expressions for variable assignments instead of if / else. 6) Use the object shorthand notation for the function declarations. 7) Consolidate if else case where possible. 8) Remove double line breaks. PR-URL: https://github.com/nodejs/node/pull/25278 Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Ruben Bridgewater authored
1) This uses some ternary expressions instead of if else to assign some variables. 2) Use template strings instead of concat. 3) Use the object shortand notation. 4) Some var to let / const. 5) Removed some double line breaks. 6) Less brackets around statements if not necessary. PR-URL: https://github.com/nodejs/node/pull/25278 Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Ruben Bridgewater authored
The current caching logic broke by [0] because it used destructuring on the module arguments. Since the exported property is a primitive counting it up or down would not have any effect anymore in the module that required that property. The original implementation would cache all stat calls caused during bootstrap. Afterwards it would clear the cache and lazy require calls during runtime would create a new cascading cache for the then loaded modules and clear the cache again. This behavior is now restored. This is difficult to test without exposing a lot of information and therfore the existing tests have been removed (as they could not detect the issue). With the broken implementation it caused each module compilation to reset the cache and therefore minimizing the effect drastically. [0] https://github.com/nodejs/node/pull/19177 PR-URL: https://github.com/nodejs/node/pull/26266 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
This simplifies the shebang function significantly. Before, it was optimized for two characters input. Any module actually parsed should however have more characters than just the shebang. The performance stays the same as before. PR-URL: https://github.com/nodejs/node/pull/26266 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Alexander Sattelmaier authored
PR-URL: https://github.com/nodejs/node/pull/26163 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Alexander Sattelmaier authored
PR-URL: https://github.com/nodejs/node/pull/26163 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26218 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
MaleDong authored
Due to `maledong_private@qq.com` is useless because I cannot log in with the email address (GitHub doesn't support `qq` mail well), and I've successfully changed my email account to `maledong_github@outlook.com` instead. So I removed my old useless email address and keep the new one for the same account 'MaleDong', because there're two 'MaleDong' Accounts and they are both pointing to me. The final solution is that to add my own email account address into the '.mailmap' to let AUTHORS re-generated. PR-URL: https://github.com/nodejs/node/pull/26146 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Anna Henningsen authored
In the presence of Workers, it is not safe to assume that `StreamPipe::Unpipe()` has been called at the time when the object is destroyed. Instead, clean up when the destructor is called. PR-URL: https://github.com/nodejs/node/pull/26256 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Anna Henningsen authored
Do not access handles that have already begun to be closed or are closed. PR-URL: https://github.com/nodejs/node/pull/26256 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Gireesh Punathil authored
The current mechanism of uses two async handles, one owned by the creator of the worker thread to terminate a running worker, and another one employed by the worker to interrupt its creator on its natural termination. The force termination piggybacks on the message- passing mechanism to inform the worker to quiesce. Also there are few flags that represent the other thread's state / request state because certain code path is shared by multiple control flows, and there are certain code path where the async handles may not have come to life. Refactor into an AsyncRequest abstraction that exposes routines to install a handle as well as to save a state. PR-URL: https://github.com/nodejs/node/pull/26099 Refs: https://github.com/nodejs/node/pull/21283 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ruben Bridgewater authored
This is only a reference to the instance and should not be used. PR-URL: https://github.com/nodejs/node/pull/26260 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
When using `util.inspect()` with `compact` mode set to a number, all array entries exceeding 6 are going to be grouped together into logical parts. PR-URL: https://github.com/nodejs/node/pull/26269 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ruben Bridgewater authored
This overloads the `compact` option from `util.inspect()`. If it's set to a number, it is going to align all most inner entries on the same lign if they adhere to the following: * The entries do not exceed the `breakLength` options value. * The entry is one of the local most inner levels up the the one provided in `compact`. PR-URL: https://github.com/nodejs/node/pull/26269 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Michael Wei authored
PR-URL: https://github.com/nodejs/node/pull/26300 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Jarrod Connolly authored
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. PR-URL: https://github.com/nodejs/node/pull/25917 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
The cast is needed to build against OpenSSL 1.0.2, which master, 11.x, and 10.x no longer support. PR-URL: https://github.com/nodejs/node/pull/26305 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Mukul Khanna authored
PR-URL: https://github.com/nodejs/node/pull/26308 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Ruben Bridgewater authored
This prevents any proxy traps from being called while inspecting proxy objects. That guarantees a side-effect free way of inspecting proxies. PR-URL: https://github.com/nodejs/node/pull/26241 Fixes: https://github.com/nodejs/node/issues/10731 Fixes: https://github.com/nodejs/node/issues/26231 Refs: https://github.com/nodejs/node/issues/25212 Refs: https://github.com/nodejs/node/issues/24765 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Ruben Bridgewater authored
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com>
-
Ruben Bridgewater authored
This prevents leaking of the internal `inspect()` properties when using a custom inspect function. It also aligns the indentation to the way it was in v8.0.0 since that changed unintentionally. All strings returned by the custom inspect function will now be indented appropriately to the current depth. PR-URL: https://github.com/nodejs/node/pull/24971 Refs: https://github.com/nodejs/node/issues/24765 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Ruben Bridgewater authored
This makes sure the internal `stylize` function is not used to render anything and instead just uses the regular inspect function in case of reaching the maximum depth level. PR-URL: https://github.com/nodejs/node/pull/24971 Refs: https://github.com/nodejs/node/issues/24765 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Ruben Bridgewater authored
It is possible to distinguish the entries iterator from others. Expose that information to the users as well and improve the Symbol.toStringTag handling by adding a special tag instead of replacing the existent information. PR-URL: https://github.com/nodejs/node/pull/26222 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com>
-
Ruben Bridgewater authored
The cpp linter is very noisy at the moment. So use the --quiet flag by default instead of being verbose in this case. PR-URL: https://github.com/nodejs/node/pull/26252 Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Richard Lau authored
Fixes `maybe-uninitialized` build warning in `src/node_report.cc`. PR-URL: https://github.com/nodejs/node/pull/26265 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
- Feb 28, 2019
-
-
Matteo Collina authored
Fixes: https://github.com/nodejs/node/issues/26097 PR-URL: https://github.com/nodejs/node/pull/26135 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Rod Vagg authored
This is a security release. All Node.js users should consult the security release summary at: https://nodejs.org/en/blog/vulnerability/february-2019-security-releases/ for details on patched vulnerabilities. Fixes for the following CVEs are included in this release: * Node.js: Denial of Service with keep-alive HTTP connections (CVE-2019-5739) * Node.js: Slowloris HTTP Denial of Service with keep-alive (CVE-2019-5737) * OpenSSL: 0-byte record padding oracle (CVE-2019-1559) Notable Changes: * deps: OpenSSL has been upgraded to 1.0.2r which contains a fix for CVE-2019-1559 (https://www.openssl.org/news/secadv/20190226.txt). Under certain circumstances, a TLS server can be forced to respond differently to a client if a zero-byte record is received with an invalid padding compared to a zero-byte record with an invalid MAC. This can be used as the basis of a padding oracle attack to decrypt data. * http: - Backport `server.keepAliveTimeout` to prevent keep-alive HTTP and HTTPS connections remaining open and inactive for an extended period of time, leading to a potential Denial of Service (DoS). (CVE-2019-5739 / Timur Shemsedinov, Matteo Collina) - Further prevention of "Slowloris" attacks on HTTP and HTTPS connections by consistently applying the receive timeout set by `server.headersTimeout` to connections in keep-alive mode. Reported by Marco Pracucci (https://voxnest.com). (CVE-2019-5737 / Matteo Collina) PR-URL: https://github.com/nodejs-private/node-private/pull/169
-
Rod Vagg authored
This is a security release. All Node.js users should consult the security release summary at: https://nodejs.org/en/blog/vulnerability/february-2019-security-releases/ for details on patched vulnerabilities. Fixes for the following CVEs are included in this release: * Node.js: Slowloris HTTP Denial of Service with keep-alive (CVE-2019-5737) * OpenSSL: 0-byte record padding oracle (CVE-2019-1559) Notable Changes: * deps: OpenSSL has been upgraded to 1.0.2r which contains a fix for CVE-2019-1559 (https://www.openssl.org/news/secadv/20190226.txt). Under certain circumstances, a TLS server can be forced to respond differently to a client if a zero-byte record is received with an invalid padding compared to a zero-byte record with an invalid MAC. This can be used as the basis of a padding oracle attack to decrypt data. * http: Further prevention of "Slowloris" attacks on HTTP and HTTPS connections by consistently applying the receive timeout set by `server.headersTimeout` to connections in keep-alive mode. Reported by Marco Pracucci (https://voxnest.com). (CVE-2019-5737 / Matteo Collina) PR-URL: https://github.com/nodejs-private/node-private/pull/165
-
Rod Vagg authored
This is a security release. All Node.js users should consult the security release summary at: https://nodejs.org/en/blog/vulnerability/february-2019-security-releases/ for details on patched vulnerabilities. A fix for the following CVE is included in this release: * Node.js: Slowloris HTTP Denial of Service with keep-alive (CVE-2019-5737) Notable Changes: * http: Further prevention of "Slowloris" attacks on HTTP and HTTPS connections by consistently applying the receive timeout set by `server.headersTimeout` to connections in keep-alive mode. Reported by Marco Pracucci (https://voxnest.com). (CVE-2019-5737 / Matteo Collina) PR-URL: https://github.com/nodejs-private/node-private/pull/164
-
Rod Vagg authored
This is a security release. All Node.js users should consult the security release summary at: https://nodejs.org/en/blog/vulnerability/february-2019-security-releases/ for details on patched vulnerabilities. A fix for the following CVE is included in this release: * Node.js: Slowloris HTTP Denial of Service with keep-alive (CVE-2019-5737) Notable Changes: * http: Further prevention of "Slowloris" attacks on HTTP and HTTPS connections by consistently applying the receive timeout set by `server.headersTimeout` to connections in keep-alive mode. Reported by Marco Pracucci (https://voxnest.com). (CVE-2019-5737 / Matteo Collina) PR-URL: https://github.com/nodejs-private/node-private/pull/163
-
Matteo Collina authored
Fixes: https://github.com/nodejs-private/security/issues/214 PR-URL: https://github.com/nodejs-private/node-private/pull/158 Reviewed-By:
Rod Vagg <rod@vagg.org> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Rich Trott authored
Simplify and clarify deprecation semverness information in the Collaborator Guide. Unlike some of the other changes I've made lately, this one is not merely cosmetic. It changes information about how to handle deprecations vis-a-vis SemVer. The revised conventions take advange of `notable change` labels etc. instead of suggesting that doc-deprecations be treated as `semver-minor`. The idea that a deprecation is a new feature seems incorrect from a SemVer perspective, but probably made sense at the time the text was written if we weren't yet using `notable change` etc. PR-URL: https://github.com/nodejs/node/pull/26232 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Gireesh Punathil authored
In test test-cluster-net-listen-ipv6only-rr, the cluster member that listens to `any` port actually has the potential to `grab` any port from the environment which when passed onto the master causes collision when it tries to listen on. Moving the test to sequential alone is not sufficient as the cluster member can in theory catch on to the admin ports on the host. Assigning static port alone is also not sufficient, as it can interfere with other running tests in the parallel category which would be mostly running with `port: any` fashion. So move to sequential, and use a static port. Fixes: https://github.com/nodejs/node/issues/25813 PR-URL: https://github.com/nodejs/node/pull/26298 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
Gireesh Punathil authored
If retainers are embedded in retainers, direct tracking those lead to double tracking. Instead, use a special tracker that adjusts the tracking for the container object. PR-URL: https://github.com/nodejs/node/pull/26161 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ruben Bridgewater authored
The editor mode is only useable when used as terminal. Hide it from the user in case the repl terminal option is not set. PR-URL: https://github.com/nodejs/node/pull/26240 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com>
-
Ruben Bridgewater authored
Currently the repl ends on the same line which procudes a weird output. To prevent that, just add a new line in case of ctrl+d. PR-URL: https://github.com/nodejs/node/pull/26240 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com>
-
Ruben Bridgewater authored
This adds information about how to close the repl. PR-URL: https://github.com/nodejs/node/pull/26240 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com>
-
- Feb 27, 2019
-
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26158 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26102 Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-