From 76dee3244137bf3fd431540b11c1c91f5bf15432 Mon Sep 17 00:00:00 2001 From: JeelRajodiya Date: Mon, 30 Dec 2024 15:54:54 +0530 Subject: [PATCH] refactor: simplify JSON import in build-rss and remove debug log in combine-tools --- scripts/build-rss.ts | 2 +- scripts/tools/combine-tools.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build-rss.ts b/scripts/build-rss.ts index d452075476e4..1de38eb419d2 100644 --- a/scripts/build-rss.ts +++ b/scripts/build-rss.ts @@ -5,7 +5,7 @@ import json2xml from 'jgexml/json2xml'; import type { BlogPostTypes, RSS, RSSItemType } from '@/types/scripts/build-rss'; async function getAllPosts() { - const posts = (await import('../config/posts.json', { assert: { type: 'json' } })).default; + const posts = (await import('../config/posts.json')).default; return posts; } diff --git a/scripts/tools/combine-tools.ts b/scripts/tools/combine-tools.ts index 201d126bba8c..d8a79a50b23a 100644 --- a/scripts/tools/combine-tools.ts +++ b/scripts/tools/combine-tools.ts @@ -160,7 +160,6 @@ const combineTools = async (automatedTools: any, manualTools: any, toolsPath: st } } finalToolsList.sort((tool, anotherTool) => tool.title.localeCompare(anotherTool.title)); - console.log('finalToolsList', finalToolsList, '\n', 'key', key, '\n'); finalTools[key].toolsList = finalToolsList; } fs.writeFileSync(toolsPath, JSON.stringify(finalTools));