Commit Graph

15 Commits

Author SHA1 Message Date
Kazuki Yamada
ea1cc485c2 chore(config): disable organizeImports for src/index.ts
Added override configuration to disable Biome's organizeImports feature
specifically for src/index.ts to allow manual import order management
while keeping automatic import organization enabled for other files.
2025-09-21 13:54:12 +09:00
Kazuki Yamada
ddd2814f84 fix(tests): Update test mocks to use new WorkerOptions interface 2025-08-31 16:32:49 +09:00
Kazuki Yamada
8f07b63a61 feat(core): Add runtime selection support for worker pools
Add WorkerRuntime type and configurable runtime parameter to createWorkerPool and initTaskRunner functions. This allows choosing between 'worker_threads' and 'child_process' runtimes based on performance requirements.

- Add WorkerRuntime type definition for type safety
- Add optional runtime parameter to createWorkerPool with child_process default
- Add optional runtime parameter to initTaskRunner with child_process default
- Configure fileCollectWorker to use worker_threads for better performance
- Update all test files to use WorkerRuntime type
- Add comprehensive tests for runtime parameter functionality
- Maintain backward compatibility with existing code

The fileCollectWorker now benefits from worker_threads faster startup and shared memory, while other workers continue using child_process for stability.
2025-08-31 16:18:12 +09:00
Kazuki Yamada
b7fe6f25c5 fix(lint): resolve all oxlint warnings for code quality
- Remove unused imports across 67 files (RepomixConfigMerged, QueryCapture, etc.)
- Fix unused parameters by prefixing with underscore (_context, _index, etc.)
- Remove unused catch parameters using modern JavaScript syntax
- Fix require-yield warnings in generator functions
- Remove unused variables and interface declarations
- Add oxlint configuration to ignore integration test fixtures

Resolves 144 linting warnings while preserving all functionality.
All 743 tests continue to pass. Code quality significantly improved.
2025-08-24 18:25:08 +09:00
Kazuki Yamada
5b5ee862a0 feat(cli): Add --include-logs option for git commit history
This feature allows users to include git log information in the output to help AI understand development patterns and file change relationships.

Key changes:
- Added --include-logs and --include-logs-count CLI options
- Default to 50 commits, configurable via CLI and config file
- Includes commit date, message, and changed file paths (excludes commit hashes)
- Added security checks and metrics calculation for git logs
- Updated output templates to include git logs section
- Comprehensive test coverage and TypeScript fixes

Resolves user request for including git commit history to provide development context for AI analysis.
2025-08-22 14:09:58 +09:00
Kazuki Yamada
748ce7cead refactor(shared): Consolidate initTaskRunner implementations
Add generic initTaskRunner function to processConcurrency.ts to eliminate
duplicate initialization logic across multiple modules. This reduces code
duplication and provides consistent worker pool management with proper
type safety through generic parameters.

- Add TaskRunner<T, R> interface and initTaskRunner function
- Remove duplicate createTaskRunner wrappers from 5 modules
- Update all deps parameters to use shared initTaskRunner directly
- Maintain type safety with explicit generic type parameters
- Update corresponding test mocks to match new signature

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 23:47:07 +09:00
Kazuki Yamada
97d4171176 fix(core): Fix TokenCounter memory leak in worker threads
TokenCounter instances were not being properly freed when worker threads
were terminated by Tinypool's idle timeout. This caused memory leaks
when using runCli as a library.

Changes:
- Add SIGTERM/SIGINT handlers to fileMetricsWorker and outputMetricsWorker
- Add freeTokenCounters function with proper cleanup and debug logging
- Convert all worker usage to consistent taskRunner pattern with cleanup
- Add cleanupWorkerPool function for explicit worker pool termination
- Update all related tests to match new taskRunner interface

The fix ensures TokenCounter resources are properly freed when workers
terminate, preventing memory accumulation during library usage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 23:25:23 +09:00
Kazuki Yamada
c1edfff082 Rename initTinypool to initWorker for better semantic clarity
Updated all references throughout the codebase:
- Import statements in 5 core modules
- Function calls in file processing, metrics, and security modules
- Test mocks and descriptions
- Maintained backward compatibility and functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 00:27:34 +09:00
Kazuki Yamada
a2c5a15838 feat: migrate from Piscina to Tinypool for worker thread management
Replace Piscina with Tinypool to significantly reduce bundle size (800KB → 38KB) while maintaining full API compatibility and performance. This migration affects all worker thread pools used in file processing, security checks, and metrics calculations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 00:23:56 +09:00
Kazuki Yamada
7c2bac6d30 test(security): Update logger mock to use repomixLogLevels and clean up expectations 2025-05-25 14:45:59 +09:00
Kazuki Yamada
e67d0bf384 test(security): Add tests for runSecurityCheck with Git diff processing 2025-05-25 12:18:58 +09:00
Kazuki Yamada
265845a9c0 fix(gitDiff): Fix syntax and tests 2025-05-10 11:26:05 +09:00
Kazuki Yamada
6c9a149eb5 feat(pack): Simplify various processes 2025-01-25 13:55:19 +09:00
Yamada Dev
64fcd143db feat(pack): Execute various processes such as security checks in multi-threaded mode 2025-01-25 12:01:39 +09:00
Kazuki Yamada
487287c22c refactor: refine directory structure and files 2024-10-08 01:17:05 +09:00