2025-09-23 14:18:04 +02:00
|
|
|
{
|
|
|
|
|
"name": "kraiken-ponder",
|
|
|
|
|
"version": "0.0.1",
|
|
|
|
|
"private": true,
|
|
|
|
|
"type": "module",
|
|
|
|
|
"scripts": {
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
"dev": "node ./node_modules/ponder/dist/esm/bin/ponder.js dev",
|
|
|
|
|
"start": "node ./node_modules/ponder/dist/esm/bin/ponder.js start",
|
|
|
|
|
"codegen": "node ./node_modules/ponder/dist/esm/bin/ponder.js codegen",
|
|
|
|
|
"build": "node ./node_modules/ponder/dist/esm/bin/ponder.js codegen",
|
fix: Ponder: add test infrastructure + coverage for helpers (target 95%) (#287)
- Add vitest ^2 + @vitest/coverage-v8 ^2 as devDependencies
- Add `test` and `test:coverage` scripts to package.json
- Create vitest.config.ts with resolve.alias to mock ponder virtual modules
(ponder:schema, ponder:registry) and point kraiken-lib/version to source
- Add coverage/ to .gitignore
- Add vitest.config.ts to tsconfig.json include so eslint project-aware rules apply
- Create src/tests/__mocks__/ponder-schema.ts and ponder-registry.ts stubs
- Create src/tests/stats.test.ts — 48 tests covering ring buffer logic,
segment updates, hourly advancement, projections, ETH reserve snapshots,
all exported async helpers with mock Ponder contexts
- Create src/tests/version.test.ts — 14 tests covering isCompatibleVersion,
getVersionMismatchError, and validateContractVersion (compatible / mismatch /
error paths, existing-meta upsert path)
- Create src/tests/abi.test.ts — 6 tests covering validateAbi and
validateContractAbi
Result: 68 tests pass, 100% line/statement/function coverage on all helpers
(stats.ts, version.ts, abi.ts, logger.ts) — exceeds 95% target.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 22:29:57 +00:00
|
|
|
"test": "vitest run",
|
|
|
|
|
"test:coverage": "vitest run --coverage",
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
"lint": "eslint .",
|
|
|
|
|
"lint:fix": "eslint . --fix",
|
|
|
|
|
"format": "prettier --write \"src/**/*.ts\" \"ponder.config.ts\" \"ponder.schema.ts\"",
|
|
|
|
|
"format:check": "prettier --check \"src/**/*.ts\" \"ponder.config.ts\" \"ponder.schema.ts\"",
|
|
|
|
|
"prepare": "husky"
|
2025-09-23 14:18:04 +02:00
|
|
|
},
|
|
|
|
|
"dependencies": {
|
2025-09-23 16:57:49 +02:00
|
|
|
"hono": "^4.5.0",
|
2025-09-30 20:02:43 +02:00
|
|
|
"kraiken-lib": "file:../../kraiken-lib",
|
2025-10-01 20:26:49 +02:00
|
|
|
"ponder": "^0.13.8",
|
2025-09-23 16:57:49 +02:00
|
|
|
"viem": "^2.21.0"
|
2025-09-23 14:18:04 +02:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@types/node": "^20.11.30",
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
|
|
|
"@typescript-eslint/parser": "^8.45.0",
|
fix: Ponder: add test infrastructure + coverage for helpers (target 95%) (#287)
- Add vitest ^2 + @vitest/coverage-v8 ^2 as devDependencies
- Add `test` and `test:coverage` scripts to package.json
- Create vitest.config.ts with resolve.alias to mock ponder virtual modules
(ponder:schema, ponder:registry) and point kraiken-lib/version to source
- Add coverage/ to .gitignore
- Add vitest.config.ts to tsconfig.json include so eslint project-aware rules apply
- Create src/tests/__mocks__/ponder-schema.ts and ponder-registry.ts stubs
- Create src/tests/stats.test.ts — 48 tests covering ring buffer logic,
segment updates, hourly advancement, projections, ETH reserve snapshots,
all exported async helpers with mock Ponder contexts
- Create src/tests/version.test.ts — 14 tests covering isCompatibleVersion,
getVersionMismatchError, and validateContractVersion (compatible / mismatch /
error paths, existing-meta upsert path)
- Create src/tests/abi.test.ts — 6 tests covering validateAbi and
validateContractAbi
Result: 68 tests pass, 100% line/statement/function coverage on all helpers
(stats.ts, version.ts, abi.ts, logger.ts) — exceeds 95% target.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 22:29:57 +00:00
|
|
|
"@vitest/coverage-v8": "^2.0.0",
|
2025-09-23 16:57:49 +02:00
|
|
|
"esbuild": "^0.25.10",
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
"eslint": "^9.36.0",
|
|
|
|
|
"eslint-config-prettier": "^10.1.8",
|
|
|
|
|
"husky": "^9.1.7",
|
|
|
|
|
"lint-staged": "^16.2.3",
|
|
|
|
|
"prettier": "^3.6.2",
|
fix: Ponder: add test infrastructure + coverage for helpers (target 95%) (#287)
- Add vitest ^2 + @vitest/coverage-v8 ^2 as devDependencies
- Add `test` and `test:coverage` scripts to package.json
- Create vitest.config.ts with resolve.alias to mock ponder virtual modules
(ponder:schema, ponder:registry) and point kraiken-lib/version to source
- Add coverage/ to .gitignore
- Add vitest.config.ts to tsconfig.json include so eslint project-aware rules apply
- Create src/tests/__mocks__/ponder-schema.ts and ponder-registry.ts stubs
- Create src/tests/stats.test.ts — 48 tests covering ring buffer logic,
segment updates, hourly advancement, projections, ETH reserve snapshots,
all exported async helpers with mock Ponder contexts
- Create src/tests/version.test.ts — 14 tests covering isCompatibleVersion,
getVersionMismatchError, and validateContractVersion (compatible / mismatch /
error paths, existing-meta upsert path)
- Create src/tests/abi.test.ts — 6 tests covering validateAbi and
validateContractAbi
Result: 68 tests pass, 100% line/statement/function coverage on all helpers
(stats.ts, version.ts, abi.ts, logger.ts) — exceeds 95% target.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 22:29:57 +00:00
|
|
|
"typescript": "^5.9.2",
|
|
|
|
|
"vitest": "^2.0.0"
|
2025-09-23 14:18:04 +02:00
|
|
|
},
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
"lint-staged": {
|
|
|
|
|
"src/**/*.ts": [
|
|
|
|
|
"eslint --fix",
|
|
|
|
|
"prettier --write"
|
|
|
|
|
],
|
|
|
|
|
"ponder.config.ts": [
|
|
|
|
|
"eslint --fix",
|
|
|
|
|
"prettier --write"
|
|
|
|
|
],
|
|
|
|
|
"ponder.schema.ts": [
|
|
|
|
|
"eslint --fix",
|
|
|
|
|
"prettier --write"
|
|
|
|
|
]
|
|
|
|
|
},
|
2025-09-23 16:57:49 +02:00
|
|
|
"overrides": {
|
|
|
|
|
"esbuild": "^0.25.10",
|
2025-09-23 19:24:05 +02:00
|
|
|
"vite": "^5.4.11"
|
2025-09-23 16:57:49 +02:00
|
|
|
},
|
2025-09-23 14:18:04 +02:00
|
|
|
"engines": {
|
|
|
|
|
"node": ">=18.0.0"
|
|
|
|
|
}
|
2025-09-23 16:57:49 +02:00
|
|
|
}
|