Skip to content

Commit 918a276

Browse files
committed
fix: remove unnecessary console log and simplify JSON parsing
1 parent abec5d9 commit 918a276

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

api/src/services/contentful.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,6 @@ const createLocale = async (packagePath: string, destination_stack_id: string, p
937937
)
938938
await customLogger(projectId, destination_stack_id, 'error', message);
939939
}
940-
console.info(project?.stackDetails?.master_locale)
941940
const fallbackMapLocales: any = { ...project?.master_locale ?? {}, ...project?.locales ?? {} }
942941
await Promise?.all(locales?.map?.(async (localeData: any) => {
943942
const currentMapLocale = getKeyByValue?.(fallbackMapLocales, localeData?.code) ?? `${localeData?.code?.toLowerCase?.()}`;

api/src/utils/test-folder-creator.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const testFolderCreator = async ({ destinationStackId }: any) => {
269269
const allData = [];
270270
for await (const filePath of read(entriesPath)) {
271271
if (!filePath?.endsWith('index.json')) {
272-
const entryData = await JSON?.parse?.(await fs?.promises?.readFile?.(path?.join?.(entriesPath, filePath), 'utf8'));
272+
const entryData = await JSON.parse(await fs.promises.readFile(path.join(entriesPath, filePath), 'utf8'));
273273
if (Object?.keys?.(entryData)?.length) {
274274
const normalizedPath = path.normalize(filePath);
275275
// Split using `path.sep` for cross-platform support

0 commit comments

Comments
 (0)