Skip to content

feat(pm): support shared install options in add - #2722

Open
jong-kyung wants to merge 12 commits into
voidzero-dev:mainfrom
jong-kyung:fix/install-package-options
Open

jong-kyung wants to merge 12 commits into
voidzero-dev:mainfrom
jong-kyung:fix/install-package-options

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extend vp add with ten options already available to vp install, using native equivalents where each package manager supports them.

This also fixes vp install <packages> silently dropping shared options when routing to add. For example, --lockfile-only could still create node_modules, and --offline could still allow network access.

Changes

  • Expose shared options on vp add:
    • --no-optional, --frozen-lockfile, --no-frozen-lockfile, --lockfile-only
    • --prefer-offline, --offline, --force, --no-lockfile
    • --shamefully-hoist, --silent
  • Preserve these options when converting positional installs to add.
  • Warn and drop install-only options when adding packages, and add-only options when installing without package names.
  • Suppress Vite+ diagnostics and cached update notices with add --silent, and enable native silent mode where supported.

Unsupported options retain the existing warning-and-continue policy.

Preserve common options when install with package names resolves to add,
and map them to each package manager's supported flags. Diagnose options
that do not apply to the selected install/add mode before conversion.

Retain Yarn Classic's native frozen-lockfile behavior and warn for
unsupported options without changing the warning-and-continue policy.
Cover option forwarding and command modes with resolver tests and CLI
snapshots.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@jong-kyung jong-kyung self-assigned this Sep 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T08:19:24.931043Z 9ba2c96 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f1d004f3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_pm_cli/src/resolution/commands/add.rs Outdated
Classic add accepts --frozen-lockfile without checking manifest and
lockfile consistency. Reject this combination before execution for both
add and install with package names.

Preserve package-free frozen installs and other package managers. Verify
rejected additions leave the manifest, lockfile, and installed dependency
unchanged, while package-free installs still enforce the frozen lockfile.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8933963ac5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_pm_cli/src/resolution/commands/add.rs Outdated
Use the shared unsupported-option policy for all Yarn add versions instead
of rejecting frozen additions only on Classic. Warn, drop the option, and
continue with the add command.

Preserve frozen-lockfile enforcement for package-free installs and Bun add.
Cover both add entrypoints and package-free frozen installs in snapshots.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6ed532df0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_pm_cli/src/resolution/commands/add.rs Outdated
Include add's silent flag in the shared quiet-mode and diagnostics checks
so Vite+ suppresses compatibility warnings and cached upgrade notices.

Cover silent and normal add classification, and verify a silent add leaves
the pending upgrade notice available for the next interactive command.
Use project npm configuration for the offline probe and isolate Berry's
cache. Give the updated local dependency a distinct manifest size so
Yarn Classic does not skip copying files with identical size and mtime.

Refresh the add help and affected snapshots. Leave cross-platform Yarn
hash normalization for a separate change.
Restore the npm offline probe and Berry cache settings, retaining only the help snapshot update and the Classic file-copy fixture correction. Regenerate snapshots without changing redaction.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 287616f1bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Mask file locator hashes and checksums in Yarn immutable lockfile diffs while preserving package versions and diagnostics. Add redaction coverage and regenerate the affected snapshots.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 16a0cba033

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Disable the global cache for yarn_berry_lockfile_only so its fetch summary does not depend on packages cached by other cases on Windows.
@jong-kyung
jong-kyung marked this pull request as ready for review September 16, 2026 08:12
@jong-kyung
jong-kyung requested a review from fengmk2 September 16, 2026 08:13
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@fengmk2 The Windows CI failure seems related to argument parsing in the PowerShell. Could you take a look? 🙇‍♂

@fengmk2

fengmk2 commented Sep 16, 2026

Copy link
Copy Markdown
Member

@jong-kyung Sure, let me take over

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ba2c96b3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_pm_cli/src/resolution/commands/add.rs
Explain that silent mode suppresses Vite+ output and enables native silent mode where supported. Refresh the global and local help snapshots without changing runtime behavior.
@jong-kyung jong-kyung changed the title fix(pm): preserve install options when adding packages feat(pm): support shared install options in add Sep 17, 2026
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.

2 participants