Skip to content

Updating Node.js package dependencies

Joe Cheng edited this page Feb 22, 2018 · 1 revision

Follow these instructions to upgrade Node.js package dependencies.

  1. Make sure you can build from source.
  2. Show the list of outdated dependencies using bin/npm outdated.
  3. For each outdated dependency, run bin/npm install --save [packagename]@*. For example, if the package is express, you'd do bin/npm install --save express@*. A couple of exceptions:
    1. unixgroups should never be upgraded; the fork we build is newer than the abandoned npm project.
    2. log4js must be installed with --no-optional (bin/npm install --save --no-optional log4js@*). Not only does this save us from installing tons and tons of packages we don't need, but one of the sub-sub-sub-packages uses a possibly non-GPL compatible license.
  4. Run tests with node_modules/.bin/mocha test.
  5. Ensure preflight (tools/preflight.sh) passes.
  6. Perform manual testing on Shiny Server to ensure you haven't broken anything.
  7. Commit!