-
Notifications
You must be signed in to change notification settings - Fork 2
Technical maintenance
The nodejs
ecosystem is constantly evolving. Keeping up with latest versions is a nightmare. Below are some of my notes that I took on the go. They're not thorough, but they contain the basics.
Best advice - don't let too much time pass between updates.
When requesting updates, it took me a while before understanding the difference between ng update
and npm update
:
-
ng update
- Updates to the latest available version -
npm update
- This command will update all the packages listed to the latest version (specified by the tag config), respecting semver.
npm update
will only inspect top-level packages. To recursively inspect all dependencies, use npm --depth 9999 update.
Reference: https://stackoverflow.com/questions/52128687/what-is-the-difference-between-ng-update-and-npm-update
As soon as github
or npm
complain about vulnerabilities:
- Check that you've got the latest
nodejs
version. - Check that you're at the latest angular version.
- Then fix the vulnerability.
To keep your machine updated with nodejs
:
- On mac os:
brew upgrade nodejs
- On windows: Reinstall node from the original distribution: https://nodejs.org/en/download/
- On linux: I don't use linux (I know I should).
Once you're up to date with nodejs
, go to the angular upgrade guide:
And upgrade one major version after the other. Run tests and test the application after each upgrade.
ts-node
is a runtime transpiler so it allow you to import typescript files in runtime when using node.
To update ts-node
:
ng update ts-node