Skip to content

Commit b706bbe

Browse files
chore: remove unused files, dependencies, and exports flagged by knip (#1982)
## Summary Cleans up dead code and unused dependencies identified by [knip](https://knip.dev/). All removals were individually verified to have zero imports or references across the codebase. No functional changes. **Deleted 9 unused files:** - `packages/api/src/clickhouse/__tests__/clickhouse.V1_DEPRECATED_test.ts` — skipped deprecated test - `packages/api/src/utils/email.ts` — empty stub functions, never imported - `packages/api/src/utils/queue.ts` — unused utility class - `packages/app/src/Checkbox.tsx` — replaced by Mantine Checkbox, never imported - `packages/app/src/components/DBSearchPageFilters/index.ts` — dead barrel file (shadowed by sibling `.tsx`) - `packages/app/src/components/Sources/index.ts` — dead barrel file (all consumers import submodules directly) - `packages/app/src/components/WhereLanguageControlled.tsx` — unused component - `packages/app/src/TabBarWithContent.tsx` — unused component - `packages/app/src/vsc-dark-plus.ts` — unused Prism theme **Removed 14 unused dependencies** from `packages/api`, `packages/app`, and `packages/common-utils` (e.g. `semver`, `react-query`, `react-sortable-hoc`, `@microsoft/fetch-event-source`, `store2`, `uuid`, etc.) **Removed 17 unused devDependencies** across root, api, app, and common-utils (e.g. `@nx/workspace`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`, `@types/semver`, `@types/react-table`, `rimraf`, `supertest`, `ts-node`, `tsc-alias`, `tsconfig-paths`, etc.) **Replaced `react-papaparse` with `papaparse`** — code imports `papaparse` directly, not the React wrapper. Added `@types/papaparse` since the package doesn't bundle its own types. **Cleaned up unused exports:** - Trimmed barrel files (`AppNav/index.ts`, `SearchInput/index.ts`) to only re-export what's actually consumed - Removed duplicate named exports where only the default export is used (`DBRowTableFieldWithPopover`, `DBRowTableRowButtons`) - Un-exported interfaces and constants that are only used locally (`DBRowTableFieldWithPopoverProps`, `DBRowTableIconButtonProps`, `DBRowTableRowButtonsProps`, `BASE_URL`, `makeHandler`) - Removed stale `supertest` from `allowModules` in `common-utils/eslint.config.mjs` ### How to test locally or on Vercel 1. `yarn install` — lockfile should resolve cleanly 2. `yarn workspace @hyperdx/common-utils ci:lint` — should pass (the only package where lint+tsc fully passes on this branch) 3. `npx knip` — should show reduced issue counts vs. main ### References - Related PRs: #1973 (knip CI workflow)
1 parent 2a8a642 commit b706bbe

22 files changed

Lines changed: 54 additions & 2520 deletions

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"devDependencies": {
1010
"@changesets/cli": "^2.26.2",
1111
"@dotenvx/dotenvx": "^1.51.1",
12-
"@nx/workspace": "21.3.11",
1312
"@types/ungap__structured-clone": "^1.2.0",
14-
"@typescript-eslint/eslint-plugin": "^8.48.1",
15-
"@typescript-eslint/parser": "^8.48.1",
1613
"@ungap/structured-clone": "^1.3.0",
1714
"babel-plugin-react-compiler": "^1.0.0",
1815
"concurrently": "^9.1.2",

packages/api/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@
4646
"pino-http": "^11.0.0",
4747
"promised-handlebars": "^2.0.1",
4848
"protobufjs": "^7.5.2",
49-
"semver": "^7.5.3",
5049
"serialize-error": "^8.1.0",
5150
"uuid": "^8.3.2",
5251
"zod": "3.25",
5352
"zod-express-middleware": "^1.4.0"
5453
},
5554
"devDependencies": {
5655
"@stoplight/spectral-cli": "^6.15.0",
57-
"@types/aws4": "^1",
5856
"@types/compression": "^1.7.3",
5957
"@types/cors": "^2.8.14",
6058
"@types/express": "^4.17.13",
@@ -64,7 +62,6 @@
6462
"@types/minimist": "^1.2.2",
6563
"@types/ms": "^0.7.31",
6664
"@types/passport-local": "^1.0.34",
67-
"@types/semver": "^7.3.12",
6865
"@types/supertest": "^2.0.12",
6966
"@types/swagger-jsdoc": "^6",
7067
"@types/uuid": "^8.3.4",

0 commit comments

Comments
 (0)