feat(pm): support shared install options in add - #2722
jong-kyung wants to merge 12 commits into
Conversation
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.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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.
|
@fengmk2 The Windows CI failure seems related to argument parsing in the PowerShell. Could you take a look? 🙇♂ |
|
@jong-kyung Sure, let me take over |
There was a problem hiding this comment.
💡 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".
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.
Summary
Extend
vp addwith ten options already available tovp 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-onlycould still createnode_modules, and--offlinecould still allow network access.Changes
vp add:--no-optional,--frozen-lockfile,--no-frozen-lockfile,--lockfile-only--prefer-offline,--offline,--force,--no-lockfile--shamefully-hoist,--silentadd --silent, and enable native silent mode where supported.Unsupported options retain the existing warning-and-continue policy.