next-upgrade

Upgrade Next.js projects to the latest stable version with codemods and dependency updates.

2|Updated Jun 11, 2024
One-click install
npx skills add https://github.com/gutierrezp22/administracion-departamentos --skill next-upgrade-gutierrezp22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-upgrade
Source: https://github.com/gutierrezp22/administracion-departamentos/tree/main/.cursor/skills/next-upgrade
Command: npx skills add https://github.com/gutierrezp22/administracion-departamentos --skill next-upgrade-gutierrezp22

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of upgrading a Next.js project to the latest version, handling dependency updates and applying necessary code transformations.

Core Features & Use Cases

  • Version Detection: Automatically identifies the current Next.js version from package.json.
  • Codemod Execution: Runs official Next.js codemods to refactor code for breaking changes.
  • Dependency Management: Updates Next.js and related React dependencies to the latest versions.
  • Use Case: You need to upgrade your Next.js application from version 14 to 15. This Skill will guide you through fetching the correct migration guide, running the necessary codemods, updating your dependencies, and performing a test build.

Quick Start

Use the next-upgrade skill to upgrade the project to the latest Next.js version.

Frequently Asked Questions about next-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Next.js to the latest version automatically?

To upgrade Next.js automatically, this Skill detects your current version from package.json, fetches official migration guides, executes relevant codemods for breaking changes, and updates dependencies to the latest stable release.

How do Next.js codemods work during a framework migration?

Next.js codemods work by automatically refactoring your codebase to handle breaking changes introduced in newer versions. This Skill runs official codemods to ensure your project code aligns with the latest framework requirements.

Can I upgrade Next.js incrementally instead of jumping to the latest version?

Yes, you can upgrade Next.js incrementally. This Skill supports incremental upgrades, allowing you to update your project step-by-step while ensuring compatibility with React and TypeScript types throughout the process.

What is the best way to update React dependencies alongside a Next.js migration?

The best way to update React dependencies during a Next.js migration is through automated dependency management. This Skill updates Next.js and related React dependencies together to ensure full compatibility across your tech stack.

Does upgrading Next.js with codemods also update TypeScript types?

Yes, upgrading Next.js with codemods also updates TypeScript types. This Skill ensures compatibility with React and TypeScript types while applying necessary code transformations and updating your project dependencies.