From 290bd83a2bf7d09cf54c5ccdbf13d05eb3ddf566 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 10 Feb 2022 13:59:46 -0800 Subject: [PATCH] build: Use "npm ci" for CI stability (#3938) This is recommended by npm to allow CI to get stable results when installing dependencies. --- build/shakaBuildHelpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/shakaBuildHelpers.py b/build/shakaBuildHelpers.py index 679f915ad7..63a26bffb5 100644 --- a/build/shakaBuildHelpers.py +++ b/build/shakaBuildHelpers.py @@ -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()