Skip to content

Commit

Permalink
fix(cli): support single packages better (#2597)
Browse files Browse the repository at this point in the history
This change fixes an issue in the `package-dynamic-plugins` command that
prevents it from running properly in a single plugin project which does
not have workspaces.

Signed-off-by: Stan Lewis <[email protected]>
  • Loading branch information
gashcrumb authored Dec 9, 2024
1 parent b10490c commit 2d73fa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-meals-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@janus-idp/cli": patch
---

fix(cli): support single packages better. This change fixes an issue in the `package-dynamic-plugins` command that prevents it from running properly in a single plugin project that does not have workspaces.
4 changes: 1 addition & 3 deletions packages/cli/src/commands/package-dynamic-plugins/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export async function command(opts: OptionValues): Promise<void> {
workspacePackageRole !== undefined
? PackageRoles.getRoleInfo(workspacePackageRole)
: undefined;
const isMonoRepo =
typeof (workspacePackage.workspaces as PackageJson.WorkspaceConfig)
.packages !== 'undefined';
const isMonoRepo = typeof workspacePackage.workspaces !== 'undefined';
// Find all plugin packages in the workspace
const packages = isMonoRepo
? await discoverPluginPackages()
Expand Down

0 comments on commit 2d73fa1

Please sign in to comment.