js-code-detector 0.0.47 → 0.0.48

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.
@@ -72,5 +72,5 @@ export declare function getUpstreamDependenceJson(inputUrl: string, token: strin
72
72
  export { isRepoTypeSupported } from "./util/shared/getRepoSupportFlag";
73
73
  export declare function runDiffDetect(compareUrl?: string, token?: string): Promise<{
74
74
  repoType: string;
75
- effectedImportUsage: string[];
75
+ effectedImportUsage: [string, string][];
76
76
  }>;
@@ -30,6 +30,6 @@ export declare class DetectService {
30
30
  projectHandle(): Promise<void>;
31
31
  formatResult(): {
32
32
  repoType: string;
33
- effectedImportUsage: string[];
33
+ effectedImportUsage: [string, string][];
34
34
  };
35
35
  }
@@ -10,7 +10,7 @@ export interface ProjectService {
10
10
  parsedAlias: Record<string, any>;
11
11
  };
12
12
  outputResult: {
13
- effectedImportUsage: string[];
13
+ effectedImportUsage: [string, string][];
14
14
  };
15
15
  run(): void;
16
16
  }
@@ -88,10 +88,9 @@ var UmiProjectService = class {
88
88
  const exportedNames = (0, import_filterEffectedExportMember.default)((0, import_path.join)(absPathPrefix, filePath), absPathPrefix, Number(startLineOfNew), Number(startLineOfNew) + Number(newBranchLineScope));
89
89
  return exportedNames.map((name) => [filePath, name].join("#"));
90
90
  }).flat();
91
- const effectedImportUsage = [...Object.entries(import2export), ...Object.entries(indirectExportMembers)].reduce((acc, [key, value]) => {
92
- effectedExportNames.includes(value) && acc.push(key);
93
- return acc;
94
- }, []);
91
+ const effectedImportUsage = [...Object.entries(import2export), ...Object.entries(indirectExportMembers)].filter(([_, value]) => {
92
+ return effectedExportNames.includes(value);
93
+ });
95
94
  this.outputResult.effectedImportUsage = effectedImportUsage;
96
95
  }
97
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-code-detector",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",