feat(pm): add 'add' as subcommand alias for install#2823
Open
Totoro-jam wants to merge 3 commits intoutooland:nextfrom
Open
feat(pm): add 'add' as subcommand alias for install#2823Totoro-jam wants to merge 3 commits intoutooland:nextfrom
Totoro-jam wants to merge 3 commits intoutooland:nextfrom
Conversation
ff0e4fd to
4c8f702
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces 'add' as an alias for the 'install' command. The changes include updating command constants, CLI subcommand definitions, and adding comprehensive unit and E2E tests for both PowerShell and Bash environments. A minor inconsistency was identified in a Bash E2E test log message where the package name mentioned in the output did not match the package being installed.
1db42f9 to
40021c9
Compare
elrrrrrrr
reviewed
Apr 25, 2026
e0b8f30 to
ea00d68
Compare
- Add 'add' as an alias for the install subcommand (Issue utooland#2608) - Update help text to display all aliases: 'i, add' - Add unit tests for add alias recognition - Add comprehensive E2E tests for both Unix and Windows platforms
Use aliases = ["i", "add"] instead of alias + aliases split pattern. Remove INSTALL_ALIAS constant as suggested by PR review.
Ignore node_modules and package-lock.json in E2E test directories.
d656ca9 to
6bc0c6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2608
Add
addas a subcommand alias forinstall, providing an intuitive alternative for users familiar with npm/pnpm/yarn conventions.Changes:
INSTALL_ALIASESconstant incrates/pm/src/constants.rsfor help text displayaliases = ["add"]to Install command incrates/pm/src/main.rscrates/pm/src/service/config.rsto showi, addaliasese2e/utoo-pm.sh(Unix) ande2e/utoo-pm.ps1(Windows)Usage
# All of these are equivalent: utoo install react utoo i react utoo add react ut add reactTest Plan
cargo test -p utoo-pmpassed./e2e/utoo-pm.shpassed (Unix)utoo install --helpshowsAliases: i, addinstallandialiases continue to work-D,-O,--save-peer,-g, version specs, multiple packages