hayd / deno-udd

Update Deno Dependencies - update dependency urls to their latest published versions
MIT License
329 stars 18 forks source link

Disable React next versions #80

Open oscarotero opened 2 years ago

oscarotero commented 2 years ago

Hi. When I run udd to update my dependencies, it always update the react version to the "next" version:

https://esm.sh/react@18.1.0 18.1.0 -> 18.2.0-next-e531a4a62-20220505

I guess this is a bug because I would expect to update always to the latest stable version. The other development versions should be ignored.

imaxe
hayd commented 2 years ago

Thanks! Potentially we should ignore the strings: rc, beta, experimental and next...

above here:

https://github.com/hayd/deno-udd/blob/19adffa05a10cc07058ae7a8b5a9e5ae49323086/mod.ts#L86-L87

I suppose the clever thing to do is if initVersion included one of those (e.g. rc) then we'd pick the latest that's matches that (also has rc) i.e. do something like versions = allowableVersions(initVersion, versions) above this. wdyt?

(Note: the fragment handling below is a little wild... so we'd need to modify versions array.)

oscarotero commented 2 years ago

Yes, it makes sense. An even more clever behavior could be to sort these fragments by "stability". For example, to update from an alpha version to a beta or rc version. But I'm not sure this can work fine for all cases.