bin-version
Advanced tools
Comparing version 6.0.0 to 7.0.0
@@ -1,2 +0,2 @@ | ||
export interface Options { | ||
export type Options = { | ||
/** | ||
@@ -8,3 +8,3 @@ The arguments to pass to `binary` so that it will print its version. | ||
readonly args?: readonly string[]; | ||
} | ||
}; | ||
@@ -11,0 +11,0 @@ /** |
18
index.js
@@ -1,2 +0,2 @@ | ||
import execa from 'execa'; | ||
import {execa} from 'execa'; | ||
import findVersions from 'find-versions'; | ||
@@ -10,5 +10,5 @@ | ||
'ffprobe', | ||
'ffplay' | ||
'ffplay', | ||
].map(name => [name, ['-version']]), | ||
['openssl', ['version']] | ||
['openssl', ['version']], | ||
]); | ||
@@ -18,3 +18,3 @@ | ||
['--version'], | ||
['version'] | ||
['version'], | ||
]; | ||
@@ -26,4 +26,4 @@ | ||
if (options.args === undefined) { | ||
const customArgs = knownBinaryArguments.get(binary); | ||
possibleArguments = customArgs === undefined ? defaultPossibleArguments : [customArgs]; | ||
const customArguments = knownBinaryArguments.get(binary); | ||
possibleArguments = customArguments === undefined ? defaultPossibleArguments : [customArguments]; | ||
} else { | ||
@@ -33,8 +33,8 @@ possibleArguments = [options.args]; | ||
for (const args of possibleArguments) { | ||
for (const arguments_ of possibleArguments) { | ||
try { | ||
// eslint-disable-next-line no-await-in-loop | ||
const {all} = await execa(binary, args, { | ||
const {all} = await execa(binary, arguments_, { | ||
all: true, | ||
maxBuffer: oneMegabyte | ||
maxBuffer: oneMegabyte, | ||
}); | ||
@@ -41,0 +41,0 @@ |
{ | ||
"name": "bin-version", | ||
"version": "6.0.0", | ||
"version": "7.0.0", | ||
"description": "Get the version of a binary in semver format", | ||
@@ -14,5 +14,9 @@ "license": "MIT", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"exports": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"sideEffects": false, | ||
"engines": { | ||
"node": ">=12" | ||
"node": ">=18" | ||
}, | ||
@@ -35,10 +39,15 @@ "scripts": { | ||
"dependencies": { | ||
"execa": "^5.0.0", | ||
"find-versions": "^5.0.0" | ||
"execa": "^8.0.1", | ||
"find-versions": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.39.1" | ||
"ava": "^6.1.2", | ||
"tsd": "^0.31.0", | ||
"xo": "^0.58.0" | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"fixture" | ||
] | ||
} | ||
} |
@@ -7,9 +7,9 @@ # bin-version | ||
```sh | ||
npm install bin-version | ||
``` | ||
$ npm install bin-version | ||
``` | ||
## Usage | ||
``` | ||
```console | ||
$ curl --version | ||
@@ -26,3 +26,3 @@ curl 7.30.0 (x86_64-apple-darwin13.0) | ||
``` | ||
```console | ||
$ openssl version | ||
@@ -39,3 +39,3 @@ OpenSSL 1.0.2d 9 Jul 2015 | ||
``` | ||
```console | ||
$ openssl version | ||
@@ -42,0 +42,0 @@ OpenSSL 1.0.2d 9 Jul 2015 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5650
1
+ Addedconvert-hrtime@5.0.0(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedfind-versions@6.0.0(transitive)
+ Addedfunction-timeout@1.0.2(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedpath-key@4.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedsuper-regex@1.0.0(transitive)
+ Addedtime-span@5.1.0(transitive)
- Removedexeca@5.1.1(transitive)
- Removedfind-versions@5.1.0(transitive)
- Removedget-stream@6.0.1(transitive)
- Removedhuman-signals@2.1.0(transitive)
- Removedis-stream@2.0.1(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednpm-run-path@4.0.1(transitive)
- Removedonetime@5.1.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-final-newline@2.0.0(transitive)
Updatedexeca@^8.0.1
Updatedfind-versions@^6.0.0