framework icon indicating copy to clipboard operation
framework copied to clipboard

feat(nuxi): support nuxt 2 and nuxt 3 edge releases in `nuxi upgrade` command

Open AndreyYolkin opened this issue 3 years ago • 4 comments

🔗 Linked issue

❓ Type of change

  • [x] 📖 Documentation (updates to the documentation or readme)
  • [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [ ] 👌 Enhancement (improving an existing functionality like performance)
  • [x] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR extends nuxi upgrade command usage with some new features:

  1. It respects not only stable Nuxt 3RC packages (like nuxt: "3.0.0-rc.8"), but also Nuxt 2 (nuxt & nuxt-edge) and Nuxt 3 packages, installed as npm:nuxt3@latest. This might be useful for nuxt 2 bridge users and people, who wants to get edge releases of Nuxt.
  2. It add extra --channel flag, which switches users between stable and edge releases. People in nuxt 2 can type npx nuxi upgrade --channel="edge" and get nuxt-edge package, which allows them to use bridge (Yes, this example also about bridge)
  3. It warns people who still have nuxt3 in their package.json file. It might be dangerous to find and replace all nuxt3 imports to nuxt in code, so it's just a reminder to people.

📝 Checklist

  • [ ] I have linked an issue or discussion.
  • [x] I have updated the documentation accordingly.

AndreyYolkin avatar Aug 27 '22 19:08 AndreyYolkin

Deploy Preview for nuxt3-docs ready!

Name Link
Latest commit 81ecd7dc612e10fec35f9e6eb30da1d01a0bdfb6
Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/630a69b3a087210009544b2e
Deploy Preview https://deploy-preview-6998--nuxt3-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 27 '22 19:08 netlify[bot]

Deploy Preview for nuxt3-docs ready!

Name Link
Latest commit 123872b94c8f1b1dca8095d57bfbafba545c2369
Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/630a69c30c610200084dcc2d
Deploy Preview https://deploy-preview-6998--nuxt3-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 27 '22 19:08 netlify[bot]

All changes in this PR are amazing @AndreyYolkin ❤️ Supporting both Nuxt 2 (bridge) for nuxi upgrade and switching from/to edge are both nice ideas.

I've splitted it into nuxt/nuxt.js#14731 and nuxt/nuxt.js#14741 to track (please consider making such issues beforehand next time. It is described in contribution docs)

Regardless I'm positive we can move forward based on changes in this PR but since currently I'm also working on preparing a major refactor for CLI infra (dep management and CLI builder), putting this PR into pending state until can figure out best way for Next actions.

pi0 avatar Aug 29 '22 11:08 pi0

closes nuxt/nuxt.js#13844

nandi95 avatar Aug 31 '22 11:08 nandi95

This is a nice PR; the only blocker here is upstream with our creation of a utility to remove a lot of the boilerplate within the nuxi cli. Apologies for the delay in getting that done.

Would you mind reopening this PR against https://github.com/nuxt/nuxt so we don't forget about it once that work is done? 🙏

danielroe avatar Jan 21 '23 17:01 danielroe

Excited to hear that work in progress, I also wrote a post in discussions (https://github.com/nuxt/nuxt/discussions/16025) about it. The reopened PR is here: https://github.com/nuxt/nuxt/pull/18427 . I'll close this PR, but feel free to reopen if needed.

AndreyYolkin avatar Jan 21 '23 19:01 AndreyYolkin