Files
Jiwon Choi 5d9ab72cef Add next upgrade --ai and security vulnerability coverage (#98562)
> [!TIP]
> Recommended to review commit by commit.

This PR adds `next upgrade --experimental-ai="security"` flag (alias
`--ai`), which is targeted to help users leverage agents to upgrade
their app to the safe major version when their app's Next.js version has
any security advisories.

Once the command is ran from the user, Next.js will detect the installed
agent harness in user's device, currently limited to Codex and Claude,
and will proceed with starting an agent session once approved. If it is
called within an agent session, the work will continue off within that
agent.

`next upgrade --ai` simply does two things:

- prepare the relevant context to temporary dir
- print hand off prompt, guiding to read those context

The context will guide the agent to run relevant codemods and migration
checklist to proceed. This PR is a base core of the workflow, and will
have wrappers of entry point around this. Also, will add "latest" and
"future" as follow up, which will cover the app to be always latest, and
adopt the future defaults like Cache Components.

This PR also sets up the evals infra and adds evals.
2026-09-18 00:52:20 +02:00

44 lines
1.3 KiB
JSON

{
"compilerOptions": {
"noEmit": true,
"strict": false,
"allowJs": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "bundler",
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
"paths": {
"development-sandbox": ["./test/lib/development-sandbox"],
"next-test-utils": ["./test/lib/next-test-utils"],
"next-webdriver": ["./test/lib/next-webdriver"],
"e2e-utils": ["./test/lib/e2e-utils"],
"e2e-utils/*": ["./test/lib/e2e-utils/*"],
"test-data-service/*": ["./test/lib/test-data-service/*"],
"test-log": ["./test/lib/test-log"],
"router-act": ["./test/lib/router-act"],
"@next/playwright": ["./packages/next-playwright/src/index.ts"]
}
},
"include": [
"run-tests.js",
"evals/lib/**/*",
"evals/next-upgrade/experiments/**/*.ts",
"evals/next-upgrade/lib/**/*.ts",
"evals/next-upgrade/security/setup.ts",
"test/**/*.test.ts",
"test/**/*.test.tsx",
"test/**/*.util.ts",
"test/e2e/app-dir/use-cache-custom-handler/*.js",
"test/lib/**/*.ts",
"scripts/**/*.js",
"scripts/**/*.cjs",
"scripts/**/*.mjs",
"scripts/**/*.ts",
"turbo/**/*.ts"
],
"exclude": ["scripts/minimal-server.js"]
}