rsnext/packages
Javi Velasco 7584b02b34
Remove Middleware Preflight (#37490)
* Refactor data fetching to support getting headers

* Relax `getNextPathnameInfo` type

* Add test for middleware internal redirects

* Export `ParsedRelativeUrl` type

* Refactor `getMiddlewareEffects`

* Move rewrite i18n test to middleware rewrite tests

* Fix bug parsing pathname info

* Normalize data requests to page requests for middleware

* Ensure there is a header `x-nextjs-matched-path` for middleware rewrites on data requests

* Extract `getDataHref` to a function

* Stop using `getDataHref` for flight

* Always set the query in `dataHref` independently of if it is SSG

* Add test for recursive rewrites

* Refactor dynamicPath validation to `matchHrefAndAsPath`

* Add `dataHref` to `FetchDataOutput`

* Extract `matchesMiddleware` function

* Add `hasMiddleware` option to `fetchNextData`

* Move preflight test

* Remove preflight test

* Add middleware prefetch tests

* Remove preflight

* Attempt to reduce bundle size

Include `withMiddlewareEffects` and `matchHrefAndAsPath` into `router`

Bring `getDataHref` back to `page-loader`

Bring `resolveDynamicRoute` back to `router`

* Reduce arg duplication for `withMiddlewareEffects`

* Remove some async/await and spreads to reduce bundle size

* Upgrade `edge-runtime` & clone `Request` on redirects to mutate headers

* Add some rewrite tests

Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-08 10:41:28 -05:00
..
create-next-app v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
eslint-config-next v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
eslint-plugin-next v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next Remove Middleware Preflight (#37490) 2022-06-08 10:41:28 -05:00
next-bundle-analyzer v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-codemod v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-env v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-mdx v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-plugin-storybook v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-polyfill-module v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-polyfill-nomodule v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
next-swc v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
react-dev-overlay v12.1.7-canary.31 2022-06-06 16:49:30 -05:00
react-refresh-utils Update to latest version of @swc/helpers (#37531) 2022-06-08 11:52:26 +02:00