mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
## 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) |
||
|---|---|---|
| .. | ||
| src | ||
| .env.test | ||
| CHANGELOG.md | ||
| eslint.config.mjs | ||
| jest.config.js | ||
| jest.int.config.js | ||
| jest.setup.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
How to test the package with HyperDX app/api
- Run
yarn buildin the root directory of this project (packages/common-utils) - Run
yarn devin the root directory of app/api project (packages/app,api) - You should be able to test utils with the app