diff --git a/.changeset/cool-moles-fetch.md b/.changeset/cool-moles-fetch.md new file mode 100644 index 000000000000..b202aef5ac23 --- /dev/null +++ b/.changeset/cool-moles-fetch.md @@ -0,0 +1,5 @@ +--- +'svelte-migrate': patch +--- + +suggest running migrate command with latest if migration does not exist diff --git a/packages/migrate/bin.js b/packages/migrate/bin.js index 80704a57cbcf..a643b8fa7c50 100755 --- a/packages/migrate/bin.js +++ b/packages/migrate/bin.js @@ -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}` + ) ); }