Skip to content

Commit 1d24e45

Browse files
committed
fix: sync pkg version after running the npm plugin
1 parent 9c4ccc8 commit 1d24e45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/updateDeps.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { writeFileSync } = require("fs");
22
const recognizeFormat = require("./recognizeFormat");
33
const semver = require("semver");
4+
const getManifest = require("./getManifest");
45

56
/**
67
* Resolve next package version.
@@ -136,10 +137,13 @@ const resolveNextVersion = (currentVersion, nextVersion, strategy = "override")
136137
* @returns {undefined}
137138
* @internal
138139
*/
139-
const updateManifestDeps = (pkg, strategy) => {
140+
const updateManifestDeps = (pkg) => {
140141
const { manifest, path } = pkg;
141142
const { indent, trailingWhitespace } = recognizeFormat(manifest.__contents__);
142143

144+
// NOTE npm plugin updates pkg version, so we have to sync.
145+
manifest.version = getManifest(path).version;
146+
143147
// Loop through localDeps to verify release consistency.
144148
pkg._localDeps.forEach((d) => {
145149
// Get version of dependency.

0 commit comments

Comments
 (0)