-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: implement downloader #2
Conversation
does the node version used in the minimum supported vscode version support global fetch? if so we could use it and avoid adding an additional dependency, or use undici's fetch which node uses under the hood, or i might be wrong altogether as i havent ever worked on vscode extensions |
I believe Node's fetch API was released with Node 18. The version of Node used by the minimum supported version is Node 16. That being said, in reading your comment I realize that I haven't confirmed that it works with 1.80 either, so I'll do that. |
As expected, it did not work. I was able to polyfill fetch with ofetch, so we'll keep the dependency anyway for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks good to me, and I think it's an excellent feature! I left some suggestions
I ended up adding the command for clearing the versions cache if only to be used by us while developing the extension. |
This PR implements a downloader that prompts users to download the Biome CLI if none is found. It is meant to replace the current strategy of bundling the CLI with the extension with every release.
Screen.Recording.2023-11-03.at.19.00.54.mov
Testing
pnpm install
F5
biome.json
file insidebiome.json
fileFair warning
The code is admittedly a bit spaghetti, but I think it will do fine for now. We'll have to overhaul the majority of the logic if we want to support testing and more features in the future.