Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"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 -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && cp -r ./src/opamp/proto ./build/opamp/",
"build:vercel": "rimraf ./build && tsc -p tsconfig.vercel.json && tsc-alias -p tsconfig.vercel.json && cp -r ./src/opamp/proto ./build/opamp/",
"lint": "npx eslint --quiet . --ext .ts",
"lint": "npx eslint . --ext .ts --max-warnings 357",
"lint:fix": "npx eslint . --ext .ts --fix",
"ci:lint": "yarn lint && yarn tsc --noEmit && yarn lint:openapi",
"ci:unit": "jest --ci --coverage",
Expand Down
26 changes: 26 additions & 0 deletions packages/app/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,30 @@ module.exports = {
'^ky$': '<rootDir>/src/__mocks__/ky-universal.ts',
},
setupFilesAfterEnv: ['<rootDir>/src/setupTests.tsx'],
// Coverage floors are scoped to hooks/ and utils/ only — the genuinely
// unit-testable code. React components carry no coverage requirement (unit
// tests on them tend to be low-value and fragile; E2E and Storybook cover
// them better). Each floor is pinned just below measured reality so coverage
// can only ratchet up; decay below these numbers fails the build. Raise them
// deliberately as coverage improves; never lower them silently.
coverageThreshold: {
'./src/hooks/': {
statements: 72,
branches: 59,
functions: 66,
lines: 73,
},
'./src/utils/': {
statements: 74,
branches: 59,
functions: 72,
lines: 76,
},
'./src/utils.ts': {
statements: 76,
branches: 77,
functions: 75,
lines: 76,
},
},
};
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:clickhouse": "NEXT_PUBLIC_THEME=clickstack NEXT_PUBLIC_IS_LOCAL_MODE=true NEXT_PUBLIC_CLICKHOUSE_BUILD=true next build --webpack && node scripts/prepare-clickhouse-build-export.js",
"run:clickhouse": "test -d out && npx rimraf tmp && mkdir tmp && cp -r out tmp/clickstack && echo 'visit http://localhost:3000/clickstack to start' && npx serve tmp -l 3000 || echo 'run build:clickhouse first'",
"start": "next start",
"lint": "npx eslint --quiet . --ext .ts,.tsx",
"lint": "npx eslint . --ext .ts,.tsx --max-warnings 740",
"lint:fix": "npx eslint . --ext .ts,.tsx --fix",
"lint:styles": "stylelint **/*/*.{css,scss}",
"ci:lint": "yarn lint && yarn tsc --noEmit && yarn lint:styles --quiet",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"compile:linux": "bun build src/cli.tsx --compile --target=bun-linux-x64 --outfile dist/hdx-linux-x64",
"compile:macos": "bun build src/cli.tsx --compile --target=bun-darwin-arm64 --outfile dist/hdx-darwin-arm64",
"compile:macos-x64": "bun build src/cli.tsx --compile --target=bun-darwin-x64 --outfile dist/hdx-darwin-x64",
"lint": "npx eslint --quiet . --ext .ts,.tsx",
"lint": "npx eslint . --ext .ts,.tsx --max-warnings 9",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:unit": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand --ci --passWithNoTests",
"dev:unit": "NODE_OPTIONS=--experimental-vm-modules jest --watchAll --runInBand"
Expand Down
11 changes: 11 additions & 0 deletions packages/common-utils/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@ module.exports = {
moduleNameMapper: {
'@/(.*)$': '<rootDir>/$1',
},
// Coverage floor pinned just below measured reality so coverage can only
// ratchet up. Decay below these numbers fails the build. Raise them
// deliberately as coverage improves; never lower them silently.
coverageThreshold: {
global: {
statements: 86,
branches: 78,
functions: 85,
lines: 86,
},
},
};
2 changes: 1 addition & 1 deletion packages/common-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"dev:build": "tsup && tsc --emitDeclarationOnly --declaration",
"build": "tsup",
"ci:build": "tsup",
"lint": "npx eslint --quiet . --ext .ts",
"lint": "npx eslint . --ext .ts --max-warnings 92",
"lint:fix": "npx eslint . --ext .ts --fix",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:unit": "jest --ci --coverage",
Expand Down
11 changes: 11 additions & 0 deletions packages/hdx-eval/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@ module.exports = {
moduleNameMapper: {
'@/(.*)$': '<rootDir>/$1',
},
// Coverage floor pinned just below measured reality so coverage can only
// ratchet up. Decay below these numbers fails the build. Raise them
// deliberately as coverage improves; never lower them silently.
coverageThreshold: {
global: {
statements: 70,
branches: 55,
functions: 72,
lines: 71,
},
},
};
4 changes: 2 additions & 2 deletions packages/hdx-eval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"scripts": {
"build": "rimraf ./dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
"dev": "NODE_OPTIONS=--max-old-space-size=8192 ./scripts/env.sh tsx src/cli.ts",
"lint": "npx eslint --quiet . --ext .ts",
"lint": "npx eslint . --ext .ts --max-warnings 3",
"lint:fix": "npx eslint . --ext .ts --fix",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:unit": "jest --ci --forceExit",
"ci:unit": "jest --ci --coverage --forceExit",
"dev:unit": "jest --watch",
"viewer": "node scripts/viewer/server.js"
}
Expand Down
Loading