Files
test-repo/scripts/release/steps/install-dependencies.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
501 B
JavaScript
Raw Normal View History

import { execa } from "execa";
2021-07-26 09:24:44 +08:00
import { runYarn, runGit, logPromise } from "../utils.js";
2018-06-05 16:37:52 -03:00
async function install() {
2018-06-05 19:10:27 -03:00
await execa("rm", ["-rf", "node_modules"]);
2021-04-21 22:15:12 +08:00
await runYarn(["install"]);
2018-06-05 16:37:52 -03:00
2021-04-21 22:15:12 +08:00
const { stdout: status } = await runGit(["ls-files", "-m"]);
2018-06-05 16:37:52 -03:00
if (status) {
2019-11-17 18:36:21 +08:00
throw new Error(
2018-06-05 16:37:52 -03:00
"The lockfile needs to be updated, commit it before making the release."
);
}
}
export default function installDependencies() {
2018-06-05 16:37:52 -03:00
return logPromise("Installing NPM dependencies", install());
2021-07-26 09:24:44 +08:00
}