Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(updater): npm7 package lock's inner version not being updated #713

Merged
merged 4 commits into from Jul 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/updaters/types/json.js
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