hyperdx/packages/common-utils/package.json
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

53 lines
1.7 KiB
JSON

{
"name": "@hyperdx/common-utils",
"description": "Common utilities for HyperDX application",
"version": "0.16.1",
"license": "MIT",
"private": true,
"files": [
"dist/*"
],
"engines": {
"node": ">=22.16.0"
},
"dependencies": {
"@clickhouse/client": "^1.12.1",
"@clickhouse/client-common": "^1.12.1",
"@clickhouse/client-web": "^1.12.1",
"@hyperdx/lucene": "^3.1.1",
"date-fns": "^2.28.0",
"date-fns-tz": "^2.0.0",
"lodash": "^4.17.23",
"node-sql-parser": "^5.3.5",
"object-hash": "^3.0.0",
"sql-formatter": "^15.4.11",
"sqlstring": "^2.3.3",
"zod": "3.25"
},
"devDependencies": {
"@types/hyperdx__lucene": "npm:@types/lucene@*",
"@types/jest": "^28.1.1",
"@types/lodash": "^4.14.198",
"@types/object-hash": "^2.2.1",
"@types/sqlstring": "^2.3.0",
"dotenv": "^17.2.3",
"jest": "^28.1.1",
"nodemon": "^2.0.20",
"ts-jest": "^29.4.5",
"tsup": "^8.4.0",
"typescript": "^5.9.3"
},
"scripts": {
"dev": "nodemon --on-change-only --watch ./src --ext ts --exec \"yarn dev:build\"",
"dev:build": "tsup && tsc --emitDeclarationOnly --declaration",
"build": "tsup",
"ci:build": "tsup",
"lint": "npx eslint --quiet . --ext .ts",
"lint:fix": "npx eslint . --ext .ts --fix",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:unit": "jest --runInBand --ci --forceExit --coverage",
"dev:unit": "jest --watchAll --runInBand --detectOpenHandles",
"ci:int": "DOTENV_CONFIG_PATH=.env.test jest --config jest.int.config.js --runInBand --ci --forceExit --coverage",
"dev:int": "DOTENV_CONFIG_PATH=.env.test jest --config jest.int.config.js --watchAll --runInBand --detectOpenHandles"
}
}