File tree Expand file tree Collapse file tree 5 files changed +24
-24
lines changed
Expand file tree Collapse file tree 5 files changed +24
-24
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2+ import process from 'node:process' ;
23import meow from 'meow' ;
3- import binaryVersion from 'bin -version' ;
4+ import binaryVersion from 'binary -version' ;
45
56const 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
2427const [ 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 ) ;
Original file line number Diff line number Diff line change 1515 "bin-version" : " ./cli.js"
1616 },
1717 "engines" : {
18- "node" : " >=12 "
18+ "node" : " >=18 "
1919 },
2020 "scripts" : {
2121 "test" : " xo && ava"
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}
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11import test from 'ava' ;
2- import execa from 'execa' ;
2+ import { execa } from 'execa' ;
33
44const reVersion = / \d + \. \d + \. \d + / ;
55
You can’t perform that action at this time.
0 commit comments