
- Updated
Upgrade a library to a new major version
This prompt plans a major version upgrade, such as a router or framework, for code like yours. It lists the breaking changes with before and after examples and an upgrade order that keeps the app working.
Act as a senior developer planning an upgrade. Library: [e.g. React Router] from version [OLD] to [NEW] How we use it: [PASTE THE MAIN FILES OR DESCRIBE] Tests we have: [e.g. unit tests, no end-to-end tests] List the breaking changes that affect code like mine, with before and after examples. Give me an upgrade order that keeps the app working, including any codemods or compatibility modes. Tell me what to test by hand afterwards. If you are not sure about a detail of the new version, say so and point me to the library's own migration guide.
Always check the library's own migration guide too. AI knowledge of very new versions can be out of date.
Get a better result
The breaking changes in the new version that touch code like yours, with before and after examples, an upgrade order that keeps the app running, any codemods or compatibility modes, and a list of things to test by hand.
Pasting how you use the library narrows a long changelog down to the changes that touch your code. The line about tests sets how cautious the plan should be. The request to say when it is unsure is honest about a real limit: models can lag behind very new releases, so pointing you to the official migration guide is part of a good answer.
It describes changes from a different version.
Fix: Give the exact old and new version numbers, and check each breaking change in the library’s own migration guide, as the tip says.
- The plan upgrades everything in one big step. Ask for small steps that each leave the app working, with a commit after each.
- Peer dependencies break after the upgrade. Paste your package file and ask which other packages need to move to a matching version.
Ask for the case for and against upgrading now, including how long the old version will get security fixes, if the project says.
List the screens and flows I must test by hand after this upgrade, ordered by how likely they are to break.
More chat & writing prompts
See all 465 →More like this
- Add secure login to a web appClaude · ChatGPT · Gemini
- Plan a safe technology migrationChatGPT · Gemini · Claude
- Start a new hobby in 30 daysChatGPT · Gemini · Claude
- Check a UI component for accessibilityClaude · ChatGPT · Gemini
- Write a GitHub Actions workflowChatGPT · Gemini · Claude



