@xhmikosr/bin-wrapper
Advanced tools
Comparing version 5.0.1 to 6.0.0
20
index.js
@@ -127,3 +127,3 @@ import {promises as fs} from 'node:fs'; | ||
if (!works) { | ||
throw new Error(`The \`${this.path()}\` binary doesn't seem to work correctly`); | ||
throw new Error(`The "${this.path()}" binary doesn't seem to work correctly`); | ||
} | ||
@@ -144,3 +144,3 @@ | ||
return fs.stat(this.path()).catch(error => { | ||
if (error && error.code === 'ENOENT') { | ||
if (error?.code === 'ENOENT') { | ||
return this.download(); | ||
@@ -170,7 +170,9 @@ } | ||
return Promise.all(urls.map(url => download(url, this.dest(), { | ||
extract: true, | ||
strip: this.options.strip, | ||
}))).then(result => { | ||
const resultingFiles = result.flatMap((item, index) => { | ||
return Promise.all( | ||
urls.map(url => download(url, this.dest(), { | ||
extract: true, | ||
strip: this.options.strip, | ||
})), | ||
).then(result => { | ||
const resultFiles = result.flatMap((item, index) => { | ||
if (Array.isArray(item)) { | ||
@@ -186,5 +188,7 @@ return item.map(file => file.path); | ||
return Promise.all(resultingFiles.map(fileName => fs.chmod(path.join(this.dest(), fileName), 0o755))); | ||
return Promise.all( | ||
resultFiles.map(file => fs.chmod(path.join(this.dest(), file), 0o755)), | ||
); | ||
}); | ||
} | ||
} |
{ | ||
"name": "@xhmikosr/bin-wrapper", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "Binary wrapper that makes your programs seamlessly available as local dependencies", | ||
@@ -16,9 +16,11 @@ "license": "MIT", | ||
"engines": { | ||
"node": "^12.20.0 || ^14.14.0 || >=16.0.0" | ||
"node": "^14.14.0 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"ava": "ava", | ||
"lint": "xo", | ||
"xo": "xo", | ||
"fix": "xo --fix", | ||
"test": "npm run xo && npm run ava", | ||
"test-ci": "npm run xo && c8 ava" | ||
"test-ci": "c8 ava" | ||
}, | ||
@@ -39,10 +41,4 @@ "main": "index.js", | ||
], | ||
"c8": { | ||
"reporter": [ | ||
"lcovonly", | ||
"text" | ||
] | ||
}, | ||
"dependencies": { | ||
"@xhmikosr/downloader": "^9.0.0", | ||
"@xhmikosr/downloader": "^10.0.1", | ||
"bin-check": "^4.1.0", | ||
@@ -53,11 +49,10 @@ "bin-version-check": "^5.0.0", | ||
"devDependencies": { | ||
"ava": "^4.3.0", | ||
"c8": "^7.11.3", | ||
"ava": "^5.3.0", | ||
"c8": "^7.13.0", | ||
"executable": "^4.1.1", | ||
"nock": "^13.2.6", | ||
"nock": "^13.3.1", | ||
"path-exists": "^5.0.0", | ||
"rimraf": "^3.0.2", | ||
"tempy": "^2.0.0", | ||
"xo": "^0.49.0" | ||
"tempy": "^3.0.0", | ||
"xo": "^0.54.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# bin-wrapper [![CI](https://github.com/XhmikosR/bin-wrapper/actions/workflows/ci.yml/badge.svg)](https://github.com/XhmikosR/bin-wrapper/actions/workflows/ci.yml) | ||
# bin-wrapper [![CI](https://github.com/XhmikosR/bin-wrapper/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/XhmikosR/bin-wrapper/actions/workflows/ci.yml) | ||
@@ -3,0 +3,0 @@ > Binary wrapper that makes your programs seamlessly available as local dependencies |
7
165
7767
+ Added@xhmikosr/decompress@6.0.0(transitive)
+ Added@xhmikosr/downloader@10.0.2(transitive)
- Removed@xhmikosr/decompress@5.0.0(transitive)
- Removed@xhmikosr/downloader@9.0.0(transitive)
- Removedpify@5.0.0(transitive)
Updated@xhmikosr/downloader@^10.0.1