@teambit/component-issues 0.0.153 → 0.0.155

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.
Files changed (55) hide show
  1. package/dist/circular-dependencies.js +19 -12
  2. package/dist/circular-dependencies.js.map +1 -1
  3. package/dist/component-issue.js +68 -55
  4. package/dist/component-issue.js.map +1 -1
  5. package/dist/deprecated-dependencies.js +20 -12
  6. package/dist/deprecated-dependencies.js.map +1 -1
  7. package/dist/duplicate-component-and-package.js +19 -12
  8. package/dist/duplicate-component-and-package.js.map +1 -1
  9. package/dist/external-env-without-version.js +22 -15
  10. package/dist/external-env-without-version.js.map +1 -1
  11. package/dist/import-from-directory.js +18 -11
  12. package/dist/import-from-directory.js.map +1 -1
  13. package/dist/import-non-main-files.js +17 -10
  14. package/dist/import-non-main-files.js.map +1 -1
  15. package/dist/index.js +81 -10
  16. package/dist/index.js.map +1 -1
  17. package/dist/issues-list.js +292 -140
  18. package/dist/issues-list.js.map +1 -1
  19. package/dist/legacy-inside-harmony.js +19 -12
  20. package/dist/legacy-inside-harmony.js.map +1 -1
  21. package/dist/merge-config-has-conflict.js +19 -12
  22. package/dist/merge-config-has-conflict.js.map +1 -1
  23. package/dist/missing-dependencies-on-fs.js +16 -9
  24. package/dist/missing-dependencies-on-fs.js.map +1 -1
  25. package/dist/missing-dists.js +19 -12
  26. package/dist/missing-dists.js.map +1 -1
  27. package/dist/missing-links-from-nm-to-src.js +19 -12
  28. package/dist/missing-links-from-nm-to-src.js.map +1 -1
  29. package/dist/missing-manually-configured-packages.js +19 -12
  30. package/dist/missing-manually-configured-packages.js.map +1 -1
  31. package/dist/missing-packages-dependencies-on-fs.js +19 -14
  32. package/dist/missing-packages-dependencies-on-fs.js.map +1 -1
  33. package/dist/multiple-envs.js +20 -12
  34. package/dist/multiple-envs.js.map +1 -1
  35. package/dist/non-loaded-env.js +19 -12
  36. package/dist/non-loaded-env.js.map +1 -1
  37. package/dist/parse-errors.js +16 -9
  38. package/dist/parse-errors.js.map +1 -1
  39. package/dist/relative-components-authored.js +49 -36
  40. package/dist/relative-components-authored.js.map +1 -1
  41. package/dist/relative-components.js +20 -13
  42. package/dist/relative-components.js.map +1 -1
  43. package/dist/removed-dependencies.js +20 -12
  44. package/dist/removed-dependencies.js.map +1 -1
  45. package/dist/removed-env.js +20 -12
  46. package/dist/removed-env.js.map +1 -1
  47. package/dist/resolve-errors.js +16 -9
  48. package/dist/resolve-errors.js.map +1 -1
  49. package/dist/self-reference.js +17 -10
  50. package/dist/self-reference.js.map +1 -1
  51. package/dist/untracked-dependencies.js +41 -32
  52. package/dist/untracked-dependencies.js.map +1 -1
  53. package/package.json +20 -6
  54. package/types/asset.d.ts +15 -3
  55. package/dist/preview-1736711473672.js +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-errors.js","sourceRoot":"","sources":["../resolve-errors.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAEnD,MAAa,aAAc,SAAQ,gCAAc;IAAjD;;QACE,gBAAW,GAAG,mDAAmD,CAAC;QAClE,aAAQ,GAAG,gCAAgC,CAAC;QAC5C,SAAI,GAAmC,EAAE,CAAC;IAC5C,CAAC;CAAA;AAJD,sCAIC"}
