Skip to content

Commit

Permalink
fix: do not reset hidden lockfile data before saving (#5907)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Nov 30, 2022
1 parent da6cf30 commit 80c6c4a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions workspaces/arborist/lib/arborist/reify.js
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 80c6c4a

Please sign in to comment.