node-abi 2.19.2 → 2.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -54,7 +54,11 @@ function getTarget (abi, runtime) {
54
54
  }
55
55
 
56
56
  function sortByTargetFn (a, b) {
57
- return Number(a.abi) > Number(b.abi) && a.target > b.target
57
+ var abiComp = Number(a.abi) - Number(b.abi)
58
+ if (abiComp !== 0) return abiComp
59
+ if (a.target < b.target) return -1
60
+ if (a.target > b.target) return 1
61
+ return 0
58
62
  }
59
63
 
60
64
  function loadGeneratedTargets () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-abi",
3
- "version": "2.19.2",
3
+ "version": "2.19.3",
4
4
  "description": "Get the Node ABI for a given target and runtime, and vice versa.",
5
5
  "main": "index.js",
6
6
  "scripts": {