unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

v2.10.0 tracker #2522

Open pi0 opened 3 months ago

pi0 commented 3 months ago

Nitro v2.10 release had been delayed due to major (non-breaking) structure changes making sure Nitro 2.x is forward-compatible until community adoption happens. It might be delayed a little bit longer mainly to have enough time to make sure there are no regressions and well-test ecosystem compatibility.

⭐ Highlights

✅ Migration

Although migrating to Nitro v2.10 from older 2.x versions is not mandatory, it is highly recommended that you migrate:

Runtime imports

If you were previously importing from #internal/nitro/* or nitropack/runtime/* you should change them to #imports or nitropack/runtime.

--- import { defineNitroPlugin } from "#internal/nitro/plugin"
--- import { defineNitroPlugin } from "nitropack/runtime/plugin"
+++ import { defineNitroPlugin } from "#imports"
+++ import { defineNitroPlugin } from "nitropack/runtime"

Compatibility date

Adding compatibility date, make sure you can leverage from latest platform enhancements. If this config is not provided nitro will keep using v2.9 behavior for presets. Nitro will show a guide about adding it and if you are using nitro dev command it can automatically add it.

export default defineNitroConfig({
+++  compatibilityDate: "2024-06-12",
});

🌃 Try via the nightly channel

Nitro has a nightly release channel that automatically releases for every commit to try the latest changes. You can opt-in by updating your package.json:

{
  "devDependencies": {
--    "nitropack": "^2.0.0"
++    "nitropack": "npm:nitropack-nightly@latest"
  }
}

(for nuxt users)

{
  "devDependencies": {
--    "nuxt": "^3.0.0"
++    "nuxt": "npm:nuxt-nightly@latest"
  }
}

🚀 Enhancements

🩹 Fixes

💅 Refactors

📖 Documentation