Skip to content

Commit

Permalink
fix: prevent circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Mar 4, 2022
1 parent 588622e commit d6db763
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/plugin-package/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ class PackagePlugin implements Plugin {
commit: ["git"],
};
public readonly stageAfter = {
// Checking whether the --publishAll flag is necessary needs to know the new version
check: ["version"],
commit: (context: Context): string[] => {
// In lerna mode, we need to update the lockfile after bumping, so we do that in non-lerna mode too.
const lerna = context.hasData("lerna") && !!context.getData("lerna");
Expand Down Expand Up @@ -135,7 +133,8 @@ Alternatively, you can use ${context.cli.colors.blue("lerna")} to manage the mon
context.setData("monorepo", "yarn");

// One last check: make sure there is anything to publish
const publishAll = getEffectivePublishAllFlag(context);
// We cannot use getEffectivePublishAllFlag here without introducing a circular dependency
const publishAll = context.argv.publishAll as boolean;
const updatePackages = await getUpdatePackages(
context,
publishAll,
Expand Down

0 comments on commit d6db763

Please sign in to comment.