topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
2.07k stars 141 forks source link

feat: allow version specification for deno #970

Closed sehnryr closed 3 weeks ago

sehnryr commented 4 weeks ago

What does this PR do

Add config field for specifying deno version.

Standards checklist

For new steps

If you developed a feature or a bug fix for someone else and you do not have the means to test it, please tag this person here.

SteveLauC commented 4 weeks ago

Add config field for specifying deno version.

What was the previous behavior?

sehnryr commented 4 weeks ago

Add config field for specifying deno version.

What was the previous behavior?

deno upgrades to "stable" channel by default and overwrites any other version.

SteveLauC commented 4 weeks ago

and overwrites any other version.

Say I have all the 3 channels installed, deno upgrade will upgrade the "stable" channel to remove all the other installations? Or can I have 3 channels installed? (Rust allows you to do so, I am not sure about the case of Deno)

Stupid question, if I already have "1.45.0" installed, what will deno upgrade 1.45 do?

sehnryr commented 4 weeks ago

Say I have all the 3 channels installed, deno upgrade will upgrade the "stable" channel to remove all the other installations? Or can I have 3 channels installed? (Rust allows you to do so, I am not sure about the case of Deno)

Stupid question, if I already have "1.45.0" installed, what will deno upgrade 1.45 do?

I don't think you can install multiple versions of Deno :thinking:.

deno upgrade 1.45 won't work as it only recognize semver:

error: Invalid version passed (1.45)

Pass a semver, or a full 40 character git commit hash, or a release channel name.

Usage:
Latest
  deno upgrade

Specific version
  deno upgrade 1.45.0
  deno upgrade 1.46.0-rc.1
  deno upgrade 9bc2dd29ad6ba334fd57a20114e367d3c04763d4

Channel
  deno upgrade stable
  deno upgrade rc
  deno upgrade canary

And if we try upgrading to the same version, deno will recognize it and not replace it.

sehnryr commented 4 weeks ago

I just found out there's an issue with deno's v1 upgrade arguments as they don't match with v2: