Run the package manager's install to update the lockfile
(rootDir: string)
| 181 | |
| 182 | /** Run the package manager's install to update the lockfile */ |
| 183 | async function updateLockfile(rootDir: string): Promise<void> { |
| 184 | const { packageManager } = await detectWorkspaces(rootDir); |
| 185 | const installArgs = getInstallArgs(packageManager); |
| 186 | |
| 187 | log.step(`Updating lockfile (${installArgs.join(' ')})...`); |
| 188 | try { |
| 189 | runArgs(installArgs, { cwd: rootDir }); |
| 190 | log.dim(' Lockfile updated'); |
| 191 | } catch (err) { |
| 192 | log.warn(` Lockfile update failed: ${err instanceof Error ? err.message : err}`); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | function getInstallArgs(pm: string): string[] { |
| 197 | switch (pm) { |
no test coverage detected
searching dependent graphs…