Repository navigation
Fix report-web build under TypeScript 6 - #104
Conversation
tsup's DTS worker hardcodes baseUrl: "." into the TS program it constructs for rollup-plugin-dts, which trips TS5101 under TS 6. Opt in to ignoreDeprecations "6.0" at the base tsconfig so every package inherits it. Also add an ambient *.css module declaration so the DTS pass accepts side-effect CSS imports (Vite handles them at runtime, but the tsc program used for declarations does not). Untrack package-lock.json and add it to .gitignore. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📝 WalkthroughWalkthroughConfiguration updates to improve project setup: adding Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
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 `@tsconfig.base.json`:
- Line 20: The tsconfig flag ignoreDeprecations ("ignoreDeprecations": "6.0") is
a temporary escape hatch masking the upstream tsup DTS worker injecting baseUrl
and must be removed later; create a follow-up tracking issue (or add a TODO in
the repo) referencing tsup and its DTS worker behavior, state that the goal is
to drop ignoreDeprecations once tsup stops injecting baseUrl, and include the
exact symbols/strings to watch for: "ignoreDeprecations", "baseUrl", and "tsup
DTS worker" so the change can be revisited when upgrading to TS 6.x.
🪄 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: CHILL
Plan: Pro
Run ID: fc2c9fcd-81d9-4bc1-aebe-86fe5cb717ff
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
.gitignorepackages/report-web/src/css.d.tstsconfig.base.json
| "noImplicitReturns": true, | ||
| "noFallthroughCasesInSwitch": true | ||
| "noFallthroughCasesInSwitch": true, | ||
| "ignoreDeprecations": "6.0" |
There was a problem hiding this comment.
Track removal of the ignoreDeprecations escape hatch.
ignoreDeprecations: "6.0" only silences warnings for APIs slated for removal in TS 6.0 — once the toolchain actually upgrades to TS 6.x, baseUrl (and any other APIs this currently masks) will become hard errors and this flag will itself be rejected. Since the root cause lives in tsup's DTS worker hardcoding baseUrl (per the PR description), please file/track a follow-up to drop this flag after tsup stops injecting baseUrl, so this temporary mitigation doesn't silently linger and hide unrelated deprecations in the meantime.
Want me to open a tracking issue referencing the upstream tsup behavior?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tsconfig.base.json` at line 20, The tsconfig flag ignoreDeprecations
("ignoreDeprecations": "6.0") is a temporary escape hatch masking the upstream
tsup DTS worker injecting baseUrl and must be removed later; create a follow-up
tracking issue (or add a TODO in the repo) referencing tsup and its DTS worker
behavior, state that the goal is to drop ignoreDeprecations once tsup stops
injecting baseUrl, and include the exact symbols/strings to watch for:
"ignoreDeprecations", "baseUrl", and "tsup DTS worker" so the change can be
revisited when upgrading to TS 6.x.
Summary
baseUrl) at tsconfig.base.json viaignoreDeprecations: "6.0". ThebaseUrlis injected by tsup's DTS worker (node_modules/tsup/dist/rollup.js#L6837), not our config — this flag is the TS-team-blessed stopgap until tsup stops hardcoding it.declare module '*.css'so the DTS pass accepts side-effect CSS imports in RunDetailView.tsx. Vite handles these at runtime, but thetscprogram used for.d.mtsemission does not.package-lock.jsonand add it to.gitignoreas requested.Test plan
npm run buildcompletes cleanly (JS + DTS + styles + Vite app)finalrun-cloudcan still typecheck against the published.d.mts(types for@finalrun/commonshould still be inlined)🤖 Generated with Claude Code
Summary by CodeRabbit
.gitignoreto exclude package lock files from version control