@zohodesk/codestandard-validator 0.0.6-exp-13 → 0.0.6-exp-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,10 +51,13 @@ function checkIfPluginsAreInstalled() {
|
|
|
51
51
|
packageName,
|
|
52
52
|
version
|
|
53
53
|
} = plugin;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const {
|
|
55
|
+
isPluginPresent,
|
|
56
|
+
pluginPath
|
|
57
|
+
} = checkPluginsPresentInNodemodules(packageName);
|
|
58
|
+
if (isPluginPresent && checkPluginHasProperVersion(packageName, pluginPath, version)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
58
61
|
return `${packageName}@${version}`;
|
|
59
62
|
}).filter(Boolean);
|
|
60
63
|
if (uninstalledPlugins.length > 0) {
|
|
@@ -29,7 +29,7 @@ function installPlugins(pluginsToBeInstalled) {
|
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
31
|
const packageJsonBackup = getPackageJsonContentBeforeInstallingPlugins();
|
|
32
|
-
const installCommand = `npm install --
|
|
32
|
+
const installCommand = `npm install --save-dev ${pluginsToBeInstalled.join(' ')}`;
|
|
33
33
|
Logger.log(Logger.INFO_TYPE, 'Installing plugins...');
|
|
34
34
|
Logger.log(Logger.INFO_TYPE, `Install command being executed: ${installCommand}`);
|
|
35
35
|
const installed = executeSynchronizedCommands(execSync, [installCommand, {
|