Skip to content

Commit 17581c0

Browse files
authored
Rename getV2GlobalNameFromModule to getGlobalNameFromModule (#461)
1 parent c4c3ea7 commit 17581c0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/transforms/v2-to-v3/modules/getV2GlobalNameFromModule.ts renamed to src/transforms/v2-to-v3/modules/getGlobalNameFromModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getImportEqualsDeclaration } from "./getImportEqualsDeclaration";
55
import { getImportSpecifiers } from "./getImportSpecifiers";
66
import { hasRequire } from "./hasRequire";
77

8-
export const getV2GlobalNameFromModule = (
8+
export const getGlobalNameFromModule = (
99
j: JSCodeshift,
1010
source: Collection<unknown>
1111
): string | undefined => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export * from "./addClientModules";
2+
export * from "./getGlobalNameFromModule";
23
export * from "./getImportEqualsDeclaration";
34
export * from "./getImportSpecifiers";
45
export * from "./getRequireDeclaratorsWithProperty";
5-
export * from "./getV2GlobalNameFromModule";
66
export * from "./hasRequire";
77
export * from "./removeClientModule";
88
export * from "./removeGlobalModule";

src/transforms/v2-to-v3/transformer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "./client-names";
1111
import {
1212
addClientModules,
13-
getV2GlobalNameFromModule,
13+
getGlobalNameFromModule,
1414
removeClientModule,
1515
removeGlobalModule,
1616
} from "./modules";
@@ -21,7 +21,7 @@ const transformer = async (file: FileInfo, api: API) => {
2121
const j = isTypeScriptFile(file.path) ? api.jscodeshift.withParser("ts") : api.jscodeshift;
2222
const source = j(file.source);
2323

24-
const v2GlobalName = getV2GlobalNameFromModule(j, source);
24+
const v2GlobalName = getGlobalNameFromModule(j, source);
2525
const v2ClientNamesRecord = getV2ClientNamesRecord(j, source);
2626

2727
if (!v2GlobalName && Object.keys(v2ClientNamesRecord).length === 0) {

0 commit comments

Comments
 (0)