Skip to content

chore: remove dependency on chokidar - #16621

Merged
Rich-Harris merged 9 commits into
sveltejs:version-3from
Nic-Polumeyv:package-native-watch
Aug 4, 2026
Merged

chore: remove dependency on chokidar#16621
Rich-Harris merged 9 commits into
sveltejs:version-3from
Nic-Polumeyv:package-native-watch

Conversation

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

Same treatment #15272 gave sade, applied to chokidar: watch mode needs recursive file events with unlink detection, and fs.watch(dir, { recursive: true }) provides them at the Node 22 floor.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 3, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 6ae7a0a:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/6ae7a0a8e75fe76ecd256638b15229cc7d7bcc9c

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

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6ae7a0a

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/package 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

@teemingc

teemingc commented Aug 3, 2026

Copy link
Copy Markdown
Member

Seems like svelte-check will still pull in chokidar and sade. Wonder if it's worth releasing a new major of svelte-check that bumps node to 22 and lets us get rid of both and more https://github.com/sveltejs/language-tools/tree/master/packages/svelte-check

@Rich-Harris

Copy link
Copy Markdown
Member

Opened sveltejs/language-tools#3092 to track that

@Rich-Harris
Rich-Harris merged commit eb3d948 into sveltejs:version-3 Aug 4, 2026
40 of 42 checks passed
@Rich-Harris

Copy link
Copy Markdown
Member

huh, tests are failing locally in packages/package now. Investigating

@Rich-Harris

Copy link
Copy Markdown
Member

Reverting: #16641

Rich-Harris added a commit that referenced this pull request Aug 4, 2026
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).
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.

3 participants