feat(backend): add npm package-manager install options#9109
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for package-manager-specific arguments (npm_args, pnpm_args, bun_args) and adds env as an alias for install_env within the npm backend. The changes include documentation updates, configuration parsing for the new alias, and logic to apply these options during tool installation. A review comment suggests refactoring resolve_install_lockfile_options to use the install_time_option_keys function to avoid duplicating the list of supported argument keys.
Greptile SummaryThis PR adds Confidence Score: 4/5Safe to merge once previously flagged e2e fragilities (--before assertion on modern npm, aube path after .mise.toml overwrite) are resolved. Core Rust implementation is correct and consistent across all four manager branches. Score is capped at 4 due to pre-existing P1 findings in the e2e test (--before assertion breakage on npm >= 11.10.0, aube availability after heredoc overwrite) that remain unaddressed in this revision. e2e/backend/test_npm_package_manager — the npm Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[install_version_] --> B{package_manager_for_install}
B -->|Aube| C[write_aube_npmrc\naube add --global pkg@ver\n+ aube_args]
B -->|Bun| D[bun install pkg@ver --global\n--trust --linker hoisted\n+ install_before_args\n+ bun_args]
B -->|Pnpm| E[pnpm add --global pkg@ver\n--global-dir --global-bin-dir\n+ install_before_args\n+ pnpm_args]
B -->|Npm / other| F[npm install -g pkg@ver\n--prefix\n+ install_before_args\n+ npm_args]
G[resolve_lockfile_options] --> H{iterate install_time_option_keys}
H -->|npm_args / pnpm_args\nbun_args / aube_args| I[include in lockfile BTreeMap]
H -->|other keys| J[excluded]
Reviews (12): Last reviewed commit: "test(npm): pin pnpm setup version" | Re-trigger Greptile |
7294be8 to
6010a94
Compare
6010a94 to
cca2578
Compare
57bc245 to
c3d5581
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
I think this is ok @risu729 but it has merge conflicts |
|
Sorry, I was busy. It should work now. |
Summary
npm_args,pnpm_args,bun_args, andaube_argsauto/aubeflow and applying args inline in each manager branch, matching thepipxbackend styleinstall_env/envalias support from the original version of this PRTests
cargo fmt --checkcargo test --quiet test_resolve_lockfile_options_includes_install_args_onlyNot run locally:
mise run test:e2e e2e/backend/test_npm_package_manager e2e/backend/test_npm_aube- local task discovery reportedno tasks defined in ~/.ghr/github.com/risu729/mise, so I did not run the e2e scripts directly.