Skip to content

Commit f7ecb39

Browse files
committed
Require Node.js 18
1 parent a601e85 commit f7ecb39

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13-
- 16
14-
- 14
15-
- 12
13+
- 20
14+
- 18
1615
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-node@v2
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
1918
with:
2019
node-version: ${{ matrix.node-version }}
2120
- run: npm install

cli.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
2+
import process from 'node:process';
23
import meow from 'meow';
3-
import binaryVersion from 'bin-version';
4+
import binaryVersion from 'binary-version';
45

56
const cli = meow(`
67
Usage
@@ -19,7 +20,9 @@ const cli = meow(`
1920
OpenSSL 1.0.2p 14 Aug 2018
2021
$ bin-version openssl version
2122
1.0.2
22-
`);
23+
`, {
24+
importMeta: import.meta,
25+
});
2326

2427
const [binary, ...binaryArguments] = cli.input;
2528

@@ -33,13 +36,11 @@ if (binaryArguments.length > 0) {
3336
options.args = binaryArguments;
3437
}
3538

36-
(async () => {
37-
const version = await binaryVersion(binary, options);
39+
const version = await binaryVersion(binary, options);
3840

39-
if (!version) {
40-
console.error(`Could not find a version for \`${binary}\``);
41-
process.exit(2);
42-
}
41+
if (!version) {
42+
console.error(`Could not find a version for \`${binary}\``);
43+
process.exit(2);
44+
}
4345

44-
console.log(version);
45-
})();
46+
console.log(version);

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"bin-version": "./cli.js"
1616
},
1717
"engines": {
18-
"node": ">=12"
18+
"node": ">=18"
1919
},
2020
"scripts": {
2121
"test": "xo && ava"
@@ -33,12 +33,12 @@
3333
"semantic"
3434
],
3535
"dependencies": {
36-
"bin-version": "^6.0.0",
37-
"meow": "^9.0.0"
36+
"binary-version": "^7.1.0",
37+
"meow": "^13.2.0"
3838
},
3939
"devDependencies": {
40-
"ava": "^3.15.0",
41-
"execa": "^5.0.0",
42-
"xo": "^0.39.1"
40+
"ava": "^6.1.2",
41+
"execa": "^8.0.1",
42+
"xo": "^0.58.0"
4343
}
4444
}

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
55
## Install
66

7-
```
8-
$ npm install --global bin-version-cli
7+
```sh
8+
npm install --global bin-version-cli
99
```
1010

1111
## Usage

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava';
2-
import execa from 'execa';
2+
import {execa} from 'execa';
33

44
const reVersion = /\d+\.\d+\.\d+/;
55

0 commit comments

Comments
 (0)