@zohodesk/codestandard-validator 0.0.6-exp-11 → 0.0.6-exp-13

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.
package/build/lib/cli.js CHANGED
@@ -19,13 +19,11 @@ const {
19
19
  Logger
20
20
  } = require("../utils/Logger/Logger");
21
21
  const [,, action, ...options] = process.argv;
22
- const path = require("path");
23
22
  async function run() {
24
23
  switch (action) {
25
24
  case "setup":
26
25
  {
27
- process.chdir(path.resolve(__dirname, '..', '..'));
28
- require("./postinstall");
26
+ await executeMethodsThatReturnBooleanValue("Some issue occurred in setting up husky.", setupHusky, null);
29
27
  break;
30
28
  }
31
29
  case "init":
@@ -36,7 +36,7 @@ async function postInstall() {
36
36
  await executeMethodsThatReturnBooleanValue("Make sure zgit.csez.zohocorpin.com is accessible", cloneViaCdt, null);
37
37
  await executeMethodsThatReturnBooleanValue("Some issue occurred in creating eslint config file.", createEslintConfigFile, null);
38
38
  Logger.log(Logger.SUCCESS_TYPE, "Pre commit setup successfull");
39
- arePluginsInstalled();
39
+ // arePluginsInstalled();
40
40
  } catch (error) {
41
41
  Logger.log(Logger.FAILURE_TYPE, `Kindly retry npm install. & ${error.message}`);
42
42
  }
@@ -51,13 +51,10 @@ function checkIfPluginsAreInstalled() {
51
51
  packageName,
52
52
  version
53
53
  } = plugin;
54
- const {
55
- isPluginPresent,
56
- pluginPath
57
- } = checkPluginsPresentInNodemodules(packageName);
58
- if (isPluginPresent && checkPluginHasProperVersion(packageName, pluginPath, version)) {
59
- return false;
60
- }
54
+ // const { isPluginPresent, pluginPath } = checkPluginsPresentInNodemodules(packageName)
55
+ // if( isPluginPresent && checkPluginHasProperVersion(packageName,pluginPath,version)){
56
+ // return false
57
+ // }
61
58
  return `${packageName}@${version}`;
62
59
  }).filter(Boolean);
63
60
  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 --save-dev ${pluginsToBeInstalled.join(' ')}`;
32
+ const installCommand = `npm install --no-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, {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@zohodesk/codestandard-validator",
3
- "version": "0.0.6-exp-11",
3
+ "version": "0.0.6-exp-13",
4
4
  "description": "library to enforce code standard using eslint",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
+ "postinstall": "node bin/postinstall.js",
8
9
  "build": "babel -d ./build ./src --copy-files"
9
10
  },
10
11
  "author": "",