diff --git a/index.js b/index.js index b4ce886..a560467 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ import lib from './lib/index.js'; -export default lib.path(); +export default lib.path; diff --git a/lib/index.js b/lib/index.js index a7aa2e2..49c4fe3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,7 +1,7 @@ import fs from 'node:fs'; import process from 'node:process'; import {fileURLToPath} from 'node:url'; -import BinWrapper from 'bin-wrapper'; +import {BinWrapper} from '@mole-inc/bin-wrapper'; const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url))); const url = `https://raw.githubusercontent.com/imagemin/gifsicle-bin/v${pkg.version}/vendor/`; diff --git a/lib/install.js b/lib/install.js index 764e30f..cf41822 100644 --- a/lib/install.js +++ b/lib/install.js @@ -3,6 +3,10 @@ import {fileURLToPath} from 'node:url'; import binBuild from 'bin-build'; import bin from './index.js'; +// Can stop ignoring this rule once no longer needing to support +// Node versions that *don't* support top-level await +// See https://github.com/imagemin/gifsicle-bin/issues/149 +// eslint-disable-next-line unicorn/prefer-top-level-await (async () => { try { await bin.run(['--version']); diff --git a/package.json b/package.json index a33a24d..e13209f 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "gifsicle" ], "dependencies": { + "@mole-inc/bin-wrapper": "8.0.1", "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", "execa": "^6.1.0" }, "devDependencies": { @@ -45,6 +45,6 @@ "bin-check": "^4.0.1", "compare-size": "^3.0.0", "tempy": "^3.0.0", - "xo": "^0.48.0" + "xo": "^0.56.0" } }