Skip to content

feat(package): add --preserve-output flag - #13055

Merged
Rich-Harris merged 12 commits into
sveltejs:mainfrom
GauBen:feat(package)/preserve-output
Aug 20, 2025
Merged

Rich-Harris merged 12 commits into
sveltejs:mainfrom
GauBen:feat(package)/preserve-output

Conversation

@GauBen

@GauBen GauBen commented Nov 26, 2024 •

Copy link
Copy Markdown
Contributor

Closes #13041

It adds a CLI flag not to rimraf the output directory, --preserve-output, plus tests


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

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

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@changeset-bot

changeset-bot Bot commented Nov 26, 2024 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6976513

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 Minor

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

@Rich-Harris

Copy link
Copy Markdown
Member

Comment thread .changeset/mean-ladybugs-sparkle.md Resolved
@benmccann benmccann added pkg:svelte-package Issues related to svelte-package feature / enhancement New feature or request labels Nov 26, 2024
Comment thread .changeset/mean-ladybugs-sparkle.md Resolved
@svelte-docs-bot

Copy link
Copy Markdown

@GauBen GauBen changed the title feat(package): added --preserve-output flag feat(package): add --preserve-output flag Feb 22, 2025
Comment thread .changeset/mean-ladybugs-sparkle.md Resolved

@Rich-Harris Rich-Harris left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@Rich-Harris
Rich-Harris merged commit 46efb63 into sveltejs:main Aug 20, 2025
@github-actions github-actions Bot mentioned this pull request Aug 20, 2025
Copilot AI pushed a commit to Stadly/kit that referenced this pull request Mar 6, 2026
* feat(package): added --preserve-output flag

* Create mean-ladybugs-sparkle.md

* Update 70-packaging.md

* Update .changeset/mean-ladybugs-sparkle.md

* Update .changeset/mean-ladybugs-sparkle.md

* Update .changeset/mean-ladybugs-sparkle.md

* oops

* goddammit

---------

Co-authored-by: Rich Harris <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
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

feature / enhancement New feature or request pkg:svelte-package Issues related to svelte-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

svelte-package --preserve-output

3 participants