fix(test): extract shellQuote to standalone module to fix broken main#1900
fix(test): extract shellQuote to standalone module to fix broken main#1900
Conversation
…resolution
config-io.ts importing shellQuote from runner.ts caused vitest to load
runner.ts from source, where the CJS require("./platform") fails because
Node cannot resolve .ts extensions. Extract shellQuote into shell-quote.ts
so config-io.ts no longer pulls in runner.ts and its platform dependency.
Fixes the MODULE_NOT_FOUND error in sandbox-version.test.ts and
secret-redaction.test.ts introduced by #1370.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA refactoring that extracts the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
57ea768f(PR fix(cli): harden config file permission handling #1370) — thechecksworkflow fails withCannot find module './platform'insandbox-version.test.tsandsecret-redaction.test.tsimport { shellQuote } from "./runner"toconfig-io.ts, which causes vitest to loadrunner.tsfrom source.runner.tsuses CJSrequire("./platform")which fails because Node's nativerequire()cannot resolve.tsextensionsshellQuoteinto a standaloneshell-quote.tsmodule with no heavy dependencies, and pointconfig-io.tsat it.runner.tskeeps its own copy for CJS consumersFiles changed
src/lib/shell-quote.tsshellQuotesrc/lib/config-io.ts./shell-quoteinstead of./runnertest/runner.test.tsrunner.tsandshell-quote.tsTest plan
sandbox-version.test.tspasses (was failing)secret-redaction.test.tspasses (was failing)runner.test.tsregression guard passes (updated)🤖 Generated with Claude Code
Summary by CodeRabbit