Conversation
|
| ) { | ||
| delayed = true | ||
| await fs.writeFile('input-stat-delayed', 'yes') | ||
| await new Promise((resolve) => setTimeout(resolve, 1500)) |
There was a problem hiding this comment.
The test holds the input file’s stat for only 1.5 seconds. If the first stylesheet response takes longer than that, the stat can finish before the test edits the CSS, so the test may pass even without the fix. Keep the stat pending until the edit to make the regression test reliable.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The change makes stylesheet generation wait for dependency registration, and the integration test covers the delayed-stat rebuild. No material merge risk is evident. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Root.generate()started recording the input stylesheet's modification time without awaiting it. When thatstatwas slower than compilation, the first transform returned with no input entry inbuildDependencies; a subsequent transform could reuse the old compiler after the stylesheet changed.Await that dependency record before compiling. The integration test holds just this
statpending until it checks the first response, then edits the root stylesheet and checks that the Vite dev server serves the new theme value. The held-stat test failed before the fix and passes afterward.Test plan
pnpm build— passed.pnpm test:integrations run vite/input-dependency-race.test.ts— failed before the fix (first response returned while the inputstatwas pending), passed after.pnpm test:integrations run vite/input-dependency-race.test.ts vite/config.test.ts -t 'rebuilds when the input stylesheet changes before its dependency stat finishes|Config files \(CJS, dev mode\)'— 2 passed.pnpm exec prettier --check integrations/vite/input-dependency-race.test.ts packages/@tailwindcss-vite/src/index.ts— passed.pnpm lintdid not complete locally: its repository-wide Prettier pass inspected generated WASM build files, and a separate package TypeScript pass reported errors outside the changed files.