Skip to content

feat(migrate): defer formatting to project format script#1149

Open
jycouet wants to merge 2 commits into
feat/sv-migratefrom
feat/migrate-format-strategy
Open

feat(migrate): defer formatting to project format script#1149
jycouet wants to merge 2 commits into
feat/sv-migratefrom
feat/migrate-format-strategy

Conversation

@jycouet

@jycouet jycouet commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

sv migrate now formats using the project's own setup instead of always shelling out to prettier on the modified files:

  • Runs the nearest format/fmt package.json script, walking up from cwd to the workspace root (monorepo-aware via existing findWorkspaceRoot, which uses pnpm-workspace.yaml/workspaces - submodule-safe, not .git). The script owns its scope and tooling, so biome/dprint/etc. are respected.
  • Falls back to today's prettier --write --ignore-unknown <files> when no such script exists.

formatFiles gains a strategy param; create/add keep the existing files-only behavior.

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 08b7916

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

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

@svelte-docs-bot

Copy link
Copy Markdown

@jycouet jycouet force-pushed the feat/app-state-migration branch from f31ac69 to 55fc80c Compare June 24, 2026 11:35
jycouet added 2 commits June 24, 2026 13:42
Migrate now runs the nearest `format`/`fmt` package.json script (walking up
to the workspace root) before falling back to prettier on modified files.
`formatFiles` takes a `strategy` param; create/add keep the files-only path.
@jycouet jycouet force-pushed the feat/migrate-format-strategy branch from 29ade20 to 08b7916 Compare June 24, 2026 11:43
@jycouet jycouet changed the base branch from feat/app-state-migration to feat/sv-migrate June 24, 2026 11:43
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.

1 participant