@bigbinary/neeto-audit-frontend 2.0.1 → 2.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-audit-frontend",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Audits neeto frontend codebase for issues and suggests a fix.",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -15,26 +15,26 @@
15
15
  "author": "Thejus Paul <thejuspaul@protonmail.ch>",
16
16
  "license": "UNLICENSED",
17
17
  "devDependencies": {
18
- "@rollup/plugin-commonjs": "25.0.3",
19
- "@rollup/plugin-json": "6.0.0",
20
- "@rollup/plugin-node-resolve": "15.1.0",
21
- "rollup": "3.26.3",
18
+ "@rollup/plugin-commonjs": "25.0.7",
19
+ "@rollup/plugin-json": "6.0.1",
20
+ "@rollup/plugin-node-resolve": "15.2.3",
21
+ "rollup": "4.1.4",
22
22
  "rollup-plugin-analyzer": "4.0.0",
23
23
  "rollup-plugin-cleaner": "1.0.0",
24
24
  "rollup-plugin-executable-script": "1.0.1",
25
25
  "rollup-plugin-peer-deps-external": "2.2.4"
26
26
  },
27
27
  "dependencies": {
28
- "@bigbinary/neeto-commons-frontend": "2.0.101",
28
+ "@bigbinary/neeto-commons-frontend": "2.1.18",
29
29
  "chalk": "5.3.0",
30
- "commander": "11.0.0",
31
- "ora": "6.3.1",
32
- "ramda": "0.29.0",
33
- "simple-git": "3.19.1"
30
+ "commander": "11.1.0",
31
+ "ora": "7.0.1",
32
+ "ramda": "0.29.1",
33
+ "simple-git": "3.20.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@bigbinary/neeto-commons-frontend": "^2.0.101",
37
- "ramda": "^0.29.0"
36
+ "@bigbinary/neeto-commons-frontend": "^2.1.18",
37
+ "ramda": "^0.29.1"
38
38
  },
39
39
  "packageManager": "pnpm@8.6.9",
40
40
  "engines": {
@@ -12,6 +12,7 @@ export const NANO_TYPE_MAP = {
12
12
  nano: "nano",
13
13
  frontend: "frontend",
14
14
  extension: "extension",
15
+ widget: "widget",
15
16
  editor: "frontend",
16
17
  molecules: "frontend",
17
18
  };
@@ -18,7 +18,11 @@ const currentNodeVersion = async (debug) => {
18
18
  });
19
19
 
20
20
  if (!nodeVersionFileContent) {
21
- return { error: "No file or content found in the .nvmrc file.", fix };
21
+ return {
22
+ error: "No file or content found in the .nvmrc file.",
23
+ status: STATUSES.FAIL,
24
+ fix,
25
+ };
22
26
  }
23
27
 
24
28
  const [major = 0, minor = 0, patch = 0] = getSemVer(nodeVersionFileContent);
@@ -2,4 +2,4 @@ import path from "path";
2
2
 
3
3
  export const ESLINT_DESTINATION_DIRECTORY = path.resolve("./");
4
4
 
5
- export const NANOS_TO_OVERRIDE = ["nano", "extension"];
5
+ export const NANOS_TO_OVERRIDE = ["nano", "extension", "widget"];
@@ -1,3 +1,5 @@
1
1
  import path from "path";
2
2
 
3
3
  export const PRETTIER_DESTINATION_PATH = path.resolve("./");
4
+
5
+ export const NANOS_TO_OVERRIDE = ["extension", "widget"];
@@ -6,7 +6,7 @@ import {
6
6
  getNanoType,
7
7
  identicalDirectoryFiles,
8
8
  } from "../../utils";
9
- import { PRETTIER_DESTINATION_PATH } from "./constants";
9
+ import { PRETTIER_DESTINATION_PATH, NANOS_TO_OVERRIDE } from "./constants";
10
10
  import { STATUSES } from "../../constants";
11
11
 
12
12
  const prettier = async (debug) => {
@@ -18,7 +18,9 @@ const prettier = async (debug) => {
18
18
  return { isSuccess: true, status: STATUSES.SKIPPED };
19
19
  }
20
20
 
21
- const prettierCommonSource = type === "extension" ? type : "common";
21
+ const prettierCommonSource = NANOS_TO_OVERRIDE.includes(type)
22
+ ? type
23
+ : "common";
22
24
 
23
25
  const prettierSourceDirectory = path.resolve(
24
26
  `./node_modules/@bigbinary/neeto-audit-frontend/common/prettier/${prettierCommonSource}`
@@ -2,7 +2,7 @@ import { existsBy, isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
2
2
  import { mergeDeepRight, objOf } from "ramda";
3
3
 
4
4
  import recommendedDependencies from "../../../common/recommendedDependencies";
5
- import { PACKAGE_JSON_PATH, STATUSES } from "../../constants";
5
+ import { NANO_TYPE_MAP, PACKAGE_JSON_PATH, STATUSES } from "../../constants";
6
6
  import {
7
7
  createOrReplaceFile,
8
8
  execute,
@@ -20,6 +20,10 @@ const recommendedPackageVersions = async (debug) => {
20
20
 
21
21
  const { type } = await getNanoType();
22
22
 
23
+ if (type === NANO_TYPE_MAP.widget) {
24
+ return { isSuccess: true, status: STATUSES.SKIPPED };
25
+ }
26
+
23
27
  const recommendedVersions = mergeDeepRight(
24
28
  recommendedDependencies["common"],
25
29
  recommendedDependencies[type]