Skip to content
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

[rush] rush add should not require the -p flag to specify packages #3585

Open
chrispaterson opened this issue Aug 12, 2022 · 1 comment
Open
Projects

Comments

@chrispaterson
Copy link

Summary

  1. Every package manager that exists (except for rush) adds a package without a special flag for the package name. What else would you be adding if not a package? Why is this necessary?
  2. Can we sort the dependencies once they are added, instead of just dropping them to the bottom of the list?
@D4N14L
Copy link
Member

D4N14L commented Aug 15, 2022

For 1, the main reason for this would be that the command-line parser we use (@rushstack/ts-command-line) doesn't support for more than one non-flag parameter, where add is the non-flag parameter here. In theory, the remainder property of the parsed command-line could be used for this, we'd just need to parse it properly. If you want to create a PR for such a feature, we'd happily take a look!

For 2, we had similar requests regarding this in the past. Here's the discussion regarding it: #2115 which was closed in favor #2496 ... TL;DR: it's something we've considered adding in the past, it just hasn't been done yet. However, there are also other solutions that already exist such as using Prettier with Prettier plugins. On that note:

Given that there's an existing issue tracking the package.json sorting, I'm going to rename this issue to focus on the rush add bit.

@D4N14L D4N14L changed the title [rush] rush add -> adding the -p flag is weird, and why are they not sorted? [rush] rush add should not require the -p flag to specify packages Aug 15, 2022
@D4N14L D4N14L added this to Low priority in Bug Triage Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Low priority
Bug Triage
  
Low priority
Development

No branches or pull requests

2 participants