Skip to content

Fix report-web build under TypeScript 6 - #104

Merged
droid-ash merged 1 commit into
mainfrom
fix/ts6-baseurl-deprecation
Apr 23, 2026
Merged

droid-ash merged 1 commit into
mainfrom
fix/ts6-baseurl-deprecation

Conversation

@droid-ash

@droid-ash droid-ash commented Apr 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Silence TS5101 (deprecated baseUrl) at tsconfig.base.json via ignoreDeprecations: "6.0". The baseUrl is 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.
  • Add ambient declare module '*.css' so the DTS pass accepts side-effect CSS imports in RunDetailView.tsx. Vite handles these at runtime, but the tsc program used for .d.mts emission does not.
  • Untrack package-lock.json and add it to .gitignore as requested.

Test plan

  • npm run build completes cleanly (JS + DTS + styles + Vite app)
  • CI green on this branch
  • Confirm downstream finalrun-cloud can still typecheck against the published .d.mts (types for @finalrun/common should still be inlined)

Heads-up: removing package-lock.json from VCS means npm ci no longer works and contributors/CI will regenerate their own lockfile on install. If this wasn't the intent, revert the lockfile deletion and keep only the .gitignore line as documentation.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated .gitignore to exclude package lock files from version control
    • Enhanced TypeScript configuration to support CSS file imports
    • Updated TypeScript compiler settings for deprecation handling

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>
@coderabbitai

coderabbitai Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Configuration updates to improve project setup: adding package-lock.json to gitignore, declaring CSS module types in TypeScript, and configuring TypeScript to ignore deprecation warnings up to version 6.0.

Changes

Cohort / File(s) Summary
Project Configuration
.gitignore, tsconfig.base.json
Added package-lock.json to gitignore and configured TypeScript to ignore deprecations up to version 6.0.
TypeScript Type Declarations
packages/report-web/src/css.d.ts
Added global module declaration for CSS imports to resolve TypeScript type errors on CSS file imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Hop, hop, hooray! 🐰
Lock files hidden, CSS types bright,
TypeScript warnings fade from sight,
Config tweaks make builds just right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the pull request: fixing the report-web build to work under TypeScript 6.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ts6-baseurl-deprecation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@droid-ash
droid-ash requested a review from srinidhi-lwt April 23, 2026 06:37
@droid-ash droid-ash self-assigned this Apr 23, 2026
@droid-ash droid-ash added the bug Something isn't working label Apr 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between bbfc94c and e328e78.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .gitignore
  • packages/report-web/src/css.d.ts
  • tsconfig.base.json

Comment thread tsconfig.base.json
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"ignoreDeprecations": "6.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@droid-ash
droid-ash merged commit 41458a0 into main Apr 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant