Skip to content

Consider parallel downloads for mpak update (no args) #55

@mgoldsborough

Description

@mgoldsborough

Context

From QA review of issue-37-cli-add-bundle-update-awareness branch.

Problem

In packages/cli/src/commands/packages/update.ts, outdated bundles are updated sequentially in a for...of loop. Since each download is independent, Promise.allSettled would be faster for users with multiple outdated bundles.

The current sequential approach is correct and handles partial failure gracefully. This is a performance improvement, not a bug.

Suggested Fix

const results = await Promise.allSettled(
  outdated.map(async (entry) => {
    const downloadInfo = await resolveBundle(entry.name, client);
    const { version } = await downloadAndExtract(entry.name, downloadInfo);
    return { name: entry.name, from: entry.current, to: version };
  })
);

Severity

Suggestion — non-blocking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions