Note that this section is to update your existing project to newer versions.
Before update your project to new releases, please make a research about version compatibility to disable unintended errors.
There are two files you need to consider to upgrade namely package.json, and src/program/Cargo.toml.
In this file you need to update fields:
testnetDefaultChannel - which should be perfectly matched solona-sdk version in Cargo.toml.
@solana/web3.js - which specifies the version of web3 that the client, an off-chain program, use to communicate with the on-chain program.
other dependencies - which are your options.
After updating the version number, please reinstall those dependencies,
This one directly affects how your programs will be compiled which may lead your previous build to be stale. You may lose controls of your programs. Thus, carefully consider pros and cons before upgrading.
solana-sdk - you change version to your desired number.
other dependencies - similar to package.json, they are yours.
Cargo doesn't require you reinstall whenever you change versions like npm.
If you are running a devnet, you should restart it for all changes to be propagated.