Skip to content

feat: update command add long option #9610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

btea
Copy link
Member

@btea btea commented Jun 6, 2025

close #9576

@btea btea requested a review from zkochan as a code owner June 6, 2025 15:37
@btea btea requested a review from Copilot July 8, 2025 00:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new --long option for the update command to enable detailed output (including URLs) and to fetch full package metadata when listing outdated dependencies.

  • Adds long flag to CLI options and command handlers
  • Propagates long through outdatedDepsOfProjects and getUpdateChoices
  • Updates tests to remove URL column in short mode and documents the change in a changeset

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
reviewing/outdated/src/outdatedDepsOfProjects.ts Map long to the fullMetadata flag for manifest retrieval
pkg-manager/plugin-commands-installation/src/update/index.ts Register --long option and pass opts.long to handler
pkg-manager/plugin-commands-installation/src/update/getUpdateChoices.ts Accept long flag and conditionally include the URL column
pkg-manager/plugin-commands-installation/test/update/interactive.ts Remove URL column header when long is not set
pkg-manager/plugin-commands-installation/test/update/getUpdateChoices.test.ts Remove URL in default test output
.changeset/cold-cows-roll.md Document the addition of the long option
Comments suppressed due to low confidence (2)

pkg-manager/plugin-commands-installation/test/update/getUpdateChoices.test.ts:79

  • Add a test case where long = true to verify that the URL column is correctly included in the output when the --long flag is set.
      {

pkg-manager/plugin-commands-installation/test/update/interactive.ts:61

  • Introduce a scenario invoking the interactive update with --long to assert that the URL column appears in the rendered prompt.
  const storeDir = path.resolve('pnpm-store')

@@ -37,7 +38,7 @@ export async function outdatedDepsOfProjects (
const wantedLockfile = await readWantedLockfile(lockfileDir, { ignoreIncompatible: false }) ?? currentLockfile
const getLatestManifest = createManifestGetter({
...opts,
fullMetadata: opts.fullMetadata === true,
fullMetadata: opts.long === true,
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Currently the code ignores any user-supplied opts.fullMetadata by only using opts.long. You may want to combine both flags, e.g. fullMetadata: opts.fullMetadata === true || opts.long === true, so existing consumers of fullMetadata continue working.

Suggested change
fullMetadata: opts.long === true,
fullMetadata: opts.fullMetadata === true || opts.long === true,

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running pnpm update --interactive has an empty URL column
1 participant