-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v10.x] Backport util PRs #23039
[v10.x] Backport util PRs #23039
Commits on Sep 23, 2018
-
PR-URL: nodejs#22503 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3f0e52e - Browse repository at this point
Copy the full SHA 3f0e52eView commit details -
benchmark: refactor util benchmarks
This significantly reduces the benchmark runtime. It removes to many variations that do not provide any benefit and reduces the iterations. PR-URL: nodejs#22503 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0560cd0 - Browse repository at this point
Copy the full SHA 0560cd0View commit details -
util: improve inspect performance
This significantly improves the inspection performance for all array types. From now on only the visible elements cause work instead of having to process all array keys no matter how many entries are visible. This also moves some code out of the main function to reduce the overall function complexity. PR-URL: nodejs#22503 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15b0c80 - Browse repository at this point
Copy the full SHA 15b0c80View commit details -
util: fix indentationLvl when exceeding max call stack size
The inspection indentation level was not always reset to it's former value in case the maximum call stack size was exceeded. PR-URL: nodejs#22787 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8513b45 - Browse repository at this point
Copy the full SHA 8513b45View commit details -
util: use a shared symbol for util.inspect.custom
Define `util.inspect.custom` as `Symbol.for("nodejs.util.inspect.custom")` rather than `Symbol("util.inspect.custom")`. This allows `inspect` hooks to easily/safely be defined in non-Node.js environments. Fixes: nodejs#20821 Refs: nodejs#22684 PR-URL: nodejs#20857 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cc9898b - Browse repository at this point
Copy the full SHA cc9898bView commit details -
util: add order option to
.inspect()
The order option can be used to sort the inspected values in case they do not rely on their order as arrays. That way the output is stable no matter of the object property inspection order. PR-URL: nodejs#22788 Refs: nodejs#22763 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c3ea927 - Browse repository at this point
Copy the full SHA c3ea927View commit details -
doc,test: fix inspect's sorted compare function
In V8 7.0, the array sorting algorithm was changed to Timsort, which is stable. A compare function returning only `true` or `false` (converted to 0 and 1) cannot work properly. PR-URL: nodejs#22992 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Configuration menu - View commit details
-
Copy full SHA for 2b3af24 - Browse repository at this point
Copy the full SHA 2b3af24View commit details