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

fix: cleanup star/unstar #4868

Merged
merged 1 commit into from May 9, 2022
Merged

fix: cleanup star/unstar #4868

merged 1 commit into from May 9, 2022

Commits on May 7, 2022

  1. fix: cleanup star/unstar

    It was querying whoami once for every package you starred/unstarred, and
    incorrectly trying to determine if you weren't logged in.  In fact the
    function throws a descriptive message if you're not logged in already.
    The whoami check was also racing with the fetch of the packument for
    each package you were starring/unstarring meaning you could also get a
    random 401 for a private package instead of the 'you need to log in'
    message.
    
    unstar was setting an undocumented config item to get the
    shared code to unstar.  The command already has a name attribute that
    tells us what action we are doing so we can just use that.
    
    Finally, the duplicated (and differing) params between the two commands
    were consolidated.
    wraithgar committed May 7, 2022
    Copy the full SHA
    a97bf8f View commit details
    Browse the repository at this point in the history