Using the upgrade command
We started this chapter by learning how to install Deno, and we installed a single version of the runtime. But Deno is constantly shipping bug fixes and improvements – even more so in these early versions.
When there are new updates, we can use the same package manager we used to install Deno to upgrade it. However, the Deno CLI provides a command it can use to upgrade itself. The command is called upgrade
and can be used together with the --version
flag to select the version we're upgrading to:
$ deno upgrade --version=1.7.4
If no version is provided, it defaults to the latest version. To install the newer version in another location, instead of replacing the current installation, you can use the --output
flag, like so:
$ deno upgrade --output $HOME/my_deno
And that's it – upgrade
is one more utility that follows the Deno philosophy of providing all we need to write and maintain applications, and part of that cycle...