doc,test: fix inspect's sorted compare function by targos · Pull Request #22992 · nodejs/node

@targos

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.

@targos targos added util

Issues and PRs related to the built-in util module.

doc

Issues and PRs related to the documentations.

test

Issues and PRs related to the tests.

fast-track

PRs that do not need to wait for 72 hours to land.

labels

Sep 21, 2018

BridgeAR

kfarnung

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Sep 21, 2018

@targos targos deleted the util-inspect-stable branch

September 22, 2018 12:32

targos added a commit that referenced this pull request

Sep 22, 2018
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: #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>

targos added a commit to targos/node that referenced this pull request

Sep 23, 2018
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>

targos added a commit that referenced this pull request

Sep 24, 2018
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.

Backport-PR-URL: #23039
PR-URL: #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>

This was referenced

Oct 10, 2018