From dfd5c28896e4ee245fa8c3948ea6031f17ccd1d1 Mon Sep 17 00:00:00 2001 From: nlf Date: Tue, 29 Nov 2022 12:25:43 -0800 Subject: [PATCH] fix: do not reset hidden lockfile data before saving --- workspaces/arborist/lib/arborist/reify.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index 36aabd6f0fcdd..e5ccec5c71d96 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -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