Skip to content

chore: better async derived labels - #19068

Open
Rich-Harris wants to merge 1 commit into
mainfrom
better-async-derived-labels
Open

Rich-Harris wants to merge 1 commit into
mainfrom
better-async-derived-labels

Conversation

@Rich-Harris

Copy link
Copy Markdown
Member

This is a small quality of life change with no user-observable effects. Basically, it means that await expressions in the template are labelled with the code that was actually written (or something close to it) — if you have something like this...

<p>{await foo}</p>

...then the signal is labeled as {await foo()} instead of async () => (await $.track_reactivity_loss($.get(foo)))().

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of svelte from ee97519:

pnpm add https://pkg.svelte.dev/svelte/c/ee97519870fb5c8bf6ed8876c04c3278e78bb759

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/svelte/pr/19068

@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ee97519

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Comment on lines +523 to +527
return `{${fn.toString()
.replace(/^async \(\) => /, '')
.replace(/^\(/, '')
.replace(/\$\.get\((.+?)\)/, (_, name) => name)
.replace(/\$\.track_reactivity_loss\((.+?)\)\(\)/, (_, name) => name)
Comment on lines +523 to +526
return `{${fn.toString()
.replace(/^async \(\) => /, '')
.replace(/^\(/, '')
.replace(/\$\.get\((.+?)\)/, (_, name) => name)
@svelte-docs-bot

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

2 participants