diff --git a/.changeset/red-meals-help.md b/.changeset/red-meals-help.md new file mode 100644 index 0000000000..91d6825869 --- /dev/null +++ b/.changeset/red-meals-help.md @@ -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. diff --git a/packages/cli/src/commands/package-dynamic-plugins/command.ts b/packages/cli/src/commands/package-dynamic-plugins/command.ts index 1298f2c22a..b4132d832c 100644 --- a/packages/cli/src/commands/package-dynamic-plugins/command.ts +++ b/packages/cli/src/commands/package-dynamic-plugins/command.ts @@ -41,9 +41,7 @@ export async function command(opts: OptionValues): Promise { 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()