hyperdx/packages/common-utils
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
..
src fix: Correctly detect text index with quoted tokenizer argument (#1985) 2026-03-25 13:51:05 +00:00
.env.test Enable parallel integration testing across multiple worktrees (#1917) 2026-03-16 19:42:08 +00:00
CHANGELOG.md Release HyperDX (#1884) 2026-03-20 14:22:09 -07:00
eslint.config.mjs chore: remove unused files, dependencies, and exports flagged by knip (#1982) 2026-03-25 20:32:03 +00:00
jest.config.js fix: Adjust CI logs verbosity (#1888) 2026-03-11 20:32:02 +00:00
jest.int.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
package.json chore: remove unused files, dependencies, and exports flagged by knip (#1982) 2026-03-25 20:32:03 +00:00
README.md DX: running api + app + task concurrently with npm script (dev) (#567) 2025-01-23 17:31:25 +00:00
tsconfig.json Improve common-utils intellisense. Currently "Go to Definition" on an… (#1159) 2025-09-11 12:57:41 -06:00
tsup.config.ts feat: introduce common-utils package (#554) 2025-01-16 18:15:22 +00:00

How to test the package with HyperDX app/api

  1. Run yarn build in the root directory of this project (packages/common-utils)
  2. Run yarn dev in the root directory of app/api project (packages/app,api)
  3. You should be able to test utils with the app