diff --git a/packages/next-upgrade/index.ts b/packages/next-upgrade/index.ts index 5a7e4de87af070..4ced195a3041eb 100644 --- a/packages/next-upgrade/index.ts +++ b/packages/next-upgrade/index.ts @@ -152,6 +152,11 @@ async function run(): Promise { console.log( `\n${chalk.green('✔')} Your Next.js project has been upgraded successfully. ${chalk.bold('Time to ship! 🚢')}` ) + + const changelogUrl = await getChangelogUrl(targetNextPackageJson.version) + if (changelogUrl) { + console.log(`📝 Changelog: ${chalk.underline(changelogUrl)}`) + } } async function detectWorkspace(appPackageJson: any): Promise { @@ -364,4 +369,13 @@ async function suggestTurbopack(packageJson: any): Promise { responseCustomDevScript.customDevScript || devScript } +async function getChangelogUrl(version: string): Promise { + const url = `https://github.com/vercel/next.js/releases/tag/v${version}` + const res = await fetch(url) + if (res.status === 200) { + return url + } + return null +} + run().catch(console.error)