Skip to content

Commit

Permalink
ci: Commit package-lock.json 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 Feb 10, 2022
1 parent 1b12910 commit 746d253
Show file tree
Hide file tree
Showing 5 changed files with 18,745 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_update_issues.yaml
Expand Up @@ -24,5 +24,5 @@ jobs:
- name: Test
run: |
cd .github/workflows/tools/update-issues
npm install
npm ci
npm test
2 changes: 1 addition & 1 deletion .github/workflows/update_issues.yaml
Expand Up @@ -22,5 +22,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd .github/workflows/tools/update-issues
npm install
npm ci
node main.js
1 change: 0 additions & 1 deletion .gitignore
@@ -1,7 +1,6 @@
*.pyc
*~
node_modules
package-lock.json
dist/
docs/api/
coverage/
Expand Down
6 changes: 3 additions & 3 deletions build/shakaBuildHelpers.py
Expand Up @@ -350,9 +350,9 @@ def update_node_modules():
# Actually change directories instead of using npm --prefix.
# See npm/npm#17027 and google/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 746d253

Please sign in to comment.