Skip to content

fix(package): remove transformed outputs when sources are deleted in watch mode - #17519

Merged
teemingc merged 5 commits into
mainfrom
triage/kit-17518-package-watch-unlink
Nov 13, 2026
Merged

teemingc merged 5 commits into
mainfrom
triage/kit-17518-package-watch-unlink

Conversation

@svelte-triage-bot

@svelte-triage-bot svelte-triage-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
  • 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 and preserved through #8922.
  • Keep chokidar rename handling (#16641) and unrelated output preservation (#13055) instead of rebuilding or wiping output on deletion.
  • Cover TypeScript/declaration removal, custom-extension directory renames, and empty-directory cleanup.

Fixes #17518

@pkg-svelte-dev

pkg-svelte-dev Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 90cf81a:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/90cf81aaa229f22642f6910e42e5957075be706c

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

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 Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90cf81a

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

Comment thread packages/package/src/index.js Resolved
Comment thread packages/package/src/index.js Resolved
@teemingc teemingc added the pkg:svelte-package Issues related to svelte-package label Nov 13, 2026
@teemingc
teemingc merged commit 8d03614 into sveltejs:main Nov 13, 2026
69 of 71 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
teemingc pushed a commit that referenced this pull request Nov 17, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @sveltejs/[email protected]

### Patch Changes

- fix: set `X-Accel-Buffering: no` on `text/event-stream` responses
whose content type has parameters, such as `charset=utf-8`
([#17687](#17687))
- Updated dependencies:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: support all bundle strategies with Vercel Skew Protection
([#17731](#17731))
- Updated dependencies:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: check the return value of async `load` functions against
`App.PageData` ([#17793](#17793))

- fix: prerender crawler finds links located after a quoted attribute
value ending with `\`
([#17688](#17688))

- fix: omit nopush from preload Link headers so Chromium can use CDN
Early Hints ([#17786](#17786))

- perf: hash a page's encoded bytes for its `ETag` and send the same
bytes as the body, and skip the hash when `setHeaders` already sets an
`etag` or the response is `no-store`
([#17674](#17674))

- chore: deprecate `adapter.emulate`
([#17769](#17769))

- fix: generate valid types for route params whose names start with a
digit, such as `[2nd]`
([#17661](#17661))

- perf: skip the `ETag` hash for a page that has a CSP nonce in it,
since no two responses are the same
([#17743](#17743))

- fix: correctly scan routes on Windows when optimising dependencies
([#17757](#17757))
## @sveltejs/[email protected]

### Patch Changes

- fix: remove transformed output files when sources are deleted in watch
mode ([#17519](#17519))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:svelte-package Issues related to svelte-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

svelte-package watch mode leaves the compiled .js of a deleted .ts file in the output

1 participant