This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a3e90b  Switch to npm ci for reliable builds (#135)
7a3e90b is described below

commit 7a3e90b7e26eb54a614a4d2b16d099c46b7ddaaf
Author: kezhenxu94 <[email protected]>
AuthorDate: Tue Sep 6 11:01:32 2022 +0800

    Switch to npm ci for reliable builds (#135)
---
 pkg/deps/npm.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkg/deps/npm.go b/pkg/deps/npm.go
index 129534e..63bc102 100644
--- a/pkg/deps/npm.go
+++ b/pkg/deps/npm.go
@@ -127,9 +127,11 @@ func (resolver *NpmResolver) NeedSkipInstallPkgs() bool {
        }
 }
 
-// InstallPkgs runs command 'npm install' to install node packages
+// InstallPkgs runs command 'npm ci' to install node packages,
+// using `npm ci` instead of `npm install` to ensure the reproducible builds.
+// See 
https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable
 func (resolver *NpmResolver) InstallPkgs() {
-       cmd := exec.Command("npm", "install")
+       cmd := exec.Command("npm", "ci")
        logger.Log.Println(fmt.Sprintf("Run command: %v, please wait", 
cmd.String()))
        cmd.Stdout = os.Stdout
        cmd.Stderr = os.Stderr

Reply via email to