🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@RazinShafayet2007
Copy link
Contributor

Description

Adds a test case reproducing the scenario in #17277 (binding to an array index inside an async svelte:boundary).

Related Issue

Ref #17277

Motivation

The issue reported that bindings broke inside async boundaries in production builds.

I investigated this by:

  1. Creating a local reproduction of the issue using the SvelteLab code.
  2. Running npm run build and npm run preview.
  3. Verifying that the bug is already fixed on the latest version (checkboxes update correctly).
  4. Running this new test case against main with dev: false, which passes.

I am submitting this test case to ensure this behavior remains fixed and does not regress in the future.


Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time.
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.
  • If this PR changes code within packages/svelte/src, add a changeset (npx changeset).

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2025

⚠️ No Changeset found

Latest commit: 2194c7e

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

@github-actions
Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@17346

@Rich-Harris
Copy link
Member

Thank you but I'm confused — this isn't fixed, as far as I can tell. The repro in #17277 fails with the latest version of Svelte. What am I missing?

@RazinShafayet2007
Copy link
Contributor Author

RazinShafayet2007 commented Dec 12, 2025

Thanks for catching that, Rich. You are absolutely right. I went back and tested the full production build on the latest version (5.45.9), and the bug is definitely still there.

The confusing part is that I can't get this unit test to fail locally, even after updating it to match the repro exactly (adding the #each loop and setTimeout). I suspect vitest isn't replicating whatever specific bundling behavior causes this in the Vite production build.

Since I can't seem to catch this with a standard runtime test, should I look into adding an E2E test instead, or is it better to just close this PR?

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