lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.01k stars 43 forks source link

NPM install utility displays installed packages in search results #546

Closed RodrigoTomeES closed 1 year ago

RodrigoTomeES commented 1 year ago

https://user-images.githubusercontent.com/13077343/224259773-de4fab27-97ca-4ad1-a06a-ca767fca011d.mov

lukehaas commented 1 year ago

There are some cases where someone would want to update or install a different version of a package they have already added. This behaviour caters for that.

RodrigoTomeES commented 1 year ago

Mmmm but you can't select witch version want to install (or I didnt see how can i do it) so I think the text button should be "update" if there is an update and not install and only should be "update" if there is avalible an update. If there isn't an update I think they should show "intalled" or some thing like that.

lukehaas commented 1 year ago

You can specify the version to install in the same way you would via the cli, for example react@17.0.0

RodrigoTomeES commented 1 year ago

WoW interesting thanks!

btecu commented 1 year ago

It would be good to at least document this option (package@version), although having the UI display other versions when clicking on the package or in a dropdown would be even better.

lukehaas commented 1 year ago

@btecu this is documented here: https://runjs.app/docs#tools

lukehaas commented 1 year ago

The latest release of RunJS has some updates for this. Now, when you search for a package that you already have installed, the result will should you what version you have installed: Screenshot 2023-04-19 at 11 13 59