Skip to content

Commit 7848d56

Browse files
authored
dev/ci: use npm ci instead of npm install (#228)
Closes #226
1 parent 9198f62 commit 7848d56

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ jobs:
6464
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
6565
restore-keys: ${{ runner.os }}-node-
6666

67-
- name: Install node modules
68-
run: npm install
67+
- name: Install node packages
68+
run: npm ci
6969

7070
- name: Run Tests
7171
run: ${{ matrix.cmd }}

doc/02-developer-guide.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ After checking out this project from GitHub,
6767
1. Install JavaScript libraries and tools required by https://github.com/bensu/doo[doo] and https://github.com/thheller/shadow-cljs[shadow-cljs]:
6868
+
6969
----
70-
npm install
70+
npm ci
7171
----
7272

7373
2. If you are on macOS or linux, https://github.com/planck-repl/planck#installing[install planck].
@@ -291,7 +291,14 @@ This task uses:
291291

292292
* https://github.com/liquidz/antq[antq] for Clojure.
293293
* npm for JavaScript.
294-
It only checks against installed `./node_modules`, so you may want to run `npm install` first.
294+
It only checks against installed `./node_modules`, so you may want to run `npm ci` first.
295+
296+
To bump JavaScript npm packages:
297+
298+
. make appropriate changes to `package.json`
299+
. delete the `./node_modules` directory and `./package-lock.json`
300+
. run `npm install`
301+
. after you are happy the updates work, commit both `package.json` and `package-lock.json`
295302

296303
[#linting]
297304
== Linting

script/outdated.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(status/line :head "Checking Node.js deps")
1616
(when (not (.exists (io/file "node_modules")))
1717
(status/line :detail "node_modules, not found, installing.")
18-
(shell/command "npm install"))
18+
(shell/command "npm ci"))
1919

2020
(let [{:keys [:exit]} (shell/command {:continue true}
2121
"npm outdated")]

0 commit comments

Comments
 (0)