Skip to content
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

fix: ignore comments while comparing nodes in node_match #9197

Merged

Conversation

sina-salahshour
Copy link
Contributor

Ignore trailing comments when comparing nodes with node_match in invalidate function.

related to issue #9088
it doesn't solve the main problem of dependencies getting invalidated whenever value of a variable gets changed.
but it fixes the behavior difference between the code with and without comments

the problem is demonstrated in this repl: https://svelte.dev/repl/81bdbbbb88694b4a80d2619bd2dbfc2e?version=4.2.0

@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2023

🦋 Changeset detected

Latest commit: 4093a59

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dummdidumm
Copy link
Member

Thank you! Could you add a test to runtime that fails without the fix, and add a changeset? Then we're good to go 👍

@sina-salahshour
Copy link
Contributor Author

@dummdidumm Hi, i added a test for checking this issue, please let me know if there's any problem.

@sina-salahshour
Copy link
Contributor Author

@dummdidumm hi, just out of curiosity, did this pr have a problem in tests/changesets?

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Thank you

.changeset/thirty-steaks-dream.md Outdated Show resolved Hide resolved
@dummdidumm dummdidumm merged commit 6b9b8af into sveltejs:master Oct 19, 2023
5 of 7 checks passed
@github-actions github-actions bot mentioned this pull request Oct 19, 2023
kelvinsjk pushed a commit to kelvinsjk/svelte that referenced this pull request Oct 19, 2023
related to issue sveltejs#9088
it doesn't solve the main problem of dependencies getting invalidated whenever value of a variable gets changed.
but it fixes the behavior difference between the code with and without comments
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.

None yet

2 participants