hyperdx/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

82 lines
3.2 KiB
JSON

{
"name": "hyperdx",
"private": true,
"version": "2.0.0",
"license": "MIT",
"workspaces": [
"packages/*"
],
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@dotenvx/dotenvx": "^1.51.1",
"@types/ungap__structured-clone": "^1.2.0",
"@ungap/structured-clone": "^1.3.0",
"babel-plugin-react-compiler": "^1.0.0",
"concurrently": "^9.1.2",
"dotenv": "^16.4.7",
"dotenv-cli": "^8.0.0",
"dotenv-expand": "^12.0.1",
"eslint": "^9.39.1",
"eslint-config-next": "16.0.7",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-n": "^16.4.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"husky": "^8.0.3",
"knip": "^6.0.1",
"lint-staged": "^13.1.2",
"nx": "21.3.11",
"prettier": "3.3.3"
},
"scripts": {
"setup": "yarn install && husky install",
"build:common-utils": "nx run @hyperdx/common-utils:dev:build",
"app:dev": "concurrently -k -n 'API,APP,ALERTS-TASK,COMMON-UTILS' -c 'green.bold,blue.bold,yellow.bold,magenta' 'nx run @hyperdx/api:dev' 'nx run @hyperdx/app:dev' 'nx run @hyperdx/api:dev-task check-alerts' 'nx run @hyperdx/common-utils:dev'",
"app:dev:local": "concurrently -k -n 'APP,COMMON-UTILS' -c 'blue.bold,magenta' 'nx run @hyperdx/app:dev:local' 'nx run @hyperdx/common-utils:dev'",
"app:lint": "nx run @hyperdx/app:ci:lint",
"app:storybook": "nx run @hyperdx/app:storybook",
"build:clickhouse": "nx run @hyperdx/common-utils:build && nx run @hyperdx/app:build:clickhouse",
"run:clickhouse": "nx run @hyperdx/app:run:clickhouse",
"dev": "yarn build:common-utils && dotenvx run --convention=nextjs -- docker compose -f docker-compose.dev.yml up -d && yarn app:dev && docker compose -f docker-compose.dev.yml down",
"dev:local": "IS_LOCAL_APP_MODE='DANGEROUSLY_is_local_app_mode💀' yarn dev",
"dev:down": "docker compose -f docker-compose.dev.yml down",
"dev:compose": "docker compose -f docker-compose.dev.yml",
"knip": "knip",
"knip:ci": "knip --reporter json",
"lint": "npx nx run-many -t ci:lint",
"version": "make version",
"release": "npx changeset tag && npx changeset publish"
},
"lint-staged": {
"packages/api/src/routers/external-api/**/*.ts": [
"prettier --write --ignore-unknown",
"eslint --flag v10_config_lookup_from_file --fix --quiet",
"sh -c 'cd packages/api && yarn run lint:openapi && git add openapi.json'"
],
"**/*.{ts,tsx}": [
"prettier --write --ignore-unknown",
"eslint --flag v10_config_lookup_from_file --fix --quiet"
],
"**/*.{mdx,json,yml}": [
"prettier --write --ignore-unknown"
]
},
"packageManager": "yarn@4.5.1",
"resolutions": {
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3",
"@types/express": "4.17.21",
"@types/express-serve-static-core": "4.17.43",
"express": "^4.20.0",
"send": "^0.19.0",
"serve-static": "^1.16.0",
"cookie": "^0.7.0",
"brace-expansion": "^2.0.2",
"diff": "^5.2.2",
"on-headers": "^1.1.0",
"fast-xml-parser": "^4.5.4",
"systeminformation": "^5.24.0"
}
}