diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-05 16:14:55 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-05 16:14:55 +0000 |
commit | 941f9157f5561868c4683d54fdf98378383f64b8 (patch) | |
tree | af99da0ce03a70f2bef5b3879008643c5dec5ecf | |
parent | 737e7a7b751f300de3a55a79ce530ea6e15fb64d (diff) | |
parent | 8ff69055b93b25a9e9340b51f171cc07c116c88d (diff) |
Merge #7573
7573: Do not overwrite lock file r=kjeremy a=kjeremy
Use `npm ci` instead of `npm install`. `npm install` will overwrite
the lock file if you have a newer npm version than the one that
generated the package-lock.json
Co-authored-by: kjeremy <[email protected]>
-rw-r--r-- | docs/dev/debugging.md | 2 | ||||
-rw-r--r-- | xtask/src/install.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md index cc7a790ff..5876e71bc 100644 --- a/docs/dev/debugging.md +++ b/docs/dev/debugging.md | |||
@@ -10,7 +10,7 @@ | |||
10 | - Install all TypeScript dependencies | 10 | - Install all TypeScript dependencies |
11 | ```bash | 11 | ```bash |
12 | cd editors/code | 12 | cd editors/code |
13 | npm install | 13 | npm ci |
14 | ``` | 14 | ``` |
15 | 15 | ||
16 | ## Common knowledge | 16 | ## Common knowledge |
diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 81b9956b8..3b79cca0d 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs | |||
@@ -129,7 +129,7 @@ fn install_client(client_opt: ClientOpt) -> Result<()> { | |||
129 | 129 | ||
130 | let installed_extensions = if cfg!(unix) { | 130 | let installed_extensions = if cfg!(unix) { |
131 | cmd!("npm --version").run().context("`npm` is required to build the VS Code plugin")?; | 131 | cmd!("npm --version").run().context("`npm` is required to build the VS Code plugin")?; |
132 | cmd!("npm install").run()?; | 132 | cmd!("npm ci").run()?; |
133 | 133 | ||
134 | cmd!("npm run package --scripts-prepend-node-path").run()?; | 134 | cmd!("npm run package --scripts-prepend-node-path").run()?; |
135 | 135 | ||
@@ -140,7 +140,7 @@ fn install_client(client_opt: ClientOpt) -> Result<()> { | |||
140 | cmd!("cmd.exe /c npm --version") | 140 | cmd!("cmd.exe /c npm --version") |
141 | .run() | 141 | .run() |
142 | .context("`npm` is required to build the VS Code plugin")?; | 142 | .context("`npm` is required to build the VS Code plugin")?; |
143 | cmd!("cmd.exe /c npm install").run()?; | 143 | cmd!("cmd.exe /c npm ci").run()?; |
144 | 144 | ||
145 | cmd!("cmd.exe /c npm run package").run()?; | 145 | cmd!("cmd.exe /c npm run package").run()?; |
146 | 146 | ||