Skip to content

Commit

Permalink
fix: sync pkg version after running the npm plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Nov 21, 2020
1 parent 9c4ccc8 commit 1d24e45
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/updateDeps.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { writeFileSync } = require("fs");
const recognizeFormat = require("./recognizeFormat");
const semver = require("semver");
const getManifest = require("./getManifest");

/**
* Resolve next package version.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1d24e45

Please sign in to comment.