Skip to content

Revert "chore: remove dependency on chokidar" - #16641

Merged
Rich-Harris merged 1 commit into
version-3from
revert-16621-package-native-watch
Aug 4, 2026
Merged

Rich-Harris merged 1 commit into
version-3from
revert-16621-package-native-watch

Conversation

@Rich-Harris

Copy link
Copy Markdown
Member

Reverts #16621 — doing this rather than fixing it because it's not a Kit 3 priority.

This broke stuff silently (because watch tests don't run in CI). The issue is that renames aren't properly accounted for — renaming a directory foo to bar (or sub to sub2 in the test) means that pending unlink events are created for everything inside foo, with no corresponding events for the files that are now inside bar. As a result, files are removed from the output directory instead of being renamed (or recreated).

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 4, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 89349d3:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/89349d3e4cc6b1206dc6118106d76c2d648ee8d4

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16641

@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 89349d3

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

@svelte-docs-bot

Copy link
Copy Markdown

@Rich-Harris
Rich-Harris merged commit b48cdb7 into version-3 Aug 4, 2026
25 checks passed
@Rich-Harris
Rich-Harris deleted the revert-16621-package-native-watch branch August 4, 2026 16:58
teemingc added a commit that referenced this pull request Nov 13, 2026
…watch mode (#17519)

- Watch creation uses normalized `file.dest`, but deletion used source
`file.name`, leaving compiled JavaScript and custom-extension Svelte
outputs behind.
- Reuse the writer’s output mapping rather than special-casing
TypeScript; retain incremental cleanup introduced in
[#4658](#4658) and preserved through
[#8922](#8922).
- Keep chokidar rename handling
([#16641](#16641)) and unrelated
output preservation
([#13055](#13055)) instead of
rebuilding or wiping output on deletion.
- Cover TypeScript/declaration removal, custom-extension directory
renames, and empty-directory cleanup.

Fixes #17518

<!--
svelte-triage-bot:feedback-baseline:26cc741518be003772b96099701173a8f5534c95
-->

---------

Co-authored-by: svelte-triage-bot <[email protected]>
Co-authored-by: Tee Ming <[email protected]>
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