#!/usr/bin/env bash
#
# HELPER PURPOSE
#
# Run npm update to ensure npm packages in node_modules are the latest.
#
# Why we pass the flags we do to `npm update`:
#
# --dev - Also update devDependencies
#
# --no-package-lock - Don't write a package-lock.json as
#   we don't use it and it can cause issues with `npm ls`,
#   which is run by subsequent tasks in CI:
#   https://github.com/npm/npm/issues/19393
#
# --no-save - Don't update package.json - as we don't use
#   package-lock.json, we use the checksum of package.json
#   for some CI tasks e.g. naming node_module caches
#

# Set error handling
set -eu -o pipefail

# HELPER COMMANDS

npm update --dev --no-package-lock --no-save
