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)
99 lines
3.8 KiB
JSON
99 lines
3.8 KiB
JSON
{
|
|
"name": "@hyperdx/api",
|
|
"version": "2.22.0",
|
|
"license": "MIT",
|
|
"private": true,
|
|
"engines": {
|
|
"node": ">=22.16.0"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^3.0.58",
|
|
"@ai-sdk/openai": "^3.0.47",
|
|
"@esm2cjs/p-queue": "^7.3.0",
|
|
"@hyperdx/common-utils": "^0.16.1",
|
|
"@hyperdx/node-opentelemetry": "^0.9.0",
|
|
"@hyperdx/passport-local-mongoose": "^9.0.1",
|
|
"@opentelemetry/api": "^1.8.0",
|
|
"@opentelemetry/host-metrics": "^0.35.5",
|
|
"@opentelemetry/sdk-metrics": "^1.30.1",
|
|
"@slack/webhook": "^7.0.0",
|
|
"@types/node": "^22.15.18",
|
|
"ai": "^6.0.116",
|
|
"aws4": "^1.13.2",
|
|
"chrono-node": "^2.9.0",
|
|
"compression": "^1.7.4",
|
|
"concurrently": "^9.1.2",
|
|
"connect-mongo": "^4.6.0",
|
|
"cors": "^2.8.5",
|
|
"cron": "^4.3.1",
|
|
"date-fns": "^2.28.0",
|
|
"express": "^4.19.2",
|
|
"express-rate-limit": "^6.7.1",
|
|
"express-session": "^1.17.3",
|
|
"handlebars": "^4.7.8",
|
|
"http-graceful-shutdown": "^3.1.13",
|
|
"http-proxy-middleware": "^3.0.5",
|
|
"jsonwebtoken": "^9.0.0",
|
|
"lodash": "^4.17.23",
|
|
"minimist": "^1.2.7",
|
|
"mongodb": "^6.15.0",
|
|
"mongoose": "^6.13.8",
|
|
"ms": "^2.1.3",
|
|
"on-headers": "^1.1.0",
|
|
"passport": "^0.6.0",
|
|
"passport-local": "^1.0.0",
|
|
"pino": "^10.0.0",
|
|
"pino-http": "^11.0.0",
|
|
"promised-handlebars": "^2.0.1",
|
|
"protobufjs": "^7.5.2",
|
|
"serialize-error": "^8.1.0",
|
|
"uuid": "^8.3.2",
|
|
"zod": "3.25",
|
|
"zod-express-middleware": "^1.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@stoplight/spectral-cli": "^6.15.0",
|
|
"@types/compression": "^1.7.3",
|
|
"@types/cors": "^2.8.14",
|
|
"@types/express": "^4.17.13",
|
|
"@types/express-session": "^1.17.7",
|
|
"@types/jest": "^28.1.1",
|
|
"@types/lodash": "^4.14.198",
|
|
"@types/minimist": "^1.2.2",
|
|
"@types/ms": "^0.7.31",
|
|
"@types/passport-local": "^1.0.34",
|
|
"@types/supertest": "^2.0.12",
|
|
"@types/swagger-jsdoc": "^6",
|
|
"@types/uuid": "^8.3.4",
|
|
"jest": "^28.1.3",
|
|
"migrate-mongo": "^11.0.0",
|
|
"nodemon": "^2.0.20",
|
|
"pino-pretty": "^13.1.1",
|
|
"rimraf": "^4.4.1",
|
|
"supertest": "^6.3.1",
|
|
"swagger-jsdoc": "^6.2.8",
|
|
"swagger-ui-express": "^5.0.1",
|
|
"ts-jest": "^29.4.5",
|
|
"ts-node": "^10.8.1",
|
|
"tsc-alias": "^1.8.8",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"scripts": {
|
|
"start": "node ./build/index.js",
|
|
"dev": "DOTENV_CONFIG_PATH=.env.development nodemon --exec 'ts-node' --transpile-only -r tsconfig-paths/register -r dotenv-expand/config -r '@hyperdx/node-opentelemetry/build/src/tracing' ./src/index.ts",
|
|
"dev-task": "DOTENV_CONFIG_PATH=.env.development nodemon --exec 'ts-node' --transpile-only -r tsconfig-paths/register -r dotenv-expand/config -r '@hyperdx/node-opentelemetry/build/src/tracing' ./src/tasks/index.ts",
|
|
"build": "rimraf ./build && tsc && tsc-alias && cp -r ./src/opamp/proto ./build/opamp/",
|
|
"lint": "npx eslint --quiet . --ext .ts",
|
|
"lint:fix": "npx eslint . --ext .ts --fix",
|
|
"ci:lint": "yarn lint && yarn tsc --noEmit && yarn lint:openapi",
|
|
"ci:int": "DOTENV_CONFIG_PATH=.env.test DOTENV_CONFIG_OVERRIDE=true jest --runInBand --ci --forceExit --coverage",
|
|
"dev:int": "DOTENV_CONFIG_PATH=.env.test DOTENV_CONFIG_OVERRIDE=true jest --runInBand --forceExit --coverage",
|
|
"dev:migrate-db-create": "ts-node node_modules/.bin/migrate-mongo create -f migrate-mongo-config.ts",
|
|
"dev:migrate-db": "ts-node node_modules/.bin/migrate-mongo up -f migrate-mongo-config.ts",
|
|
"dev:migrate-ch-create": "migrate create -ext sql -dir ./migrations/ch -seq",
|
|
"dev:migrate-ch": "migrate -database 'clickhouse://localhost:9000?database=default&x-multi-statement=true' -path ./migrations/ch up",
|
|
"docgen": "ts-node scripts/generate-api-docs.ts",
|
|
"lint:openapi": "yarn docgen && spectral lint openapi.json"
|
|
}
|
|
}
|