#!/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 - While we now use package-lock.json 
#   in our repos, skip package-lock.json in this instance 
#   as we don't want to accidentally modify the file 
#   for subsequent steps in the workflow, e.g cache keys 
#   and artefact generation.
#
# --no-save - We don't want to modify package.json as we
#   use its checksum 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
