Skip to content

Commit ebd6ae8

Browse files
committed
fix: prefer newer abis when loading
1 parent 207e789 commit ebd6ae8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

lib/load-addon.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/load-addon.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/load-addon.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ const addonParentDir = path.join(
1010
"node",
1111
)
1212
const addOnAbiDirs = fs.readdirSync(addonParentDir)
13+
.sort((a, b) => {
14+
return Number.parseInt(b, 10) - Number.parseInt(a, 10)
15+
})
1316

1417
let addon: undefined | any
1518
// try each available addon ABI

0 commit comments

Comments
 (0)