Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: unify svelte-migrate to sv #376

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

manuel3108
Copy link
Member

@manuel3108 manuel3108 commented Dec 24, 2024

Initial goal here was to unify the UX between stuff like sv create and svelte-migrate

done:

  • use picocolors instead of kleur
  • use @clack/prompts instead of prompts

todo:

  • print package version and intro similar to sv
  • print outro (also if action is cancelled or process is exited)
  • remove most console.log as they look ugly inside the prompts and convert them to notes or information etc.
  • unify code (there is so much trivially duplicated code)
  • closes List out options for npx sv migrate #302

I opted to not use our own @sveltejs/clack-prompts package and instead use the public one. Using our own package would either require us to publish the package, or include svelte-migrate inside our own rollup config to bundle it. Not a fan of both options, thus decided to use the public package instead.

Copy link

changeset-bot bot commented Dec 24, 2024

🦋 Changeset detected

Latest commit: 12d5c5f

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

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

@manuel3108 manuel3108 changed the title chore: unify migrate chore: unify svelte-migrate to sv Dec 24, 2024
Copy link

pkg-pr-new bot commented Dec 24, 2024

Open in Stackblitz

npm i https://pkg.pr.new/sveltejs/cli/sv@376
npm i https://pkg.pr.new/sveltejs/cli/svelte-migrate@376

commit: 651b3c2

@manuel3108 manuel3108 marked this pull request as ready for review December 27, 2024 10:13
@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-cli-376-svelte.vercel.app/

this is an automated message

@manuel3108
Copy link
Member Author

There are obviously lots of potential improvements that could still be done here. The main goal here was to unify the UX and this is a huge step forward imo.

The following things might be done at a later stage:

  • use package-manager-detector from {pm} install messages
  • further deduplicate and unify source code
  • deprecate old migrations / remove the respective source code and make the users use [email protected]

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.

List out options for npx sv migrate
2 participants