@npmcli/arborist
Advanced tools
Comparing version 0.0.0-pre.12 to 0.0.0-pre.13
@@ -30,2 +30,3 @@ // a module that manages a shrinkwrap file (npm-shrinkwrap.json or | ||
const {promisify} = require('util') | ||
const rimraf = promisify(require('rimraf')) | ||
const fs = require('fs') | ||
@@ -658,3 +659,13 @@ const readFile = promisify(fs.readFile) | ||
return Promise.all([ | ||
writeFile(this.filename, json), | ||
writeFile(this.filename, json).catch(er => { | ||
if (this.hiddenLockfile) { | ||
// well, we did our best. | ||
// if we reify, and there's nothing there, then it might be lacking | ||
// a node_modules folder, but then the lockfile is not important. | ||
// Remove the file, so that in case there WERE deps, but we just | ||
// failed to update the file for some reason, it's not out of sync. | ||
return rimraf(this.filename) | ||
} | ||
throw er | ||
}), | ||
this.yarnLock && this.yarnLock.entries.size && | ||
@@ -661,0 +672,0 @@ writeFile(this.path + '/yarn.lock', this.yarnLock.toString()) |
{ | ||
"name": "@npmcli/arborist", | ||
"version": "0.0.0-pre.12", | ||
"version": "0.0.0-pre.13", | ||
"description": "Manage node_modules trees", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
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
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
194597
4596