phoenixframework / esbuild

An installer for esbuild
MIT License
271 stars 38 forks source link

Should `esbuild.install --if-missing` check also if outdated #16

Closed cw789 closed 3 years ago

cw789 commented 3 years ago

Or should I add a --update-only flag?

What do you thing?

josevalim commented 3 years ago

Checking the version is a good idea. Can you please send a PR?

josevalim commented 3 years ago

I had some free time and I will push it. :)

cw789 commented 3 years ago

Ohh, my PR is up. By checking Esbuild.configured_version() we will unexpectedly update for users if the latest_known version within esbuild is updated and no version is configured.

josevalim commented 3 years ago

@cw789 I think that behaviour is the desired one, after all, esbuild is under a lock file too. Otherwise people on the same esbuild version will get different outputs depending if they ran mix esbuild.install in a previous version, no?

cw789 commented 3 years ago

You're right. Got my head around. Thanks for learning.

josevalim commented 3 years ago

Thank you for double checking and once again, sorry for the double effort. :)