diff --git a/lib/updaters/types/json.js b/lib/updaters/types/json.js index 4494aab76..fdc2a8907 100644 --- a/lib/updaters/types/json.js +++ b/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) }