@nuxt/docs-nightly 5.0.0-2611201206-83e0e32 → 5.0.0-2611201901-e715de6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1042,6 +1042,10 @@ The `H3Event` object now uses Web standard APIs:
1042
1042
  + event.res.headers.append('set-cookie', cookie)
1043
1043
  ```
1044
1044
 
1045
+ #### Server Middleware Runs for WebSocket Upgrades
1046
+
1047
+ Server middleware runs for a WebSocket upgrade request, which Nitro v2 didn't do. An error thrown there doesn't refuse the handshake. To refuse a handshake, return or throw a `Response` from the `upgrade` hook of the WebSocket handler.
1048
+
1045
1049
  #### `useRuntimeConfig()` No Longer Accepts `event`
1046
1050
 
1047
1051
  In Nitro v3, `useRuntimeConfig()` no longer requires (or accepts) an `event` argument in server routes:
@@ -1998,7 +2002,7 @@ export default defineNuxtConfig({
1998
2002
 
1999
2003
  With it on, `import { defineEventHandler, getQuery } from 'h3'`, `useRuntimeConfig(event)`, `defineNitroPlugin`, `cachedEventHandler`, `useEvent`, auto-imports from subdirectories of `server/utils/`, handlers registered without a `route`, and server files with a dotted suffix in their names, such as `server/middleware/auth.global.ts`, all keep working. A handler that returns a string still sends it as `text/html` unless it sets a content type, and a handler that returns `null` still responds with `204 No Content`, or with the status it set.
2000
2004
 
2001
- The h3 v1 helpers that ended the response still end it. When a handler defined with `defineEventHandler` calls `sendRedirect`, `sendNoContent`, `send`, `sendStream`, `sendError`, `sendProxy` or `sendWebResponse`, or handles a preflight request with `handleCors`, Nuxt sends that response even if the handler returns nothing, and the request goes no further. A handler defined with `defineEventHandler({ handler, websocket })` still gets its `websocket` hooks for a WebSocket upgrade request.
2005
+ The h3 v1 helpers that ended the response still end it. When a handler defined with `defineEventHandler` calls `sendRedirect`, `sendNoContent`, `send`, `sendStream`, `sendError`, `sendProxy` or `sendWebResponse`, or handles a preflight request with `handleCors`, Nuxt sends that response even if the handler returns nothing, and the request goes no further. A handler defined with `defineEventHandler({ handler, websocket })` still gets its `websocket` hooks for a WebSocket upgrade request. The `onRequest` hooks of such a handler run for the requests it responds to, and not for its WebSocket upgrade request.
2002
2006
 
2003
2007
  With `nitroLegacy.h3` on, Nuxt also removes any server alias that points `h3` at h3 v1, such as one a module sets so that `h3` resolves to the copy `nitropack` depends on, and reports it with `NUXT_B9015`. Nitro v3 can't run h3 v1, so with the alias removed, Nitro v2 code gets the h3 v1 helpers and other server code gets h3 v2.
2004
2008
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/docs-nightly",
3
- "version": "5.0.0-2611201206-83e0e32",
3
+ "version": "5.0.0-2611201901-e715de6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",