build: update packages

This commit is contained in:
Jovan Krunić
2021-09-10 10:40:01 +02:00
parent c31540e835
commit c4f5fb80b5
3 changed files with 110 additions and 87 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018, 2019 StApps
* Copyright (C) 2018-2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
@@ -51,7 +51,7 @@ commander
.parse(process.argv);
// make path absolute
const path = resolve(commander.path);
const path = resolve(commander.opts().path);
// check for existing package.json in provided path
if (!existsSync(resolve(path, 'package.json'))) {
@@ -87,14 +87,14 @@ checkLicenses(rules, packageJson);
checkConfigurationFilesAreExtended(path);
suggestOverwrite = suggestOverwrite || checkNeededFiles(rules, path, commander.replace);
suggestOverwrite = suggestOverwrite || checkNeededFiles(rules, path, commander.opts().replace);
const checkedNYCConfiguration = checkNYCConfiguration(rules, packageJson, commander.replace);
const checkedNYCConfiguration = checkNYCConfiguration(rules, packageJson, commander.opts().replace);
packageJsonChanged = packageJsonChanged || checkedNYCConfiguration[0];
suggestOverwrite = suggestOverwrite || checkedNYCConfiguration[1];
packageJsonChanged = packageJsonChanged || checkScripts(rules, packageJson, commander.replace);
packageJsonChanged = packageJsonChanged || checkScripts(rules, packageJson, commander.opts().replace);
checkContributors(path, packageJson);