Skip to content

Commit

Permalink
fix: do not reset hidden lockfile data before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Nov 29, 2022
1 parent dc8e6bd commit 613dc63
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions workspaces/arborist/lib/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1531,16 +1531,12 @@ module.exports = cls => class Reifier extends cls {
this.idealTree.meta.filename =
this.idealTree.realpath + '/node_modules/.package-lock.json'
this.idealTree.meta.hiddenLockfile = true
const resetMeta = this.idealTree.meta && this.idealTree.meta.lockfileVersion !== defaultLockfileVersion
this.idealTree.meta.lockfileVersion = defaultLockfileVersion

this.actualTree = this.idealTree
this.idealTree = null

if (!this[_global]) {
if (resetMeta) {
await this.actualTree.meta.reset()
}
await this.actualTree.meta.save()
const ignoreScripts = !!this.options.ignoreScripts
// if we aren't doing a dry run or ignoring scripts and we actually made changes to the dep
Expand Down

0 comments on commit 613dc63

Please sign in to comment.