The existing enableCompileCache() in bin/repomix.cjs only applied to the
main process. Tinypool child_process workers (defaultAction) were spawned
without compile cache because NODE_COMPILE_CACHE env var was not set.
Capture the cache directory from enableCompileCache()'s return value and
set it as NODE_COMPILE_CACHE env var so child_process workers inherit it
at startup — before any ESM static imports are resolved.
Note: worker_threads workers (fileProcess, securityCheck, calculateMetrics)
already benefit from the main process's enableCompileCache() call since
they share the same V8 isolate.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enable V8 compile cache via module.enableCompileCache() to speed up
CLI startup by caching compiled bytecode across runs.
Benchmarks show ~10% improvement in startup time (148ms vs 165ms).
Available on Node.js >= 22.8.0, gracefully skipped on older versions.
Can be disabled via NODE_DISABLE_COMPILE_CACHE env var.
- Change from hard requirement to soft recommendation for Node.js 20+
- Use console.warn instead of console.error with process.exit
- Allow execution with older Node.js versions while showing warning
- Update .node-version to 24.0.1
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>