Files
Jiwon ChoiandGitHub 26a2bab6fa next-upgrade: prompt (un)install only when there's a change (#71308)
### Why?

When running next-upgrade, `next-request-geo-ip` requires to install
`@vercel/functions` and `built-in-next-font` makes `@next/font` no
longer needed. We added a prompt to ask user whether to (un)install it
at https://github.com/vercel/next.js/pull/71038 but it prompts even if
there were no transform occurred.

This is unnecessary layer so we only prompt when there's a change caused
from the codemod.

### No Modification


https://github.com/user-attachments/assets/3acfdb24-c8e7-4189-9c81-4765ce748822

### With Modification


https://github.com/user-attachments/assets/f44a8b1c-c75a-4446-afc8-f74111de939d

---------
2024-10-21 13:15:27 -07:00

9 lines
213 B
TypeScript

// @ts-nocheck
import { type NextRequest, NextResponse } from 'next/server'
export function GET(request: NextRequest) {
const geo = request.geo
const ip = request.ip
return NextResponse.json({ geo, ip })
}