hyperdx/packages/api
Brandon Pereira 4318d0a3c3
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)
2026-03-25 20:32:03 +00:00
..
bin [HDX-2712] Unified hyperdx entrypoint script for API and tasks (#1951) 2026-03-20 18:27:40 +00:00
docs/auto_provision feat: Set up default sources/connections with env var in server mode (#817) 2025-05-16 23:17:37 +00:00
migrations chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
scripts chore: Add automatic api doc generation (#1397) 2025-11-21 21:14:02 +00:00
src chore: remove unused files, dependencies, and exports flagged by knip (#1982) 2026-03-25 20:32:03 +00:00
.Dockerignore first commit 2023-09-12 20:08:05 -07:00
.env.development feat: Attach service version to all internal telemetry (#1891) 2026-03-12 16:50:46 +00:00
.env.e2e chore: Use local clickhouse instance for playwright tests (#1711) 2026-02-13 15:43:12 +00:00
.env.test Enable parallel integration testing across multiple worktrees (#1917) 2026-03-16 19:42:08 +00:00
.spectral.yaml ci: Add linting for openapi specs (#1945) 2026-03-20 15:13:19 +00:00
CHANGELOG.md Release HyperDX (#1884) 2026-03-20 14:22:09 -07:00
Dockerfile ci: Replace QEMU with native ARM64 runners for release builds (#1952) 2026-03-20 23:04:49 +00:00
eslint.config.mjs chore(eslint): add @typescript-eslint/no-unsafe-type-assertion rule (#1534) 2025-12-30 16:01:11 +00:00
jest.config.js Enable parallel integration testing across multiple worktrees (#1917) 2026-03-16 19:42:08 +00:00
jest.setup.ts fix: Adjust CI logs verbosity (#1888) 2026-03-11 20:32:02 +00:00
migrate-mongo-config.ts feat: setup clickhouse migration tool + update metrics schema (add is_delta + is_monotonic fields) (#138) 2023-12-03 14:06:50 -08:00
nodemon.json Improve common-utils build performance and add support for .env.local (#1466) 2025-12-11 23:07:16 +00:00
openapi.json feat: Add conditions to Dashboard filters; Support filter multi-select (#1969) 2026-03-24 18:05:41 +00:00
package.json chore: remove unused files, dependencies, and exports flagged by knip (#1982) 2026-03-25 20:32:03 +00:00
tsconfig.build.json fix: Update tsconfigs to resolve IDE type errors (#1150) 2025-09-11 08:55:14 -04:00
tsconfig.json Clean Up Integration Test Console Output (#1566) 2026-01-07 17:38:01 +00:00