Skip to content
Permalink
Browse files
fix(updater): npm7 package lock's inner version not being updated (#713)
  • Loading branch information
vicrep committed Jul 14, 2021
1 parent 605c1ab commit a316dd02f5a7d8dee33d99370afda8738985bc10
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/updaters/types/json.js
@@ -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)
}

0 comments on commit a316dd0

Please sign in to comment.