diff --git a/lib/updateDeps.js b/lib/updateDeps.js index ba50c02..1daecc7 100644 --- a/lib/updateDeps.js +++ b/lib/updateDeps.js @@ -1,6 +1,7 @@ const { writeFileSync } = require("fs"); const recognizeFormat = require("./recognizeFormat"); const semver = require("semver"); +const getManifest = require("./getManifest"); /** * Resolve next package version. @@ -136,10 +137,13 @@ const resolveNextVersion = (currentVersion, nextVersion, strategy = "override") * @returns {undefined} * @internal */ -const updateManifestDeps = (pkg, strategy) => { +const updateManifestDeps = (pkg) => { const { manifest, path } = pkg; const { indent, trailingWhitespace } = recognizeFormat(manifest.__contents__); + // NOTE npm plugin updates pkg version, so we have to sync. + manifest.version = getManifest(path).version; + // Loop through localDeps to verify release consistency. pkg._localDeps.forEach((d) => { // Get version of dependency.