Skip to content

Commit

Permalink
build: Use "npm ci" for CI stability (#3938)
Browse files Browse the repository at this point in the history
This is recommended by npm to allow CI to get stable results when
installing dependencies.
  • Loading branch information
joeyparrish committed Apr 21, 2022
1 parent 4c70abf commit 290bd83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/shakaBuildHelpers.py
Expand Up @@ -325,9 +325,9 @@ def update_node_modules():
# Actually change directories instead of using npm --prefix.
# See npm/npm#17027 and shaka-project/shaka-player#776 for more details.
with InDir(base):
# npm update seems to be the wrong thing in npm v5, so use install.
# See google/shaka-player#854 for more details.
execute_get_output(['npm', 'install'])
# npm ci uses package-lock.json to get a stable, reproducible set of
# packages installed.
execute_get_output(['npm', 'ci'])

# Update the timestamp of the file that tracks when we last updated.
open(_node_modules_last_update_path(), 'wb').close()
Expand Down

0 comments on commit 290bd83

Please sign in to comment.