Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to @mole-inc/bin-wrapper #148

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import lib from './lib/index.js';

export default lib.path();
export default lib.path;
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -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/`;
Expand Down
4 changes: 4 additions & 0 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"gifsicle"
],
"dependencies": {
"@mole-inc/bin-wrapper": "8.0.1",
"bin-build": "^3.0.0",
"bin-wrapper": "^4.0.0",
"execa": "^6.1.0"
},
"devDependencies": {
"ava": "^4.2.0",
"bin-check": "^4.0.1",
"compare-size": "^3.0.0",
"tempy": "^3.0.0",
"xo": "^0.48.0"
"xo": "^0.56.0"
}
}