build: upgrade to asar@^1.0.0 (#17061)
* build: upgrade asar to ^1.0.0 This is to remove a transitive security vulnerability. The API changed from callbacks to Promises, so `script/gn-asar.js` needed to be changed. * build: add klaw to package.json `klaw` is used in `script/lint.js`, but it was a transitive dependency. * build: add fs-extra to package.json `fs-extra` is used in `script/gn-asar.js`, but it was a transitive dependency.
This commit is contained in:
parent
30213089ae
commit
7a7389ab1c
3 changed files with 89 additions and 153 deletions
|
@ -51,11 +51,9 @@ try {
|
|||
}
|
||||
|
||||
// Create the ASAR archive
|
||||
asar.createPackageWithOptions(tmpPath, out[0], {}, (err) => {
|
||||
fs.removeSync(tmpPath)
|
||||
|
||||
if (err) {
|
||||
asar.createPackageWithOptions(tmpPath, out[0], {})
|
||||
.catch(err => {
|
||||
fs.removeSync(tmpPath)
|
||||
console.error('Unexpected error while generating ASAR', err)
|
||||
process.exit(1)
|
||||
}
|
||||
})
|
||||
}).then(() => fs.remove(tmpPath))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue