rsnext/packages/next/shared/lib
Javi Velasco f354f46b3f
Deprecate nested Middleware in favor of root middleware (#36772)
This PR deprecates declaring a middleware under `pages` in favour of the project root naming it after `middleware` instead of `_middleware`. This is in the context of having a simpler execution model for middleware and also ships some refactor work. There is a ton of a code to be simplified after this deprecation but I think it is best to do it progressively.

With this PR, when in development, we will **fail** whenever we find a nested middleware but we do **not** include it in the compiler so if the project is using it, it will no longer work. For production we will **fail** too so it will not be possible to build and deploy a deprecated middleware. The error points to a page that should also be reviewed as part of **documentation**.

Aside from the deprecation, this migrates all middleware tests to work with a single middleware. It also splits tests into multiple folders to make them easier to isolate and work with. Finally it ships some small code refactor and simplifications.
2022-05-19 15:46:21 +00:00
..
i18n Add initial handling for routing tests (#36635) 2022-05-03 10:37:23 +00:00
isomorphic polish isomorphic path module (#36521) 2022-04-27 18:23:26 +00:00
page-path Deprecate nested Middleware in favor of root middleware (#36772) 2022-05-19 15:46:21 +00:00
router Deprecate nested Middleware in favor of root middleware (#36772) 2022-05-19 15:46:21 +00:00
amp-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.ts Simplify the logic for static flight response generation (#36984) 2022-05-18 13:18:28 +02:00
dynamic.tsx Hoist the desired ReactDOM import expression (#36552) 2022-04-28 19:17:23 +00:00
escape-regexp.ts perf(escapeStringRegexp): test before replace (#34472) 2022-04-16 05:42:10 +00:00
flatten.ts Refactor Page Paths utils and Middleware Plugin (#36576) 2022-04-30 11:19:27 +00:00
head-manager-context.ts next/script fix duplicate scripts (#28428) 2021-08-24 11:07:38 -05:00
head.tsx Hoist the desired ReactDOM import expression (#36552) 2022-04-28 19:17:23 +00:00
html-context.ts Revert "Revert "Make concurrent features independent from the global runtime option"" (#35490) 2022-03-26 00:05:35 +01:00
image-config-context.ts fix: make sure image-config gets transpiled (#34677) 2022-02-22 09:27:18 -05:00
image-config.ts Add experimental wildcard remotePatterns config for upstream images (#36245) 2022-05-05 02:19:16 +00:00
is-plain-object.ts fix: fixes #33314 move is-plain-object for es5 compilation (#33690) 2022-01-27 17:59:42 +00:00
loadable-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
loadable.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
loadable.js replace use-subscription with use-sync-external-store (#36733) 2022-05-08 12:19:33 +00:00
match-remote-pattern.ts Add experimental wildcard remotePatterns config for upstream images (#36245) 2022-05-05 02:19:16 +00:00
mitt.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
router-context.ts Add new target for middleware (#30299) 2021-10-26 18:50:56 +02:00
runtime-config.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
side-effect.tsx Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
styled-jsx.d.ts Reexports styled-jsx JSXStyle in nextjs (#36585) 2022-04-30 20:25:05 +00:00
styled-jsx.js Reexports styled-jsx JSXStyle in nextjs (#36585) 2022-04-30 20:25:05 +00:00
utils.ts Update status code for normalize error (#36580) 2022-05-01 09:23:06 +00:00