upgrade_dependency
This function should look for the latest version on CDN and download file if the tag are differents. Moreover, it is better to keep a copy of old deps in a backup folder. Upgrading rarely works without issues ...
Yes you're right, not an easy task though. Should the dependency back-up be kept outside the inst directory? This could quickly become heavy with files that are not used in the package and should not be installed/downloaded by users.
We could create a temp file and ask the user if if wants to save it: we can put a command in the console to copy and paste
Comparing version is going to be complex: packages follow different rules and we can't check all of them:
- 3.0.0-rc.6 (admin-lte)
- 1.0.0-alpha.7 (tabler)
- 5.0.0-alpha1 (bootstrap)
- 16.0.0-experimental-def3445 (react) (we very unlikely want react but we may imagine other doing like this)
Maybe we reject alpha/beta/rc versions. What do you think @JohnCoene?
Otherwise I suggest to overwrite everything instead of writing an exotic script and ask for confirmation like in devtools or usethis ...
upgrade rename to update to allow downgrade option (possible during development)
Argh. Hard to tell what's best here.