Skip to content

Commit 84fae0d

Browse files
committed
Require Node.js 12
1 parent 468be30 commit 84fae0d

5 files changed

Lines changed: 16 additions & 25 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 16
1314
- 14
1415
- 12
15-
- 10
16-
- 8
1716
steps:
1817
- uses: actions/checkout@v2
19-
- uses: actions/setup-node@v1
18+
- uses: actions/setup-node@v2
2019
with:
2120
node-version: ${{ matrix.node-version }}
2221
- run: npm install

cli.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
2-
'use strict';
3-
const meow = require('meow');
4-
const binVersion = require('bin-version');
2+
import meow from 'meow';
3+
import binaryVersion from 'bin-version';
54

65
const cli = meow(`
76
Usage
@@ -35,7 +34,7 @@ if (binaryArguments.length > 0) {
3534
}
3635

3736
(async () => {
38-
const version = await binVersion(binary, options);
37+
const version = await binaryVersion(binary, options);
3938

4039
if (!version) {
4140
console.error(`Could not find a version for \`${binary}\``);

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
"description": "Get the version of a binary in semver format",
55
"license": "MIT",
66
"repository": "sindresorhus/bin-version-cli",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1112
},
13+
"type": "module",
1214
"bin": {
13-
"bin-version": "cli.js"
15+
"bin-version": "./cli.js"
1416
},
1517
"engines": {
16-
"node": ">=8"
18+
"node": ">=12"
1719
},
1820
"scripts": {
1921
"test": "xo && ava"
@@ -24,20 +26,19 @@
2426
"keywords": [
2527
"cli-app",
2628
"cli",
27-
"bin",
2829
"binary",
2930
"executable",
3031
"version",
3132
"semver",
3233
"semantic"
3334
],
3435
"dependencies": {
35-
"bin-version": "^3.0.0",
36-
"meow": "^5.0.0"
36+
"bin-version": "^6.0.0",
37+
"meow": "^9.0.0"
3738
},
3839
"devDependencies": {
39-
"ava": "^0.25.0",
40-
"execa": "^1.0.0",
41-
"xo": "^0.23.0"
40+
"ava": "^3.15.0",
41+
"execa": "^5.0.0",
42+
"xo": "^0.39.1"
4243
}
4344
}

readme.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
> Get the version of a binary in [semver](https://github.com/npm/node-semver) format
44
5-
65
## Install
76

87
```
98
$ npm install --global bin-version-cli
109
```
1110

12-
1311
## Usage
1412

1513
```
@@ -33,13 +31,7 @@ $ bin-version --help
3331
1.0.2
3432
```
3533

36-
3734
## Related
3835

3936
- [bin-version](https://github.com/sindresorhus/bin-version) - API for this module
4037
- [find-versions-cli](https://github.com/sindresorhus/find-versions-cli) - Find semver versions in a string
41-
42-
43-
## License
44-
45-
MIT © [Sindre Sorhus](https://sindresorhus.com)

0 commit comments

Comments
 (0)