Fix knip duplicate-export failure breaking lint on main - #4718
Conversation
knip's duplicate-exports rule flags MAX_EXTERNAL_SOURCE_MAP_BYTES re-exporting the MAX_INLINE_SOURCE_MAP_BYTES binding. Route both caps through a private shared constant so they stay distinct exported symbols with the same value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
+ci-run-hosted |
Hosted CI RequestedTriggered 9 workflow(s) for View progress in the Actions tab. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe source-map support module introduces a shared private 50 MB byte ceiling and updates both inline and external source-map limit exports to reference it directly. ChangesSource-map limit centralization
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
ReviewOverview: Fixes a red Correctness
Code quality
Test coverage
Risk: Very low. This is a pure refactor to satisfy a static-analysis tool; no logic paths changed. No security implications. No blocking issues found — this looks ready to merge as an unblock for the open-PR queue. |
Greptile SummaryThis PR preserves both source-map size limits while separating their exports for knip.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Fix knip duplicate-export failure on mai..." | Re-trigger Greptile |
size-limit report 📦
|
Why
Main is red: the
Lint JS and Rubyworkflow fails onpnpm exec knipsince #4711 merged (failing run). knip's duplicate-exports rule flagsMAX_EXTERNAL_SOURCE_MAP_BYTES = MAX_INLINE_SOURCE_MAP_BYTESinvmSourceMapSupport.tsas one value exported under two names. A red lint gate on main fails every PR branch, so this blocks the whole open-PR queue.What
Route both source-map size caps through a private shared constant (
MAX_SOURCE_MAP_BYTES) so the two exports stay distinct symbols with the same value. No behavior change; the intentional unit difference (string length vs bytes-on-disk) documented in the surrounding comments is preserved.Test plan
pnpm exec knip→ exit 0 (was exit 1 withDuplicate exports (1))pnpm exec knip --production→ exit 0pnpm exec jest tests/vmSourceMapSupport.test.tsinpackages/react-on-rails-pro-node-renderer→ 57 passed🤖 Generated with Claude Code
Summary by CodeRabbit