diff --git a/.yarn/cache/@notionhq-client-npm-2.2.15-7cc25af82c-18e8812f16.zip b/.yarn/cache/@notionhq-client-npm-2.2.15-7cc25af82c-18e8812f16.zip deleted file mode 100644 index 586d751..0000000 Binary files a/.yarn/cache/@notionhq-client-npm-2.2.15-7cc25af82c-18e8812f16.zip and /dev/null differ diff --git a/.yarn/cache/@types-node-fetch-npm-2.6.12-bc850f58da-8107c479da.zip b/.yarn/cache/@types-node-fetch-npm-2.6.12-bc850f58da-8107c479da.zip deleted file mode 100644 index 6ab52af..0000000 Binary files a/.yarn/cache/@types-node-fetch-npm-2.6.12-bc850f58da-8107c479da.zip and /dev/null differ diff --git a/apps/admin/.eslintrc.js b/apps/admin/.eslintrc.js index 7b1d198..959be21 100644 --- a/apps/admin/.eslintrc.js +++ b/apps/admin/.eslintrc.js @@ -28,9 +28,5 @@ module.exports = { }, }, ], - rules: { - 'import/no-extraneous-dependencies': ['error', { - devDependencies: ['**/*.test.js', 'scripts/**/*'], - }], - }, + rules: {}, }; diff --git a/apps/admin/package.json b/apps/admin/package.json index 66cbc61..dbb49ef 100644 --- a/apps/admin/package.json +++ b/apps/admin/package.json @@ -42,7 +42,6 @@ "devDependencies": { "@dnd-academy/eslint-config": "*", "@next/eslint-plugin-next": "14.2.15", - "@notionhq/client": "2.2.15", "@testing-library/dom": "10.3.1", "@testing-library/jest-dom": "6.4.6", "@testing-library/react": "16.0.0", diff --git a/apps/admin/scripts/notion.ts b/apps/admin/scripts/notion.ts deleted file mode 100644 index b6ac4f8..0000000 --- a/apps/admin/scripts/notion.ts +++ /dev/null @@ -1,46 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { Client } = require('@notionhq/client'); - -const notion = new Client({ - auth: process.env.NOTION_API_KEY, -}); - -async function getNotionData() { - try { - const databaseId = process.env.NOTION_DATABASE_ID; - - const response = await notion.databases.query({ - database_id: databaseId, - filter: { - // property: 'Status', - // status: { - // equals: 'Published' - // } - }, - }); - - const pages = response.results.map((page: any) => ({ - id: page.id, - title: page.properties.Title?.title[0]?.plain_text || '', - tags: page.properties.Tags?.multi_select.map((tag: any) => tag.name) || [], - date: page.properties.Date?.date?.start || '', - })); - - // eslint-disable-next-line @typescript-eslint/no-var-requires, global-require - const fs = require('fs'); - fs.writeFileSync( - 'notion-data.json', - JSON.stringify(pages, null, 2), - 'utf-8', - ); - - return pages; - } catch (error) { - console.error('Error fetching Notion data:', error); - throw error; - } -} - -getNotionData() - .then(() => console.log('Data successfully fetched and saved')) - .catch((error) => console.error('Failed to fetch data:', error)); diff --git a/apps/admin/tsconfig.json b/apps/admin/tsconfig.json index 03249e8..a5de600 100644 --- a/apps/admin/tsconfig.json +++ b/apps/admin/tsconfig.json @@ -18,7 +18,6 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "../../jest.setup.ts", - "scripts/**/*.ts", + "../../jest.setup.ts" ], } diff --git a/yarn.lock b/yarn.lock index 766a1e0..f771256 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3292,16 +3292,6 @@ __metadata: languageName: node linkType: hard -"@notionhq/client@npm:2.2.15": - version: 2.2.15 - resolution: "@notionhq/client@npm:2.2.15" - dependencies: - "@types/node-fetch": "npm:^2.5.10" - node-fetch: "npm:^2.6.1" - checksum: 10/18e8812f1630d7f6a93e058695101853b2db980b2003ca6b1e451c93bca330b8d1c1a7fe2c9769ac5a07ab36bdfe33d9458a244ecc3c171331153872384f0cae - languageName: node - linkType: hard - "@npmcli/agent@npm:^2.0.0": version: 2.2.2 resolution: "@npmcli/agent@npm:2.2.2" @@ -5192,16 +5182,6 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.5.10": - version: 2.6.12 - resolution: "@types/node-fetch@npm:2.6.12" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^4.0.0" - checksum: 10/8107c479da83a3114fcbfa882eba95ee5175cccb5e4dd53f737a96f2559ae6262f662176b8457c1656de09ec393cc7b20a266c077e4bfb21e929976e1cf4d0f9 - languageName: node - linkType: hard - "@types/node@npm:*, @types/node@npm:^22.0.0": version: 22.7.2 resolution: "@types/node@npm:22.7.2" @@ -6181,7 +6161,6 @@ __metadata: "@dnd-academy/eslint-config": "npm:*" "@dnd-academy/ui": "npm:*" "@next/eslint-plugin-next": "npm:14.2.15" - "@notionhq/client": "npm:2.2.15" "@tanstack/react-query": "npm:5.52.0" "@testing-library/dom": "npm:10.3.1" "@testing-library/jest-dom": "npm:6.4.6" @@ -14354,7 +14333,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": +"node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: