release-checker
Version:
Check your release before publishing
24 lines (23 loc) • 901 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var git_1 = require("../common/git");
exports.gitUncommitedFilesChecker = {
canRun: function () { return git_1.gitIsInstalled(); },
cliOption: '--uncommited-files',
id: 'git-uncommited-files-checker',
run: function () { return validate(); },
shortCliOption: '-c',
statusToDisplayWhileValidating: 'Checking there are no uncommited files',
whyCannotRun: function () { return "git not found. Run 'npm doctor' for more details"; },
};
function validate() {
var uncommitedFiles = git_1.getUncommitedFiles();
var validationErrorsAndWarnings = [];
uncommitedFiles.forEach(function (filepath) {
validationErrorsAndWarnings.push({
reason: "File '" + filepath + "' is uncommited",
severity: 'error',
});
});
return validationErrorsAndWarnings;
}