Files
claude-hub/package.json
Jonathan Flatt a38ed85924 feat: setup TypeScript infrastructure for Phase 1 migration
## Overview
Establishes comprehensive TypeScript infrastructure and tooling for
the claude-github-webhook project as specified in issue #101.

## Dependencies Added
- Core TypeScript: typescript, @types/node, @types/express, @types/body-parser
- Development: ts-node for dev execution
- ESLint: @typescript-eslint/parser, @typescript-eslint/eslint-plugin
- Testing: ts-jest, babel-jest for Jest TypeScript support

## Configuration Files
- tsconfig.json: Strict TypeScript config targeting ES2022/CommonJS
- eslint.config.js: Updated with TypeScript support and strict rules
- jest.config.js: Configured for both .js and .ts test files
- babel.config.js: Babel configuration for JavaScript transformation

## Build Scripts
- npm run build: Compile TypeScript to dist/
- npm run build Watch mode compilation
- npm run typecheck: Type checking without compilation
- npm run clean: Clean build artifacts
- npm run dev: Development with ts-node
- npm run dev Development with nodemon + ts-node

## Infrastructure Verified
 TypeScript compilation works
 ESLint supports TypeScript files
 Jest runs tests with TypeScript support
 All existing tests pass (67 tests, 2 skipped)
 Docker build process updated for TypeScript

## Documentation
- CLAUDE.md updated with TypeScript build commands and architecture
- Migration strategy documented (Phase 1: Infrastructure, Phase 2: Code conversion)
- TypeScript coding guidelines added

## Backward Compatibility
- Existing JavaScript files continue to work during transition
- Support for both .js and .ts files in tests and linting
- No breaking changes to existing functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 19:35:54 -05:00

66 lines
2.0 KiB
JSON

{
"name": "claude-github-webhook",
"version": "1.0.0",
"description": "A webhook endpoint for Claude to perform git and GitHub actions",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"build:watch": "tsc --watch",
"start": "node dist/index.js",
"start:dev": "node src/index.js",
"dev": "ts-node src/index.js",
"dev:watch": "nodemon --exec ts-node src/index.js",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"test": "jest",
"test:unit": "jest --testMatch='**/test/unit/**/*.test.{js,ts}'",
"test:e2e": "jest --testMatch='**/test/e2e/**/*.test.{js,ts}'",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"test:ci": "jest --ci --coverage --testPathPattern='test/(unit|integration).*\\.test\\.(js|ts)$'",
"pretest": "./scripts/utils/ensure-test-dirs.sh",
"lint": "eslint src/ test/ --fix",
"lint:check": "eslint src/ test/",
"format": "prettier --write src/ test/",
"format:check": "prettier --check src/ test/",
"security:audit": "npm audit --audit-level=moderate",
"security:fix": "npm audit fix",
"setup:dev": "husky install"
},
"dependencies": {
"@octokit/rest": "^22.0.0",
"axios": "^1.6.2",
"body-parser": "^2.2.0",
"commander": "^14.0.0",
"dotenv": "^16.3.1",
"express": "^5.1.0",
"pino": "^9.7.0",
"pino-pretty": "^13.0.0"
},
"devDependencies": {
"@babel/core": "^7.27.3",
"@babel/preset-env": "^7.27.2",
"@types/body-parser": "^1.19.5",
"@types/express": "^5.0.2",
"@types/jest": "^29.5.14",
"@types/node": "^22.15.23",
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.33.0",
"babel-jest": "^30.0.0-beta.3",
"eslint": "^9.27.0",
"eslint-config-node": "^4.1.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"nodemon": "^3.0.1",
"prettier": "^3.0.0",
"supertest": "^7.1.1",
"ts-jest": "^29.3.4",
"ts-node": "^10.9.2",
"typescript": "^5.8.3"
},
"engines": {
"node": ">=20.0.0"
}
}