File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -94,25 +94,27 @@ def npm_builder(
94
94
if isinstance (npm , str ):
95
95
npm = [npm ]
96
96
97
+ is_yarn = (abs_path / "yarn.lock" ).exists ()
98
+
97
99
# Find a suitable default for the npm command.
98
100
if npm is None :
99
- is_yarn = (abs_path / "yarn.lock" ).exists ()
100
101
if is_yarn and not which ("yarn" ):
101
102
log .warning ("yarn not found, ignoring yarn.lock file" )
102
103
is_yarn = False
103
-
104
104
npm = ["yarn" ] if is_yarn else ["npm" ]
105
105
106
106
npm_cmd = normalize_cmd (npm )
107
107
108
+ install_cmd = ["install" , "--immutable" ] if is_yarn else ["install" , "--no-audit" , "--no-fund" ]
109
+
108
110
if build_dir and source_dir and not force :
109
111
should_build = is_stale (build_dir , source_dir )
110
112
else :
111
113
should_build = True
112
114
113
115
if should_build :
114
116
log .info ("Installing build dependencies with npm. This may take a while..." )
115
- run ([* npm_cmd , "install" ], cwd = str (abs_path ))
117
+ run ([* npm_cmd , * install_cmd ], cwd = str (abs_path ))
116
118
if build_cmd :
117
119
run ([* npm_cmd , "run" , build_cmd ], cwd = str (abs_path ))
118
120
else :
You can’t perform that action at this time.
0 commit comments