-
Notifications
You must be signed in to change notification settings - Fork 7
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
build: svelte v5 (without components migration) #548
Draft
peterpeterparker
wants to merge
23
commits into
main
Choose a base branch
from
build/svelte-v5-libs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peterpeterparker
added a commit
that referenced
this pull request
Dec 10, 2024
# Motivation Svelte v5 appears to add `<!---->` comments in the DOM when rendering deprecated `slot` elements. As a result, the tooltip tests that read HTML to compare text would not be compatible. # Notes Related to PR #548. # Changes - Replace usage of `innerHTML` to compare text in the `Tooltip` test with `textContent`.
peterpeterparker
added a commit
that referenced
this pull request
Dec 17, 2024
# Motivation Using an `$on` callback for testing is deprecated in Svelte v5 (PR #548). Instead, we will now use the `events` option of `render`, which itself will eventually be replaced by the library. To minimize changes in the Svelte v5 PR, we refactored the test to use a utility function that handles rendering and event binding. # Changes - Introduce and use `renderWithEvents` utilitiy. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want to use the most recent tools, but we also want to avoid being left behind, notably in terms of security. For example, SvelteKit is going to patch a minor issue with cookies only in a future version. That's why we are migrating to Svelte v5.
Notes
This PR updates the dependencies and makes the required configuration changes. No components are migrated since Svelte v5 is backward compatible with how Svelte v4 is composed.
Changes - App
@sveltejs/[email protected]
must be pinned to avoid Vite v6Changes - Tests
ResizeObserver
andelement.animate
required by Svelte v5$on
and$set
as documented https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes$state
for test purpose because "rune is only available inside.svelte
and.svelte.js/ts
files"svelte/internal
config overwrite ("Your application, or one of its dependencies, imported from 'svelte/internal', which was a private module used by Svelte 4 components that no longer exists in Svelte 5.")Changes - Screenshots
main
the code snippet of the targeted page was actually not rendered correctly. A new line was missing and the type of the propertyexport let button: HTMLButtonElement | undefined
was not rendered. I did not managed to fix that on main.