Skip to content

Commit

Permalink
fix: don't show workspace selection if there is only one package (#6271)
Browse files Browse the repository at this point in the history
* refactor: refactor typescript types from build-info and related parts

* fix: don't show workspace selection when there is only one package
  • Loading branch information
lukasholzer authored Dec 20, 2023
1 parent 9eb8dc0 commit 5d6bcf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ const getDuration = (startTime: bigint) => {
* If the filter flag does not match a workspace package or is not defined then it will prompt with an autocomplete to select a package
*/
async function selectWorkspace(project: Project, filter?: string): Promise<string> {
// don't show prompt for workspace selection if there is only one package
if (project.workspace?.packages && project.workspace.packages.length === 1) {
return project.workspace.packages[0].path
}

const selected = project.workspace?.packages.find((pkg) => {
if (
project.relativeBaseDirectory &&
Expand Down

2 comments on commit 5d6bcf3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,399
  • Package size: 405 MB
  • Number of ts-expect-error directives: 1,231

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,399
  • Package size: 405 MB
  • Number of ts-expect-error directives: 1,231

Please sign in to comment.