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

fix: suggest running svelte-migrate with latest if migration does not exist #11362

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cool-moles-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-migrate': patch
---

suggest running migrate command with latest if migration does not exist
8 changes: 7 additions & 1 deletion packages/migrate/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ if (migrations.includes(migration)) {
migrate();
} else {
console.error(
colors.bold().red(`You must specify one of the following migrations: ${migrations.join(', ')}`)
colors
.bold()
.red(
`You must specify one of the following migrations: ${migrations.join(', ')}\n` +
'If you expected this to work, try re-running the command with the latest svelte-migrate version:\n' +
` npx svelte-migrate@latest ${migration}`
)
);
}
Loading