Skip to content

Commit 82677a5

Browse files
chore: Prune dead dependencies and unused utils (#1236)
* chore: Prune dead dependencies and unused utils Remove 17 unused dependencies (express, dayjs, framer-motion, react-markdown, unified, @xenova/transformers, mailchimp-api-v3, xml2js, js-cookie, plato, complexity-report, and others) plus the dead helpers in src/utils they supported. Migrate the few real callers off removed packages: framer-motion to motion/react in the profile components, and express types to Next's NextApiRequest / NextApiResponse in the apply, mentor, and mentee API routes. * refactor: Use type-only import for IEvent and SectionType
1 parent c06ed0c commit 82677a5

18 files changed

Lines changed: 181 additions & 3726 deletions

package-lock.json

Lines changed: 163 additions & 3233 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,20 @@
5555
"@react-email/components": "^1.0.3",
5656
"@react-email/render": "^2.0.1",
5757
"@shopify/shopify-api": "^12.1.2",
58-
"@types/express": "^4.17.17",
5958
"@vercel/analytics": "^1.4.1",
60-
"@xenova/transformers": "^2.17.2",
6159
"ace-builds": "^1.33.1",
6260
"ai": "^5.0.93",
6361
"axios": "^1.4.0",
6462
"class-variance-authority": "^0.7.0",
6563
"cloudinary": "2.9.0",
6664
"clsx": "^1.2.1",
67-
"complexity-report": "^2.0.0-alpha",
6865
"date-fns": "^4.1.0",
69-
"dayjs": "^1.11.4",
7066
"disqus-react": "^1.1.3",
7167
"dompurify": "^3.3.1",
7268
"dotenv": "^16.3.1",
73-
"express": "^4.18.2",
7469
"fast-equals": "3.0.3",
75-
"framer-motion": "^12.18.1",
7670
"gray-matter": "^4.0.3",
77-
"js-cookie": "^3.0.5",
7871
"lucide-react": "^0.378.0",
79-
"mailchimp-api-v3": "^1.15.0",
8072
"mammoth": "^1.11.0",
8173
"marked": "^4.0.18",
8274
"motion": "^11.13.3",
@@ -92,27 +84,19 @@
9284
"node-html-parser": "^7.0.1",
9385
"pdf-lib": "^1.17.1",
9486
"pdf-parse": "^2.4.5",
95-
"plato": "^1.7.0",
9687
"react": "^18.3.1",
9788
"react-ace": "^11.0.1",
9889
"react-dom": "^18.3.1",
9990
"react-email": "^5.1.1",
10091
"react-hook-form": "^7.45.0",
101-
"react-markdown": "^10.1.0",
10292
"react-simple-typewriter": "^3.0.1",
103-
"rehype-raw": "^7.0.0",
104-
"rehype-stringify": "^10.0.1",
105-
"remark-parse": "^11.0.0",
106-
"remark-rehype": "^11.1.2",
10793
"resend": "^6.6.0",
10894
"rss-parser": "^3.13.0",
10995
"swagger-ui-react": "4.19.1",
11096
"swiper": "^8.3.1",
11197
"tailwind-merge": "^2.3.0",
11298
"tailwindcss-animate": "^1.0.7",
113-
"unified": "^11.0.5",
114-
"ws": "^8.18.2",
115-
"xml2js": "^0.6.2"
99+
"ws": "^8.18.2"
116100
},
117101
"devDependencies": {
118102
"@biomejs/biome": "2.3.14",
@@ -153,7 +137,6 @@
153137
"rimraf": "^3.0.2",
154138
"storybook": "^10.3.6",
155139
"tailwindcss": "^3.0.23",
156-
"ts-complex": "^1.0.0",
157140
"ts-node": "^10.9.2",
158141
"tsx": "^4.19.4",
159142
"typescript": "^5.6.3",

src/components/profile/ActivityFeed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import type { GitHubEvent } from "@/types/profile";
33

44
interface ActivityFeedProps {

src/components/profile/GitHubStatsGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import type { GitHubData } from "@/types/profile";
33

44
interface GitHubStatsGridProps {

src/components/profile/LanguageBreakdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import type { LanguageBreakdownEntry } from "@/types/profile";
33

44
interface LanguageBreakdownProps {

src/components/profile/LearningProgress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import type { LearningStatsData } from "@/types/profile";
33

44
interface LearningProgressProps {

src/components/profile/ProfileHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import Image from "next/image";
33
import type { GitHubData, ProfileFormData, ProfileUser } from "@/types/profile";
44

src/components/profile/RepositoryShowcase.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import { useState } from "react";
33
import type { GitHubRepo } from "@/types/profile";
44
import { GITHUB_LANGUAGE_COLORS } from "@/types/profile";

src/components/ui/engagement-modal/EngagementModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SafeSessionStorage } from "@utils/safe-storage";
2-
import { AnimatePresence, motion } from "framer-motion";
2+
import { AnimatePresence, motion } from "motion/react";
33
import Link from "next/link";
44
import React, { useEffect, useRef, useState } from "react";
55
import styles from "./EngagementModal.module.css";

src/pages/api/apply.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from "axios";
2-
import { Request, Response } from "express";
2+
import type { NextApiRequest, NextApiResponse } from "next";
33
import { checkParams } from "./api-helpers";
44

55
// Define the ParsedBody interface to type-check the request body
@@ -110,7 +110,7 @@ async function postToSlack(text: string): Promise<void> {
110110
);
111111
}
112112

113-
export default async function handler(req: Request, res: Response) {
113+
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
114114
try {
115115
const parsedBody = req.body as ParsedBody;
116116

0 commit comments

Comments
 (0)