feat(bundler): add verbose error logging to tsdown build and watch#165
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
🦋 Changeset detectedLatest commit: b459ae7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ests Co-Authored-By: Claude <noreply@anthropic.com>
Merging this PR will not alter performance
Comparing Footnotes
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 43 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis change introduces an optional Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bundler/src/build/build.ts`:
- Around line 20-33: Refactor the exported function formatBuildError to accept a
single object parameter (e.g., { phase, error, verbose }) instead of three
positional args, replace the current if/instanceof logic inside formatBuildError
with ts-pattern's match() to branch on verbose and the error type/message, and
update all call sites that invoke formatBuildError (notably the call in build.ts
that currently calls formatBuildError(...) and the call in watch.ts) to pass an
object with keys phase, error, and verbose.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f96ed92d-2da0-44e9-860e-70add95d11b5
⛔ Files ignored due to path filters (1)
.changeset/bundler-verbose-errors.mdis excluded by!.changeset/**
📒 Files selected for processing (4)
packages/bundler/src/build/build.tspackages/bundler/src/build/watch.tspackages/bundler/src/bundler.tspackages/bundler/src/types.ts
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
verboseerror logging to tsdownbuild()andwatch()steps, matching the existing behavior in buncompile()formatBuildError()helper shared by both build and watch, which includes the full error message when verbose is enabledBuildOverridestype andverboseflag toWatchOverridesfor per-call controlTest plan
pnpm typecheckpassespnpm lintpasses (0 warnings, 0 errors)pnpm testpasses (116 tests)