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

Handle dist tags / no version argument when running the info command #92

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

charliegerard
Copy link
Contributor

@charliegerard charliegerard commented Nov 9, 2023

PR description

At the moment, users can't run the command socket info without specifying a package version. For example, running socket info webtorrent returns the error ✖ Invalid input: Need to specify a full package identifier, like eg: [email protected], event hough our help command indicates it should work.

  Examples
    $ socket info webtorrent
    $ socket info [email protected]

To improve the user experience, I updated the code so that the command can be run without specifying a version or also with dist tags such as latest, beta, etc.

Example: socket info lodash or socket info lodash@latest

Screenshot 2023-11-28 at 2 09 06 PM

@charliegerard charliegerard marked this pull request as ready for review November 9, 2023 18:52
@charliegerard
Copy link
Contributor Author

@mikolalysenko I worked on this before I saw this related issue in Linear. I didn't implement it the way it's discussed in there, I would like to work on making the changes in the API to support version aliases but in the meantime, let me know if this PR is still ok or if you'd rather only work on this once the API changes are done.

@feross
Copy link
Member

feross commented Nov 9, 2023

@charliegerard thank you for focusing on these developer experience issues! ✨

@charliegerard charliegerard marked this pull request as draft November 17, 2023 06:26
@charliegerard
Copy link
Contributor Author

Converting back to draft while I work on updating the API instead

@charliegerard charliegerard force-pushed the cg/infoPackageDefaultVersion branch from 66c287d to 7cd2a4f Compare November 28, 2023 21:30
@charliegerard charliegerard force-pushed the cg/infoPackageDefaultVersion branch from 43794e1 to e04dc92 Compare November 28, 2023 22:03
@charliegerard charliegerard changed the title Fetch package latest version number when running the info command without a version Handle dist tags and no version argument when running the info command Nov 28, 2023
@charliegerard charliegerard changed the title Handle dist tags and no version argument when running the info command Handle dist tags / no version argument when running the info command Nov 28, 2023
@charliegerard charliegerard marked this pull request as ready for review November 28, 2023 22:13
@charliegerard charliegerard requested a review from bmeck November 28, 2023 22:13
@charliegerard charliegerard merged commit d384029 into master Nov 29, 2023
14 checks passed
@charliegerard charliegerard deleted the cg/infoPackageDefaultVersion branch November 29, 2023 18:50
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.

3 participants