1
+ {"version":3,"names":["_componentIssue","data","require","ResolveErrors","ComponentIssue","description","solution","exports"],"sources":["resolve-errors.ts"],"sourcesContent":["import { ComponentIssue } from './component-issue';\n\nexport class ResolveErrors extends ComponentIssue {\n description = 'error found while resolving the file dependencies';\n solution = 'see the log for the full error';\n data: { [filePath: string]: string } = {};\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,SAASC,gCAAc,CAAC;EAChDC,WAAW,GAAG,mDAAmD;EACjEC,QAAQ,GAAG,gCAAgC;EAC3CL,IAAI,GAAmC,CAAC,CAAC;AAC3C;AAACM,OAAA,CAAAJ,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1,15 +1,22 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.SelfReference = void 0;
4
- const component_issue_1 = require("./component-issue");
5
- class SelfReference extends component_issue_1.ComponentIssue {
6
- constructor() {
7
- super(...arguments);
8
- this.description = 'a component has an import statement that points to itself';
9
- this.solution = 'edit the file and change the import statement to a relative path';
10
- this.data = {};
11
- this.isTagBlocker = true;
12
- }
7
+ function _componentIssue() {
8
+ const data = require("./component-issue");
9
+ _componentIssue = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ class SelfReference extends _componentIssue().ComponentIssue {
15
+ description = 'a component has an import statement that points to itself';
16
+ solution = 'edit the file and change the import statement to a relative path';
17
+ data = {};
18
+ isTagBlocker = true;
13
19
  }
14
20
  exports.SelfReference = SelfReference;
21
+
15
22
  //# sourceMappingURL=self-reference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"self-reference.js","sourceRoot":"","sources":["../self-reference.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAEnD,MAAa,aAAc,SAAQ,gCAAc;IAAjD;;QACE,gBAAW,GAAG,2DAA2D,CAAC;QAC1E,aAAQ,GAAG,kEAAkE,CAAC;QAC9E,SAAI,GAAmC,EAAE,CAAC;QAC1C,iBAAY,GAAG,IAAI,CAAC;IACtB,CAAC;CAAA;AALD,sCAKC"}
1
+ {"version":3,"names":["_componentIssue","data","require","SelfReference","ComponentIssue","description","solution","isTagBlocker","exports"],"sources":["self-reference.ts"],"sourcesContent":["import { ComponentIssue } from './component-issue';\n\nexport class SelfReference extends ComponentIssue {\n description = 'a component has an import statement that points to itself';\n solution = 'edit the file and change the import statement to a relative path';\n data: { [filePath: string]: string } = {};\n isTagBlocker = true;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,SAASC,gCAAc,CAAC;EAChDC,WAAW,GAAG,2DAA2D;EACzEC,QAAQ,GAAG,kEAAkE;EAC7EL,IAAI,GAAmC,CAAC,CAAC;EACzCM,YAAY,GAAG,IAAI;AACrB;AAACC,OAAA,CAAAL,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1,39 +1,48 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
6
  exports.UntrackedDependencies = exports.MISSING_NESTED_DEPS_SPACE = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const component_issue_1 = require("./component-issue");
9
- exports.MISSING_NESTED_DEPS_SPACE = ' '.repeat(component_issue_1.ISSUE_FORMAT_SPACE_COUNT + 2);
10
- class UntrackedDependencies extends component_issue_1.ComponentIssue {
11
- constructor() {
12
- super(...arguments);
13
- this.description = 'untracked file dependencies';
14
- this.solution = 'use "bit add <file>" to track untracked files as components';
15
- this.data = {};
16
- }
17
- dataToString() {
18
- return Object.keys(this.data)
19
- .map((k) => {
20
- let space = component_issue_1.ISSUE_FORMAT_SPACE;
21
- if (this.data[k].nested) {
22
- space = exports.MISSING_NESTED_DEPS_SPACE;
23
- }
24
- return `${space}${k} -> ${untrackedFilesComponentIssueToString(this.data[k])}`;
25
- })
26
- .join('\n');
27
- }
7
+ function _chalk() {
8
+ const data = _interopRequireDefault(require("chalk"));
9
+ _chalk = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _componentIssue() {
15
+ const data = require("./component-issue");
16
+ _componentIssue = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ const MISSING_NESTED_DEPS_SPACE = exports.MISSING_NESTED_DEPS_SPACE = ' '.repeat(_componentIssue().ISSUE_FORMAT_SPACE_COUNT + 2);
23
+ class UntrackedDependencies extends _componentIssue().ComponentIssue {
24
+ description = 'untracked file dependencies';
25
+ solution = 'use "bit add <file>" to track untracked files as components';
26
+ data = {};
27
+ dataToString() {
28
+ return Object.keys(this.data).map(k => {
29
+ let space = _componentIssue().ISSUE_FORMAT_SPACE;
30
+ if (this.data[k].nested) {
31
+ space = MISSING_NESTED_DEPS_SPACE;
32
+ }
33
+ return `${space}${k} -> ${untrackedFilesComponentIssueToString(this.data[k])}`;
34
+ }).join('\n');
35
+ }
28
36
  }
29
37
  exports.UntrackedDependencies = UntrackedDependencies;
30
38
  function untrackedFilesComponentIssueToString(value) {
31
- const colorizedMap = value.untrackedFiles.map((curr) => {
32
- if (curr.existing) {
33
- return `${chalk_1.default.yellow(curr.relativePath)}`;
34
- }
35
- return curr.relativePath;
36
- });
37
- return colorizedMap.join(', ');
39
+ const colorizedMap = value.untrackedFiles.map(curr => {
40
+ if (curr.existing) {
41
+ return `${_chalk().default.yellow(curr.relativePath)}`;
42
+ }
43
+ return curr.relativePath;
44
+ });
45
+ return colorizedMap.join(', ');
38
46
  }
47
+
39
48
  //# sourceMappingURL=untracked-dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"untracked-dependencies.js","sourceRoot":"","sources":["../untracked-dependencies.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAAiG;AAEpF,QAAA,yBAAyB,GAAG,GAAG,CAAC,MAAM,CAAC,0CAAwB,GAAG,CAAC,CAAC,CAAC;AAYlF,MAAa,qBAAsB,SAAQ,gCAAc;IAAzD;;QACE,gBAAW,GAAG,6BAA6B,CAAC;QAC5C,aAAQ,GAAG,6DAA6D,CAAC;QACzE,SAAI,GAAyD,EAAE,CAAC;IAYlE,CAAC;IAXC,YAAY;QACV,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACT,IAAI,KAAK,GAAG,oCAAkB,CAAC;YAC/B,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACxB,KAAK,GAAG,iCAAyB,CAAC;YACpC,CAAC;YACD,OAAO,GAAG,KAAK,GAAG,CAAC,OAAO,oCAAoC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;CACF;AAfD,sDAeC;AAED,SAAS,oCAAoC,CAAC,KAAmC;IAC/E,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACrD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9C,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssue","e","__esModule","default","MISSING_NESTED_DEPS_SPACE","exports","repeat","ISSUE_FORMAT_SPACE_COUNT","UntrackedDependencies","ComponentIssue","description","solution","dataToString","Object","keys","map","k","space","ISSUE_FORMAT_SPACE","nested","untrackedFilesComponentIssueToString","join","value","colorizedMap","untrackedFiles","curr","existing","chalk","yellow","relativePath"],"sources":["untracked-dependencies.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentIssue, ISSUE_FORMAT_SPACE, ISSUE_FORMAT_SPACE_COUNT } from './component-issue';\n\nexport const MISSING_NESTED_DEPS_SPACE = ' '.repeat(ISSUE_FORMAT_SPACE_COUNT + 2);\n\ninterface UntrackedFileEntry {\n relativePath: string;\n existing: boolean;\n}\n\nexport interface UntrackedFileDependencyEntry {\n nested: boolean;\n untrackedFiles: Array<UntrackedFileEntry>;\n}\n\nexport class UntrackedDependencies extends ComponentIssue {\n description = 'untracked file dependencies';\n solution = 'use \"bit add <file>\" to track untracked files as components';\n data: { [filePath: string]: UntrackedFileDependencyEntry } = {};\n dataToString() {\n return Object.keys(this.data)\n .map((k) => {\n let space = ISSUE_FORMAT_SPACE;\n if (this.data[k].nested) {\n space = MISSING_NESTED_DEPS_SPACE;\n }\n return `${space}${k} -> ${untrackedFilesComponentIssueToString(this.data[k])}`;\n })\n .join('\\n');\n }\n}\n\nfunction untrackedFilesComponentIssueToString(value: UntrackedFileDependencyEntry) {\n const colorizedMap = value.untrackedFiles.map((curr) => {\n if (curr.existing) {\n return `${chalk.yellow(curr.relativePath)}`;\n }\n return curr.relativePath;\n });\n return colorizedMap.join(', ');\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiG,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1F,MAAMG,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,GAAG,CAACE,MAAM,CAACC,0CAAwB,GAAG,CAAC,CAAC;AAY1E,MAAMC,qBAAqB,SAASC,gCAAc,CAAC;EACxDC,WAAW,GAAG,6BAA6B;EAC3CC,QAAQ,GAAG,6DAA6D;EACxEd,IAAI,GAAyD,CAAC,CAAC;EAC/De,YAAYA,CAAA,EAAG;IACb,OAAOC,MAAM,CAACC,IAAI,CAAC,IAAI,CAACjB,IAAI,CAAC,CAC1BkB,GAAG,CAAEC,CAAC,IAAK;MACV,IAAIC,KAAK,GAAGC,oCAAkB;MAC9B,IAAI,IAAI,CAACrB,IAAI,CAACmB,CAAC,CAAC,CAACG,MAAM,EAAE;QACvBF,KAAK,GAAGb,yBAAyB;MACnC;MACA,OAAO,GAAGa,KAAK,GAAGD,CAAC,OAAOI,oCAAoC,CAAC,IAAI,CAACvB,IAAI,CAACmB,CAAC,CAAC,CAAC,EAAE;IAChF,CAAC,CAAC,CACDK,IAAI,CAAC,IAAI,CAAC;EACf;AACF;AAAChB,OAAA,CAAAG,qBAAA,GAAAA,qBAAA;AAED,SAASY,oCAAoCA,CAACE,KAAmC,EAAE;EACjF,MAAMC,YAAY,GAAGD,KAAK,CAACE,cAAc,CAACT,GAAG,CAAEU,IAAI,IAAK;IACtD,IAAIA,IAAI,CAACC,QAAQ,EAAE;MACjB,OAAO,GAAGC,gBAAK,CAACC,MAAM,CAACH,IAAI,CAACI,YAAY,CAAC,EAAE;IAC7C;IACA,OAAOJ,IAAI,CAACI,YAAY;EAC1B,CAAC,CAAC;EACF,OAAON,YAAY,CAACF,IAAI,CAAC,IAAI,CAAC;AAChC","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-issues",
3
- "version": "0.0.153",
3
+ "version": "0.0.155",
4
4
  "homepage": "https://bit.cloud/teambit/component/component-issues",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component-issues",
9
- "version": "0.0.153"
9
+ "version": "0.0.155"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -14,11 +14,25 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/mocha": "9.1.0",
17
- "@types/jest": "26.0.20",
18
- "@types/node": "22.10.5"
17
+ "chai": "4.3.0",
18
+ "@teambit/node.envs.node-babel-mocha": "0.1.5"
19
19
  },
20
20
  "peerDependencies": {},
21
- "license": "SEE LICENSE IN UNLICENSED",
21
+ "license": "Apache-2.0",
22
22
  "optionalDependencies": {},
23
- "peerDependenciesMeta": {}
23
+ "peerDependenciesMeta": {},
24
+ "private": false,
25
+ "engines": {
26
+ "node": ">=16.0.0"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/teambit/bit"
31
+ },
32
+ "keywords": [
33
+ "bit",
34
+ "components",
35
+ "collaboration",
36
+ "web"
37
+ ]
24
38
  }
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
29
  }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }
@@ -1,7 +0,0 @@
1
- ;
2
- ;
3
-
4
- export const compositions = [];
5
- export const overview = [];
6
-
7
- export const compositions_metadata = {"compositions":[]};