Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Imports from @next/font to next/font in Next15 #1298

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nishant2253
Copy link

📚 Description

This codemod refactors import statements in your code to replace @next/font with next/font, aligning with the latest Next.js module structure. It identifies and updates import paths from @next/font to next/font to ensure compatibility with the updated Next.js API.

To run this codemod run this command in project directory

codemod Next/15/Refactor-Imports-from-@next/font-to-next/font

🧪 Test Plan

Test the codemod by running it against the specified repository and Next.js folder to ensure that import statements are correctly updated from @next/font to next/font. Verify that the refactored import paths work as expected and that there are no import errors in the application.

  1. Apply the codemod to the repository available at (https://github.com/saleor/storefront)
  2. Confirm that all occurrences of @next/font are replaced with next/font.
  3. Test the application to ensure that it functions correctly with the updated import paths.
  • All the other test cases are runned in the codemod studio and present in /codemod/packages/codemods/next/15/next-font/textfixtures/

📄 Documentation to Update

If applicable, update the documentation to reflect the changes in import paths. This may include README files or other developer guides that reference @next/font.

Copy link

vercel bot commented Aug 30, 2024

@nishant2253 is attempting to deploy a commit to the Codemod Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants