Skip to content

fix(1951): Typescript errors - RolldownError - Parse failure#1952

Open
ybriys wants to merge 1 commit into
themesberg:mainfrom
ybriys:fix-1951
Open

fix(1951): Typescript errors - RolldownError - Parse failure#1952
ybriys wants to merge 1 commit into
themesberg:mainfrom
ybriys:fix-1951

Conversation

@ybriys

@ybriys ybriys commented Jun 24, 2026

Copy link
Copy Markdown

🔗 Related issue (optional)

Closes #1951


📑 Description

Fixes typescript errors on build based on fixes provided by https://github.com/sorinpopescu


🔍 PR Type

  • Bug fix
  • Feature
  • Documentation
  • Refactor / Code cleanup
  • Build / Tooling
  • Other (please describe)

🚦 PR Status

  • Draft (work in progress, not ready for review)
  • Ready for review ✅

✅ Checklist

  • My code follows the existing code style
  • I have run pnpm lint && pnpm check && pnpm test:e2e and all tests pass
  • CoderabbitAI review has been completed and actionable suggestions were reviewed
  • I have updated documentation if my changes require it
  • My PR is based on the latest main branch (not the published npm version)
  • I have checked accessibility where applicable (ARIA, keyboard nav, etc.)
  • I have reviewed the rendered component in the browser

Summary by CodeRabbit

  • Chores
    • Improved internal type consistency across the command palette, date picker, and scroll spy components.
    • No user-facing behavior changed; search filtering, date formatting, and section scrolling work as before.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@ybriys is attempting to deploy a commit to the Bergside Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Three component files replace shorthand optional parameter syntax (param?) with explicit param: Type | undefined = undefined declarations. This fixes parse failures reported by rolldown (used in Vite 8) which does not support the shorthand optional parameter form. Runtime behavior is unchanged in all three cases.

Changes

Optional Parameter Syntax Fix

Layer / File(s) Summary
Optional parameter syntax fix across three components
src/lib/command-palette/CommandPalette.svelte, src/lib/datepicker/Datepicker.svelte, src/lib/scroll-spy/ScrollSpy.svelte
check, formatDate, isSameDate, and scrollToSection parameters are changed from param? shorthand to param: Type | undefined = undefined to resolve rolldown parse errors at build/SSR time.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐇 A question mark caused all the fuss,
The parser said "No more of this!"
So I swapped ? for undefined,
And Vite 8 was finally appeased.
The build runs clean, the errors gone —
Hop hop, the bunny carries on! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the core fix: resolving TypeScript/Rolldown parse failures in flowbite-svelte.
Linked Issues check ✅ Passed The changes directly fix the parse failures in Datepicker, CommandPalette, and ScrollSpy by replacing optional parameters.
Out of Scope Changes check ✅ Passed All edits are limited to the three files named in the issue and only adjust parameter typing for the parser fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description matches the template well, with issue link, summary, type, status, and checklist completed.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typescript errors: RolldownError: Parse failure: Parse failed with 1 error:

1 participant