Skip to content

chore: improve minimizeDiff#1163

Merged
manuel3108 merged 5 commits into
feat/sv-migratefrom
chore/improve-minimizeDiff
Jul 8, 2026
Merged

chore: improve minimizeDiff#1163
manuel3108 merged 5 commits into
feat/sv-migratefrom
chore/improve-minimizeDiff

Conversation

@manuel3108

Copy link
Copy Markdown
Member

Description

This is a heavily AI based re-write of minimizeDiff. The previous implementation had a couple of major problems when run against the following test projects:

  • pkg.svelte.dev
  • svelte.dev
  • immich

For the two svelte projects the produced diff is close to perfect IMHO and only contains very understandable changes. Same applies for typescript files inside immich. For svelte files in immich, we will need to wait for sveltejs/svelte#18474, but this can happen at a later point.

Added a couple of regression tests on the go

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 7, 2026

Copy link
Copy Markdown

Install the latest version of sv from 997cba2:

pnpm add https://pkg.svelte.dev/sv/c/997cba282b6e86278f002322e279fa99d5916126

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1163

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 997cba2

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

@manuel3108 manuel3108 changed the title Chore/improve minimize diff chore: improve minimizeDiff Jul 7, 2026
@svelte-docs-bot

Copy link
Copy Markdown

…#1164)

* re-add diffLines size cap, handle trailing commas before ), trim comments

* update migrate snapshots for new minimizeDiff blank-line behavior

* update cli create snapshots for new minimizeDiff blank-line behavior
@manuel3108 manuel3108 merged commit bb46ef7 into feat/sv-migrate Jul 8, 2026
6 checks passed
@manuel3108 manuel3108 deleted the chore/improve-minimizeDiff branch July 8, 2026 19:33
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