How do you upgrade/update every package on your Mac?

After asking this question many places, I've refined the function to be both more comprehensive and predictable (runs the updates in serial, instead of parallel).

This is the final result in my .zshrc (Updated Sept 2021):

function update () {
  softwareupdate --install --all
  (brew update && brew upgrade && brew cleanup && brew doctor)
  mas upgrade # https://github.com/mas-cli/mas
  npm update -g
  (pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip3 install -U)
  (gem update --system && gem update && gem cleanup) # https://github.com/rbenv/rbenv
  omz update # https://ohmyz.sh/
  (cd ~/.vim_runtime && git pull --rebase) # https://github.com/amix/vimrc
}