Skip to content

Commit

Permalink
fix(updater): npm7 package lock's inner version not being updated (co…
Browse files Browse the repository at this point in the history
  • Loading branch information
vicrep authored Jul 14, 2021
1 parent 605c1ab commit a316dd0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/updaters/types/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ module.exports.writeVersion = function (contents, version) {
const indent = detectIndent(contents).indent
const newline = detectNewline(contents)
json.version = version

if (json.packages && json.packages['']) {
// package-lock v2 stores version there too
json.packages[''].version = version
}

return stringifyPackage(json, indent, newline)
}

Expand Down

0 comments on commit a316dd0

Please sign in to comment.