Skip to content

Commit

Permalink
fix: apply deps update before npm's plugin prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Nov 23, 2020
1 parent 9bfaa62 commit 11b7951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lib/createInlinePluginCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,25 +182,25 @@ function createInlinePluginCreator(packages, multiContext, synchronizer, flags)
getLucky("_readyForTagging", pkg);
await waitFor("_readyForTagging", pkg);

const res = await plugins.prepare(context);
pkg._prepared = true;

updateManifestDeps(pkg);
pkg._depsUpdated = true;

const res = await plugins.prepare(context);
pkg._prepared = true;

debug("prepared: %s", pkg.name);

return res;
};

const publish = async (pluginOptions, context) => {
next();

const res = await plugins.publish(context);
pkg._published = true;

debug("published: %s", pkg.name);

next();

// istanbul ignore next
return res.length ? res[0] : {};
};
Expand Down
4 changes: 0 additions & 4 deletions lib/updateDeps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { writeFileSync } = require("fs");
const recognizeFormat = require("./recognizeFormat");
const semver = require("semver");
const getManifest = require("./getManifest");

/**
* Resolve next package version.
Expand Down Expand Up @@ -152,9 +151,6 @@ 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 11b7951

Please sign in to comment.