electron / node-abi

:turtle: :rocket: Get the Node.js and Electron ABI for a given target and runtime
https://www.npmjs.com/node-abi
MIT License
164 stars 58 forks source link

fix: sorting of targets #99

Closed vecerek closed 3 years ago

vecerek commented 3 years ago

A comparator function for Array.sort should return:

The previous implementation of the comparator function (introduced in #95) could only ever return true/false, i.e. 1/0 but no -1. So, what I think happened was that when 0 was returned, Node attempted to apply a default ordering on the objects based on the values of all their properties. That is why a seemingly innocuous change such as changing an lts property from false to true resulted in a broken order. I guess the order was previously correct only by accident 😄

mafintosh commented 3 years ago

Yep good fix.

lgeiger commented 3 years ago

:tada: This PR is included in version 2.19.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: