-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: @debug does not work with proxied-state #13690
Conversation
🦋 Changeset detectedLatest commit: e4ee0f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
I think we also want to untrack it otherwise it will fire for every change within, which is now how debug tags work. |
I'm not used to
|
Not for deep state though, |
On Svelte 4 or in non-runes mode, I never used |
What I mean is that we probably want to I updated the PR and added a test :) |
Fix #13687
The
console.log()
generated by@debug
receive the proxied state, which causes two bugs :This simple fix simply call
$.snapshot()
on all the values of{@debug}
in order to print correctly the proxied states.This adds an unnecessary call when the variable is not a proxy-state, but I don't think this is problematic for a debugging tool.
Note : I don't know if this requires a test (and I wouldn't know how to write it)
Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint