Skip to content

Commit 59b3e71

Browse files
author
Daniel Del Core
committed
improve types for internal script
1 parent 5bf3428 commit 59b3e71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/sync.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@ async function main() {
2121
const directories = communityCodemods.filter(dir => junk.not(dir));
2222

2323
for (const dir of directories) {
24-
const { config } = await fetchConfig(path.join(COMMUNITY_PATH, dir));
24+
const configMeta = await fetchConfig(path.join(COMMUNITY_PATH, dir));
2525

26-
if (!config) {
26+
if (!configMeta?.config) {
2727
throw new Error(`Unable to locate config for path: ${dir}`);
2828
}
2929

3030
const pkgName = `@hypermod/mod-${dir.replace('@', '').replace('/', '__')}`;
3131
const rawPkgName = dir.replace('__', '/');
3232
data.push({
3333
pkgName,
34-
targets: rawPkgName + (config.targets ? `, ${config.targets}` : ''),
34+
targets:
35+
rawPkgName +
36+
(configMeta.config.targets ? `, ${configMeta.config.targets}` : ''),
3537
});
3638
}
3739

0 commit comments

Comments
 (0)