Skip to content

feat: update [email protected].* + @sveltejs/[email protected] #4056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jun 17, 2024

Conversation

ndom91
Copy link
Contributor

@ndom91 ndom91 commented Jun 10, 2024

Changes

  • Update svelte and @sveltejs/kit to their latest versions

  • Refactor out the usage of SLOTS = $$props.$$slots

  • Components are no longer classes under the hood, therefore refactored out the few new Component instantiations to use the mount import from svelte instead

  • CommitMessageInput was throwing an error regarding it's use of the ResizeObserver ("loop completed with undelivered messages"), with a bit of simplification it doesn't seem like the useResize action was necessary in the textareas/textinputs. The preexisting event handlers adjusting the input's height oninput or onchange were enough, so I removed the use:useResize action on those components.

  • Upgraded the @sentry/sveltekit package

  • <-- svelte-ignore .. options now are snake_case instead of kebab-case

  • Example Convert <Modal /> component to svelte 5

    • $props() instead of export let ..
    • i.e. onclose prop / function instead of createEventDispatcher and dispatch('close' ...)
    • #snippets instead of <slots />
    • Refactor out <form /> in Modal body and therefore also rm the implicit relationship with type="submit" buttons in favor of explicit onclick handlers on those submit btns
  • svelte-check / eslint now complains about the following, so I cleaned these up:

    • $page is an invalid variable - seems to be something that's just not supported in eslint-plugin-svelte yet so I disable-next-line-ed it for now
    • Removed unused / left over classes
    • Removed unused / left over props
    • Couldn't find types for tinykeys, so I added a dummy module declaration to the root app.d.ts
    • Refactored self-closing html tags for non-void elements (i.e. <div /> -> <div></div>)
    • It didn't like the Action enum in PullRequestButton.svelte, so updated that to an as const object

Todos

  • Double check the #snippet usage when passing arguments to the nameless default snippet, i.e. children. Do you pick up those arguments like in v4? (<Modal ... let:items />)?

Notes

@ndom91 ndom91 force-pushed the ndom91/svelte-5 branch from 4923163 to 8e59830 Compare June 12, 2024 11:48
@ndom91 ndom91 force-pushed the ndom91/svelte-5 branch 2 times, most recently from 3dd88e8 to 45e9ab7 Compare June 12, 2024 14:24
fix: more Modal cleanup
@ndom91 ndom91 force-pushed the ndom91/svelte-5 branch from 45e9ab7 to 499e8a1 Compare June 12, 2024 14:25
@ndom91 ndom91 marked this pull request as ready for review June 12, 2024 14:35
@ndom91 ndom91 requested review from mtsgrd, Caleb-T-Owens and krlvi June 12, 2024 14:36
@ndom91 ndom91 merged commit db7681f into master Jun 17, 2024
48 checks passed
@ndom91 ndom91 deleted the ndom91/svelte-5 branch June 17, 2024 14:27
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.

1 participant