Skip to content

Conversation

@ainsleyclark
Copy link
Contributor

No description provided.

claude added 2 commits January 7, 2026 19:26
- Updated PayloadForm.svelte to use $props() instead of export let
- Updated Row.svelte to use $props() instead of export let
- Exported component prop types using module script blocks
- Added changeset for patch release
- Updated Column.svelte to use $props() instead of $$restProps
- Updated Container.svelte to use $props() instead of $$restProps
- Ensures full Svelte 5 runes mode compatibility
@claude

This comment has been minimized.

- $$restProps is still valid in Svelte 5 for simple pass-through components
- Only components with defined props need $props()
@claude
Copy link

claude bot commented Jan 7, 2026

Review summary

  • Overall score: 8/10
  • Critical issues: 0
  • Warnings: 1
  • Suggestions: 1
  • Recommendation: ⚠️ Approve with comments

This PR successfully migrates two Svelte components from legacy export let syntax to Svelte 5 runes mode using $props(). The implementation is correct and follows proper Svelte 5 patterns. However, the migration is incomplete as not all components in the package have been updated.

Critical issues 🔴

None

Warnings 🟡

Incomplete migration across component library

File: packages/sveltekit-helper/src/components/payload/PayloadMedia.svelte

The PayloadMedia component already uses Svelte 5 runes mode correctly with $props(), while Column.svelte and Container.svelte do not have any props and thus don't need migration. However, the PR title "fix: sveltekit-helper package errors" and the changeset description "Fixed Svelte components to use Svelte 5 runes mode instead of legacy export let syntax" suggest this was meant to be a comprehensive fix across all components.

Current state:

  • PayloadMedia.svelte - Already uses runes
  • Row.svelte - Fixed in this PR
  • PayloadForm.svelte - Fixed in this PR
  • Column.svelte - No props, no migration needed
  • Container.svelte - No props, no migration needed

All components are now consistent, but it would be worth verifying no other components exist that need updating.

Suggestions 🟢

Duplicate type import in PayloadForm

File: packages/sveltekit-helper/src/components/payload/PayloadForm.svelte:25-26

<script lang="ts" module>
import type { PayloadFormField } from '../../utils/forms/schema';
// ... type definition
</script>

<script lang="ts">
import type { PayloadFormField } from '../../utils/forms/schema'; // ← Duplicate

The PayloadFormField type is imported in both the module script and the instance script. Since the module-level import makes the type available to the entire component, the second import on line 26 is redundant and can be removed.


Implementation quality: The migration to Svelte 5 runes is implemented correctly:

  • Props are properly typed with TypeScript interfaces
  • Default values are correctly specified in the destructuring
  • Module-level type exports follow Svelte 5 conventions
  • Component functionality remains unchanged

@ainsleyclark ainsleyclark merged commit d0c2bd2 into main Jan 7, 2026
4 checks passed
@ainsleyclark ainsleyclark deleted the claude/fix-sveltekit-helper-errors-s0SBY branch January 7, 2026 19:37
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.80%. Comparing base (7f6b060) to head (071f7f7).
⚠️ Report is 451 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
+ Coverage   64.59%   69.80%   +5.21%     
==========================================
  Files         154      185      +31     
  Lines        6064     7359    +1295     
==========================================
+ Hits         3917     5137    +1220     
+ Misses       2064     2025      -39     
- Partials       83      197     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants