Files
test-repo/scripts/release/steps/install-dependencies.js
T
fisker CheungandSosuke Suzuki 916693c066 Update release script (#9418)
* Update release dependencies

* Remove `version` field

* Run install before any require

* Update scripts/release/utils.js

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>

* Fix update schedule

* Update deps

* Fix

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-04-21 17:15:12 +03:00

21 lines
503 B
JavaScript

"use strict";
const execa = require("execa");
const { runYarn, runGit, logPromise } = require("../utils");
async function install() {
await execa("rm", ["-rf", "node_modules"]);
await runYarn(["install"]);
const { stdout: status } = await runGit(["ls-files", "-m"]);
if (status) {
throw new Error(
"The lockfile needs to be updated, commit it before making the release."
);
}
}
module.exports = function () {
return logPromise("Installing NPM dependencies", install());
};