From 8ff69055b93b25a9e9340b51f171cc07c116c88d Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 5 Feb 2021 10:57:36 -0500 Subject: Do not overwrite lock file 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 --- docs/dev/debugging.md | 2 +- 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 @@ - Install all TypeScript dependencies ```bash cd editors/code - npm install + npm ci ``` ## 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<()> { let installed_extensions = if cfg!(unix) { cmd!("npm --version").run().context("`npm` is required to build the VS Code plugin")?; - cmd!("npm install").run()?; + cmd!("npm ci").run()?; cmd!("npm run package --scripts-prepend-node-path").run()?; @@ -140,7 +140,7 @@ fn install_client(client_opt: ClientOpt) -> Result<()> { cmd!("cmd.exe /c npm --version") .run() .context("`npm` is required to build the VS Code plugin")?; - cmd!("cmd.exe /c npm install").run()?; + cmd!("cmd.exe /c npm ci").run()?; cmd!("cmd.exe /c npm run package").run()?; -- cgit v1.2.3