From 81ce18573af089fb5d47afe86a1886e2f0ef05b7 Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Thu, 10 Nov 2022 11:06:50 +0000 Subject: [PATCH 01/25] fix: redirect isr index pages without a sub path --- packages/runtime/src/helpers/redirects.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/src/helpers/redirects.ts b/packages/runtime/src/helpers/redirects.ts index 764117596e..b8303ac500 100644 --- a/packages/runtime/src/helpers/redirects.ts +++ b/packages/runtime/src/helpers/redirects.ts @@ -143,8 +143,8 @@ const generateStaticIsrRewrites = ({ return } // The default locale is served from the root, not the localised path - if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}/`)) { - route = route.slice(i18n.defaultLocale.length + 1) + if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}`)) { + route = route.slice(i18n.defaultLocale.length + 1) || '/' staticRoutePaths.add(route) if (matchesMiddleware(middleware, route)) { staticIsrRoutesThatMatchMiddleware.push(route) From 1dd7c26cdade5aaa0187c8adf80986a333bc79b8 Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Thu, 10 Nov 2022 11:07:19 +0000 Subject: [PATCH 02/25] test: update homepage to test isr i18n --- demos/default/pages/index.js | 19 +++++++++----- test/__snapshots__/index.js.snap | 44 ++++++++++++++++---------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/demos/default/pages/index.js b/demos/default/pages/index.js index 591f01b551..c216967ac4 100644 --- a/demos/default/pages/index.js +++ b/demos/default/pages/index.js @@ -17,13 +17,14 @@ const Index = ({ shows, nodeEnv }) => {
-

This is a demo of a NextJS application with Server-Side Rendering (SSR).

+

This is a demo of a NextJS application with Incremental Static Regeneration (ISR).

-

Server-Side Rendering

+

Incremental Static Regeneration

- This page is server-side rendered. It fetches a random list of five TV shows from the TVmaze REST API. Refresh - this page to see it change. + This page is rendered by an On-Demand Builder (ODB) function. It fetches a random list of five TV shows from + the TVmaze REST API. After 60 seconds, the ODB cache is invalidated and the page will be re-rendered on the + next request.

NODE_ENV: {nodeEnv} @@ -176,7 +177,7 @@ const Index = ({ shows, nodeEnv }) => { ) } -Index.getInitialProps = async function () { +export async function getStaticProps(context) { const dev = process.env.CONTEXT !== 'production' // Set a random page between 1 and 100 @@ -190,7 +191,13 @@ Index.getInitialProps = async function () { const res = await fetch(server) const data = await res.json() - return { shows: data.slice(0, 5), nodeEnv: process.env.NODE_ENV || null } + return { + props: { + shows: data.slice(0, 5), + nodeEnv: process.env.NODE_ENV || null, + }, + revalidate: 60, + } } export default Index diff --git a/test/__snapshots__/index.js.snap b/test/__snapshots__/index.js.snap index 3e0a8fc8ec..043ace5b7d 100644 --- a/test/__snapshots__/index.js.snap +++ b/test/__snapshots__/index.js.snap @@ -454,10 +454,10 @@ Array [ "to": "/fr/", }, Object { - "force": false, + "force": true, "from": "/", "status": 200, - "to": "/.netlify/functions/___netlify-handler", + "to": "/.netlify/builders/___netlify-odb-handler", }, Object { "from": "/_ipx/*", @@ -633,10 +633,10 @@ Array [ "to": "/.netlify/functions/___netlify-handler", }, Object { - "force": false, + "force": true, "from": "/_next/data/build-id/en/index.json", "status": 200, - "to": "/.netlify/functions/___netlify-handler", + "to": "/.netlify/builders/___netlify-odb-handler", }, Object { "force": false, @@ -692,6 +692,12 @@ Array [ "status": 200, "to": "/.netlify/functions/___netlify-handler", }, + Object { + "force": true, + "from": "/_next/data/build-id/es.json", + "status": 200, + "to": "/.netlify/builders/___netlify-odb-handler", + }, Object { "force": false, "from": "/_next/data/build-id/es/500.json", @@ -824,12 +830,6 @@ Array [ "status": 200, "to": "/.netlify/functions/___netlify-handler", }, - Object { - "force": false, - "from": "/_next/data/build-id/es/index.json", - "status": 200, - "to": "/.netlify/functions/___netlify-handler", - }, Object { "force": false, "from": "/_next/data/build-id/es/layouts.json", @@ -884,6 +884,12 @@ Array [ "status": 200, "to": "/.netlify/functions/___netlify-handler", }, + Object { + "force": true, + "from": "/_next/data/build-id/fr.json", + "status": 200, + "to": "/.netlify/builders/___netlify-odb-handler", + }, Object { "force": false, "from": "/_next/data/build-id/fr/500.json", @@ -1016,12 +1022,6 @@ Array [ "status": 200, "to": "/.netlify/functions/___netlify-handler", }, - Object { - "force": false, - "from": "/_next/data/build-id/fr/index.json", - "status": 200, - "to": "/.netlify/functions/___netlify-handler", - }, Object { "force": false, "from": "/_next/data/build-id/fr/layouts.json", @@ -1177,10 +1177,10 @@ Array [ "to": "/.netlify/functions/___netlify-handler", }, Object { - "force": false, - "from": "/es/", + "force": true, + "from": "/es", "status": 200, - "to": "/.netlify/functions/___netlify-handler", + "to": "/.netlify/builders/___netlify-odb-handler", }, Object { "force": false, @@ -1375,10 +1375,10 @@ Array [ "to": "/.netlify/functions/___netlify-handler", }, Object { - "force": false, - "from": "/fr/", + "force": true, + "from": "/fr", "status": 200, - "to": "/.netlify/functions/___netlify-handler", + "to": "/.netlify/builders/___netlify-odb-handler", }, Object { "force": false, From ab4596bd7ab431fe112a2a53028a940ac316843d Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Mon, 5 Dec 2022 14:48:24 +0000 Subject: [PATCH 03/25] feat: proxy tv maze api --- demos/default/pages/api/shows/[...params].js | 2 +- demos/default/pages/api/shows/[id].js | 2 +- demos/default/pages/deep/import.js | 2 +- .../default/pages/getServerSideProps/[id].js | 2 +- .../getServerSideProps/all/[[...slug]].js | 2 +- .../pages/getServerSideProps/static.js | 2 +- demos/default/pages/getStaticProps/[id].js | 2 +- demos/default/pages/getStaticProps/static.js | 2 +- .../pages/getStaticProps/with-revalidate.js | 2 +- .../getStaticProps/withFallback/[...slug].js | 2 +- .../pages/getStaticProps/withFallback/[id].js | 2 +- .../withFallbackBlocking/[id].js | 2 +- .../getStaticProps/withRevalidate/[id].js | 2 +- .../withRevalidate/withFallback/[id].js | 2 +- .../withFallbackBlocking/[id].js | 2 +- demos/default/pages/index.js | 4 +- demos/default/pages/shows/[...params].js | 2 +- demos/default/pages/shows/[id].js | 2 +- demos/default/public/shows1.json | 520 +++++++++--------- demos/middleware/pages/shows/[id].js | 2 +- demos/middleware/pages/shows/static/[id].js | 2 +- 21 files changed, 284 insertions(+), 278 deletions(-) diff --git a/demos/default/pages/api/shows/[...params].js b/demos/default/pages/api/shows/[...params].js index e8f510d08b..05a9873ba2 100644 --- a/demos/default/pages/api/shows/[...params].js +++ b/demos/default/pages/api/shows/[...params].js @@ -10,7 +10,7 @@ export default async (req, res) => { const id = params[0] // Get the data - const fetchRes = await fetch(`https://api.tvmaze.com/shows/${id}`) + const fetchRes = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await fetchRes.json() // If show was found, return it diff --git a/demos/default/pages/api/shows/[id].js b/demos/default/pages/api/shows/[id].js index 54f8a41b73..ab5b76be8c 100644 --- a/demos/default/pages/api/shows/[id].js +++ b/demos/default/pages/api/shows/[id].js @@ -7,7 +7,7 @@ export default async (req, res) => { const { id } = query // Get the data - const fetchRes = await fetch(`https://api.tvmaze.com/shows/${id}`) + const fetchRes = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await fetchRes.json() // If show was found, return it diff --git a/demos/default/pages/deep/import.js b/demos/default/pages/deep/import.js index 89a27deb88..43183eaa3d 100644 --- a/demos/default/pages/deep/import.js +++ b/demos/default/pages/deep/import.js @@ -25,7 +25,7 @@ const Show = ({ show }) => ( ) export const getServerSideProps = async ({ params }) => { - const res = await fetch('https://api.tvmaze.com/shows/42') + const res = await fetch('https://tvproxy.netlify.app/shows/42') const data = await res.json() return { diff --git a/demos/default/pages/getServerSideProps/[id].js b/demos/default/pages/getServerSideProps/[id].js index 2ff080fe03..4f6a6d2dae 100644 --- a/demos/default/pages/getServerSideProps/[id].js +++ b/demos/default/pages/getServerSideProps/[id].js @@ -34,7 +34,7 @@ export const getServerSideProps = async ({ params }) => { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() // Set error code if show item could not be found diff --git a/demos/default/pages/getServerSideProps/all/[[...slug]].js b/demos/default/pages/getServerSideProps/all/[[...slug]].js index eefc1b2997..4820b4bcf3 100644 --- a/demos/default/pages/getServerSideProps/all/[[...slug]].js +++ b/demos/default/pages/getServerSideProps/all/[[...slug]].js @@ -34,7 +34,7 @@ export const getServerSideProps = async ({ params }) => { // The ID to render const { slug } = params - const res = await fetch(`https://api.tvmaze.com/shows/${slug[0]}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${slug[0]}`) const data = await res.json() // Set error code if show item could not be found diff --git a/demos/default/pages/getServerSideProps/static.js b/demos/default/pages/getServerSideProps/static.js index 3c07c2994a..c421ff7855 100644 --- a/demos/default/pages/getServerSideProps/static.js +++ b/demos/default/pages/getServerSideProps/static.js @@ -22,7 +22,7 @@ const Show = ({ show }) => ( ) export const getServerSideProps = async ({ params }) => { - const res = await fetch('https://api.tvmaze.com/shows/42') + const res = await fetch('https://tvproxy.netlify.app/shows/42') const data = await res.json() return { diff --git a/demos/default/pages/getStaticProps/[id].js b/demos/default/pages/getStaticProps/[id].js index 52c176e7c2..21671ff5a8 100644 --- a/demos/default/pages/getStaticProps/[id].js +++ b/demos/default/pages/getStaticProps/[id].js @@ -28,7 +28,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/static.js b/demos/default/pages/getStaticProps/static.js index 7f45686882..e75260ce78 100644 --- a/demos/default/pages/getStaticProps/static.js +++ b/demos/default/pages/getStaticProps/static.js @@ -16,7 +16,7 @@ const Show = ({ show }) => ( ) export async function getStaticProps(context) { - const res = await fetch(`https://api.tvmaze.com/shows/71`) + const res = await fetch(`https://tvproxy.netlify.app/shows/71`) const data = await res.json() return { diff --git a/demos/default/pages/getStaticProps/with-revalidate.js b/demos/default/pages/getStaticProps/with-revalidate.js index fbc8d5e93d..97f3b0d62c 100644 --- a/demos/default/pages/getStaticProps/with-revalidate.js +++ b/demos/default/pages/getStaticProps/with-revalidate.js @@ -16,7 +16,7 @@ const Show = ({ show }) => ( ) export async function getStaticProps(context) { - const res = await fetch(`https://api.tvmaze.com/shows/71`) + const res = await fetch(`https://tvproxy.netlify.app/shows/71`) const data = await res.json() return { diff --git a/demos/default/pages/getStaticProps/withFallback/[...slug].js b/demos/default/pages/getStaticProps/withFallback/[...slug].js index eb94451b9c..14d60cd65e 100644 --- a/demos/default/pages/getStaticProps/withFallback/[...slug].js +++ b/demos/default/pages/getStaticProps/withFallback/[...slug].js @@ -42,7 +42,7 @@ export async function getStaticProps({ params }) { const { slug } = params const id = slug[slug.length - 1] - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/withFallback/[id].js b/demos/default/pages/getStaticProps/withFallback/[id].js index 238b11480d..86f019ab5c 100644 --- a/demos/default/pages/getStaticProps/withFallback/[id].js +++ b/demos/default/pages/getStaticProps/withFallback/[id].js @@ -41,7 +41,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/withFallbackBlocking/[id].js b/demos/default/pages/getStaticProps/withFallbackBlocking/[id].js index e9c220ba50..825fd4376c 100644 --- a/demos/default/pages/getStaticProps/withFallbackBlocking/[id].js +++ b/demos/default/pages/getStaticProps/withFallbackBlocking/[id].js @@ -30,7 +30,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/withRevalidate/[id].js b/demos/default/pages/getStaticProps/withRevalidate/[id].js index 887756f894..95a8f24923 100644 --- a/demos/default/pages/getStaticProps/withRevalidate/[id].js +++ b/demos/default/pages/getStaticProps/withRevalidate/[id].js @@ -29,7 +29,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/withRevalidate/withFallback/[id].js b/demos/default/pages/getStaticProps/withRevalidate/withFallback/[id].js index faa37227da..fa5520d515 100644 --- a/demos/default/pages/getStaticProps/withRevalidate/withFallback/[id].js +++ b/demos/default/pages/getStaticProps/withRevalidate/withFallback/[id].js @@ -42,7 +42,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js b/demos/default/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js index 0284c4e139..ec2bec5aba 100644 --- a/demos/default/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js +++ b/demos/default/pages/getStaticProps/withRevalidate/withFallbackBlocking/[id].js @@ -29,7 +29,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() const time = new Date().toLocaleTimeString() diff --git a/demos/default/pages/index.js b/demos/default/pages/index.js index c216967ac4..198e9a903e 100644 --- a/demos/default/pages/index.js +++ b/demos/default/pages/index.js @@ -184,8 +184,8 @@ export async function getStaticProps(context) { const randomPage = Math.floor(Math.random() * 100) + 1 // FIXME: stub out in dev const server = dev - ? `https://api.tvmaze.com/shows?page=${randomPage}` - : `https://api.tvmaze.com/shows?page=${randomPage}` + ? `https://tvproxy.netlify.app/shows/page/${randomPage}` + : `https://tvproxy.netlify.app/shows/page/${randomPage}` // Get the data const res = await fetch(server) diff --git a/demos/default/pages/shows/[...params].js b/demos/default/pages/shows/[...params].js index dff413c918..0c53886299 100644 --- a/demos/default/pages/shows/[...params].js +++ b/demos/default/pages/shows/[...params].js @@ -47,7 +47,7 @@ CatchAll.getInitialProps = async ({ res: req, query }) => { const id = params[0] // Get the data - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() // Set error code if show item could not be found diff --git a/demos/default/pages/shows/[id].js b/demos/default/pages/shows/[id].js index acf9c4c471..b812bb41be 100644 --- a/demos/default/pages/shows/[id].js +++ b/demos/default/pages/shows/[id].js @@ -35,7 +35,7 @@ Show.getInitialProps = async ({ res: req, query }) => { const { id } = query // Get the data - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() // Set error code if show item could not be found diff --git a/demos/default/public/shows1.json b/demos/default/public/shows1.json index 4755d47621..e19c26e9d7 100644 --- a/demos/default/public/shows1.json +++ b/demos/default/public/shows1.json @@ -1,272 +1,278 @@ -[{ - "id": 250, - "url": "https://www.tvmaze.com/shows/250/kirby-buckets", - "name": "Kirby Buckets", - "type": "Scripted", - "language": "English", - "genres": ["Comedy"], - "status": "Ended", - "runtime": 30, - "averageRuntime": 30, - "premiered": "2014-10-20", - "ended": "2017-02-02", - "officialSite": "http://disneyxd.disney.com/kirby-buckets", - "schedule": { - "time": "07:00", - "days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"] - }, - "rating": { - "average": null - }, - "weight": 69, - "network": { - "id": 25, - "name": "Disney XD", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" - } - }, - "webChannel": { - "id": 83, - "name": "DisneyNOW", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" - } - }, - "dvdCountry": null, - "externals": { - "tvrage": 37394, - "thetvdb": 278449, - "imdb": "tt3544772" - }, - "image": { - "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4600.jpg", - "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4600.jpg" - }, - "summary": "

The single-camera series that mixes live-action and animation stars Jacob Bertrand as the title character. Kirby Buckets introduces viewers to the vivid imagination of charismatic 13-year-old Kirby Buckets, who dreams of becoming a famous animator like his idol, Mac MacCallister. With his two best friends, Fish and Eli, by his side, Kirby navigates his eccentric town of Forest Hills where the trio usually find themselves trying to get out of a predicament before Kirby's sister, Dawn, and her best friend, Belinda, catch them. Along the way, Kirby is joined by his animated characters, each with their own vibrant personality that only he and viewers can see.

", - "updated": 1617744408, - "_links": { - "self": { - "href": "https://api.tvmaze.com/shows/250" +[ + { + "id": 250, + "url": "https://www.tvmaze.com/shows/250/kirby-buckets", + "name": "Kirby Buckets", + "type": "Scripted", + "language": "English", + "genres": ["Comedy"], + "status": "Ended", + "runtime": 30, + "averageRuntime": 30, + "premiered": "2014-10-20", + "ended": "2017-02-02", + "officialSite": "http://disneyxd.disney.com/kirby-buckets", + "schedule": { + "time": "07:00", + "days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"] }, - "previousepisode": { - "href": "https://api.tvmaze.com/episodes/1051658" - } - } -}, { - "id": 251, - "url": "https://www.tvmaze.com/shows/251/downton-abbey", - "name": "Downton Abbey", - "type": "Scripted", - "language": "English", - "genres": ["Drama", "Family", "Romance"], - "status": "Ended", - "runtime": 60, - "averageRuntime": 71, - "premiered": "2010-09-26", - "ended": "2015-12-25", - "officialSite": "http://www.itv.com/downtonabbey", - "schedule": { - "time": "21:00", - "days": ["Sunday"] - }, - "rating": { - "average": 9.1 - }, - "weight": 96, - "network": { - "id": 35, - "name": "ITV", - "country": { - "name": "United Kingdom", - "code": "GB", - "timezone": "Europe/London" - } - }, - "webChannel": null, - "dvdCountry": null, - "externals": { - "tvrage": 26615, - "thetvdb": 193131, - "imdb": "tt1606375" - }, - "image": { - "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4601.jpg", - "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4601.jpg" - }, - "summary": "

The Downton Abbey estate stands a splendid example of confidence and mettle, its family enduring for generations and its staff a well-oiled machine of propriety. But change is afoot at Downton--change far surpassing the new electric lights and telephone. A crisis of inheritance threatens to displace the resident Crawley family, in spite of the best efforts of the noble and compassionate Earl, Robert Crawley; his American heiress wife, Cora his comically implacable, opinionated mother, Violet and his beautiful, eldest daughter, Mary, intent on charting her own course. Reluctantly, the family is forced to welcome its heir apparent, the self-made and proudly modern Matthew Crawley himself none too happy about the new arrangements. As Matthew's bristly relationship with Mary begins to crackle with electricity, hope for the future of Downton's dynasty takes shape. But when petty jealousies and ambitions grow among the family and the staff, scheming and secrets--both delicious and dangerous--threaten to derail the scramble to preserve Downton Abbey. Downton Abbey offers a spot-on portrait of a vanishing way of life.

", - "updated": 1627415536, - "_links": { - "self": { - "href": "https://api.tvmaze.com/shows/251" + "rating": { + "average": null }, - "previousepisode": { - "href": "https://api.tvmaze.com/episodes/623237" - } - } -}, { - "id": 252, - "url": "https://www.tvmaze.com/shows/252/girl-meets-world", - "name": "Girl Meets World", - "type": "Scripted", - "language": "English", - "genres": ["Drama", "Comedy", "Family"], - "status": "Ended", - "runtime": 30, - "averageRuntime": 30, - "premiered": "2014-06-27", - "ended": "2017-01-20", - "officialSite": "http://disneychannel.disney.com/girl-meets-world", - "schedule": { - "time": "18:00", - "days": ["Friday"] - }, - "rating": { - "average": 7.7 - }, - "weight": 72, - "network": { - "id": 78, - "name": "Disney Channel", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" - } - }, - "webChannel": { - "id": 83, - "name": "DisneyNOW", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" - } - }, - "dvdCountry": null, - "externals": { - "tvrage": 33436, - "thetvdb": 267777, - "imdb": "tt2543796" - }, - "image": { - "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/316/792450.jpg", - "original": "https://static.tvmaze.com/uploads/images/original_untouched/316/792450.jpg" - }, - "summary": "

Girl Meets World is based on ABC's hugely popular sitcom, Boy Meets World (1993). Set in New York City, the show tells the wonderfully funny heartfelt stories that Boy Meets World is renowned for - only this time from a tween girl's perspective - as the curious and bright 7th grader Riley Matthews and her quick-witted friend Maya Fox embark on an unforgettable middle school experience. But their plans for a carefree year will be adjusted slightly under the watchful eyes of Riley's parents - dad Cory, who's also a faculty member (and their new History teacher), and mom Topanga, who owns a trendy after school hangout that specializes in pudding.

", - "updated": 1621082326, - "_links": { - "self": { - "href": "https://api.tvmaze.com/shows/252" + "weight": 69, + "network": { + "id": 25, + "name": "Disney XD", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "webChannel": { + "id": 83, + "name": "DisneyNOW", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "dvdCountry": null, + "externals": { + "tvrage": 37394, + "thetvdb": 278449, + "imdb": "tt3544772" }, - "previousepisode": { - "href": "https://api.tvmaze.com/episodes/1011244" + "image": { + "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4600.jpg", + "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4600.jpg" + }, + "summary": "

The single-camera series that mixes live-action and animation stars Jacob Bertrand as the title character. Kirby Buckets introduces viewers to the vivid imagination of charismatic 13-year-old Kirby Buckets, who dreams of becoming a famous animator like his idol, Mac MacCallister. With his two best friends, Fish and Eli, by his side, Kirby navigates his eccentric town of Forest Hills where the trio usually find themselves trying to get out of a predicament before Kirby's sister, Dawn, and her best friend, Belinda, catch them. Along the way, Kirby is joined by his animated characters, each with their own vibrant personality that only he and viewers can see.

", + "updated": 1617744408, + "_links": { + "self": { + "href": "https://tvproxy.netlify.app/shows/250" + }, + "previousepisode": { + "href": "https://tvproxy.netlify.app/episodes/1051658" + } } - } -}, { - "id": 253, - "url": "https://www.tvmaze.com/shows/253/hells-kitchen", - "name": "Hell's Kitchen", - "type": "Reality", - "language": "English", - "genres": ["Food"], - "status": "Running", - "runtime": 60, - "averageRuntime": 60, - "premiered": "2005-05-30", - "ended": null, - "officialSite": "https://www.fox.com/hells-kitchen", - "schedule": { - "time": "20:00", - "days": ["Monday"] }, - "rating": { - "average": 7.1 - }, - "weight": 93, - "network": { - "id": 4, - "name": "FOX", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" + { + "id": 251, + "url": "https://www.tvmaze.com/shows/251/downton-abbey", + "name": "Downton Abbey", + "type": "Scripted", + "language": "English", + "genres": ["Drama", "Family", "Romance"], + "status": "Ended", + "runtime": 60, + "averageRuntime": 71, + "premiered": "2010-09-26", + "ended": "2015-12-25", + "officialSite": "http://www.itv.com/downtonabbey", + "schedule": { + "time": "21:00", + "days": ["Sunday"] + }, + "rating": { + "average": 9.1 + }, + "weight": 96, + "network": { + "id": 35, + "name": "ITV", + "country": { + "name": "United Kingdom", + "code": "GB", + "timezone": "Europe/London" + } + }, + "webChannel": null, + "dvdCountry": null, + "externals": { + "tvrage": 26615, + "thetvdb": 193131, + "imdb": "tt1606375" + }, + "image": { + "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4601.jpg", + "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4601.jpg" + }, + "summary": "

The Downton Abbey estate stands a splendid example of confidence and mettle, its family enduring for generations and its staff a well-oiled machine of propriety. But change is afoot at Downton--change far surpassing the new electric lights and telephone. A crisis of inheritance threatens to displace the resident Crawley family, in spite of the best efforts of the noble and compassionate Earl, Robert Crawley; his American heiress wife, Cora his comically implacable, opinionated mother, Violet and his beautiful, eldest daughter, Mary, intent on charting her own course. Reluctantly, the family is forced to welcome its heir apparent, the self-made and proudly modern Matthew Crawley himself none too happy about the new arrangements. As Matthew's bristly relationship with Mary begins to crackle with electricity, hope for the future of Downton's dynasty takes shape. But when petty jealousies and ambitions grow among the family and the staff, scheming and secrets--both delicious and dangerous--threaten to derail the scramble to preserve Downton Abbey. Downton Abbey offers a spot-on portrait of a vanishing way of life.

", + "updated": 1627415536, + "_links": { + "self": { + "href": "https://tvproxy.netlify.app/shows/251" + }, + "previousepisode": { + "href": "https://tvproxy.netlify.app/episodes/623237" + } } }, - "webChannel": null, - "dvdCountry": null, - "externals": { - "tvrage": 3828, - "thetvdb": 74897, - "imdb": "tt0437005" - }, - "image": { - "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/324/811405.jpg", - "original": "https://static.tvmaze.com/uploads/images/original_untouched/324/811405.jpg" - }, - "summary": "

In Hell's Kitchen, aspiring chefs are put through an intense culinary academy to prove they possess the right combination of ingredients to win a life-changing grand prize.

", - "updated": 1631607953, - "_links": { - "self": { - "href": "https://api.tvmaze.com/shows/253" + { + "id": 252, + "url": "https://www.tvmaze.com/shows/252/girl-meets-world", + "name": "Girl Meets World", + "type": "Scripted", + "language": "English", + "genres": ["Drama", "Comedy", "Family"], + "status": "Ended", + "runtime": 30, + "averageRuntime": 30, + "premiered": "2014-06-27", + "ended": "2017-01-20", + "officialSite": "http://disneychannel.disney.com/girl-meets-world", + "schedule": { + "time": "18:00", + "days": ["Friday"] + }, + "rating": { + "average": 7.7 + }, + "weight": 72, + "network": { + "id": 78, + "name": "Disney Channel", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "webChannel": { + "id": 83, + "name": "DisneyNOW", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "dvdCountry": null, + "externals": { + "tvrage": 33436, + "thetvdb": 267777, + "imdb": "tt2543796" }, - "previousepisode": { - "href": "https://api.tvmaze.com/episodes/2118484" + "image": { + "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/316/792450.jpg", + "original": "https://static.tvmaze.com/uploads/images/original_untouched/316/792450.jpg" + }, + "summary": "

Girl Meets World is based on ABC's hugely popular sitcom, Boy Meets World (1993). Set in New York City, the show tells the wonderfully funny heartfelt stories that Boy Meets World is renowned for - only this time from a tween girl's perspective - as the curious and bright 7th grader Riley Matthews and her quick-witted friend Maya Fox embark on an unforgettable middle school experience. But their plans for a carefree year will be adjusted slightly under the watchful eyes of Riley's parents - dad Cory, who's also a faculty member (and their new History teacher), and mom Topanga, who owns a trendy after school hangout that specializes in pudding.

", + "updated": 1621082326, + "_links": { + "self": { + "href": "https://tvproxy.netlify.app/shows/252" + }, + "previousepisode": { + "href": "https://tvproxy.netlify.app/episodes/1011244" + } } - } -}, { - "id": 254, - "url": "https://www.tvmaze.com/shows/254/world-series-of-poker", - "name": "World Series of Poker", - "type": "Sports", - "language": "English", - "genres": [], - "status": "Running", - "runtime": 60, - "averageRuntime": 65, - "premiered": "2006-08-22", - "ended": null, - "officialSite": null, - "schedule": { - "time": "21:00", - "days": ["Monday", "Tuesday", "Sunday"] }, - "rating": { - "average": 9 - }, - "weight": 77, - "network": { - "id": 180, - "name": "ESPN2", - "country": { - "name": "United States", - "code": "US", - "timezone": "America/New_York" + { + "id": 253, + "url": "https://www.tvmaze.com/shows/253/hells-kitchen", + "name": "Hell's Kitchen", + "type": "Reality", + "language": "English", + "genres": ["Food"], + "status": "Running", + "runtime": 60, + "averageRuntime": 60, + "premiered": "2005-05-30", + "ended": null, + "officialSite": "https://www.fox.com/hells-kitchen", + "schedule": { + "time": "20:00", + "days": ["Monday"] + }, + "rating": { + "average": 7.1 + }, + "weight": 93, + "network": { + "id": 4, + "name": "FOX", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "webChannel": null, + "dvdCountry": null, + "externals": { + "tvrage": 3828, + "thetvdb": 74897, + "imdb": "tt0437005" + }, + "image": { + "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/324/811405.jpg", + "original": "https://static.tvmaze.com/uploads/images/original_untouched/324/811405.jpg" + }, + "summary": "

In Hell's Kitchen, aspiring chefs are put through an intense culinary academy to prove they possess the right combination of ingredients to win a life-changing grand prize.

", + "updated": 1631607953, + "_links": { + "self": { + "href": "https://tvproxy.netlify.app/shows/253" + }, + "previousepisode": { + "href": "https://tvproxy.netlify.app/episodes/2118484" + } } }, - "webChannel": null, - "dvdCountry": null, - "externals": { - "tvrage": 16764, - "thetvdb": 79028, - "imdb": "tt2733512" - }, - "image": { - "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4656.jpg", - "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4656.jpg" - }, - "summary": "

The World Series of Poker is where the world's best poker players battle for the title.

", - "updated": 1574298803, - "_links": { - "self": { - "href": "https://api.tvmaze.com/shows/254" + { + "id": 254, + "url": "https://www.tvmaze.com/shows/254/world-series-of-poker", + "name": "World Series of Poker", + "type": "Sports", + "language": "English", + "genres": [], + "status": "Running", + "runtime": 60, + "averageRuntime": 65, + "premiered": "2006-08-22", + "ended": null, + "officialSite": null, + "schedule": { + "time": "21:00", + "days": ["Monday", "Tuesday", "Sunday"] + }, + "rating": { + "average": 9 + }, + "weight": 77, + "network": { + "id": 180, + "name": "ESPN2", + "country": { + "name": "United States", + "code": "US", + "timezone": "America/New_York" + } + }, + "webChannel": null, + "dvdCountry": null, + "externals": { + "tvrage": 16764, + "thetvdb": 79028, + "imdb": "tt2733512" + }, + "image": { + "medium": "https://static.tvmaze.com/uploads/images/medium_portrait/1/4656.jpg", + "original": "https://static.tvmaze.com/uploads/images/original_untouched/1/4656.jpg" }, - "previousepisode": { - "href": "https://api.tvmaze.com/episodes/1684225" + "summary": "

The World Series of Poker is where the world's best poker players battle for the title.

", + "updated": 1574298803, + "_links": { + "self": { + "href": "https://tvproxy.netlify.app/shows/254" + }, + "previousepisode": { + "href": "https://tvproxy.netlify.app/episodes/1684225" + } } } -}] +] diff --git a/demos/middleware/pages/shows/[id].js b/demos/middleware/pages/shows/[id].js index d472a27749..999ed21887 100644 --- a/demos/middleware/pages/shows/[id].js +++ b/demos/middleware/pages/shows/[id].js @@ -33,7 +33,7 @@ export const getServerSideProps = async ({ params, req }) => { // The ID to render const { id } = params console.log(req.headers) - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() // Set error code if show item could not be found diff --git a/demos/middleware/pages/shows/static/[id].js b/demos/middleware/pages/shows/static/[id].js index e7aed29e5d..8272a19293 100644 --- a/demos/middleware/pages/shows/static/[id].js +++ b/demos/middleware/pages/shows/static/[id].js @@ -40,7 +40,7 @@ export async function getStaticProps({ params }) { // The ID to render const { id } = params - const res = await fetch(`https://api.tvmaze.com/shows/${id}`) + const res = await fetch(`https://tvproxy.netlify.app/shows/${id}`) const data = await res.json() return { From 2aa02dbe8140b2107c312e757e9dc1609c3b4e70 Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Fri, 9 Dec 2022 09:37:08 +0000 Subject: [PATCH 04/25] fix: use static 404 for non-prerendered dynamic routes without fallback (#1795) * fix: rewrite fallback false routes to 404 page * fix: allow ISR 404 pages to use the ODB handler * chore: update tests to expect static 404 pages for fallback false * chore: fix boolean type on is404Isr param * chore: add tests for 404 redirects --- .../default/dynamic-routes.spec.ts | 4 +- packages/runtime/src/helpers/redirects.ts | 12 ++- packages/runtime/src/helpers/utils.ts | 40 ++++++- test/helpers/utils.spec.ts | 100 ++++++++++++------ 4 files changed, 118 insertions(+), 38 deletions(-) diff --git a/cypress/integration/default/dynamic-routes.spec.ts b/cypress/integration/default/dynamic-routes.spec.ts index 31c2177695..266f6faa43 100644 --- a/cypress/integration/default/dynamic-routes.spec.ts +++ b/cypress/integration/default/dynamic-routes.spec.ts @@ -49,7 +49,7 @@ describe('Dynamic Routing', () => { cy.request({ url: '/getStaticProps/3/', headers: { 'x-nf-debug-logging': '1' }, failOnStatusCode: false }).then( (res) => { expect(res.status).to.eq(404) - expect(res.headers).to.have.property('x-nf-render-mode', 'odb') + expect(res.headers).to.not.have.property('x-nf-render-mode') expect(res.body).to.contain('Custom 404') }, ) @@ -102,7 +102,7 @@ describe('Dynamic Routing', () => { failOnStatusCode: false, }).then((res) => { expect(res.status).to.eq(404) - expect(res.headers).to.have.property('x-nf-render-mode', 'odb') + expect(res.headers).to.not.have.property('x-nf-render-mode') expect(res.body).to.contain('Custom 404') }) }) diff --git a/packages/runtime/src/helpers/redirects.ts b/packages/runtime/src/helpers/redirects.ts index 764117596e..22d777c88b 100644 --- a/packages/runtime/src/helpers/redirects.ts +++ b/packages/runtime/src/helpers/redirects.ts @@ -19,6 +19,7 @@ import { isApiRoute, redirectsForNextRoute, redirectsForNextRouteWithData, + redirectsForNext404Route, routeToDataRoute, } from './utils' @@ -187,6 +188,7 @@ const generateDynamicRewrites = ({ basePath, buildId, i18n, + is404Isr, }: { dynamicRoutes: RoutesManifest['dynamicRoutes'] prerenderedDynamicRoutes: PrerenderManifest['dynamicRoutes'] @@ -194,6 +196,7 @@ const generateDynamicRewrites = ({ i18n: NextConfig['i18n'] buildId: string middleware: Array + is404Isr: boolean }): { dynamicRoutesThatMatchMiddleware: Array dynamicRewrites: NetlifyConfig['redirects'] @@ -207,9 +210,11 @@ const generateDynamicRewrites = ({ if (route.page in prerenderedDynamicRoutes) { if (matchesMiddleware(middleware, route.page)) { dynamicRoutesThatMatchMiddleware.push(route.page) + } else if (prerenderedDynamicRoutes[route.page].fallback === false && !is404Isr) { + dynamicRewrites.push(...redirectsForNext404Route({ route: route.page, buildId, basePath, i18n })) } else { dynamicRewrites.push( - ...redirectsForNextRoute({ buildId, route: route.page, basePath, to: ODB_FUNCTION_PATH, status: 200, i18n }), + ...redirectsForNextRoute({ route: route.page, buildId, basePath, to: ODB_FUNCTION_PATH, i18n }), ) } } else { @@ -263,6 +268,10 @@ export const generateRedirects = async ({ const staticRouteEntries = Object.entries(prerenderedStaticRoutes) + const is404Isr = staticRouteEntries.some( + ([route, { initialRevalidateSeconds }]) => is404Route(route, i18n) && initialRevalidateSeconds !== false, + ) + const routesThatMatchMiddleware: Array = [] const { staticRoutePaths, staticIsrRewrites, staticIsrRoutesThatMatchMiddleware } = generateStaticIsrRewrites({ @@ -295,6 +304,7 @@ export const generateRedirects = async ({ basePath, buildId, i18n, + is404Isr, }) netlifyConfig.redirects.push(...dynamicRewrites) routesThatMatchMiddleware.push(...dynamicRoutesThatMatchMiddleware) diff --git a/packages/runtime/src/helpers/utils.ts b/packages/runtime/src/helpers/utils.ts index 527409c8fb..35e5487ba4 100644 --- a/packages/runtime/src/helpers/utils.ts +++ b/packages/runtime/src/helpers/utils.ts @@ -72,9 +72,18 @@ export const netlifyRoutesForNextRouteWithData = ({ route, dataRoute }: { route: export const routeToDataRoute = (route: string, buildId: string, locale?: string) => `/_next/data/${buildId}${locale ? `/${locale}` : ''}${route === '/' ? '/index' : route}.json` -const netlifyRoutesForNextRoute = (route: string, buildId: string, i18n?: I18n): Array => { +const netlifyRoutesForNextRoute = ( + route: string, + buildId: string, + i18n?: I18n, +): Array<{ redirect: string; locale: string | false }> => { if (!i18n?.locales?.length) { - return netlifyRoutesForNextRouteWithData({ route, dataRoute: routeToDataRoute(route, buildId) }) + return netlifyRoutesForNextRouteWithData({ route, dataRoute: routeToDataRoute(route, buildId) }).map( + (redirect) => ({ + redirect, + locale: false, + }), + ) } const { locales, defaultLocale } = i18n const routes = [] @@ -87,7 +96,10 @@ const netlifyRoutesForNextRoute = (route: string, buildId: string, i18n?: I18n): ...netlifyRoutesForNextRouteWithData({ route: locale === defaultLocale ? route : `/${locale}${route}`, dataRoute, - }), + }).map((redirect) => ({ + redirect, + locale, + })), ) }) return routes @@ -115,13 +127,33 @@ export const redirectsForNextRoute = ({ status?: number force?: boolean }): NetlifyConfig['redirects'] => - netlifyRoutesForNextRoute(route, buildId, i18n).map((redirect) => ({ + netlifyRoutesForNextRoute(route, buildId, i18n).map(({ redirect }) => ({ from: `${basePath}${redirect}`, to, status, force, })) +export const redirectsForNext404Route = ({ + route, + buildId, + basePath, + i18n, + force = false, +}: { + route: string + buildId: string + basePath: string + i18n: I18n + force?: boolean +}): NetlifyConfig['redirects'] => + netlifyRoutesForNextRoute(route, buildId, i18n).map(({ redirect, locale }) => ({ + from: `${basePath}${redirect}`, + to: locale ? `${basePath}/server/pages/${locale}/404.html` : `${basePath}/server/pages/404.html`, + status: 404, + force, + })) + export const redirectsForNextRouteWithData = ({ route, dataRoute, diff --git a/test/helpers/utils.spec.ts b/test/helpers/utils.spec.ts index ae56d3d933..e02bd3fb42 100644 --- a/test/helpers/utils.spec.ts +++ b/test/helpers/utils.spec.ts @@ -1,17 +1,24 @@ import Chance from 'chance' import { ExperimentalConfig } from 'next/dist/server/config-shared' -import { getCustomImageResponseHeaders, getRemotePatterns, ImagesConfig } from '../../packages/runtime/src/helpers/utils' +import { + getCustomImageResponseHeaders, + getRemotePatterns, + ImagesConfig, + redirectsForNext404Route, +} from '../../packages/runtime/src/helpers/utils' const chance = new Chance() describe('getCustomImageResponseHeaders', () => { it('returns null when no custom image response headers are found', () => { - const mockHeaders = [{ - for: '/test', - values: { - 'X-Foo': chance.string() - } - }] + const mockHeaders = [ + { + for: '/test', + values: { + 'X-Foo': chance.string(), + }, + }, + ] expect(getCustomImageResponseHeaders(mockHeaders)).toBe(null) }) @@ -19,12 +26,14 @@ describe('getCustomImageResponseHeaders', () => { it('returns header values when custom image response headers are found', () => { const mockFooValue = chance.string() - const mockHeaders = [{ - for: '/_next/image/', - values: { - 'X-Foo': mockFooValue - } - }] + const mockHeaders = [ + { + for: '/_next/image/', + values: { + 'X-Foo': mockFooValue, + }, + }, + ] const result = getCustomImageResponseHeaders(mockHeaders) expect(result).toStrictEqual({ @@ -38,31 +47,23 @@ describe('getRemotePatterns', () => { let mockImages beforeEach(() => { mockExperimentalConfig = { - images: {} + images: {}, } as ExperimentalConfig - + mockImages = { - deviceSizes: [ - 640, 750, 828, - 1080, 1200, 1920, - 2048, 3840 - ], - imageSizes: [ - 16, 32, 48, 64, - 96, 128, 256, 384 - ], + deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840], + imageSizes: [16, 32, 48, 64, 96, 128, 256, 384], path: '/_next/image', loader: 'default', domains: [], disableStaticImages: false, minimumCacheTTL: 60, - formats: [ 'image/avif', 'image/webp' ], + formats: ['image/avif', 'image/webp'], dangerouslyAllowSVG: false, contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;", unoptimized: false, - remotePatterns: [] + remotePatterns: [], } as ImagesConfig - }) it('returns the remote patterns found under experimental.images', () => { @@ -73,7 +74,7 @@ describe('getRemotePatterns', () => { }, ] const result = getRemotePatterns(mockExperimentalConfig, mockImages) - + expect(result).toStrictEqual(mockExperimentalConfig.images?.remotePatterns) }) @@ -85,12 +86,49 @@ describe('getRemotePatterns', () => { }, ] const result = getRemotePatterns(mockExperimentalConfig, mockImages) - - expect(result).toStrictEqual(mockImages.remotePatterns) + + expect(result).toStrictEqual(mockImages.remotePatterns) }) - + it('returns an empty array', () => { const result = getRemotePatterns(mockExperimentalConfig, mockImages) expect(result).toStrictEqual([]) }) }) + +describe('redirectsForNext404Route', () => { + it('returns static 404 redirects', () => { + const mockRoute = { + route: '/test', + buildId: 'test', + basePath: '', + i18n: null, + } + + expect(redirectsForNext404Route(mockRoute)).toStrictEqual([ + { force: false, from: '/_next/data/test/test.json', status: 404, to: '/server/pages/404.html' }, + { force: false, from: '/test', status: 404, to: '/server/pages/404.html' }, + ]) + }) + + it('returns localised static 404 redirects when i18n locales are provided', () => { + const mockRoute = { + route: '/test', + buildId: 'test', + basePath: '', + i18n: { + defaultLocale: 'en', + locales: ['en', 'es', 'fr'], + }, + } + + expect(redirectsForNext404Route(mockRoute)).toStrictEqual([ + { force: false, from: '/_next/data/test/en/test.json', status: 404, to: '/server/pages/en/404.html' }, + { force: false, from: '/test', status: 404, to: '/server/pages/en/404.html' }, + { force: false, from: '/_next/data/test/es/test.json', status: 404, to: '/server/pages/es/404.html' }, + { force: false, from: '/es/test', status: 404, to: '/server/pages/es/404.html' }, + { force: false, from: '/_next/data/test/fr/test.json', status: 404, to: '/server/pages/fr/404.html' }, + { force: false, from: '/fr/test', status: 404, to: '/server/pages/fr/404.html' }, + ]) + }) +}) From 5f7f4ba8c6d8fcfda737d99c94e116e8029946b8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 02:19:02 +0000 Subject: [PATCH 05/25] chore(deps): update dependency sass to v1.56.2 (#1837) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f8650b477..dec3b23015 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21476,9 +21476,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.56.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz", + "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==", "devOptional": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -40436,9 +40436,9 @@ "dev": true }, "sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.56.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz", + "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==", "devOptional": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", From 9aa4c3823325c69646ba1168c2bfac9aaf2e5581 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 02:28:11 +0000 Subject: [PATCH 06/25] chore(deps): update dependency typescript to v4.9.4 (#1838) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../package-lock.json | 15 ++++++++------- package-lock.json | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/demos/turborepo-next-monorepo-demo/package-lock.json b/demos/turborepo-next-monorepo-demo/package-lock.json index 4ee0b0c47d..5e7624b2d1 100644 --- a/demos/turborepo-next-monorepo-demo/package-lock.json +++ b/demos/turborepo-next-monorepo-demo/package-lock.json @@ -15,7 +15,8 @@ "@types/react": "^18.0.0", "next": "^13.0.3", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "typescript": "^4.9.4" }, "devDependencies": { "eslint-config-custom": "*", @@ -3931,9 +3932,9 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6799,9 +6800,9 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==" + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==" }, "ui": { "version": "file:packages/ui", diff --git a/package-lock.json b/package-lock.json index dec3b23015..56740da775 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "sass": "^1.49.0", "sharp": "^0.30.4", "tmp-promise": "^3.0.2", - "typescript": "^4.3.4" + "typescript": "^4.6.3" }, "engines": { "node": ">=16.0.0" @@ -23359,9 +23359,9 @@ } }, "node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -41928,9 +41928,9 @@ } }, "typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, "typical": { From a5b80475a89f5ab2266059ad2e96c8786ff41421 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Mon, 12 Dec 2022 17:31:34 +0000 Subject: [PATCH 07/25] fix: support appDir (#1638) * chore: update canary demo * chore: add app-dir demo * fix: resolve page deps in app dir * fix: patch duplicate declaration * fix: resolve nft deps * feat: add support for appdir edge runtime * chore: update next canary and react (and change APIs) * fix: update patch syntax * fix: include file itself in deps * chore: upgrade next and remove workaround * chore: move app-dir site to canary * chore: update snapshot * chore: add initial app-dir tests * chore: use correct site for canary tests * chore: enable plugin * ci: use vitest for canary e2e tests * chore: re-enable plugin * chore: setup playwright * chore: wait longer when first using playwright * chore: run tests headless * chore: install chromium * chore: longer timeout * chore: use undici * chore: enable remaining tests * chore: fix test syntax * chore: update demos * chore: update canary * chore: fix 404 test * chore: disable test that depends on an upstream fix * chore: fix handling of "self" object * chore: update packages * chore: update canary * chore: tidy and add license for next.js code * chore: handle empty static manifest * chore: downgrasde canary because of regression * chore: logging for windows * Apply suggestions from code review Co-authored-by: Erica Pisani * chore: update next canary * chore: remove npmrc * chore: update next and react * chore: update test site * chore: update tests * chore: add back npmrc This reverts commit 40480f444052974680a8d795f3b555602b8aa574. * fix: use globby not tiny-glob * chore: update fixtures * chore: deps * chore: update tests and demo * fix: correct request types * fix: skip generating lambda for edge api routes * chore: log request * chore: add runtime as dep * chore: pre-version * chore: add canary to ws * chore: fix build * chore: fix monorepo setup * chore: upgrade * chore: react no-longer pre-bundled * chore: remove deliberately broken demo pages * fix: move pre-rendered appdir files * fix: correct manifest path * chore: update demo * chore: update tests * chore: add sass test * chore: update demo config * chore: skip test that also fails upstream * chore: update next canary * chore: update use usage * chore: update canary * fix: support loading static files for both pages and app * chore: update canary * chore: update canary * chore: final canary! * chore(deps): update demos and deps to Next 13 * chore: add swc * chore: switch old node tests to use node 14 * fix: correct requestdata type * chore: update next/link syntax * chore: use legacy image component for now * chore: update demo * chore: update canary demo * chore: all the tests * chore: fix eslint * chore: parallelise e2e tests * chore: don't fail fast * chore: unignore modules and use node-fetch * chore: very parallel * chore: don't mock fetch :facepalm: * chore: remove disabled tests * chore: test with node 18 * chore: switchable fetch * chore: remove irrelevant tests * chore: remove disabled test * chore: add reporter * chore: no concurrency * chore: try to fix jest * chore: fix test command * chore: artifact file path * chore: use site build command * chore: download artifacts * chore: report per-chunk * chore: update syntax * chore: report to summary * chore: do annotate * chore: update and add summary * chore: rearrange * chore: combine tests * chore: fix test * chore: rearrange and disable failing suites * chore: skip broken ntl and fail faster * chore: disable suite * chore: skip failing tests * chore: add ability to run disabled tests * chore: add comments to workflow file * chore: one worker per file * chore: oops * chore: make path relative to test dir * chore: conditionally skip * chore: enable middleware-responses test * chore: run all tests once * chore: don't run disabled tests * fix: ensure responses are Responses * chore: re-enable test * chore: run all tests * chore: enable another suite * fix: better headers.getAll polyfill * chore: enable middleware-redirects suite * chore: conditionally enable req body tests * chore: disable failing tests * chore: add test readme doc * chore: remove eslint changes * chore: add new appdir tests * chore: use canary for appdir tests * chore: use extended matchers * chore: increase timeout * chore: enable tests that were disabled upstream * chore: don't clobber package.json in tests * chore: set EdgeRuntime name globally * chore: remove logs * chore: update tests * chore: test updates * chore: increase timeout * chore: increase timeout for site deploy * chore: include step annotations * chore: don't use canary demo for this * chore: increase timeout * chore: add rewrite-to-edge demo * chore: deploy edge functions after cache * chore: refresh lockfile * chore: enable rewrite tests * chore: update tests * chore: update tests * chore: enable rsc tests * chore: skip tests * chore: re-enable dev check * chore: update lockfile * chore: run workflows only on new pr and pr sync * chore: add log about testing appdir * chore: only use cache: manual if site uses appDir * chore: changes from review * ci: fix e2e test * fix: correctly match static files against rewrites * chore: upgrade next * chore: increase timeout * chore: extend timeout * fix: handle prefetch correctly * chore: rmeove log * chore: log env * chore: enough with these rules * chore: fix base url * chore: try with all tests * chore: don't run disabled tests * fix: vary on prefetch Co-authored-by: Erica Pisani --- .eslintrc.js | 1 + .github/workflows/cypress-canary.yml | 2 +- .github/workflows/cypress-demo-nx.yml | 2 +- .github/workflows/cypress-demo-static.yml | 2 +- .github/workflows/cypress-demo.yml | 2 +- .github/workflows/cypress-middleware.yml | 2 +- .github/workflows/e2e-appdir.yml | 71 + .github/workflows/e2e-next.yml | 13 +- cypress/integration/nx/general.spec.ts | 6 +- demos/base-path/package.json | 2 +- demos/custom-routes/package.json | 2 +- demos/default/package.json | 2 +- demos/middleware/package.json | 2 +- demos/next-auth/package.json | 2 +- demos/next-export/package.json | 2 +- demos/next-i18next/package.json | 2 +- .../apps/demo-monorepo/public/favicon.ico | Bin 0 -> 25931 bytes demos/nx-next-monorepo-demo/package-lock.json | 596 +++-- demos/nx-next-monorepo-demo/package.json | 2 +- demos/static-root/package.json | 2 +- .../turborepo-next-monorepo-demo/package.json | 2 +- package-lock.json | 1504 ++++++------ package.json | 7 +- packages/next/package.json | 2 +- packages/runtime/package.json | 2 +- packages/runtime/src/helpers/config.ts | 2 - packages/runtime/src/helpers/edge.ts | 61 +- packages/runtime/src/helpers/files.ts | 41 +- packages/runtime/src/helpers/functions.ts | 7 +- packages/runtime/src/helpers/redirects.ts | 2 - packages/runtime/src/helpers/utils.ts | 3 - packages/runtime/src/helpers/verification.ts | 2 - packages/runtime/src/index.ts | 19 +- .../runtime/src/templates/edge/runtime.ts | 8 +- .../runtime/src/templates/getApiHandler.ts | 2 +- packages/runtime/src/templates/getHandler.ts | 24 +- .../runtime/src/templates/handlerUtils.ts | 30 +- test/__snapshots__/index.js.snap | 236 +- test/e2e/app-dir/app-alias.test.ts | 52 + test/e2e/app-dir/app-alias/next.config.js | 5 + test/e2e/app-dir/app-alias/package.json | 3 + .../app-dir/app-alias/src/app/button/page.tsx | 10 + test/e2e/app-dir/app-alias/src/app/layout.tsx | 10 + .../app-dir/app-alias/src/app/typing/page.tsx | 11 + test/e2e/app-dir/app-alias/tsconfig.json | 29 + test/e2e/app-dir/app-alias/ui/button.tsx | 5 + .../e2e/app-dir/app-alias/ui/style.module.css | 3 + test/e2e/app-dir/app-edge-global.test.ts | 32 + test/e2e/app-dir/app-edge-global/.gitignore | 1 + .../app-edge-global/app/app-edge/layout.tsx | 11 + .../app-edge-global/app/app-edge/page.tsx | 6 + .../app-dir/app-edge-global/app/layout.tsx | 8 + .../app-dir/app-edge-global/next.config.js | 6 + .../e2e/app-dir/app-edge-global/tsconfig.json | 29 + test/e2e/app-dir/app-edge.test.ts | 57 + .../app-dir/app-edge/app/app-edge/layout.tsx | 11 + .../app-dir/app-edge/app/app-edge/page.tsx | 8 + test/e2e/app-dir/app-edge/app/layout.tsx | 8 + test/e2e/app-dir/app-edge/next.config.js | 5 + .../e2e/app-dir/app-edge/pages/pages-edge.tsx | 5 + test/e2e/app-dir/app-edge/tsconfig.json | 29 + .../app-external/app/css/[...slug]/page.js | 5 + .../app-external/app/css/modules/page.js | 5 + .../app-external/app/esm/client/page.js | 15 + .../app-external/app/esm/server/page.js | 12 + .../app/external-imports/client/page.js | 23 + .../app/external-imports/server/page.js | 9 + .../e2e/app-dir/app-external/app/font/page.js | 5 + test/e2e/app-dir/app-external/app/layout.js | 8 + .../react-server/3rd-party-package/client.js | 15 + .../react-server/3rd-party-package/page.js | 16 + .../app/react-server/client-detector.js | 3 + .../app-external/app/react-server/detector.js | 5 + .../app/react-server/optout/client.js | 15 + .../app/react-server/optout/page.js | 16 + .../app-external/app/react-server/page.js | 13 + .../app-external/app/shared-esm-dep/page.js | 5 + .../components/random-module-instance.js | 7 + test/e2e/app-dir/app-external/next.config.js | 8 + .../conditional-exports-optout/index.js | 1 + .../index.server.js | 1 + .../conditional-exports-optout/package.json | 15 + .../conditional-exports-optout/subpath.js | 1 + .../subpath.server.js | 1 + .../conditional-exports/dep.js | 1 + .../conditional-exports/dep.server.js | 1 + .../conditional-exports/index.js | 8 + .../conditional-exports/index.server.js | 8 + .../conditional-exports/package.json | 21 + .../conditional-exports/subpath.js | 1 + .../conditional-exports/subpath.server.js | 1 + .../node_modules_bak/css/index.js | 1 + .../node_modules_bak/css/module.js | 5 + .../node_modules_bak/css/package.json | 11 + .../node_modules_bak/css/style.css | 3 + .../node_modules_bak/css/styles.module.css | 3 + .../node_modules_bak/esm-with-react/index.js | 6 + .../esm-with-react/package.json | 9 + .../node_modules_bak/font/index.ts | 3 + .../node_modules_bak/font/my-font.woff2 | Bin 0 -> 17508 bytes .../node_modules_bak/font/package.json | 4 + .../non-isomorphic-text/browser.js | 3 + .../non-isomorphic-text/index.js | 6 + .../non-isomorphic-text/index.mjs | 5 + .../non-isomorphic-text/package.json | 8 + .../node_modules_bak/pure-esm-module/index.js | 2 + .../pure-esm-module/package.json | 7 + .../untranspiled-module/index.ts | 3 + .../untranspiled-module/package.json | 4 + .../app-external/pages/test-pages-esm.jsx | 14 + .../app-dir/app-external/pages/test-pages.jsx | 5 + test/e2e/app-dir/app-middleware.test.ts | 152 ++ .../app-middleware/app/headers/page.js | 10 + test/e2e/app-dir/app-middleware/app/layout.js | 10 + test/e2e/app-dir/app-middleware/middleware.js | 30 + .../e2e/app-dir/app-middleware/next.config.js | 6 + .../pages/api/dump-headers-edge.js | 11 + .../pages/api/dump-headers-serverless.js | 6 + .../app-prefetch/app/dashboard/[id]/page.js | 35 + .../app-prefetch/app/dashboard/layout.js | 19 + .../app-prefetch/app/dashboard/loading.js | 3 + .../app-prefetch/app/dashboard/page.js | 19 + test/e2e/app-dir/app-prefetch/app/layout.js | 10 + test/e2e/app-dir/app-prefetch/app/loading.js | 3 + test/e2e/app-dir/app-prefetch/app/page.js | 10 + test/e2e/app-dir/app-prefetch/next.config.js | 5 + .../app-rendering/app/isr-multiple/layout.js | 20 + .../app/isr-multiple/nested/page.js | 21 + .../app/isr-ssr-combined/nested/layout.js | 20 + .../app/isr-ssr-combined/nested/page.js | 19 + .../app/isr-ssr-combined/slow/layout.js | 20 + .../app/isr-ssr-combined/slow/page.js | 19 + test/e2e/app-dir/app-rendering/app/layout.js | 10 + test/e2e/app-dir/app-rendering/app/page.js | 3 + .../app-rendering/app/ssr-only/layout.js | 20 + .../app-rendering/app/ssr-only/nested/page.js | 17 + .../app-rendering/app/ssr-only/slow/layout.js | 24 + .../app-rendering/app/ssr-only/slow/page.js | 22 + .../app-rendering/app/static-only/layout.js | 18 + .../app/static-only/nested/page.js | 18 + .../app/static-only/slow/layout.js | 19 + .../app/static-only/slow/page.js | 19 + test/e2e/app-dir/app-rendering/next.config.js | 5 + test/e2e/app-dir/app-static.test.ts | 517 ++++ .../app-static/app/(new)/custom/page.js | 5 + .../app-dir/app-static/app/(new)/layout.js | 10 + .../app/blog/[author]/[slug]/page.js | 56 + .../app-static/app/blog/[author]/layout.js | 14 + .../app-static/app/blog/[author]/page.js | 46 + .../dynamic-no-gen-params-ssr/[slug]/page.js | 10 + .../app/dynamic-no-gen-params/[slug]/page.js | 22 + .../app/force-static/[slug]/page.js | 17 + .../app-static/app/force-static/layout.js | 14 + .../app-static/app/force-static/page.js | 11 + .../app/hooks/use-pathname/[slug]/layout.js | 7 + .../app/hooks/use-pathname/[slug]/page.js | 12 + .../hooks/use-search-params/[slug]/layout.js | 7 + .../hooks/use-search-params/[slug]/page.js | 19 + test/e2e/app-dir/app-static/app/layout.js | 10 + .../app/ssr-auto/cache-no-store/loading.js | 3 + .../app/ssr-auto/cache-no-store/page.js | 22 + .../ssr-auto/fetch-revalidate-zero/loading.js | 3 + .../ssr-auto/fetch-revalidate-zero/page.js | 24 + .../app-static/app/ssr-forced/loading.js | 3 + .../app-dir/app-static/app/ssr-forced/page.js | 10 + test/e2e/app-dir/app-static/next.config.js | 26 + .../app-dir/app-typescript/app/inner/page.tsx | 18 + .../e2e/app-dir/app-typescript/app/layout.tsx | 14 + .../e2e/app-dir/app-typescript/next.config.js | 5 + test/e2e/app-dir/app-typescript/package.json | 15 + .../app-dir/app-typescript/pages/index.tsx | 7 + test/e2e/app-dir/app-typescript/tsconfig.json | 25 + .../app/(newroot)/dashboard/another/page.js | 7 + .../dashboard/project/[projectId]/page.js | 19 + test/e2e/app-dir/app/app/(newroot)/layout.js | 20 + .../(rootonly)/dashboard/changelog/page.js | 7 + .../app/(rootonly)/dashboard/hello/page.js | 9 + .../app-dir/app/app/back-forward/[id]/page.js | 24 + .../app-dir/app/app/catch-all-link/page.js | 21 + .../catch-all-optional/[[...slug]]/page.js | 7 + .../catch-all/[...slug]/components/widget.js | 2 + .../app/app/catch-all/[...slug]/not-a-page.js | 3 + .../app/app/catch-all/[...slug]/page.js | 14 + .../app/app/client-component-route/page.js | 20 + .../app/app/client-component-route/style.css | 3 + .../client-component-route/style.module.css | 3 + .../app-dir/app/app/client-nested/layout.js | 20 + .../e2e/app-dir/app/app/client-nested/page.js | 7 + .../app-dir/app/app/client-nested/style.css | 3 + .../app/app/client-nested/style.module.css | 3 + .../app/app/css/css-client/client-foo.css | 3 + .../app/app/css/css-client/client-layout.css | 3 + .../app/app/css/css-client/client-page.css | 6 + .../e2e/app-dir/app/app/css/css-client/foo.js | 5 + .../inner/ClientComponent.module.css | 3 + .../app/app/css/css-client/inner/foo.js | 11 + .../app/app/css/css-client/inner/page.js | 5 + .../app-dir/app/app/css/css-client/layout.js | 14 + .../app-dir/app/app/css/css-client/page.js | 17 + .../app-dir/app/app/css/css-nested/layout.js | 14 + .../app-dir/app/app/css/css-nested/page.js | 5 + .../app-dir/app/app/css/css-nested/style.css | 3 + .../app/app/css/css-nested/style.module.css | 3 + .../app-dir/app/app/css/css-page/layout.js | 5 + test/e2e/app-dir/app/app/css/css-page/page.js | 14 + .../app-dir/app/app/css/css-page/style.css | 3 + .../app/app/css/css-page/style.module.css | 3 + .../app-dir/app/app/css/css-page/style2.css | 3 + .../css/css-page/unused-nested/inner/page.js | 3 + .../app/css/css-page/unused-nested/layout.js | 10 + .../only-used-in-first-page.module.css | 3 + .../only-used-in-layout.module.css | 3 + .../app/css/css-page/unused-nested/page.js | 5 + .../app/css/css-page/unused-nested/styles.js | 4 + .../app/app/css/css-page/unused/page.js | 12 + .../app/app/css/css-page/unused/styles.js | 4 + .../app/css/css-page/unused/unused.module.css | 3 + test/e2e/app-dir/app/app/css/foo.js | 1 + test/e2e/app-dir/app/app/css/layout.js | 15 + .../app/app/css/sass-client/global.sass | 3 + .../app/app/css/sass-client/global.scss | 3 + .../app/app/css/sass-client/inner/global.sass | 3 + .../app/app/css/sass-client/inner/global.scss | 3 + .../app/app/css/sass-client/inner/page.js | 19 + .../css/sass-client/inner/styles.module.sass | 2 + .../css/sass-client/inner/styles.module.scss | 3 + .../app-dir/app/app/css/sass-client/layout.js | 20 + .../app/css/sass-client/styles.module.sass | 2 + .../app/css/sass-client/styles.module.scss | 3 + test/e2e/app-dir/app/app/css/sass/global.sass | 3 + test/e2e/app-dir/app/app/css/sass/global.scss | 3 + .../app/app/css/sass/inner/global.sass | 3 + .../app/app/css/sass/inner/global.scss | 3 + .../app-dir/app/app/css/sass/inner/page.js | 17 + .../app/app/css/sass/inner/styles.module.sass | 2 + .../app/app/css/sass/inner/styles.module.scss | 3 + test/e2e/app-dir/app/app/css/sass/layout.js | 18 + .../app/app/css/sass/styles.module.sass | 2 + .../app/app/css/sass/styles.module.scss | 3 + test/e2e/app-dir/app/app/css/style.css | 3 + test/e2e/app-dir/app/app/css/style.module.css | 3 + .../(custom)/deployments/breakdown/page.js | 7 + .../app/app/dashboard/(custom)/layout.js | 8 + .../app/app/dashboard/client-comp-client.jsx | 18 + .../app/app/dashboard/client-comp.module.css | 3 + .../app/dashboard/deployments/[id]/data.json | 3 + .../app/dashboard/deployments/[id]/page.js | 26 + .../dashboard/deployments/info/[id]/page.js | 9 + .../app/dashboard/deployments/info/page.js | 7 + .../app/app/dashboard/deployments/layout.js | 18 + test/e2e/app-dir/app/app/dashboard/global.css | 3 + .../index/dynamic-imports/dynamic-client.js | 9 + .../index/dynamic-imports/dynamic-server.js | 9 + .../dynamic-imports/react-lazy-client.js | 15 + .../app/dashboard/index/dynamic.module.css | 3 + .../app/app/dashboard/index/lazy.module.css | 3 + .../app-dir/app/app/dashboard/index/page.js | 14 + .../dashboard/index/text-dynamic-client.js | 13 + .../dashboard/index/text-dynamic-server.js | 9 + .../app/dashboard/index/text-lazy-client.js | 13 + .../app/app/dashboard/integrations/page.js | 7 + test/e2e/app-dir/app/app/dashboard/layout.js | 11 + test/e2e/app-dir/app/app/dashboard/page.js | 16 + .../app-dir/app/app/dashboard/page/page.jsx | 7 + test/e2e/app-dir/app/app/dashboard/style.css | 3 + .../app-dir/page.js | 7 + .../app/app/dynamic/[category]/[id]/layout.js | 11 + .../app/app/dynamic/[category]/[id]/page.js | 11 + .../app/app/dynamic/[category]/layout.js | 11 + test/e2e/app-dir/app/app/dynamic/layout.js | 11 + .../app-dir/app/app/edge-apis/cookies/page.js | 8 + .../app/app/error/client-component/error.js | 14 + .../app/app/error/client-component/page.js | 20 + .../error/client-component/style.module.css | 3 + .../app/error/global-error-boundary/page.js | 20 + .../server-component/custom-digest/page.js | 7 + .../app/app/error/server-component/error.js | 13 + .../app/app/error/server-component/page.js | 5 + .../client-component.js | 5 + .../error/ssr-error-client-component/page.js | 8 + .../app-dir/app/app/extension/page.server.js | 3 + .../app-dir/app/app/hooks/use-cookies/page.js | 17 + .../app-dir/app/app/hooks/use-headers/page.js | 19 + .../hooks/use-layout-segments/server/page.js | 10 + .../app/app/hooks/use-params/server/page.js | 9 + .../app/app/hooks/use-pathname/page.js | 15 + .../app/app/hooks/use-pathname/server/page.js | 8 + .../app/app/hooks/use-preview-data/page.js | 18 + .../app-dir/app/app/hooks/use-router/page.js | 19 + .../app/app/hooks/use-router/server/page.js | 8 + .../app/app/hooks/use-router/sub-page/page.js | 5 + .../app/app/hooks/use-search-params/page.js | 16 + .../hooks/use-search-params/server/page.js | 8 + .../(group)/second/[...catchall]/page.js | 18 + .../first/[dynamic]/(group)/second/page.js | 3 + .../first/[dynamic]/page.js | 3 + .../first/layout.js | 19 + .../use-selected-layout-segment/first/page.js | 3 + .../use-selected-layout-segment/layout.js | 19 + .../server/page.js | 9 + .../app-dir/app/app/internal/failure/page.js | 3 + test/e2e/app-dir/app/app/internal/page.js | 23 + .../app-dir/app/app/internal/success/page.js | 3 + test/e2e/app-dir/app/app/layout.js | 25 + .../app/app/link-hard-push/[id]/page.js | 14 + .../app/app/link-hard-replace/[id]/page.js | 14 + .../app-dir/app/app/link-hard-replace/page.js | 16 + .../app/app/link-hard-replace/subpage/page.js | 9 + .../app-dir/app/app/link-soft-push/page.js | 9 + .../app-dir/app/app/link-soft-replace/page.js | 16 + .../app/app/link-soft-replace/subpage/page.js | 9 + test/e2e/app-dir/app/app/link-with-as/page.js | 15 + .../e2e/app-dir/app/app/linking/about/page.js | 3 + test/e2e/app-dir/app/app/linking/layout.js | 15 + test/e2e/app-dir/app/app/linking/page.js | 3 + .../app/loading-bug/[categorySlug]/loading.js | 5 + .../app/loading-bug/[categorySlug]/page.js | 15 + .../app/loading-bug/[categorySlug]/style.css | 3 + test/e2e/app-dir/app/app/navigation/link.js | 27 + test/e2e/app-dir/app/app/navigation/page.js | 17 + .../app/app/nested-navigation/CategoryNav.js | 28 + .../app/app/nested-navigation/TabNavItem.js | 9 + .../[categorySlug]/SubCategoryNav.js | 31 + .../[categorySlug]/[subCategorySlug]/page.js | 11 + .../[categorySlug]/layout.js | 14 + .../nested-navigation/[categorySlug]/page.js | 9 + .../app/nested-navigation/getCategories.js | 50 + .../app/app/nested-navigation/layout.js | 17 + .../app-dir/app/app/nested-navigation/page.js | 3 + .../app/app/not-found/client-side/page.js | 17 + .../clientcomponent/client-component.js | 7 + .../app/app/not-found/clientcomponent/page.js | 9 + .../app-dir/app/app/not-found/not-found.js | 9 + .../app/app/not-found/servercomponent/page.js | 7 + .../app/app/not-found/style.module.css | 3 + .../e2e/app-dir/app/app/pages-linking/page.js | 9 + .../app/parallel/(new)/@baz/nested-2/page.js | 3 + .../app-dir/app/app/parallel/(new)/layout.js | 10 + .../app/app/parallel/@bar/nested/@a/page.js | 3 + .../app/app/parallel/@bar/nested/@b/page.js | 3 + .../app/app/parallel/@bar/nested/layout.js | 16 + .../e2e/app-dir/app/app/parallel/@bar/page.js | 3 + .../app/app/parallel/@foo/nested/@a/page.js | 3 + .../app/app/parallel/@foo/nested/@b/page.js | 3 + .../app/app/parallel/@foo/nested/layout.js | 16 + .../e2e/app-dir/app/app/parallel/@foo/page.js | 3 + test/e2e/app-dir/app/app/parallel/layout.js | 18 + .../app-dir/app/app/parallel/nested/page.js | 3 + test/e2e/app-dir/app/app/parallel/style.css | 15 + .../app/app/param-and-query/[slug]/page.js | 13 + .../app/app/partial-match-[id]/page.js | 7 + .../app/react-cache/client-component/page.js | 16 + test/e2e/app-dir/app/app/react-cache/page.js | 17 + .../app/react-cache/server-component/page.js | 15 + test/e2e/app-dir/app/app/react-fetch/page.js | 17 + .../app/react-fetch/server-component/page.js | 18 + .../app/app/redirect/client-side/page.js | 19 + .../clientcomponent/client-component.js | 7 + .../app/app/redirect/clientcomponent/page.js | 8 + .../app/redirect/next-config-redirect/page.js | 11 + .../redirect/next-middleware-redirect/page.js | 11 + .../app-dir/app/app/redirect/result/page.js | 3 + .../app/app/redirect/servercomponent/page.js | 6 + test/e2e/app-dir/app/app/rewrites/page.js | 9 + .../app-dir/app/app/same-layout/first/page.js | 12 + .../e2e/app-dir/app/app/same-layout/layout.js | 10 + .../app/app/same-layout/second/page.js | 12 + test/e2e/app-dir/app/app/script/client.js | 15 + test/e2e/app-dir/app/app/script/page.js | 30 + .../app/app/search-params-prop/page.js | 15 + .../app/app/search-params-prop/server/page.js | 13 + .../app/app/shared-component-route/page.js | 7 + .../app/app/should-not-serve-client/page.js | 9 + .../app/app/should-not-serve-server/page.js | 7 + .../loading.js | 3 + .../slow/layout.js | 19 + .../slow/loading.js | 3 + .../slow/page.js | 14 + .../app/slow-layout-with-loading/loading.js | 3 + .../slow-layout-with-loading/slow/layout.js | 19 + .../app/slow-layout-with-loading/slow/page.js | 3 + .../app/app/slow-page-no-loading/page.js | 16 + .../app/app/slow-page-with-loading/loading.js | 3 + .../app/app/slow-page-with-loading/page.js | 16 + test/e2e/app-dir/app/app/style.css | 3 + .../template/clientcomponent/other/page.js | 11 + .../app/app/template/clientcomponent/page.js | 12 + .../template/clientcomponent/style.module.css | 3 + .../app/template/clientcomponent/template.js | 17 + .../template/servercomponent/other/page.js | 11 + .../app/app/template/servercomponent/page.js | 12 + .../template/servercomponent/style.module.css | 3 + .../app/template/servercomponent/template.js | 12 + test/e2e/app-dir/app/app/test-page/page.js | 3 + .../app/app/very-large-data-fetch/page.js | 14 + test/e2e/app-dir/app/app/with-id/page.js | 13 + .../app/components/router-hooks-fixtures.js | 37 + test/e2e/app-dir/app/middleware.js | 65 + test/e2e/app-dir/app/next.config.js | 51 + .../app-dir/app/pages/adapter-hooks/[id].js | 5 + .../app/pages/adapter-hooks/[id]/account.js | 13 + .../app-dir/app/pages/adapter-hooks/pushed.js | 3 + .../app-dir/app/pages/adapter-hooks/static.js | 9 + test/e2e/app-dir/app/pages/api/hello.js | 7 + test/e2e/app-dir/app/pages/api/preview.js | 4 + test/e2e/app-dir/app/pages/app-linking.js | 9 + test/e2e/app-dir/app/pages/blog/[slug].js | 7 + .../pages/dynamic-pages-route-app-overlap.js | 9 + .../dynamic-pages-route-app-overlap/[slug].js | 7 + .../app/pages/exists-but-not-routed.js | 15 + test/e2e/app-dir/app/pages/index.js | 16 + .../app/pages/link-to-rewritten-path.js | 11 + test/e2e/app-dir/app/public/hello.txt | 1 + test/e2e/app-dir/app/public/test1.js | 2 + test/e2e/app-dir/app/public/test2.js | 2 + test/e2e/app-dir/app/public/test3.js | 2 + test/e2e/app-dir/app/public/test4.js | 2 + test/e2e/app-dir/app/styles/global.css | 3 + test/e2e/app-dir/app/styles/shared.module.css | 3 + test/e2e/app-dir/asset-prefix.test.ts | 61 + test/e2e/app-dir/asset-prefix/app/a/page.js | 9 + test/e2e/app-dir/asset-prefix/app/layout.js | 10 + test/e2e/app-dir/asset-prefix/app/page.js | 12 + test/e2e/app-dir/asset-prefix/next.config.js | 11 + .../app-dir/async-component-preload.test.ts | 29 + .../async-component-preload/app/layout.js | 12 + .../async-component-preload/app/page.js | 6 + .../app/success/page.js | 3 + .../async-component-preload/next.config.js | 5 + .../back-button-download-bug/app/layout.js | 8 + .../back-button-download-bug/app/page.js | 13 + .../back-button-download-bug/next.config.js | 10 + .../back-button-download-bug/pages/_app.js | 3 + .../pages/_document.js | 17 + .../pages/post/[id]/index.js | 3 + .../.vscode/settings.json | 4 + .../create-next-app-template/app/globals.css | 26 + .../create-next-app-template/app/layout.tsx | 18 + .../app/page.module.css | 146 ++ .../create-next-app-template/app/page.tsx | 57 + .../create-next-app-template/next.config.js | 13 + .../create-next-app-template/tsconfig.json | 25 + .../(group)/route/first/head.js | 9 + .../(group)/route/first/layout.js | 7 + .../(group)/route/first/page.js | 3 + .../(group)/route/second/inner/page.js | 3 + .../app-group-layout/(group)/page.js | 3 + .../create-root-layout/app/route/page.js | 3 + .../app-dir/create-root-layout/next.config.js | 5 + test/e2e/app-dir/head.test.ts | 93 + test/e2e/app-dir/head/app/blog/[slug]/head.js | 8 + test/e2e/app-dir/head/app/blog/[slug]/page.js | 13 + test/e2e/app-dir/head/app/blog/about/page.js | 13 + test/e2e/app-dir/head/app/blog/head.js | 10 + test/e2e/app-dir/head/app/blog/layout.js | 8 + test/e2e/app-dir/head/app/blog/page.js | 13 + test/e2e/app-dir/head/app/head.js | 9 + test/e2e/app-dir/head/app/layout.js | 10 + test/e2e/app-dir/head/app/page.js | 24 + test/e2e/app-dir/head/next.config.js | 17 + test/e2e/app-dir/head/public/another.js | 4 + test/e2e/app-dir/head/public/hello.js | 4 + test/e2e/app-dir/head/public/hello1.js | 4 + test/e2e/app-dir/head/public/hello2.js | 4 + test/e2e/app-dir/head/public/hello3.js | 4 + test/e2e/app-dir/index.test.ts | 2115 +++++++++++++++++ test/e2e/app-dir/next-font.test.ts | 298 +++ test/e2e/app-dir/next-font/app/Comp.js | 9 + test/e2e/app-dir/next-font/app/client/Comp.js | 10 + .../app-dir/next-font/app/client/layout.js | 13 + test/e2e/app-dir/next-font/app/client/page.js | 14 + .../app/layout-with-fonts/layout-font.woff2 | 1 + .../next-font/app/layout-with-fonts/layout.js | 14 + .../next-font/app/layout-with-fonts/page.js | 3 + test/e2e/app-dir/next-font/app/layout.js | 17 + .../next-font/app/page-with-fonts/layout.js | 3 + .../app/page-with-fonts/page-font.woff2 | 1 + .../next-font/app/page-with-fonts/page.js | 11 + test/e2e/app-dir/next-font/app/page.js | 16 + test/e2e/app-dir/next-font/fonts/font1.woff2 | 1 + test/e2e/app-dir/next-font/fonts/font2.woff2 | 1 + test/e2e/app-dir/next-font/fonts/font3.woff2 | 1 + test/e2e/app-dir/next-font/fonts/font4.woff2 | 1 + test/e2e/app-dir/next-font/fonts/index.js | 16 + .../app-dir/next-font/fonts/test/font5.woff2 | 1 + .../app-dir/next-font/fonts/test/font6.woff2 | 1 + test/e2e/app-dir/next-font/next.config.js | 6 + test/e2e/app-dir/next-image/app/Comp.js | 11 + .../e2e/app-dir/next-image/app/client/Comp.js | 12 + .../app-dir/next-image/app/client/layout.js | 13 + .../e2e/app-dir/next-image/app/client/page.js | 14 + test/e2e/app-dir/next-image/app/layout.js | 17 + .../e2e/app-dir/next-image/app/nested/Comp.js | 11 + .../app-dir/next-image/app/nested/layout.js | 12 + .../e2e/app-dir/next-image/app/nested/page.js | 13 + .../app-dir/next-image/app/nested/test.jpg | Bin 0 -> 6765 bytes test/e2e/app-dir/next-image/app/page.js | 15 + test/e2e/app-dir/next-image/images/test.png | Bin 0 -> 1545 bytes test/e2e/app-dir/next-image/next.config.js | 5 + test/e2e/app-dir/rendering.test.ts | 147 ++ test/e2e/app-dir/root-layout.test.ts | 181 ++ .../nested-route-group/page.js | 10 + .../(mpa-navigation)/(route-group)/layout.js | 13 + .../(route-group)/route-group/page.js | 10 + .../basic-route/inner/page.js | 10 + .../(mpa-navigation)/basic-route/layout.js | 13 + .../app/(mpa-navigation)/basic-route/page.js | 10 + .../dynamic-catchall/[...slug]/layout.js | 10 + .../dynamic-catchall/[...slug]/page.js | 18 + .../dynamic/[first]/[second]/page.js | 12 + .../(mpa-navigation)/dynamic/[first]/page.js | 10 + .../app/(mpa-navigation)/dynamic/layout.js | 13 + .../static-mpa-navigation/[slug]/layout.js | 14 + .../static-mpa-navigation/[slug]/page.js | 22 + .../(mpa-navigation)/to-pages-dir/layout.js | 13 + .../app/(mpa-navigation)/to-pages-dir/page.js | 10 + .../with-parallel-routes/@one/inner/page.js | 10 + .../with-parallel-routes/@one/page.js | 10 + .../with-parallel-routes/@two/page.js | 3 + .../with-parallel-routes/layout.js | 16 + .../app/(required-tags)/has-tags/layout.js | 10 + .../app/(required-tags)/has-tags/page.js | 5 + .../(required-tags)/missing-tags/layout.js | 6 + .../app/(required-tags)/missing-tags/page.js | 3 + .../static-missing-tags/[slug]/layout.js | 7 + .../static-missing-tags/[slug]/page.js | 5 + test/e2e/app-dir/root-layout/next.config.js | 5 + test/e2e/app-dir/rsc-basic.test.ts | 412 ++++ .../app-dir/rsc-basic/app/css-in-js/page.js | 11 + .../app/css-in-js/styled-components.js | 32 + .../rsc-basic/app/css-in-js/styled-jsx.js | 31 + .../rsc-basic/app/css-in-js/suspense/page.js | 43 + .../app-dir/rsc-basic/app/css-modules/page.js | 10 + .../rsc-basic/app/edge/dynamic/[id]/page.js | 5 + .../rsc-basic/app/edge/dynamic/page.js | 5 + .../rsc-basic/app/escaping-rsc/page.js | 32 + .../rsc-basic/app/global-styles-rsc/page.js | 7 + test/e2e/app-dir/rsc-basic/app/layout.js | 17 + test/e2e/app-dir/rsc-basic/app/multi/page.js | 5 + .../rsc-basic/app/native-module/page.js | 14 + .../app/next-api/image-legacy/page.js | 9 + .../rsc-basic/app/next-api/image-new/page.js | 9 + .../rsc-basic/app/next-api/link/page.js | 18 + test/e2e/app-dir/rsc-basic/app/page.js | 19 + .../rsc-basic/app/partial-hydration/page.js | 25 + .../rsc-basic/app/root-style-registry.js | 37 + test/e2e/app-dir/rsc-basic/app/root/page.js | 10 + test/e2e/app-dir/rsc-basic/app/shared/page.js | 29 + .../rsc-basic/app/streaming-rsc/page.js | 22 + .../rsc-basic/app/various-exports/page.js | 41 + .../rsc-basic/components/bar-client.js | 5 + test/e2e/app-dir/rsc-basic/components/bar.js | 10 + .../rsc-basic/components/cjs-client.js | 5 + .../rsc-basic/components/cjs-server.js | 3 + .../rsc-basic/components/client-exports.js | 7 + .../app-dir/rsc-basic/components/client.js | 9 + .../rsc-basic/components/export-all/index.js | 3 + .../rsc-basic/components/export-all/one.js | 6 + .../rsc-basic/components/export-all/two.js | 3 + test/e2e/app-dir/rsc-basic/components/foo.js | 7 + test/e2e/app-dir/rsc-basic/components/nav.js | 23 + .../components/partial-hydration-counter.js | 22 + .../app-dir/rsc-basic/components/red/index.js | 7 + .../rsc-basic/components/red/style.module.css | 3 + .../rsc-basic/components/shared-client.js | 5 + .../rsc-basic/components/shared-exports.js | 10 + .../app-dir/rsc-basic/components/shared.js | 21 + test/e2e/app-dir/rsc-basic/lib/data.js | 19 + test/e2e/app-dir/rsc-basic/next.config.js | 20 + test/e2e/app-dir/rsc-basic/public/test.jpg | Bin 0 -> 6765 bytes .../get-server-side-props/page.js | 7 + .../get-static-props/page.js | 7 + test/e2e/app-dir/rsc-errors/app/layout.js | 8 + .../app/not-transform/styled-jsx/page.js | 9 + .../server-with-errors/page-export/page.js | 1 + .../app/server-with-errors/styled-jsx/page.js | 5 + test/e2e/app-dir/rsc-errors/next.config.js | 3 + test/e2e/app-dir/trailingslash.test.ts | 60 + test/e2e/app-dir/trailingslash/app/a/page.js | 9 + test/e2e/app-dir/trailingslash/app/layout.js | 10 + test/e2e/app-dir/trailingslash/app/page.js | 12 + test/e2e/app-dir/trailingslash/next.config.js | 6 + test/e2e/app-dir/with-babel.test.ts | 31 + test/e2e/app-dir/with-babel/app/layout.js | 10 + test/e2e/app-dir/with-babel/app/page.js | 8 + test/e2e/app-dir/with-babel/babel.config.js | 3 + test/e2e/app-dir/with-babel/next.config.js | 5 + test/e2e/jest-setup-after-env.ts | 6 + test/e2e/jest.config.appdir.js | 11 + test/e2e/jest.config.js | 1 + .../edge-can-read-request-body/index.test.ts | 4 +- .../index.test.ts | 2 +- .../middleware-rewrites/test/index.test.ts | 2 +- .../app/middleware.js | 7 +- test/e2e/next-test-lib/e2e-utils.ts | 5 +- test/e2e/next-test-lib/next-modes/base.ts | 36 +- test/e2e/next-test-lib/next-modes/next-dev.ts | 80 + .../next-test-lib/next-modes/next-start.ts | 153 ++ 598 files changed, 11828 insertions(+), 1178 deletions(-) create mode 100644 .github/workflows/e2e-appdir.yml create mode 100755 demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico create mode 100644 test/e2e/app-dir/app-alias.test.ts create mode 100644 test/e2e/app-dir/app-alias/next.config.js create mode 100644 test/e2e/app-dir/app-alias/package.json create mode 100644 test/e2e/app-dir/app-alias/src/app/button/page.tsx create mode 100644 test/e2e/app-dir/app-alias/src/app/layout.tsx create mode 100644 test/e2e/app-dir/app-alias/src/app/typing/page.tsx create mode 100644 test/e2e/app-dir/app-alias/tsconfig.json create mode 100644 test/e2e/app-dir/app-alias/ui/button.tsx create mode 100644 test/e2e/app-dir/app-alias/ui/style.module.css create mode 100644 test/e2e/app-dir/app-edge-global.test.ts create mode 100644 test/e2e/app-dir/app-edge-global/.gitignore create mode 100644 test/e2e/app-dir/app-edge-global/app/app-edge/layout.tsx create mode 100644 test/e2e/app-dir/app-edge-global/app/app-edge/page.tsx create mode 100644 test/e2e/app-dir/app-edge-global/app/layout.tsx create mode 100644 test/e2e/app-dir/app-edge-global/next.config.js create mode 100644 test/e2e/app-dir/app-edge-global/tsconfig.json create mode 100644 test/e2e/app-dir/app-edge.test.ts create mode 100644 test/e2e/app-dir/app-edge/app/app-edge/layout.tsx create mode 100644 test/e2e/app-dir/app-edge/app/app-edge/page.tsx create mode 100644 test/e2e/app-dir/app-edge/app/layout.tsx create mode 100644 test/e2e/app-dir/app-edge/next.config.js create mode 100644 test/e2e/app-dir/app-edge/pages/pages-edge.tsx create mode 100644 test/e2e/app-dir/app-edge/tsconfig.json create mode 100644 test/e2e/app-dir/app-external/app/css/[...slug]/page.js create mode 100644 test/e2e/app-dir/app-external/app/css/modules/page.js create mode 100644 test/e2e/app-dir/app-external/app/esm/client/page.js create mode 100644 test/e2e/app-dir/app-external/app/esm/server/page.js create mode 100644 test/e2e/app-dir/app-external/app/external-imports/client/page.js create mode 100644 test/e2e/app-dir/app-external/app/external-imports/server/page.js create mode 100644 test/e2e/app-dir/app-external/app/font/page.js create mode 100644 test/e2e/app-dir/app-external/app/layout.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/3rd-party-package/client.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/3rd-party-package/page.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/client-detector.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/detector.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/optout/client.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/optout/page.js create mode 100644 test/e2e/app-dir/app-external/app/react-server/page.js create mode 100644 test/e2e/app-dir/app-external/app/shared-esm-dep/page.js create mode 100644 test/e2e/app-dir/app-external/components/random-module-instance.js create mode 100644 test/e2e/app-dir/app-external/next.config.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports-optout/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports-optout/index.server.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports-optout/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports-optout/subpath.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports-optout/subpath.server.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/dep.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/dep.server.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/index.server.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/subpath.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/conditional-exports/subpath.server.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/css/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/css/module.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/css/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/css/style.css create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/css/styles.module.css create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/esm-with-react/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/esm-with-react/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/font/index.ts create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/font/my-font.woff2 create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/font/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/non-isomorphic-text/browser.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/non-isomorphic-text/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/non-isomorphic-text/index.mjs create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/non-isomorphic-text/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/pure-esm-module/index.js create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/pure-esm-module/package.json create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/untranspiled-module/index.ts create mode 100644 test/e2e/app-dir/app-external/node_modules_bak/untranspiled-module/package.json create mode 100644 test/e2e/app-dir/app-external/pages/test-pages-esm.jsx create mode 100644 test/e2e/app-dir/app-external/pages/test-pages.jsx create mode 100644 test/e2e/app-dir/app-middleware.test.ts create mode 100644 test/e2e/app-dir/app-middleware/app/headers/page.js create mode 100644 test/e2e/app-dir/app-middleware/app/layout.js create mode 100644 test/e2e/app-dir/app-middleware/middleware.js create mode 100644 test/e2e/app-dir/app-middleware/next.config.js create mode 100644 test/e2e/app-dir/app-middleware/pages/api/dump-headers-edge.js create mode 100644 test/e2e/app-dir/app-middleware/pages/api/dump-headers-serverless.js create mode 100644 test/e2e/app-dir/app-prefetch/app/dashboard/[id]/page.js create mode 100644 test/e2e/app-dir/app-prefetch/app/dashboard/layout.js create mode 100644 test/e2e/app-dir/app-prefetch/app/dashboard/loading.js create mode 100644 test/e2e/app-dir/app-prefetch/app/dashboard/page.js create mode 100644 test/e2e/app-dir/app-prefetch/app/layout.js create mode 100644 test/e2e/app-dir/app-prefetch/app/loading.js create mode 100644 test/e2e/app-dir/app-prefetch/app/page.js create mode 100644 test/e2e/app-dir/app-prefetch/next.config.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-multiple/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-multiple/nested/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-ssr-combined/nested/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-ssr-combined/nested/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-ssr-combined/slow/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/isr-ssr-combined/slow/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/ssr-only/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/ssr-only/nested/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/ssr-only/slow/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/ssr-only/slow/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/static-only/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/static-only/nested/page.js create mode 100644 test/e2e/app-dir/app-rendering/app/static-only/slow/layout.js create mode 100644 test/e2e/app-dir/app-rendering/app/static-only/slow/page.js create mode 100644 test/e2e/app-dir/app-rendering/next.config.js create mode 100644 test/e2e/app-dir/app-static.test.ts create mode 100644 test/e2e/app-dir/app-static/app/(new)/custom/page.js create mode 100644 test/e2e/app-dir/app-static/app/(new)/layout.js create mode 100644 test/e2e/app-dir/app-static/app/blog/[author]/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/blog/[author]/layout.js create mode 100644 test/e2e/app-dir/app-static/app/blog/[author]/page.js create mode 100644 test/e2e/app-dir/app-static/app/dynamic-no-gen-params-ssr/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/dynamic-no-gen-params/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/force-static/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/force-static/layout.js create mode 100644 test/e2e/app-dir/app-static/app/force-static/page.js create mode 100644 test/e2e/app-dir/app-static/app/hooks/use-pathname/[slug]/layout.js create mode 100644 test/e2e/app-dir/app-static/app/hooks/use-pathname/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/hooks/use-search-params/[slug]/layout.js create mode 100644 test/e2e/app-dir/app-static/app/hooks/use-search-params/[slug]/page.js create mode 100644 test/e2e/app-dir/app-static/app/layout.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-auto/cache-no-store/loading.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-auto/cache-no-store/page.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-auto/fetch-revalidate-zero/loading.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-auto/fetch-revalidate-zero/page.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-forced/loading.js create mode 100644 test/e2e/app-dir/app-static/app/ssr-forced/page.js create mode 100644 test/e2e/app-dir/app-static/next.config.js create mode 100644 test/e2e/app-dir/app-typescript/app/inner/page.tsx create mode 100644 test/e2e/app-dir/app-typescript/app/layout.tsx create mode 100644 test/e2e/app-dir/app-typescript/next.config.js create mode 100644 test/e2e/app-dir/app-typescript/package.json create mode 100644 test/e2e/app-dir/app-typescript/pages/index.tsx create mode 100644 test/e2e/app-dir/app-typescript/tsconfig.json create mode 100644 test/e2e/app-dir/app/app/(newroot)/dashboard/another/page.js create mode 100644 test/e2e/app-dir/app/app/(newroot)/dashboard/project/[projectId]/page.js create mode 100644 test/e2e/app-dir/app/app/(newroot)/layout.js create mode 100644 test/e2e/app-dir/app/app/(rootonly)/dashboard/changelog/page.js create mode 100644 test/e2e/app-dir/app/app/(rootonly)/dashboard/hello/page.js create mode 100644 test/e2e/app-dir/app/app/back-forward/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/catch-all-link/page.js create mode 100644 test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js create mode 100644 test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js create mode 100644 test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js create mode 100644 test/e2e/app-dir/app/app/catch-all/[...slug]/page.js create mode 100644 test/e2e/app-dir/app/app/client-component-route/page.js create mode 100644 test/e2e/app-dir/app/app/client-component-route/style.css create mode 100644 test/e2e/app-dir/app/app/client-component-route/style.module.css create mode 100644 test/e2e/app-dir/app/app/client-nested/layout.js create mode 100644 test/e2e/app-dir/app/app/client-nested/page.js create mode 100644 test/e2e/app-dir/app/app/client-nested/style.css create mode 100644 test/e2e/app-dir/app/app/client-nested/style.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-client/client-foo.css create mode 100644 test/e2e/app-dir/app/app/css/css-client/client-layout.css create mode 100644 test/e2e/app-dir/app/app/css/css-client/client-page.css create mode 100644 test/e2e/app-dir/app/app/css/css-client/foo.js create mode 100644 test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-client/inner/foo.js create mode 100644 test/e2e/app-dir/app/app/css/css-client/inner/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-client/layout.js create mode 100644 test/e2e/app-dir/app/app/css/css-client/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-nested/layout.js create mode 100644 test/e2e/app-dir/app/app/css/css-nested/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-nested/style.css create mode 100644 test/e2e/app-dir/app/app/css/css-nested/style.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/layout.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/style.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/style.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/style2.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused/page.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused/styles.js create mode 100644 test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css create mode 100644 test/e2e/app-dir/app/app/css/foo.js create mode 100644 test/e2e/app-dir/app/app/css/layout.js create mode 100644 test/e2e/app-dir/app/app/css/sass-client/global.sass create mode 100644 test/e2e/app-dir/app/app/css/sass-client/global.scss create mode 100644 test/e2e/app-dir/app/app/css/sass-client/inner/global.sass create mode 100644 test/e2e/app-dir/app/app/css/sass-client/inner/global.scss create mode 100644 test/e2e/app-dir/app/app/css/sass-client/inner/page.js create mode 100644 test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass create mode 100644 test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss create mode 100644 test/e2e/app-dir/app/app/css/sass-client/layout.js create mode 100644 test/e2e/app-dir/app/app/css/sass-client/styles.module.sass create mode 100644 test/e2e/app-dir/app/app/css/sass-client/styles.module.scss create mode 100644 test/e2e/app-dir/app/app/css/sass/global.sass create mode 100644 test/e2e/app-dir/app/app/css/sass/global.scss create mode 100644 test/e2e/app-dir/app/app/css/sass/inner/global.sass create mode 100644 test/e2e/app-dir/app/app/css/sass/inner/global.scss create mode 100644 test/e2e/app-dir/app/app/css/sass/inner/page.js create mode 100644 test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass create mode 100644 test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss create mode 100644 test/e2e/app-dir/app/app/css/sass/layout.js create mode 100644 test/e2e/app-dir/app/app/css/sass/styles.module.sass create mode 100644 test/e2e/app-dir/app/app/css/sass/styles.module.scss create mode 100644 test/e2e/app-dir/app/app/css/style.css create mode 100644 test/e2e/app-dir/app/app/css/style.module.css create mode 100644 test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/(custom)/layout.js create mode 100644 test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx create mode 100644 test/e2e/app-dir/app/app/dashboard/client-comp.module.css create mode 100644 test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json create mode 100644 test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/deployments/info/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/deployments/layout.js create mode 100644 test/e2e/app-dir/app/app/dashboard/global.css create mode 100644 test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css create mode 100644 test/e2e/app-dir/app/app/dashboard/index/lazy.module.css create mode 100644 test/e2e/app-dir/app/app/dashboard/index/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js create mode 100644 test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js create mode 100644 test/e2e/app-dir/app/app/dashboard/integrations/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/layout.js create mode 100644 test/e2e/app-dir/app/app/dashboard/page.js create mode 100644 test/e2e/app-dir/app/app/dashboard/page/page.jsx create mode 100644 test/e2e/app-dir/app/app/dashboard/style.css create mode 100644 test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js create mode 100644 test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js create mode 100644 test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/dynamic/[category]/layout.js create mode 100644 test/e2e/app-dir/app/app/dynamic/layout.js create mode 100644 test/e2e/app-dir/app/app/edge-apis/cookies/page.js create mode 100644 test/e2e/app-dir/app/app/error/client-component/error.js create mode 100644 test/e2e/app-dir/app/app/error/client-component/page.js create mode 100644 test/e2e/app-dir/app/app/error/client-component/style.module.css create mode 100644 test/e2e/app-dir/app/app/error/global-error-boundary/page.js create mode 100644 test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js create mode 100644 test/e2e/app-dir/app/app/error/server-component/error.js create mode 100644 test/e2e/app-dir/app/app/error/server-component/page.js create mode 100644 test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js create mode 100644 test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js create mode 100644 test/e2e/app-dir/app/app/extension/page.server.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-cookies/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-headers/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-layout-segments/server/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-params/server/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-pathname/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-preview-data/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-router/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-router/server/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-search-params/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js create mode 100644 test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js create mode 100644 test/e2e/app-dir/app/app/internal/failure/page.js create mode 100644 test/e2e/app-dir/app/app/internal/page.js create mode 100644 test/e2e/app-dir/app/app/internal/success/page.js create mode 100644 test/e2e/app-dir/app/app/layout.js create mode 100644 test/e2e/app-dir/app/app/link-hard-push/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js create mode 100644 test/e2e/app-dir/app/app/link-hard-replace/page.js create mode 100644 test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js create mode 100644 test/e2e/app-dir/app/app/link-soft-push/page.js create mode 100644 test/e2e/app-dir/app/app/link-soft-replace/page.js create mode 100644 test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js create mode 100644 test/e2e/app-dir/app/app/link-with-as/page.js create mode 100644 test/e2e/app-dir/app/app/linking/about/page.js create mode 100644 test/e2e/app-dir/app/app/linking/layout.js create mode 100644 test/e2e/app-dir/app/app/linking/page.js create mode 100644 test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js create mode 100644 test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js create mode 100644 test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css create mode 100644 test/e2e/app-dir/app/app/navigation/link.js create mode 100644 test/e2e/app-dir/app/app/navigation/page.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/getCategories.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/layout.js create mode 100644 test/e2e/app-dir/app/app/nested-navigation/page.js create mode 100644 test/e2e/app-dir/app/app/not-found/client-side/page.js create mode 100644 test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js create mode 100644 test/e2e/app-dir/app/app/not-found/clientcomponent/page.js create mode 100644 test/e2e/app-dir/app/app/not-found/not-found.js create mode 100644 test/e2e/app-dir/app/app/not-found/servercomponent/page.js create mode 100644 test/e2e/app-dir/app/app/not-found/style.module.css create mode 100644 test/e2e/app-dir/app/app/pages-linking/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/(new)/layout.js create mode 100644 test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js create mode 100644 test/e2e/app-dir/app/app/parallel/@bar/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js create mode 100644 test/e2e/app-dir/app/app/parallel/@foo/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/layout.js create mode 100644 test/e2e/app-dir/app/app/parallel/nested/page.js create mode 100644 test/e2e/app-dir/app/app/parallel/style.css create mode 100644 test/e2e/app-dir/app/app/param-and-query/[slug]/page.js create mode 100644 test/e2e/app-dir/app/app/partial-match-[id]/page.js create mode 100644 test/e2e/app-dir/app/app/react-cache/client-component/page.js create mode 100644 test/e2e/app-dir/app/app/react-cache/page.js create mode 100644 test/e2e/app-dir/app/app/react-cache/server-component/page.js create mode 100644 test/e2e/app-dir/app/app/react-fetch/page.js create mode 100644 test/e2e/app-dir/app/app/react-fetch/server-component/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/client-side/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js create mode 100644 test/e2e/app-dir/app/app/redirect/clientcomponent/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/result/page.js create mode 100644 test/e2e/app-dir/app/app/redirect/servercomponent/page.js create mode 100644 test/e2e/app-dir/app/app/rewrites/page.js create mode 100644 test/e2e/app-dir/app/app/same-layout/first/page.js create mode 100644 test/e2e/app-dir/app/app/same-layout/layout.js create mode 100644 test/e2e/app-dir/app/app/same-layout/second/page.js create mode 100644 test/e2e/app-dir/app/app/script/client.js create mode 100644 test/e2e/app-dir/app/app/script/page.js create mode 100644 test/e2e/app-dir/app/app/search-params-prop/page.js create mode 100644 test/e2e/app-dir/app/app/search-params-prop/server/page.js create mode 100644 test/e2e/app-dir/app/app/shared-component-route/page.js create mode 100644 test/e2e/app-dir/app/app/should-not-serve-client/page.js create mode 100644 test/e2e/app-dir/app/app/should-not-serve-server/page.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-and-page-with-loading/loading.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-and-page-with-loading/slow/layout.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-and-page-with-loading/slow/loading.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-and-page-with-loading/slow/page.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-with-loading/loading.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-with-loading/slow/layout.js create mode 100644 test/e2e/app-dir/app/app/slow-layout-with-loading/slow/page.js create mode 100644 test/e2e/app-dir/app/app/slow-page-no-loading/page.js create mode 100644 test/e2e/app-dir/app/app/slow-page-with-loading/loading.js create mode 100644 test/e2e/app-dir/app/app/slow-page-with-loading/page.js create mode 100644 test/e2e/app-dir/app/app/style.css create mode 100644 test/e2e/app-dir/app/app/template/clientcomponent/other/page.js create mode 100644 test/e2e/app-dir/app/app/template/clientcomponent/page.js create mode 100644 test/e2e/app-dir/app/app/template/clientcomponent/style.module.css create mode 100644 test/e2e/app-dir/app/app/template/clientcomponent/template.js create mode 100644 test/e2e/app-dir/app/app/template/servercomponent/other/page.js create mode 100644 test/e2e/app-dir/app/app/template/servercomponent/page.js create mode 100644 test/e2e/app-dir/app/app/template/servercomponent/style.module.css create mode 100644 test/e2e/app-dir/app/app/template/servercomponent/template.js create mode 100644 test/e2e/app-dir/app/app/test-page/page.js create mode 100644 test/e2e/app-dir/app/app/very-large-data-fetch/page.js create mode 100644 test/e2e/app-dir/app/app/with-id/page.js create mode 100644 test/e2e/app-dir/app/components/router-hooks-fixtures.js create mode 100644 test/e2e/app-dir/app/middleware.js create mode 100644 test/e2e/app-dir/app/next.config.js create mode 100644 test/e2e/app-dir/app/pages/adapter-hooks/[id].js create mode 100644 test/e2e/app-dir/app/pages/adapter-hooks/[id]/account.js create mode 100644 test/e2e/app-dir/app/pages/adapter-hooks/pushed.js create mode 100644 test/e2e/app-dir/app/pages/adapter-hooks/static.js create mode 100644 test/e2e/app-dir/app/pages/api/hello.js create mode 100644 test/e2e/app-dir/app/pages/api/preview.js create mode 100644 test/e2e/app-dir/app/pages/app-linking.js create mode 100644 test/e2e/app-dir/app/pages/blog/[slug].js create mode 100644 test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap.js create mode 100644 test/e2e/app-dir/app/pages/dynamic-pages-route-app-overlap/[slug].js create mode 100644 test/e2e/app-dir/app/pages/exists-but-not-routed.js create mode 100644 test/e2e/app-dir/app/pages/index.js create mode 100644 test/e2e/app-dir/app/pages/link-to-rewritten-path.js create mode 100644 test/e2e/app-dir/app/public/hello.txt create mode 100644 test/e2e/app-dir/app/public/test1.js create mode 100644 test/e2e/app-dir/app/public/test2.js create mode 100644 test/e2e/app-dir/app/public/test3.js create mode 100644 test/e2e/app-dir/app/public/test4.js create mode 100644 test/e2e/app-dir/app/styles/global.css create mode 100644 test/e2e/app-dir/app/styles/shared.module.css create mode 100644 test/e2e/app-dir/asset-prefix.test.ts create mode 100644 test/e2e/app-dir/asset-prefix/app/a/page.js create mode 100644 test/e2e/app-dir/asset-prefix/app/layout.js create mode 100644 test/e2e/app-dir/asset-prefix/app/page.js create mode 100644 test/e2e/app-dir/asset-prefix/next.config.js create mode 100644 test/e2e/app-dir/async-component-preload.test.ts create mode 100644 test/e2e/app-dir/async-component-preload/app/layout.js create mode 100644 test/e2e/app-dir/async-component-preload/app/page.js create mode 100644 test/e2e/app-dir/async-component-preload/app/success/page.js create mode 100644 test/e2e/app-dir/async-component-preload/next.config.js create mode 100644 test/e2e/app-dir/back-button-download-bug/app/layout.js create mode 100644 test/e2e/app-dir/back-button-download-bug/app/page.js create mode 100644 test/e2e/app-dir/back-button-download-bug/next.config.js create mode 100644 test/e2e/app-dir/back-button-download-bug/pages/_app.js create mode 100644 test/e2e/app-dir/back-button-download-bug/pages/_document.js create mode 100644 test/e2e/app-dir/back-button-download-bug/pages/post/[id]/index.js create mode 100644 test/e2e/app-dir/create-next-app-template/.vscode/settings.json create mode 100644 test/e2e/app-dir/create-next-app-template/app/globals.css create mode 100644 test/e2e/app-dir/create-next-app-template/app/layout.tsx create mode 100644 test/e2e/app-dir/create-next-app-template/app/page.module.css create mode 100644 test/e2e/app-dir/create-next-app-template/app/page.tsx create mode 100644 test/e2e/app-dir/create-next-app-template/next.config.js create mode 100644 test/e2e/app-dir/create-next-app-template/tsconfig.json create mode 100644 test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/first/head.js create mode 100644 test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/first/layout.js create mode 100644 test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/first/page.js create mode 100644 test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/second/inner/page.js create mode 100644 test/e2e/app-dir/create-root-layout/app-group-layout/(group)/page.js create mode 100644 test/e2e/app-dir/create-root-layout/app/route/page.js create mode 100644 test/e2e/app-dir/create-root-layout/next.config.js create mode 100644 test/e2e/app-dir/head.test.ts create mode 100644 test/e2e/app-dir/head/app/blog/[slug]/head.js create mode 100644 test/e2e/app-dir/head/app/blog/[slug]/page.js create mode 100644 test/e2e/app-dir/head/app/blog/about/page.js create mode 100644 test/e2e/app-dir/head/app/blog/head.js create mode 100644 test/e2e/app-dir/head/app/blog/layout.js create mode 100644 test/e2e/app-dir/head/app/blog/page.js create mode 100644 test/e2e/app-dir/head/app/head.js create mode 100644 test/e2e/app-dir/head/app/layout.js create mode 100644 test/e2e/app-dir/head/app/page.js create mode 100644 test/e2e/app-dir/head/next.config.js create mode 100644 test/e2e/app-dir/head/public/another.js create mode 100644 test/e2e/app-dir/head/public/hello.js create mode 100644 test/e2e/app-dir/head/public/hello1.js create mode 100644 test/e2e/app-dir/head/public/hello2.js create mode 100644 test/e2e/app-dir/head/public/hello3.js create mode 100644 test/e2e/app-dir/index.test.ts create mode 100644 test/e2e/app-dir/next-font.test.ts create mode 100644 test/e2e/app-dir/next-font/app/Comp.js create mode 100644 test/e2e/app-dir/next-font/app/client/Comp.js create mode 100644 test/e2e/app-dir/next-font/app/client/layout.js create mode 100644 test/e2e/app-dir/next-font/app/client/page.js create mode 100644 test/e2e/app-dir/next-font/app/layout-with-fonts/layout-font.woff2 create mode 100644 test/e2e/app-dir/next-font/app/layout-with-fonts/layout.js create mode 100644 test/e2e/app-dir/next-font/app/layout-with-fonts/page.js create mode 100644 test/e2e/app-dir/next-font/app/layout.js create mode 100644 test/e2e/app-dir/next-font/app/page-with-fonts/layout.js create mode 100644 test/e2e/app-dir/next-font/app/page-with-fonts/page-font.woff2 create mode 100644 test/e2e/app-dir/next-font/app/page-with-fonts/page.js create mode 100644 test/e2e/app-dir/next-font/app/page.js create mode 100644 test/e2e/app-dir/next-font/fonts/font1.woff2 create mode 100644 test/e2e/app-dir/next-font/fonts/font2.woff2 create mode 100644 test/e2e/app-dir/next-font/fonts/font3.woff2 create mode 100644 test/e2e/app-dir/next-font/fonts/font4.woff2 create mode 100644 test/e2e/app-dir/next-font/fonts/index.js create mode 100644 test/e2e/app-dir/next-font/fonts/test/font5.woff2 create mode 100644 test/e2e/app-dir/next-font/fonts/test/font6.woff2 create mode 100644 test/e2e/app-dir/next-font/next.config.js create mode 100644 test/e2e/app-dir/next-image/app/Comp.js create mode 100644 test/e2e/app-dir/next-image/app/client/Comp.js create mode 100644 test/e2e/app-dir/next-image/app/client/layout.js create mode 100644 test/e2e/app-dir/next-image/app/client/page.js create mode 100644 test/e2e/app-dir/next-image/app/layout.js create mode 100644 test/e2e/app-dir/next-image/app/nested/Comp.js create mode 100644 test/e2e/app-dir/next-image/app/nested/layout.js create mode 100644 test/e2e/app-dir/next-image/app/nested/page.js create mode 100644 test/e2e/app-dir/next-image/app/nested/test.jpg create mode 100644 test/e2e/app-dir/next-image/app/page.js create mode 100644 test/e2e/app-dir/next-image/images/test.png create mode 100644 test/e2e/app-dir/next-image/next.config.js create mode 100644 test/e2e/app-dir/rendering.test.ts create mode 100644 test/e2e/app-dir/root-layout.test.ts create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/(route-group)/(nested-route-group)/nested-route-group/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/(route-group)/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/(route-group)/route-group/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/basic-route/inner/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/basic-route/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/basic-route/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/[second]/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/to-pages-dir/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/to-pages-dir/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/with-parallel-routes/@one/inner/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/with-parallel-routes/@one/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/with-parallel-routes/@two/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(mpa-navigation)/with-parallel-routes/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/has-tags/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/has-tags/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/missing-tags/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/missing-tags/page.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/static-missing-tags/[slug]/layout.js create mode 100644 test/e2e/app-dir/root-layout/app/(required-tags)/static-missing-tags/[slug]/page.js create mode 100644 test/e2e/app-dir/root-layout/next.config.js create mode 100644 test/e2e/app-dir/rsc-basic.test.ts create mode 100644 test/e2e/app-dir/rsc-basic/app/css-in-js/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/css-in-js/styled-components.js create mode 100644 test/e2e/app-dir/rsc-basic/app/css-in-js/styled-jsx.js create mode 100644 test/e2e/app-dir/rsc-basic/app/css-in-js/suspense/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/css-modules/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/edge/dynamic/[id]/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/edge/dynamic/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/escaping-rsc/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/global-styles-rsc/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/layout.js create mode 100644 test/e2e/app-dir/rsc-basic/app/multi/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/native-module/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/next-api/image-legacy/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/next-api/image-new/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/next-api/link/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/partial-hydration/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/root-style-registry.js create mode 100644 test/e2e/app-dir/rsc-basic/app/root/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/shared/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/streaming-rsc/page.js create mode 100644 test/e2e/app-dir/rsc-basic/app/various-exports/page.js create mode 100644 test/e2e/app-dir/rsc-basic/components/bar-client.js create mode 100644 test/e2e/app-dir/rsc-basic/components/bar.js create mode 100644 test/e2e/app-dir/rsc-basic/components/cjs-client.js create mode 100644 test/e2e/app-dir/rsc-basic/components/cjs-server.js create mode 100644 test/e2e/app-dir/rsc-basic/components/client-exports.js create mode 100644 test/e2e/app-dir/rsc-basic/components/client.js create mode 100644 test/e2e/app-dir/rsc-basic/components/export-all/index.js create mode 100644 test/e2e/app-dir/rsc-basic/components/export-all/one.js create mode 100644 test/e2e/app-dir/rsc-basic/components/export-all/two.js create mode 100644 test/e2e/app-dir/rsc-basic/components/foo.js create mode 100644 test/e2e/app-dir/rsc-basic/components/nav.js create mode 100644 test/e2e/app-dir/rsc-basic/components/partial-hydration-counter.js create mode 100644 test/e2e/app-dir/rsc-basic/components/red/index.js create mode 100644 test/e2e/app-dir/rsc-basic/components/red/style.module.css create mode 100644 test/e2e/app-dir/rsc-basic/components/shared-client.js create mode 100644 test/e2e/app-dir/rsc-basic/components/shared-exports.js create mode 100644 test/e2e/app-dir/rsc-basic/components/shared.js create mode 100644 test/e2e/app-dir/rsc-basic/lib/data.js create mode 100644 test/e2e/app-dir/rsc-basic/next.config.js create mode 100644 test/e2e/app-dir/rsc-basic/public/test.jpg create mode 100644 test/e2e/app-dir/rsc-errors/app/client-with-errors/get-server-side-props/page.js create mode 100644 test/e2e/app-dir/rsc-errors/app/client-with-errors/get-static-props/page.js create mode 100644 test/e2e/app-dir/rsc-errors/app/layout.js create mode 100644 test/e2e/app-dir/rsc-errors/app/not-transform/styled-jsx/page.js create mode 100644 test/e2e/app-dir/rsc-errors/app/server-with-errors/page-export/page.js create mode 100644 test/e2e/app-dir/rsc-errors/app/server-with-errors/styled-jsx/page.js create mode 100644 test/e2e/app-dir/rsc-errors/next.config.js create mode 100644 test/e2e/app-dir/trailingslash.test.ts create mode 100644 test/e2e/app-dir/trailingslash/app/a/page.js create mode 100644 test/e2e/app-dir/trailingslash/app/layout.js create mode 100644 test/e2e/app-dir/trailingslash/app/page.js create mode 100644 test/e2e/app-dir/trailingslash/next.config.js create mode 100644 test/e2e/app-dir/with-babel.test.ts create mode 100644 test/e2e/app-dir/with-babel/app/layout.js create mode 100644 test/e2e/app-dir/with-babel/app/page.js create mode 100644 test/e2e/app-dir/with-babel/babel.config.js create mode 100644 test/e2e/app-dir/with-babel/next.config.js create mode 100644 test/e2e/jest-setup-after-env.ts create mode 100644 test/e2e/jest.config.appdir.js create mode 100644 test/e2e/next-test-lib/next-modes/next-dev.ts create mode 100644 test/e2e/next-test-lib/next-modes/next-start.ts diff --git a/.eslintrc.js b/.eslintrc.js index c8bfdeba1f..69ae1605ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -29,6 +29,7 @@ module.exports = { 'unicorn/filename-case': 0, 'unicorn/no-array-push-push': 0, 'unicorn/numeric-separators-style': 0, + 'max-lines': 0, }, parserOptions: { sourceType: 'module', diff --git a/.github/workflows/cypress-canary.yml b/.github/workflows/cypress-canary.yml index 19f48db40a..6ba293aefc 100644 --- a/.github/workflows/cypress-canary.yml +++ b/.github/workflows/cypress-canary.yml @@ -1,7 +1,7 @@ name: Run e2e (canary demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo-nx.yml b/.github/workflows/cypress-demo-nx.yml index 570a2209fe..48c498f94d 100644 --- a/.github/workflows/cypress-demo-nx.yml +++ b/.github/workflows/cypress-demo-nx.yml @@ -1,7 +1,7 @@ name: Run e2e (Nx monorepo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo-static.yml b/.github/workflows/cypress-demo-static.yml index 8a18a4c93f..586920b514 100644 --- a/.github/workflows/cypress-demo-static.yml +++ b/.github/workflows/cypress-demo-static.yml @@ -1,7 +1,7 @@ name: Run e2e (static root) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-demo.yml b/.github/workflows/cypress-demo.yml index 0072322035..41666d0b72 100644 --- a/.github/workflows/cypress-demo.yml +++ b/.github/workflows/cypress-demo.yml @@ -1,7 +1,7 @@ name: Run e2e (default demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/cypress-middleware.yml b/.github/workflows/cypress-middleware.yml index 68f12bdbf4..eb4611dbd9 100644 --- a/.github/workflows/cypress-middleware.yml +++ b/.github/workflows/cypress-middleware.yml @@ -1,7 +1,7 @@ name: Run e2e (middleware demo) on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, synchronize] push: branches: - main diff --git a/.github/workflows/e2e-appdir.yml b/.github/workflows/e2e-appdir.yml new file mode 100644 index 0000000000..fd008522c0 --- /dev/null +++ b/.github/workflows/e2e-appdir.yml @@ -0,0 +1,71 @@ +name: Next.js appdir test suite + +on: + pull_request: + types: [opened, synchronize] + push: + branches: [main] + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + test-files: ${{ steps['set-test-files'].outputs['test-files'] }} + steps: + - uses: actions/checkout@v3 + - run: npm install + - id: set-test-files + name: Get test files + # Extracts the list of all test files as JSON and trims to be relative to the test dir to be easier to read + run: + echo "test-files=$(npx jest -c test/e2e/jest.config.appdir.js --listTests --json | jq -cM 'map(.[env.PWD | + length + 10:])')" >> $GITHUB_OUTPUT + # echo "test-files=$(npx jest -c test/e2e/jest.config.all.js --listTests --json | jq -cM 'map(.[env.PWD | length + # + 10:])')" >> $GITHUB_OUTPUT + + test: + runs-on: ubuntu-latest + name: test (${{ matrix.test-file }}) + needs: + - setup + strategy: + fail-fast: false + matrix: + # Creates a job for each chunk ID. This will be assigned one or more test files to run + test-file: ${{ fromJson(needs.setup.outputs['test-files']) }} + steps: + - uses: actions/checkout@v3 + - run: npm install + - name: Run tests + run: npx jest --reporters=jest-junit --reporters=default -c test/e2e/jest.config.all.js ${{ matrix.test-file }} + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }} + NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395 + NEXT_TEST_VERSION: canary + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + name: Upload test results + with: + name: test-results + path: reports/jest-*.xml + report: + name: Report appDir e2e test results + runs-on: ubuntu-latest + if: ${{ always() }} + needs: + - test + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + path: reports + - name: Combine reports + # The test reporter can handle multiple files, but these have random filenames so the output is better when combined + run: npx junit-report-merger test-results.xml reports/**/*.xml + - uses: phoenix-actions/test-reporting@v10 + with: + name: Jest Tests + output-to: 'step-summary' + path: 'test-results.xml' + max-annotations: 49 + reporter: jest-junit diff --git a/.github/workflows/e2e-next.yml b/.github/workflows/e2e-next.yml index b435fe4119..0fdb8113aa 100644 --- a/.github/workflows/e2e-next.yml +++ b/.github/workflows/e2e-next.yml @@ -2,6 +2,7 @@ name: Next.js e2e test suite on: pull_request: + types: [opened, synchronize] push: branches: [main] @@ -41,17 +42,6 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }} NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395 # RUN_SKIPPED_TESTS: true - # - uses: phoenix-actions/test-reporting@v10 - # if: ${{ always() }} - # name: Report Test Results - # # Generates annotations for the test failures - # id: test-report - # with: - # name: E2E Test chunk ${{ matrix.chunk }} - # path: 'reports/**/*.xml' # Path to test results (inside artifact .zip) - # output-to: 'checks' - # max-annotations: 49 # Maximum number of annotations to be created - # reporter: jest-junit # Format of test results - uses: actions/upload-artifact@v3 # upload test results @@ -61,6 +51,7 @@ jobs: name: test-results path: reports/jest-*.xml report: + name: Report Next.js e2e test results runs-on: ubuntu-latest if: ${{ always() }} needs: diff --git a/cypress/integration/nx/general.spec.ts b/cypress/integration/nx/general.spec.ts index 49c6f04220..e794b265ea 100644 --- a/cypress/integration/nx/general.spec.ts +++ b/cypress/integration/nx/general.spec.ts @@ -10,10 +10,10 @@ describe('Default site', () => { cy.url().should('eq', `${Cypress.config().baseUrl}/`) }) - it('serves generated public files', async () => { - cy.request('service-worker.js').then((res) => { + it('serves generated public files', () => { + cy.request('favicon.ico').then((res) => { expect(res.status).to.eq(200) - expect(res.headers['content-type']).to.match(/javascript/) + expect(res.headers['content-type']).to.match(/image/) }) }) diff --git a/demos/base-path/package.json b/demos/base-path/package.json index c0256f1a91..6368c5c87f 100644 --- a/demos/base-path/package.json +++ b/demos/base-path/package.json @@ -14,7 +14,7 @@ "typescript": "^4.6.3" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/demos/custom-routes/package.json b/demos/custom-routes/package.json index 73789498a7..3dbb163d92 100644 --- a/demos/custom-routes/package.json +++ b/demos/custom-routes/package.json @@ -15,7 +15,7 @@ "typescript": "^4.7.4" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "scripts": { "build": "next build", diff --git a/demos/default/package.json b/demos/default/package.json index 1b1bcb1ef8..e3813a596f 100644 --- a/demos/default/package.json +++ b/demos/default/package.json @@ -22,7 +22,7 @@ "@reach/dialog": "^0.16.2", "@reach/visually-hidden": "^0.16.0", "@vercel/og": "^0.0.21", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/demos/middleware/package.json b/demos/middleware/package.json index d21c8f2cb4..6ad583ce2d 100644 --- a/demos/middleware/package.json +++ b/demos/middleware/package.json @@ -12,7 +12,7 @@ "@netlify/next": "*", "@netlify/plugin-nextjs": "*", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/demos/next-auth/package.json b/demos/next-auth/package.json index a326f1c0c5..79e563e79f 100644 --- a/demos/next-auth/package.json +++ b/demos/next-auth/package.json @@ -23,7 +23,7 @@ ], "license": "MIT", "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "react": "^18.2.0", diff --git a/demos/next-export/package.json b/demos/next-export/package.json index 44ce55cf66..70a78d4464 100644 --- a/demos/next-export/package.json +++ b/demos/next-export/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", diff --git a/demos/next-i18next/package.json b/demos/next-i18next/package.json index f02e29c21c..753f080827 100644 --- a/demos/next-i18next/package.json +++ b/demos/next-i18next/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-i18next": "^11.0.0", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico b/demos/nx-next-monorepo-demo/apps/demo-monorepo/public/favicon.ico new file mode 100755 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/demos/nx-next-monorepo-demo/package-lock.json b/demos/nx-next-monorepo-demo/package-lock.json index ddd86c6086..15a554d829 100644 --- a/demos/nx-next-monorepo-demo/package-lock.json +++ b/demos/nx-next-monorepo-demo/package-lock.json @@ -1785,7 +1785,7 @@ }, "node_modules/@cypress/request": { "version": "2.88.10", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", @@ -1813,7 +1813,7 @@ }, "node_modules/@cypress/request/node_modules/qs": { "version": "6.5.3", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.6" @@ -1836,7 +1836,7 @@ }, "node_modules/@cypress/xvfb": { "version": "1.2.4", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "debug": "^3.1.0", @@ -1845,7 +1845,7 @@ }, "node_modules/@cypress/xvfb/node_modules/debug": { "version": "3.2.7", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.1" @@ -1853,7 +1853,7 @@ }, "node_modules/@eslint/eslintrc": { "version": "1.3.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -1875,12 +1875,12 @@ }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -1894,7 +1894,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -1905,7 +1905,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -1916,7 +1916,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", - "devOptional": true, + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -1927,7 +1927,7 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1940,7 +1940,7 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause" }, "node_modules/@istanbuljs/load-nyc-config": { @@ -5485,12 +5485,12 @@ }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/sockjs": { @@ -6016,7 +6016,7 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "devOptional": true, + "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -6042,7 +6042,7 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", @@ -6169,7 +6169,7 @@ }, "node_modules/arch": { "version": "2.2.0", - "devOptional": true, + "dev": true, "funding": [ { "type": "github", @@ -6273,7 +6273,7 @@ }, "node_modules/asn1": { "version": "0.2.6", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" @@ -6281,7 +6281,7 @@ }, "node_modules/assert-plus": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -6294,7 +6294,7 @@ }, "node_modules/astral-regex": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -6310,7 +6310,7 @@ }, "node_modules/at-least-node": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": ">= 4.0.0" @@ -6359,7 +6359,7 @@ }, "node_modules/aws-sign2": { "version": "0.7.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "*" @@ -6367,7 +6367,7 @@ }, "node_modules/aws4": { "version": "1.11.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/axe-core": { @@ -6647,7 +6647,7 @@ }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" @@ -6678,7 +6678,7 @@ }, "node_modules/blob-util": { "version": "2.0.2", - "devOptional": true, + "dev": true, "license": "Apache-2.0" }, "node_modules/bluebird": { @@ -6840,7 +6840,7 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -6869,7 +6869,7 @@ }, "node_modules/cachedir": { "version": "2.3.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6929,7 +6929,7 @@ }, "node_modules/caseless": { "version": "0.12.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0" }, "node_modules/chalk": { @@ -6955,7 +6955,7 @@ }, "node_modules/check-more-types": { "version": "2.24.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -7003,7 +7003,7 @@ }, "node_modules/clean-stack": { "version": "2.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7031,7 +7031,7 @@ }, "node_modules/cli-table3": { "version": "0.6.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "string-width": "^4.2.0" @@ -7045,7 +7045,7 @@ }, "node_modules/cli-truncate": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", @@ -7150,7 +7150,7 @@ }, "node_modules/common-tags": { "version": "1.8.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=4.0.0" @@ -7763,7 +7763,7 @@ }, "node_modules/cypress": { "version": "10.10.0", - "devOptional": true, + "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -7819,17 +7819,17 @@ }, "node_modules/cypress/node_modules/@types/node": { "version": "14.18.32", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cypress/node_modules/bluebird": { "version": "3.7.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cypress/node_modules/commander": { "version": "5.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -7837,7 +7837,7 @@ }, "node_modules/cypress/node_modules/execa": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", @@ -7859,7 +7859,7 @@ }, "node_modules/cypress/node_modules/fs-extra": { "version": "9.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", @@ -7873,7 +7873,7 @@ }, "node_modules/cypress/node_modules/get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -7887,7 +7887,7 @@ }, "node_modules/cypress/node_modules/human-signals": { "version": "1.1.1", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8.12.0" @@ -7895,7 +7895,7 @@ }, "node_modules/cypress/node_modules/supports-color": { "version": "8.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -7914,7 +7914,7 @@ }, "node_modules/dashdash": { "version": "1.14.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -7950,7 +7950,7 @@ }, "node_modules/dayjs": { "version": "1.11.5", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/debug": { @@ -7986,7 +7986,7 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/deepmerge": { @@ -8101,7 +8101,7 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -8193,7 +8193,7 @@ }, "node_modules/ecc-jsbn": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "jsbn": "~0.1.0", @@ -8473,7 +8473,7 @@ }, "node_modules/eslint": { "version": "8.15.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.2.3", @@ -8857,7 +8857,7 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" @@ -8874,7 +8874,7 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=10" @@ -8882,7 +8882,7 @@ }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -8890,12 +8890,12 @@ }, "node_modules/eslint/node_modules/argparse": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "Python-2.0" }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -8906,7 +8906,7 @@ }, "node_modules/eslint/node_modules/eslint-scope": { "version": "7.1.1", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -8918,7 +8918,7 @@ }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -8929,7 +8929,7 @@ }, "node_modules/eslint/node_modules/globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -8943,7 +8943,7 @@ }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -8954,7 +8954,7 @@ }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -8965,7 +8965,7 @@ }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", - "devOptional": true, + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -8976,7 +8976,7 @@ }, "node_modules/espree": { "version": "9.4.0", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.8.0", @@ -9048,7 +9048,7 @@ }, "node_modules/eventemitter2": { "version": "6.4.7", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/eventemitter3": { @@ -9085,7 +9085,7 @@ }, "node_modules/executable": { "version": "4.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pify": "^2.2.0" @@ -9204,12 +9204,12 @@ }, "node_modules/extend": { "version": "3.0.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", - "devOptional": true, + "dev": true, "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", @@ -9228,7 +9228,7 @@ }, "node_modules/extract-zip/node_modules/get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -9242,7 +9242,7 @@ }, "node_modules/extsprintf": { "version": "1.3.0", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -9272,7 +9272,7 @@ }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/fastq": { @@ -9301,7 +9301,7 @@ }, "node_modules/fd-slicer": { "version": "1.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "pend": "~1.2.0" @@ -9322,7 +9322,7 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -9448,7 +9448,7 @@ }, "node_modules/flat-cache": { "version": "3.0.4", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.1.0", @@ -9460,7 +9460,7 @@ }, "node_modules/flatted": { "version": "3.2.7", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { @@ -9483,7 +9483,7 @@ }, "node_modules/forever-agent": { "version": "0.6.1", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "engines": { "node": "*" @@ -9550,7 +9550,7 @@ }, "node_modules/form-data": { "version": "2.3.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -9644,7 +9644,7 @@ }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/functions-have-names": { @@ -9729,7 +9729,7 @@ }, "node_modules/getos": { "version": "3.2.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "async": "^3.2.0" @@ -9737,7 +9737,7 @@ }, "node_modules/getpass": { "version": "0.1.7", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -9787,7 +9787,7 @@ }, "node_modules/global-dirs": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ini": "2.0.0" @@ -10071,7 +10071,7 @@ }, "node_modules/http-signature": { "version": "1.3.6", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", @@ -10243,7 +10243,7 @@ }, "node_modules/indent-string": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10263,7 +10263,7 @@ }, "node_modules/ini": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -10355,7 +10355,7 @@ }, "node_modules/is-ci": { "version": "3.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ci-info": "^3.2.0" @@ -10434,7 +10434,7 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", @@ -10485,7 +10485,7 @@ }, "node_modules/is-path-inside": { "version": "3.0.3", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10586,12 +10586,12 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -10638,7 +10638,7 @@ }, "node_modules/isstream": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/istanbul-lib-coverage": { @@ -11603,7 +11603,7 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/jsdom": { @@ -11707,7 +11707,7 @@ }, "node_modules/json-schema": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { @@ -11716,12 +11716,12 @@ }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/json5": { @@ -11750,7 +11750,7 @@ }, "node_modules/jsprim": { "version": "2.0.2", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -11811,7 +11811,7 @@ }, "node_modules/lazy-ass": { "version": "1.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": "> 0.8" @@ -11906,7 +11906,7 @@ }, "node_modules/levn": { "version": "0.4.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -11944,7 +11944,7 @@ }, "node_modules/listr2": { "version": "3.14.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", @@ -11970,12 +11970,12 @@ }, "node_modules/listr2/node_modules/colorette": { "version": "2.0.19", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/listr2/node_modules/rxjs": { "version": "7.5.6", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -12031,12 +12031,12 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/lodash.uniq": { @@ -12045,7 +12045,7 @@ }, "node_modules/log-symbols": { "version": "4.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -12060,7 +12060,7 @@ }, "node_modules/log-update": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", @@ -12077,7 +12077,7 @@ }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -12093,7 +12093,7 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -12806,7 +12806,7 @@ }, "node_modules/optionator": { "version": "0.9.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -12822,7 +12822,7 @@ }, "node_modules/ospath": { "version": "1.2.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/p-finally": { @@ -12860,7 +12860,7 @@ }, "node_modules/p-map": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" @@ -13026,12 +13026,12 @@ }, "node_modules/pend": { "version": "1.2.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/performance-now": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/picocolors": { @@ -13675,7 +13675,7 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -13683,7 +13683,7 @@ }, "node_modules/prettier": { "version": "2.7.1", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "prettier": "bin-prettier.js" @@ -13697,7 +13697,7 @@ }, "node_modules/pretty-bytes": { "version": "5.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -13787,7 +13787,7 @@ }, "node_modules/proxy-from-env": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/prr": { @@ -13797,12 +13797,12 @@ }, "node_modules/psl": { "version": "1.9.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/pump": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -14043,7 +14043,7 @@ }, "node_modules/regexpp": { "version": "3.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -14089,7 +14089,7 @@ }, "node_modules/request-progress": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "throttleit": "^1.0.0" @@ -14181,7 +14181,7 @@ }, "node_modules/rfdc": { "version": "1.3.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/rimraf": { @@ -14714,7 +14714,7 @@ }, "node_modules/slice-ansi": { "version": "3.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -14826,7 +14826,7 @@ }, "node_modules/sshpk": { "version": "1.17.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "asn1": "~0.2.3", @@ -15360,12 +15360,12 @@ }, "node_modules/text-table": { "version": "0.2.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/throttleit": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/through": { @@ -15416,7 +15416,7 @@ }, "node_modules/tough-cookie": { "version": "2.5.0", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", @@ -15605,7 +15605,7 @@ }, "node_modules/tunnel-agent": { "version": "0.6.0", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" @@ -15616,12 +15616,12 @@ }, "node_modules/tweetnacl": { "version": "0.14.5", - "devOptional": true, + "dev": true, "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -15664,6 +15664,7 @@ }, "node_modules/typescript": { "version": "4.8.4", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -15744,7 +15745,7 @@ }, "node_modules/untildify": { "version": "4.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -15876,7 +15877,7 @@ }, "node_modules/verror": { "version": "1.10.0", - "devOptional": true, + "dev": true, "engines": [ "node >=0.6.0" ], @@ -15889,7 +15890,7 @@ }, "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/w3c-hr-time": { @@ -16292,7 +16293,7 @@ }, "node_modules/word-wrap": { "version": "1.2.3", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -16423,7 +16424,7 @@ }, "node_modules/yauzl": { "version": "2.10.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", @@ -17457,7 +17458,7 @@ }, "@cypress/request": { "version": "2.88.10", - "devOptional": true, + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -17481,7 +17482,7 @@ "dependencies": { "qs": { "version": "6.5.3", - "devOptional": true + "dev": true } } }, @@ -17495,7 +17496,7 @@ }, "@cypress/xvfb": { "version": "1.2.4", - "devOptional": true, + "dev": true, "requires": { "debug": "^3.1.0", "lodash.once": "^4.1.1" @@ -17503,7 +17504,7 @@ "dependencies": { "debug": { "version": "3.2.7", - "devOptional": true, + "dev": true, "requires": { "ms": "^2.1.1" } @@ -17512,7 +17513,7 @@ }, "@eslint/eslintrc": { "version": "1.3.2", - "devOptional": true, + "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -17527,38 +17528,38 @@ "dependencies": { "argparse": { "version": "2.0.1", - "devOptional": true + "dev": true }, "globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "requires": { "type-fest": "^0.20.2" } }, "js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "argparse": "^2.0.1" } }, "minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "type-fest": { "version": "0.20.2", - "devOptional": true + "dev": true } } }, "@humanwhocodes/config-array": { "version": "0.9.5", - "devOptional": true, + "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -17567,7 +17568,7 @@ }, "@humanwhocodes/object-schema": { "version": "1.2.1", - "devOptional": true + "dev": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -19627,36 +19628,28 @@ } }, "@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.5.0", - "requires": {} + "version": "6.5.0" }, "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1", - "requires": {} + "version": "6.5.1" }, "@svgr/babel-preset": { "version": "6.5.1", @@ -20020,11 +20013,11 @@ }, "@types/sinonjs__fake-timers": { "version": "8.1.1", - "devOptional": true + "dev": true }, "@types/sizzle": { "version": "2.3.3", - "devOptional": true + "dev": true }, "@types/sockjs": { "version": "0.3.33", @@ -20362,13 +20355,11 @@ } }, "acorn-import-assertions": { - "version": "1.8.0", - "requires": {} + "version": "1.8.0" }, "acorn-jsx": { "version": "5.3.2", - "devOptional": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.2.0" @@ -20382,7 +20373,7 @@ }, "aggregate-error": { "version": "3.1.0", - "devOptional": true, + "dev": true, "requires": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -20418,8 +20409,7 @@ } }, "ajv-keywords": { - "version": "3.5.2", - "requires": {} + "version": "3.5.2" }, "ansi-colors": { "version": "4.1.3" @@ -20451,7 +20441,7 @@ }, "arch": { "version": "2.2.0", - "devOptional": true + "dev": true }, "arg": { "version": "4.1.3" @@ -20505,14 +20495,14 @@ }, "asn1": { "version": "0.2.6", - "devOptional": true, + "dev": true, "requires": { "safer-buffer": "~2.1.0" } }, "assert-plus": { "version": "1.0.0", - "devOptional": true + "dev": true }, "ast-types-flow": { "version": "0.0.7", @@ -20520,7 +20510,7 @@ }, "astral-regex": { "version": "2.0.0", - "devOptional": true + "dev": true }, "async": { "version": "3.2.4" @@ -20530,7 +20520,7 @@ }, "at-least-node": { "version": "1.0.0", - "devOptional": true + "dev": true }, "atob": { "version": "2.1.2" @@ -20548,11 +20538,11 @@ }, "aws-sign2": { "version": "0.7.0", - "devOptional": true + "dev": true }, "aws4": { "version": "1.11.0", - "devOptional": true + "dev": true }, "axe-core": { "version": "4.4.3", @@ -20739,7 +20729,7 @@ }, "bcrypt-pbkdf": { "version": "1.0.2", - "devOptional": true, + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -20760,7 +20750,7 @@ }, "blob-util": { "version": "2.0.2", - "devOptional": true + "dev": true }, "bluebird": { "version": "3.7.1" @@ -20862,7 +20852,7 @@ }, "buffer-crc32": { "version": "0.2.13", - "devOptional": true + "dev": true }, "buffer-from": { "version": "1.1.2" @@ -20875,7 +20865,7 @@ }, "cachedir": { "version": "2.3.0", - "devOptional": true + "dev": true }, "call-bind": { "version": "1.0.2", @@ -20904,7 +20894,7 @@ }, "caseless": { "version": "0.12.0", - "devOptional": true + "dev": true }, "chalk": { "version": "4.1.0", @@ -20918,7 +20908,7 @@ }, "check-more-types": { "version": "2.24.0", - "devOptional": true + "dev": true }, "chokidar": { "version": "3.5.3", @@ -20944,7 +20934,7 @@ }, "clean-stack": { "version": "2.2.0", - "devOptional": true + "dev": true }, "cli-cursor": { "version": "3.1.0", @@ -20957,7 +20947,7 @@ }, "cli-table3": { "version": "0.6.3", - "devOptional": true, + "dev": true, "requires": { "@colors/colors": "1.5.0", "string-width": "^4.2.0" @@ -20965,7 +20955,7 @@ }, "cli-truncate": { "version": "2.1.0", - "devOptional": true, + "dev": true, "requires": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -21033,7 +21023,7 @@ }, "common-tags": { "version": "1.8.2", - "devOptional": true + "dev": true }, "commondir": { "version": "1.0.1" @@ -21213,8 +21203,7 @@ } }, "css-declaration-sorter": { - "version": "6.3.1", - "requires": {} + "version": "6.3.1" }, "css-loader": { "version": "6.7.1", @@ -21365,8 +21354,7 @@ } }, "cssnano-utils": { - "version": "3.1.0", - "requires": {} + "version": "3.1.0" }, "csso": { "version": "4.2.0", @@ -21397,7 +21385,7 @@ }, "cypress": { "version": "10.10.0", - "devOptional": true, + "dev": true, "requires": { "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", @@ -21445,19 +21433,19 @@ "dependencies": { "@types/node": { "version": "14.18.32", - "devOptional": true + "dev": true }, "bluebird": { "version": "3.7.2", - "devOptional": true + "dev": true }, "commander": { "version": "5.1.0", - "devOptional": true + "dev": true }, "execa": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -21472,7 +21460,7 @@ }, "fs-extra": { "version": "9.1.0", - "devOptional": true, + "dev": true, "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -21482,18 +21470,18 @@ }, "get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "requires": { "pump": "^3.0.0" } }, "human-signals": { "version": "1.1.1", - "devOptional": true + "dev": true }, "supports-color": { "version": "8.1.1", - "devOptional": true, + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -21506,7 +21494,7 @@ }, "dashdash": { "version": "1.14.1", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -21532,7 +21520,7 @@ }, "dayjs": { "version": "1.11.5", - "devOptional": true + "dev": true }, "debug": { "version": "4.3.4", @@ -21552,7 +21540,7 @@ }, "deep-is": { "version": "0.1.4", - "devOptional": true + "dev": true }, "deepmerge": { "version": "4.2.2" @@ -21612,7 +21600,7 @@ }, "doctrine": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "esutils": "^2.0.2" } @@ -21666,7 +21654,7 @@ }, "ecc-jsbn": { "version": "0.1.2", - "devOptional": true, + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -21846,7 +21834,7 @@ }, "eslint": { "version": "8.15.0", - "devOptional": true, + "dev": true, "requires": { "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", @@ -21887,15 +21875,15 @@ "dependencies": { "argparse": { "version": "2.0.1", - "devOptional": true + "dev": true }, "escape-string-regexp": { "version": "4.0.0", - "devOptional": true + "dev": true }, "eslint-scope": { "version": "7.1.1", - "devOptional": true, + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -21903,35 +21891,35 @@ }, "glob-parent": { "version": "6.0.2", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.3" } }, "globals": { "version": "13.17.0", - "devOptional": true, + "dev": true, "requires": { "type-fest": "^0.20.2" } }, "js-yaml": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "argparse": "^2.0.1" } }, "minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "type-fest": { "version": "0.20.2", - "devOptional": true + "dev": true } } }, @@ -21954,8 +21942,7 @@ }, "eslint-config-prettier": { "version": "8.1.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.6", @@ -22149,8 +22136,7 @@ }, "eslint-plugin-react-hooks": { "version": "4.6.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -22166,24 +22152,24 @@ }, "eslint-utils": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" }, "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", - "devOptional": true + "dev": true } } }, "eslint-visitor-keys": { "version": "3.3.0", - "devOptional": true + "dev": true }, "espree": { "version": "9.4.0", - "devOptional": true, + "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -22219,7 +22205,7 @@ }, "eventemitter2": { "version": "6.4.7", - "devOptional": true + "dev": true }, "eventemitter3": { "version": "4.0.7" @@ -22243,7 +22229,7 @@ }, "executable": { "version": "4.1.1", - "devOptional": true, + "dev": true, "requires": { "pify": "^2.2.0" } @@ -22329,11 +22315,11 @@ }, "extend": { "version": "3.0.2", - "devOptional": true + "dev": true }, "extract-zip": { "version": "2.0.1", - "devOptional": true, + "dev": true, "requires": { "@types/yauzl": "^2.9.1", "debug": "^4.1.1", @@ -22343,7 +22329,7 @@ "dependencies": { "get-stream": { "version": "5.2.0", - "devOptional": true, + "dev": true, "requires": { "pump": "^3.0.0" } @@ -22352,7 +22338,7 @@ }, "extsprintf": { "version": "1.3.0", - "devOptional": true + "dev": true }, "fast-deep-equal": { "version": "3.1.3" @@ -22372,7 +22358,7 @@ }, "fast-levenshtein": { "version": "2.0.6", - "devOptional": true + "dev": true }, "fastq": { "version": "1.13.0", @@ -22394,7 +22380,7 @@ }, "fd-slicer": { "version": "1.1.0", - "devOptional": true, + "dev": true, "requires": { "pend": "~1.2.0" } @@ -22407,7 +22393,7 @@ }, "file-entry-cache": { "version": "6.0.1", - "devOptional": true, + "dev": true, "requires": { "flat-cache": "^3.0.4" } @@ -22488,7 +22474,7 @@ }, "flat-cache": { "version": "3.0.4", - "devOptional": true, + "dev": true, "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -22496,14 +22482,14 @@ }, "flatted": { "version": "3.2.7", - "devOptional": true + "dev": true }, "follow-redirects": { "version": "1.15.2" }, "forever-agent": { "version": "0.6.1", - "devOptional": true + "dev": true }, "fork-ts-checker-webpack-plugin": { "version": "7.2.13", @@ -22539,7 +22525,7 @@ }, "form-data": { "version": "2.3.3", - "devOptional": true, + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -22591,7 +22577,7 @@ }, "functional-red-black-tree": { "version": "1.0.1", - "devOptional": true + "dev": true }, "functions-have-names": { "version": "1.2.3", @@ -22638,14 +22624,14 @@ }, "getos": { "version": "3.2.1", - "devOptional": true, + "dev": true, "requires": { "async": "^3.2.0" } }, "getpass": { "version": "0.1.7", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -22680,7 +22666,7 @@ }, "global-dirs": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "ini": "2.0.0" } @@ -22859,7 +22845,7 @@ }, "http-signature": { "version": "1.3.6", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -22887,8 +22873,7 @@ "version": "1.1.0" }, "icss-utils": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "identity-obj-proxy": { "version": "3.0.0", @@ -22946,7 +22931,7 @@ }, "indent-string": { "version": "4.0.0", - "devOptional": true + "dev": true }, "inflight": { "version": "1.0.6", @@ -22960,7 +22945,7 @@ }, "ini": { "version": "2.0.0", - "devOptional": true + "dev": true }, "internal-slot": { "version": "1.0.3", @@ -23010,7 +22995,7 @@ }, "is-ci": { "version": "3.0.1", - "devOptional": true, + "dev": true, "requires": { "ci-info": "^3.2.0" } @@ -23048,7 +23033,7 @@ }, "is-installed-globally": { "version": "0.4.0", - "devOptional": true, + "dev": true, "requires": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -23073,7 +23058,7 @@ }, "is-path-inside": { "version": "3.0.3", - "devOptional": true + "dev": true }, "is-plain-obj": { "version": "3.0.0" @@ -23125,11 +23110,11 @@ }, "is-typedarray": { "version": "1.0.0", - "devOptional": true + "dev": true }, "is-unicode-supported": { "version": "0.1.0", - "devOptional": true + "dev": true }, "is-weakref": { "version": "1.0.2", @@ -23155,7 +23140,7 @@ }, "isstream": { "version": "0.1.2", - "devOptional": true + "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0" @@ -23555,8 +23540,7 @@ } }, "jest-pnp-resolver": { - "version": "1.2.2", - "requires": {} + "version": "1.2.2" }, "jest-regex-util": { "version": "28.0.2" @@ -23850,7 +23834,7 @@ }, "jsbn": { "version": "0.1.1", - "devOptional": true + "dev": true }, "jsdom": { "version": "19.0.0", @@ -23922,18 +23906,18 @@ }, "json-schema": { "version": "0.4.0", - "devOptional": true + "dev": true }, "json-schema-traverse": { "version": "0.4.1" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "devOptional": true + "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "devOptional": true + "dev": true }, "json5": { "version": "2.2.1" @@ -23950,7 +23934,7 @@ }, "jsprim": { "version": "2.0.2", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -23989,7 +23973,7 @@ }, "lazy-ass": { "version": "1.6.0", - "devOptional": true + "dev": true }, "less": { "version": "3.12.2", @@ -24040,7 +24024,7 @@ }, "levn": { "version": "0.4.1", - "devOptional": true, + "dev": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -24060,7 +24044,7 @@ }, "listr2": { "version": "3.14.0", - "devOptional": true, + "dev": true, "requires": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -24074,11 +24058,11 @@ "dependencies": { "colorette": { "version": "2.0.19", - "devOptional": true + "dev": true }, "rxjs": { "version": "7.5.6", - "devOptional": true, + "dev": true, "requires": { "tslib": "^2.1.0" } @@ -24116,18 +24100,18 @@ }, "lodash.merge": { "version": "4.6.2", - "devOptional": true + "dev": true }, "lodash.once": { "version": "4.1.1", - "devOptional": true + "dev": true }, "lodash.uniq": { "version": "4.5.0" }, "log-symbols": { "version": "4.1.0", - "devOptional": true, + "dev": true, "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -24135,7 +24119,7 @@ }, "log-update": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -24145,7 +24129,7 @@ "dependencies": { "slice-ansi": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -24154,7 +24138,7 @@ }, "wrap-ansi": { "version": "6.2.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -24571,7 +24555,7 @@ }, "optionator": { "version": "0.9.1", - "devOptional": true, + "dev": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -24583,7 +24567,7 @@ }, "ospath": { "version": "1.2.2", - "devOptional": true + "dev": true }, "p-finally": { "version": "1.0.0" @@ -24602,7 +24586,7 @@ }, "p-map": { "version": "4.0.0", - "devOptional": true, + "dev": true, "requires": { "aggregate-error": "^3.0.0" } @@ -24706,11 +24690,11 @@ }, "pend": { "version": "1.2.0", - "devOptional": true + "dev": true }, "performance-now": { "version": "2.1.0", - "devOptional": true + "dev": true }, "picocolors": { "version": "1.0.0" @@ -24811,20 +24795,16 @@ } }, "postcss-discard-comments": { - "version": "5.1.2", - "requires": {} + "version": "5.1.2" }, "postcss-discard-duplicates": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-discard-empty": { - "version": "5.1.1", - "requires": {} + "version": "5.1.1" }, "postcss-discard-overridden": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-import": { "version": "14.1.0", @@ -24915,8 +24895,7 @@ } }, "postcss-modules-extract-imports": { - "version": "3.0.0", - "requires": {} + "version": "3.0.0" }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -24939,8 +24918,7 @@ } }, "postcss-normalize-charset": { - "version": "5.1.0", - "requires": {} + "version": "5.1.0" }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -25037,15 +25015,15 @@ }, "prelude-ls": { "version": "1.2.1", - "devOptional": true + "dev": true }, "prettier": { "version": "2.7.1", - "devOptional": true + "dev": true }, "pretty-bytes": { "version": "5.6.0", - "devOptional": true + "dev": true }, "pretty-format": { "version": "28.1.3", @@ -25104,7 +25082,7 @@ }, "proxy-from-env": { "version": "1.0.0", - "devOptional": true + "dev": true }, "prr": { "version": "1.0.1", @@ -25112,11 +25090,11 @@ }, "psl": { "version": "1.9.0", - "devOptional": true + "dev": true }, "pump": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -25259,7 +25237,7 @@ }, "regexpp": { "version": "3.2.0", - "devOptional": true + "dev": true }, "regexpu-core": { "version": "5.2.1", @@ -25288,7 +25266,7 @@ }, "request-progress": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "throttleit": "^1.0.0" } @@ -25338,7 +25316,7 @@ }, "rfdc": { "version": "1.3.0", - "devOptional": true + "dev": true }, "rimraf": { "version": "3.0.2", @@ -25398,8 +25376,7 @@ } }, "rollup-plugin-peer-deps-external": { - "version": "2.2.4", - "requires": {} + "version": "2.2.4" }, "rollup-plugin-postcss": { "version": "4.0.2", @@ -25678,7 +25655,7 @@ }, "slice-ansi": { "version": "3.0.0", - "devOptional": true, + "dev": true, "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -25755,7 +25732,7 @@ }, "sshpk": { "version": "1.17.0", - "devOptional": true, + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -25876,8 +25853,7 @@ "version": "0.3.0" }, "style-loader": { - "version": "3.3.1", - "requires": {} + "version": "3.3.1" }, "styled-jsx": { "version": "5.1.0", @@ -26057,11 +26033,11 @@ }, "text-table": { "version": "0.2.0", - "devOptional": true + "dev": true }, "throttleit": { "version": "1.0.0", - "devOptional": true + "dev": true }, "through": { "version": "2.3.8" @@ -26092,7 +26068,7 @@ }, "tough-cookie": { "version": "2.5.0", - "devOptional": true, + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -26195,18 +26171,18 @@ }, "tunnel-agent": { "version": "0.6.0", - "devOptional": true, + "dev": true, "requires": { "safe-buffer": "^5.0.1" } }, "tweetnacl": { "version": "0.14.5", - "devOptional": true + "dev": true }, "type-check": { "version": "0.4.0", - "devOptional": true, + "dev": true, "requires": { "prelude-ls": "^1.2.1" } @@ -26228,7 +26204,8 @@ "version": "1.0.9" }, "typescript": { - "version": "4.8.4" + "version": "4.8.4", + "dev": true }, "unbox-primitive": { "version": "1.0.2", @@ -26270,7 +26247,7 @@ }, "untildify": { "version": "4.0.0", - "devOptional": true + "dev": true }, "upath2": { "version": "3.1.19", @@ -26341,7 +26318,7 @@ }, "verror": { "version": "1.10.0", - "devOptional": true, + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -26350,7 +26327,7 @@ "dependencies": { "core-util-is": { "version": "1.0.2", - "devOptional": true + "dev": true } } }, @@ -26603,7 +26580,7 @@ }, "word-wrap": { "version": "1.2.3", - "devOptional": true + "dev": true }, "wrap-ansi": { "version": "7.0.0", @@ -26624,8 +26601,7 @@ } }, "ws": { - "version": "8.9.0", - "requires": {} + "version": "8.9.0" }, "xml-name-validator": { "version": "4.0.0", @@ -26675,7 +26651,7 @@ }, "yauzl": { "version": "2.10.0", - "devOptional": true, + "dev": true, "requires": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" diff --git a/demos/nx-next-monorepo-demo/package.json b/demos/nx-next-monorepo-demo/package.json index 5068f626bd..053e164d6e 100644 --- a/demos/nx-next-monorepo-demo/package.json +++ b/demos/nx-next-monorepo-demo/package.json @@ -12,7 +12,7 @@ "@netlify/plugin-nextjs": "file:plugin-wrapper", "@nrwl/next": "15.0.11", "core-js": "^3.6.5", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "18.2.0", "regenerator-runtime": "0.13.10", diff --git a/demos/static-root/package.json b/demos/static-root/package.json index 8884647bd9..ee49f8b4dd 100644 --- a/demos/static-root/package.json +++ b/demos/static-root/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", diff --git a/demos/turborepo-next-monorepo-demo/package.json b/demos/turborepo-next-monorepo-demo/package.json index b7341ce984..e3dfa45bea 100644 --- a/demos/turborepo-next-monorepo-demo/package.json +++ b/demos/turborepo-next-monorepo-demo/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@types/react": "^18.0.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/package-lock.json b/package-lock.json index 56740da775..aeb41b4f8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "license": "MIT", "workspaces": [ "packages/*", - "demos/canary", "demos/default", "demos/next-auth", "demos/static-root", @@ -22,7 +21,7 @@ "demos/next-with-edge-functions" ], "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@babel/core": "^7.15.8", @@ -49,6 +48,7 @@ "execa": "^5.1.1", "husky": "^7.0.4", "jest": "^27.0.0", + "jest-extended": "^3.2.0", "jest-fetch-mock": "^3.0.3", "jest-junit": "^14.0.1", "netlify-plugin-cypress": "^2.2.0", @@ -67,12 +67,23 @@ "node": ">=16.0.0" } }, + "demos/app-dir": { + "version": "1.0.0", + "extraneous": true, + "license": "MIT", + "dependencies": { + "nanoid": "^2.1.11", + "next": "^12.3.2-canary.7", + "react": "^0.0.0-experimental-d1bb1c586-20220922", + "react-dom": "^0.0.0-experimental-d1bb1c586-20220922" + } + }, "demos/base-path": { "name": "base-path-demo", "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -87,82 +98,34 @@ } }, "demos/canary": { - "version": "0.1.0", + "name": "app-dir", + "version": "1.0.0", + "extraneous": true, + "license": "MIT", "dependencies": { - "next": "^12.3.1", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "nanoid": "^3.3.4", + "next": "^13.0.0", + "react": "latest", + "react-dom": "latest", + "sass": "latest", + "swr": "2.0.0-rc.0" }, "devDependencies": { - "@netlify/next": "*", - "@netlify/plugin-nextjs": "*", - "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.25", - "critters": "^0.0.16", - "husky": "^7.0.4", - "if-env": "^1.0.4", - "npm-run-all": "^4.1.5", + "@netlify/plugin-nextjs": "file:plugin-wrapper", "typescript": "^4.6.3" } }, - "demos/canary/node_modules/next": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.3.tgz", - "integrity": "sha512-Rx2Y6Wl5R8E77NOfBupp/B9OPCklqfqD0yN2+rDivhMjd6hjVFH5n0WTDI4PWwDmZsdNcYt6NV85kJ3PLR+eNQ==", - "dependencies": { - "@next/env": "12.3.3", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=12.22.0" - }, - "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.3.3", - "@next/swc-android-arm64": "12.3.3", - "@next/swc-darwin-arm64": "12.3.3", - "@next/swc-darwin-x64": "12.3.3", - "@next/swc-freebsd-x64": "12.3.3", - "@next/swc-linux-arm-gnueabihf": "12.3.3", - "@next/swc-linux-arm64-gnu": "12.3.3", - "@next/swc-linux-arm64-musl": "12.3.3", - "@next/swc-linux-x64-gnu": "12.3.3", - "@next/swc-linux-x64-musl": "12.3.3", - "@next/swc-win32-arm64-msvc": "12.3.3", - "@next/swc-win32-ia32-msvc": "12.3.3", - "@next/swc-win32-x64-msvc": "12.3.3" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^6.0.0 || ^7.0.0", - "react": "^17.0.2 || ^18.0.0-0", - "react-dom": "^17.0.2 || ^18.0.0-0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - } - } + "demos/canary/plugin-wrapper": { + "name": "local-plugin", + "version": "1.0.0-alpha-local-wrapper", + "extraneous": true, + "license": "MIT" }, "demos/custom-routes": { "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -186,7 +149,7 @@ "@reach/dialog": "^0.16.2", "@reach/visually-hidden": "^0.16.0", "@vercel/og": "^0.0.21", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -209,7 +172,7 @@ "@netlify/next": "*", "@netlify/plugin-nextjs": "*", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -228,7 +191,7 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "react": "^18.2.0", @@ -254,7 +217,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -321,7 +284,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "devDependencies": { "@netlify/next": "*", @@ -3123,6 +3086,18 @@ "node": "*" } }, + "node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", @@ -4887,11 +4862,6 @@ "node": ">=10" } }, - "node_modules/@next/env": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.3.tgz", - "integrity": "sha512-H2pKuOasV9RgvVaWosB2rGSNeQShQpiDaF4EEjLyagIc3HwqdOw2/VAG/8Lq+adOwPv2P73O1hulTNad3k5MDw==" - }, "node_modules/@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -4943,201 +4913,6 @@ "node": "*" } }, - "node_modules/@next/swc-android-arm-eabi": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.3.tgz", - "integrity": "sha512-5O/ZIX6hlIRGMy1R2f/8WiCZ4Hp4WTC0FcTuz8ycQ28j/mzDnmzjVoayVVr+ZmfEKQayFrRu+vxHjFyY0JGQlQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-android-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.3.tgz", - "integrity": "sha512-2QWreRmlxYRDtnLYn+BI8oukHwcP7W0zGIY5R2mEXRjI4ARqCLdu8RmcT9Vemw7RfeAVKA/4cv/9PY0pCcQpNA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.3.tgz", - "integrity": "sha512-GtZdDLerM+VToCMFp+W+WhnT6sxHePQH4xZZiYD/Y8KFiwHbDRcJr2FPG0bAJnGNiSvv/QQnBq74wjZ9+7vhcQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.3.tgz", - "integrity": "sha512-gRYvTKrRYynjFQUDJ+upHMcBiNz0ii0m7zGgmUTlTSmrBWqVSzx79EHYT7Nn4GWHM+a/W+2VXfu+lqHcJeQ9gQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-freebsd-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.3.tgz", - "integrity": "sha512-r+GLATzCjjQI82bgrIPXWEYBwZonSO64OThk5wU6HduZlDYTEDxZsFNoNoesCDWCgRrgg+OXj7WLNy1WlvfX7w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.3.tgz", - "integrity": "sha512-juvRj1QX9jmQScL4nV0rROtYUFgWP76zfdn1fdfZ2BhvwUugIAq8x+jLVGlnXKUhDrP9+RrAufqXjjVkK+uBxA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.3.tgz", - "integrity": "sha512-hzinybStPB+SzS68hR5rzOngOH7Yd/jFuWGeg9qS5WifYXHpqwGH2BQeKpjVV0iJuyO9r309JKrRWMrbfhnuBA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.3.tgz", - "integrity": "sha512-oyfQYljCwf+9zUu1YkTZbRbyxmcHzvJPMGOxC3kJOReh3kCUoGcmvAxUPMtFD6FSYjJ+eaog4+2IFHtYuAw/bQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.3.tgz", - "integrity": "sha512-epv4FMazj/XG70KTTnrZ0H1VtL6DeWOvyHLHYy7f5PdgDpBXpDTFjVqhP8NFNH8HmaDDdeL1NvQD07AXhyvUKA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.3.tgz", - "integrity": "sha512-bG5QODFy59XnSFTiPyIAt+rbPdphtvQMibtOVvyjwIwsBUw7swJ6k+6PSPVYEYpi6SHzi3qYBsro39ayGJKQJg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.3.tgz", - "integrity": "sha512-FbnT3reJ3MbTJ5W0hvlCCGGVDSpburzT5XGC9ljBJ4kr+85iNTLjv7+vrPeDdwHEqtGmdZgnabkLVCI4yFyCag==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.3.tgz", - "integrity": "sha512-M/fKZC2tMGWA6eTsIniNEBpx2prdR8lIxvSO3gv5P6ymZOGVWCvEMksnTkPAjHnU6d8r8eCiuGKm3UNo7zCTpQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.3.tgz", - "integrity": "sha512-Ku9mfGwmNtk44o4B/jEWUxBAT4tJ3S7QbBMLJdL1GmtRZ05LGL36OqWjLvBPr8dFiHOQQbYoAmYfQw7zeGypYA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -5310,6 +5085,12 @@ "node": ">= 8.0.0" } }, + "node_modules/@sinclair/typebox": { + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -5396,14 +5177,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "node_modules/@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -5697,13 +5470,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "node_modules/@types/react": { "version": "18.0.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", - "devOptional": true, + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5729,7 +5502,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "node_modules/@types/semver": { "version": "7.3.13", @@ -5738,9 +5511,9 @@ "dev": true }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", + "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", "dev": true }, "node_modules/@types/sizzle": { @@ -7552,10 +7325,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/canary": { - "resolved": "demos/canary", - "link": true - }, "node_modules/caniuse-lite": { "version": "1.0.30001431", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", @@ -9545,33 +9314,32 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "devOptional": true + "dev": true }, "node_modules/custom-routes": { "resolved": "demos/custom-routes", "link": true }, "node_modules/cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.0.0.tgz", + "integrity": "sha512-/93SWBZTw7BjFZ+I9S8SqkFYZx7VhedDjTtRBmXO0VzTeDbmxgK/snMJm/VFjrqk/caWbI+XY4Qr80myDMQvYg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.7", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", - "@types/sinonjs__fake-timers": "8.1.1", + "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", + "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", "dayjs": "^1.10.4", @@ -9590,15 +9358,15 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.5", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", + "url": "^0.11.0", "yauzl": "^2.10.0" }, "bin": { @@ -9700,19 +9468,70 @@ "node": ">=8.12.0" } }, - "node_modules/cypress/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/cypress/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cypress/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cypress/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "path-key": "^3.0.0" }, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=10" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cypress/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" } }, "node_modules/cypress/node_modules/supports-color": { @@ -12154,9 +11973,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/execa": { @@ -13879,7 +13698,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -15233,6 +15052,92 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/jest-extended": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.0.tgz", + "integrity": "sha512-jy+1nwlPLPPR6O8O9Mn+BWCBq/jL/9OgdKEG8ekOSQoLyVvAO5nND8ll3UxoajzBu4kYyn7zUKYWRdnTfQPcVw==", + "dev": true, + "dependencies": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "jest": ">=27.2.5" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + } + } + }, + "node_modules/jest-extended/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-extended/node_modules/diff-sequences": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-diff": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.3.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/pretty-format": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-fetch-mock": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", @@ -18017,11 +17922,11 @@ } }, "node_modules/next": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.0.5.tgz", - "integrity": "sha512-awpc3DkphyKydwCotcBnuKwh6hMqkT5xdiBK4OatJtOZurDPBYLP62jtM2be/4OunpmwIbsS0Eyv+ZGU97ciEg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz", + "integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==", "dependencies": { - "@next/env": "13.0.5", + "@next/env": "13.0.6", "@swc/helpers": "0.4.14", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -18034,19 +17939,19 @@ "node": ">=14.6.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "13.0.5", - "@next/swc-android-arm64": "13.0.5", - "@next/swc-darwin-arm64": "13.0.5", - "@next/swc-darwin-x64": "13.0.5", - "@next/swc-freebsd-x64": "13.0.5", - "@next/swc-linux-arm-gnueabihf": "13.0.5", - "@next/swc-linux-arm64-gnu": "13.0.5", - "@next/swc-linux-arm64-musl": "13.0.5", - "@next/swc-linux-x64-gnu": "13.0.5", - "@next/swc-linux-x64-musl": "13.0.5", - "@next/swc-win32-arm64-msvc": "13.0.5", - "@next/swc-win32-ia32-msvc": "13.0.5", - "@next/swc-win32-x64-msvc": "13.0.5" + "@next/swc-android-arm-eabi": "13.0.6", + "@next/swc-android-arm64": "13.0.6", + "@next/swc-darwin-arm64": "13.0.6", + "@next/swc-darwin-x64": "13.0.6", + "@next/swc-freebsd-x64": "13.0.6", + "@next/swc-linux-arm-gnueabihf": "13.0.6", + "@next/swc-linux-arm64-gnu": "13.0.6", + "@next/swc-linux-arm64-musl": "13.0.6", + "@next/swc-linux-x64-gnu": "13.0.6", + "@next/swc-linux-x64-musl": "13.0.6", + "@next/swc-win32-arm64-msvc": "13.0.6", + "@next/swc-win32-ia32-msvc": "13.0.6", + "@next/swc-win32-x64-msvc": "13.0.6" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -18110,14 +18015,14 @@ "link": true }, "node_modules/next/node_modules/@next/env": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.5.tgz", - "integrity": "sha512-F3KLtiDrUslAZhTYTh8Zk5ZaavbYwLUn3NYPBnOjAXU8hWm0QVGVzKIOuURQ098ofRU4e9oglf3Sj9pFx5nI5w==" + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz", + "integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ==" }, "node_modules/next/node_modules/@next/swc-android-arm-eabi": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.5.tgz", - "integrity": "sha512-YO691dxHlviy6H0eghgwqn+5kU9J3iQnKERHTDSppqjjGDBl6ab4wz9XfI5AhljjkaTg3TknHoIEWFDoZ4Ve8g==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", "cpu": [ "arm" ], @@ -18130,9 +18035,9 @@ } }, "node_modules/next/node_modules/@next/swc-android-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.5.tgz", - "integrity": "sha512-ugbwffkUmp8cd2afehDC8LtQeFUxElRUBBngfB5UYSWBx18HW4OgzkPFIY8jUBH16zifvGZWXbICXJWDHrOLtw==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", "cpu": [ "arm64" ], @@ -18145,9 +18050,9 @@ } }, "node_modules/next/node_modules/@next/swc-darwin-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.5.tgz", - "integrity": "sha512-mshlh8QOtOalfZbc17uNAftWgqHTKnrv6QUwBe+mpGz04eqsSUzVz1JGZEdIkmuDxOz00cK2NPoc+VHDXh99IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", "cpu": [ "arm64" ], @@ -18160,9 +18065,9 @@ } }, "node_modules/next/node_modules/@next/swc-darwin-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.5.tgz", - "integrity": "sha512-SfigOKW4Z2UB3ruUPyvrlDIkcJq1hiw1wvYApWugD+tQsAkYZKEoz+/8emCmeYZ6Gwgi1WHV+z52Oj8u7bEHPg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", "cpu": [ "x64" ], @@ -18175,9 +18080,9 @@ } }, "node_modules/next/node_modules/@next/swc-freebsd-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.5.tgz", - "integrity": "sha512-0NJg8HZr4yG8ynmMGFXQf+Mahvq4ZgBmUwSlLXXymgxEQgH17erH/LoR69uITtW+KTsALgk9axEt5AAabM4ucg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", "cpu": [ "x64" ], @@ -18190,9 +18095,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.5.tgz", - "integrity": "sha512-Cye+h3oDT3NDWjACMlRaolL8fokpKie34FlPj9nfoW7bYKmoMBY1d4IO/GgBF+5xEl7HkH0Ny/qex63vQ0pN+A==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", "cpu": [ "arm" ], @@ -18205,9 +18110,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.5.tgz", - "integrity": "sha512-5BfDS/VoRDR5QUGG9oedOCEZGmV2zxUVFYLUJVPMSMeIgqkjxWQBiG2BUHZI6/LGk9yvHmjx7BTvtBCLtRg6IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", "cpu": [ "arm64" ], @@ -18220,9 +18125,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-arm64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.5.tgz", - "integrity": "sha512-xenvqlXz+KxVKAB1YR723gnVNszpsCvKZkiFFaAYqDGJ502YuqU2fwLsaSm/ASRizNcBYeo9HPLTyc3r/9cdMQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", "cpu": [ "arm64" ], @@ -18235,9 +18140,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-x64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.5.tgz", - "integrity": "sha512-9Ahi1bbdXwhrWQmOyoTod23/hhK05da/FzodiNqd6drrMl1y7+RujoEcU8Dtw3H1mGWB+yuTlWo8B4Iba8hqiQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", "cpu": [ "x64" ], @@ -18250,9 +18155,9 @@ } }, "node_modules/next/node_modules/@next/swc-linux-x64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.5.tgz", - "integrity": "sha512-V+1mnh49qmS9fOZxVRbzjhBEz9IUGJ7AQ80JPWAYQM5LI4TxfdiF4APLPvJ52rOmNeTqnVz1bbKtVOso+7EZ4w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", "cpu": [ "x64" ], @@ -18265,9 +18170,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.5.tgz", - "integrity": "sha512-wRE9rkp7I+/3Jf2T9PFIJOKq3adMWYEFkPOA7XAkUfYbQHlDJm/U5cVCWUsKByyQq5RThwufI91sgd19MfxRxg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", "cpu": [ "arm64" ], @@ -18280,9 +18185,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.5.tgz", - "integrity": "sha512-Q1XQSLEhFuFhkKFdJIGt7cYQ4T3u6P5wrtUNreg5M+7P+fjSiC8+X+Vjcw+oebaacsdl0pWZlK+oACGafush1w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", "cpu": [ "ia32" ], @@ -18295,9 +18200,9 @@ } }, "node_modules/next/node_modules/@next/swc-win32-x64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.5.tgz", - "integrity": "sha512-t5gRblrwwiNZP6cT7NkxlgxrFgHWtv9ei5vUraCLgBqzvIsa7X+PnarZUeQCXqz6Jg9JSGGT9j8lvzD97UqeJQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", "cpu": [ "x64" ], @@ -19909,13 +19814,13 @@ } }, "node_modules/playwright-chromium": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.27.1.tgz", - "integrity": "sha512-AXAfmNHVnqByo7dKLwLqEC3aKIUlATwDUHCBwVw/qyRCgGUEoufeFUxFXB7pJ4nppwThph7TFe3fHfoETPqSvg==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.26.1.tgz", + "integrity": "sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==", "dev": true, "hasInstallScript": true, "dependencies": { - "playwright-core": "1.27.1" + "playwright-core": "1.26.1" }, "bin": { "playwright": "cli.js" @@ -19925,9 +19830,9 @@ } }, "node_modules/playwright-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz", - "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.1.tgz", + "integrity": "sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==", "dev": true, "bin": { "playwright": "cli.js" @@ -20419,6 +20324,16 @@ "node": ">=0.6" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -22660,25 +22575,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, "node_modules/supports-color": { "version": "9.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.3.tgz", @@ -23775,6 +23671,16 @@ "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dev": true, + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -23797,6 +23703,12 @@ "node": ">=4" } }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true + }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -23847,14 +23759,6 @@ } } }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -24535,7 +24439,7 @@ "devDependencies": { "@netlify/edge-functions": "^2.0.0", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, @@ -24581,7 +24485,7 @@ "@types/jest": "^27.4.1", "@types/merge-stream": "^1.1.2", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, @@ -24602,6 +24506,201 @@ "engines": { "node": ">=10" } + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } }, "dependencies": { @@ -26654,6 +26753,15 @@ } } }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", @@ -27642,7 +27750,7 @@ "requires": { "@netlify/edge-functions": "^2.0.0", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -27674,7 +27782,7 @@ "globby": "^11.0.4", "merge-stream": "^2.0.0", "moize": "^6.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "node-fetch": "^2.6.6", "node-stream-zip": "^1.15.0", "npm-run-all": "^4.1.5", @@ -27872,11 +27980,6 @@ } } }, - "@next/env": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.3.tgz", - "integrity": "sha512-H2pKuOasV9RgvVaWosB2rGSNeQShQpiDaF4EEjLyagIc3HwqdOw2/VAG/8Lq+adOwPv2P73O1hulTNad3k5MDw==" - }, "@next/eslint-plugin-next": { "version": "12.3.4", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.4.tgz", @@ -27921,84 +28024,6 @@ } } }, - "@next/swc-android-arm-eabi": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.3.tgz", - "integrity": "sha512-5O/ZIX6hlIRGMy1R2f/8WiCZ4Hp4WTC0FcTuz8ycQ28j/mzDnmzjVoayVVr+ZmfEKQayFrRu+vxHjFyY0JGQlQ==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.3.tgz", - "integrity": "sha512-2QWreRmlxYRDtnLYn+BI8oukHwcP7W0zGIY5R2mEXRjI4ARqCLdu8RmcT9Vemw7RfeAVKA/4cv/9PY0pCcQpNA==", - "optional": true - }, - "@next/swc-darwin-arm64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.3.tgz", - "integrity": "sha512-GtZdDLerM+VToCMFp+W+WhnT6sxHePQH4xZZiYD/Y8KFiwHbDRcJr2FPG0bAJnGNiSvv/QQnBq74wjZ9+7vhcQ==", - "optional": true - }, - "@next/swc-darwin-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.3.tgz", - "integrity": "sha512-gRYvTKrRYynjFQUDJ+upHMcBiNz0ii0m7zGgmUTlTSmrBWqVSzx79EHYT7Nn4GWHM+a/W+2VXfu+lqHcJeQ9gQ==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.3.tgz", - "integrity": "sha512-r+GLATzCjjQI82bgrIPXWEYBwZonSO64OThk5wU6HduZlDYTEDxZsFNoNoesCDWCgRrgg+OXj7WLNy1WlvfX7w==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.3.tgz", - "integrity": "sha512-juvRj1QX9jmQScL4nV0rROtYUFgWP76zfdn1fdfZ2BhvwUugIAq8x+jLVGlnXKUhDrP9+RrAufqXjjVkK+uBxA==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.3.tgz", - "integrity": "sha512-hzinybStPB+SzS68hR5rzOngOH7Yd/jFuWGeg9qS5WifYXHpqwGH2BQeKpjVV0iJuyO9r309JKrRWMrbfhnuBA==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.3.tgz", - "integrity": "sha512-oyfQYljCwf+9zUu1YkTZbRbyxmcHzvJPMGOxC3kJOReh3kCUoGcmvAxUPMtFD6FSYjJ+eaog4+2IFHtYuAw/bQ==", - "optional": true - }, - "@next/swc-linux-x64-gnu": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.3.tgz", - "integrity": "sha512-epv4FMazj/XG70KTTnrZ0H1VtL6DeWOvyHLHYy7f5PdgDpBXpDTFjVqhP8NFNH8HmaDDdeL1NvQD07AXhyvUKA==", - "optional": true - }, - "@next/swc-linux-x64-musl": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.3.tgz", - "integrity": "sha512-bG5QODFy59XnSFTiPyIAt+rbPdphtvQMibtOVvyjwIwsBUw7swJ6k+6PSPVYEYpi6SHzi3qYBsro39ayGJKQJg==", - "optional": true - }, - "@next/swc-win32-arm64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.3.tgz", - "integrity": "sha512-FbnT3reJ3MbTJ5W0hvlCCGGVDSpburzT5XGC9ljBJ4kr+85iNTLjv7+vrPeDdwHEqtGmdZgnabkLVCI4yFyCag==", - "optional": true - }, - "@next/swc-win32-ia32-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.3.tgz", - "integrity": "sha512-M/fKZC2tMGWA6eTsIniNEBpx2prdR8lIxvSO3gv5P6ymZOGVWCvEMksnTkPAjHnU6d8r8eCiuGKm3UNo7zCTpQ==", - "optional": true - }, - "@next/swc-win32-x64-msvc": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.3.tgz", - "integrity": "sha512-Ku9mfGwmNtk44o4B/jEWUxBAT4tJ3S7QbBMLJdL1GmtRZ05LGL36OqWjLvBPr8dFiHOQQbYoAmYfQw7zeGypYA==", - "optional": true - }, "@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -28124,6 +28149,12 @@ "string.prototype.codepointat": "^0.2.1" } }, + "@sinclair/typebox": { + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", + "dev": true + }, "@sindresorhus/is": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", @@ -28184,14 +28215,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "@swc/helpers": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.11.tgz", - "integrity": "sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==", - "requires": { - "tslib": "^2.4.0" - } - }, "@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -28469,13 +28492,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "devOptional": true + "dev": true }, "@types/react": { "version": "18.0.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.26.tgz", "integrity": "sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==", - "devOptional": true, + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -28501,7 +28524,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "devOptional": true + "dev": true }, "@types/semver": { "version": "7.3.13", @@ -28510,9 +28533,9 @@ "dev": true }, "@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", + "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", "dev": true }, "@types/sizzle": { @@ -28821,8 +28844,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -28879,8 +28901,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "dev": true, - "requires": {} + "dev": true }, "ansi-align": { "version": "3.0.1", @@ -29487,7 +29508,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -29878,52 +29899,6 @@ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==" }, - "canary": { - "version": "file:demos/canary", - "requires": { - "@netlify/next": "*", - "@netlify/plugin-nextjs": "*", - "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.25", - "critters": "^0.0.16", - "husky": "^7.0.4", - "if-env": "^1.0.4", - "next": "^12.3.1", - "npm-run-all": "^4.1.5", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "typescript": "^4.6.3" - }, - "dependencies": { - "next": { - "version": "12.3.3", - "resolved": "https://registry.npmjs.org/next/-/next-12.3.3.tgz", - "integrity": "sha512-Rx2Y6Wl5R8E77NOfBupp/B9OPCklqfqD0yN2+rDivhMjd6hjVFH5n0WTDI4PWwDmZsdNcYt6NV85kJ3PLR+eNQ==", - "requires": { - "@next/env": "12.3.3", - "@next/swc-android-arm-eabi": "12.3.3", - "@next/swc-android-arm64": "12.3.3", - "@next/swc-darwin-arm64": "12.3.3", - "@next/swc-darwin-x64": "12.3.3", - "@next/swc-freebsd-x64": "12.3.3", - "@next/swc-linux-arm-gnueabihf": "12.3.3", - "@next/swc-linux-arm64-gnu": "12.3.3", - "@next/swc-linux-arm64-musl": "12.3.3", - "@next/swc-linux-x64-gnu": "12.3.3", - "@next/swc-linux-x64-musl": "12.3.3", - "@next/swc-win32-arm64-msvc": "12.3.3", - "@next/swc-win32-ia32-msvc": "12.3.3", - "@next/swc-win32-x64-msvc": "12.3.3", - "@swc/helpers": "0.4.11", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.0.7", - "use-sync-external-store": "1.2.0" - } - } - } - }, "caniuse-lite": { "version": "1.0.30001431", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", @@ -30914,8 +30889,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.2.0.tgz", "integrity": "sha512-NkANeMnaHrlaSSlpKGyvn2R4rqUDeE/9E5YHx+b4nwo0R8dZyAqcih8/gxpCZvqWP9Vf6xuLpMSzSgdVEIM78g==", - "dev": true, - "requires": {} + "dev": true }, "cp-file": { "version": "9.1.0", @@ -31459,7 +31433,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "devOptional": true + "dev": true }, "custom-routes": { "version": "file:demos/custom-routes", @@ -31472,31 +31446,30 @@ "@types/react": "^18.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.7.4" } }, "cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.0.0.tgz", + "integrity": "sha512-/93SWBZTw7BjFZ+I9S8SqkFYZx7VhedDjTtRBmXO0VzTeDbmxgK/snMJm/VFjrqk/caWbI+XY4Qr80myDMQvYg==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^2.88.7", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", - "@types/sinonjs__fake-timers": "8.1.1", + "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", + "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", "dayjs": "^1.10.4", @@ -31515,15 +31488,15 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.5", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", + "url": "^0.11.0", "yauzl": "^2.10.0" }, "dependencies": { @@ -31592,15 +31565,48 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" } }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -31769,7 +31775,7 @@ "critters": "^0.0.16", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -32632,15 +32638,13 @@ "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} + "dev": true }, "eslint-config-standard": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", - "dev": true, - "requires": {} + "dev": true }, "eslint-formatter-codeframe": { "version": "7.32.1", @@ -33086,8 +33090,7 @@ "version": "6.1.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-react": { "version": "7.31.10", @@ -33145,8 +33148,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-unicorn": { "version": "43.0.2", @@ -33434,9 +33436,9 @@ } }, "eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { @@ -34727,7 +34729,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", - "devOptional": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -35701,6 +35703,65 @@ "jest-util": "^27.5.1" } }, + "jest-extended": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.0.tgz", + "integrity": "sha512-jy+1nwlPLPPR6O8O9Mn+BWCBq/jL/9OgdKEG8ekOSQoLyVvAO5nND8ll3UxoajzBu4kYyn7zUKYWRdnTfQPcVw==", + "dev": true, + "requires": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "dev": true + }, + "jest-diff": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.3.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" + } + }, + "jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true + }, + "pretty-format": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + } + } + }, "jest-fetch-mock": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", @@ -35839,8 +35900,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.5.1", @@ -37549,7 +37609,7 @@ "@types/react": "^18.0.25", "husky": "^7.0.4", "isomorphic-unfetch": "^3.1.0", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -37922,24 +37982,24 @@ } }, "next": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.0.5.tgz", - "integrity": "sha512-awpc3DkphyKydwCotcBnuKwh6hMqkT5xdiBK4OatJtOZurDPBYLP62jtM2be/4OunpmwIbsS0Eyv+ZGU97ciEg==", - "requires": { - "@next/env": "13.0.5", - "@next/swc-android-arm-eabi": "13.0.5", - "@next/swc-android-arm64": "13.0.5", - "@next/swc-darwin-arm64": "13.0.5", - "@next/swc-darwin-x64": "13.0.5", - "@next/swc-freebsd-x64": "13.0.5", - "@next/swc-linux-arm-gnueabihf": "13.0.5", - "@next/swc-linux-arm64-gnu": "13.0.5", - "@next/swc-linux-arm64-musl": "13.0.5", - "@next/swc-linux-x64-gnu": "13.0.5", - "@next/swc-linux-x64-musl": "13.0.5", - "@next/swc-win32-arm64-msvc": "13.0.5", - "@next/swc-win32-ia32-msvc": "13.0.5", - "@next/swc-win32-x64-msvc": "13.0.5", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/next/-/next-13.0.6.tgz", + "integrity": "sha512-COvigvms2LRt1rrzfBQcMQ2GZd86Mvk1z+LOLY5pniFtL4VrTmhZ9salrbKfSiXbhsD01TrDdD68ec3ABDyscA==", + "requires": { + "@next/env": "13.0.6", + "@next/swc-android-arm-eabi": "13.0.6", + "@next/swc-android-arm64": "13.0.6", + "@next/swc-darwin-arm64": "13.0.6", + "@next/swc-darwin-x64": "13.0.6", + "@next/swc-freebsd-x64": "13.0.6", + "@next/swc-linux-arm-gnueabihf": "13.0.6", + "@next/swc-linux-arm64-gnu": "13.0.6", + "@next/swc-linux-arm64-musl": "13.0.6", + "@next/swc-linux-x64-gnu": "13.0.6", + "@next/swc-linux-x64-musl": "13.0.6", + "@next/swc-win32-arm64-msvc": "13.0.6", + "@next/swc-win32-ia32-msvc": "13.0.6", + "@next/swc-win32-x64-msvc": "13.0.6", "@swc/helpers": "0.4.14", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -37947,86 +38007,86 @@ }, "dependencies": { "@next/env": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.5.tgz", - "integrity": "sha512-F3KLtiDrUslAZhTYTh8Zk5ZaavbYwLUn3NYPBnOjAXU8hWm0QVGVzKIOuURQ098ofRU4e9oglf3Sj9pFx5nI5w==" + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.6.tgz", + "integrity": "sha512-yceT6DCHKqPRS1cAm8DHvDvK74DLIkDQdm5iV+GnIts8h0QbdHvkUIkdOvQoOODgpr6018skbmSQp12z5OWIQQ==" }, "@next/swc-android-arm-eabi": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.5.tgz", - "integrity": "sha512-YO691dxHlviy6H0eghgwqn+5kU9J3iQnKERHTDSppqjjGDBl6ab4wz9XfI5AhljjkaTg3TknHoIEWFDoZ4Ve8g==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", "optional": true }, "@next/swc-android-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.5.tgz", - "integrity": "sha512-ugbwffkUmp8cd2afehDC8LtQeFUxElRUBBngfB5UYSWBx18HW4OgzkPFIY8jUBH16zifvGZWXbICXJWDHrOLtw==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.5.tgz", - "integrity": "sha512-mshlh8QOtOalfZbc17uNAftWgqHTKnrv6QUwBe+mpGz04eqsSUzVz1JGZEdIkmuDxOz00cK2NPoc+VHDXh99IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", "optional": true }, "@next/swc-darwin-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.5.tgz", - "integrity": "sha512-SfigOKW4Z2UB3ruUPyvrlDIkcJq1hiw1wvYApWugD+tQsAkYZKEoz+/8emCmeYZ6Gwgi1WHV+z52Oj8u7bEHPg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", "optional": true }, "@next/swc-freebsd-x64": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.5.tgz", - "integrity": "sha512-0NJg8HZr4yG8ynmMGFXQf+Mahvq4ZgBmUwSlLXXymgxEQgH17erH/LoR69uITtW+KTsALgk9axEt5AAabM4ucg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.5.tgz", - "integrity": "sha512-Cye+h3oDT3NDWjACMlRaolL8fokpKie34FlPj9nfoW7bYKmoMBY1d4IO/GgBF+5xEl7HkH0Ny/qex63vQ0pN+A==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.5.tgz", - "integrity": "sha512-5BfDS/VoRDR5QUGG9oedOCEZGmV2zxUVFYLUJVPMSMeIgqkjxWQBiG2BUHZI6/LGk9yvHmjx7BTvtBCLtRg6IQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.5.tgz", - "integrity": "sha512-xenvqlXz+KxVKAB1YR723gnVNszpsCvKZkiFFaAYqDGJ502YuqU2fwLsaSm/ASRizNcBYeo9HPLTyc3r/9cdMQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.5.tgz", - "integrity": "sha512-9Ahi1bbdXwhrWQmOyoTod23/hhK05da/FzodiNqd6drrMl1y7+RujoEcU8Dtw3H1mGWB+yuTlWo8B4Iba8hqiQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.5.tgz", - "integrity": "sha512-V+1mnh49qmS9fOZxVRbzjhBEz9IUGJ7AQ80JPWAYQM5LI4TxfdiF4APLPvJ52rOmNeTqnVz1bbKtVOso+7EZ4w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.5.tgz", - "integrity": "sha512-wRE9rkp7I+/3Jf2T9PFIJOKq3adMWYEFkPOA7XAkUfYbQHlDJm/U5cVCWUsKByyQq5RThwufI91sgd19MfxRxg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.5.tgz", - "integrity": "sha512-Q1XQSLEhFuFhkKFdJIGt7cYQ4T3u6P5wrtUNreg5M+7P+fjSiC8+X+Vjcw+oebaacsdl0pWZlK+oACGafush1w==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.5.tgz", - "integrity": "sha512-t5gRblrwwiNZP6cT7NkxlgxrFgHWtv9ei5vUraCLgBqzvIsa7X+PnarZUeQCXqz6Jg9JSGGT9j8lvzD97UqeJQ==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", "optional": true }, "@swc/helpers": { @@ -38073,7 +38133,7 @@ "@types/node": "^17.0.14", "@types/react": "^18.0.0", "husky": "^7.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "next-auth": "^4.15.0", "nodemailer": "^6.6.3", "npm-run-all": "^4.1.5", @@ -38092,7 +38152,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -39281,18 +39341,18 @@ } }, "playwright-chromium": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.27.1.tgz", - "integrity": "sha512-AXAfmNHVnqByo7dKLwLqEC3aKIUlATwDUHCBwVw/qyRCgGUEoufeFUxFXB7pJ4nppwThph7TFe3fHfoETPqSvg==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-chromium/-/playwright-chromium-1.26.1.tgz", + "integrity": "sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==", "dev": true, "requires": { - "playwright-core": "1.27.1" + "playwright-core": "1.26.1" } }, "playwright-core": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz", - "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.1.tgz", + "integrity": "sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==", "dev": true }, "pluralize": { @@ -39645,6 +39705,12 @@ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "dev": true + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -41145,7 +41211,7 @@ "@types/node": "^17.0.25", "husky": "^7.0.4", "if-env": "^1.0.4", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" } @@ -41388,12 +41454,6 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, - "styled-jsx": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", - "requires": {} - }, "supports-color": { "version": "9.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.3.tgz", @@ -42158,8 +42218,7 @@ "ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "requires": {} + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==" } } }, @@ -42242,6 +42301,24 @@ "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "dev": true }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true + } + } + }, "url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -42284,12 +42361,6 @@ "tslib": "^2.0.0" } }, - "use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "requires": {} - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -42652,8 +42723,7 @@ "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "requires": {} + "dev": true }, "xdg-basedir": { "version": "4.0.0", @@ -42817,6 +42887,84 @@ "compress-commons": "^4.1.0", "readable-stream": "^3.6.0" } + }, + "@next/swc-android-arm-eabi": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.6.tgz", + "integrity": "sha512-FGFSj3v2Bluw8fD/X+1eXIEB0PhoJE0zfutsAauRhmNpjjZshLDgoXMWm1jTRL/04K/o9gwwO2+A8+sPVCH1uw==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.6.tgz", + "integrity": "sha512-7MgbtU7kimxuovVsd7jSJWMkIHBDBUsNLmmlkrBRHTvgzx5nDBXogP0hzZm7EImdOPwVMPpUHRQMBP9mbsiJYQ==", + "optional": true + }, + "@next/swc-darwin-arm64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.6.tgz", + "integrity": "sha512-AUVEpVTxbP/fxdFsjVI9d5a0CFn6NVV7A/RXOb0Y+pXKIIZ1V5rFjPwpYfIfyOo2lrqgehMNQcyMRoTrhq04xg==", + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.6.tgz", + "integrity": "sha512-SasCDJlshglsPnbzhWaIF6VEGkQy2NECcAOxPwaPr0cwbbt4aUlZ7QmskNzgolr5eAjFS/xTr7CEeKJtZpAAtQ==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.6.tgz", + "integrity": "sha512-6Lbxd9gAdXneTkwHyYW/qtX1Tdw7ND9UbiGsGz/SP43ZInNWnW6q0au4hEVPZ9bOWWRKzcVoeTBdoMpQk9Hx9w==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.6.tgz", + "integrity": "sha512-wNdi5A519e1P+ozEuYOhWPzzE6m1y7mkO6NFwn6watUwO0X9nZs7fT9THmnekvmFQpaZ6U+xf2MQ9poQoCh6jQ==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.6.tgz", + "integrity": "sha512-e8KTRnleQY1KLk5PwGV5hrmvKksCc74QRpHl5ffWnEEAtL2FE0ave5aIkXqErsPdXkiKuA/owp3LjQrP+/AH7Q==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.6.tgz", + "integrity": "sha512-/7RF03C3mhjYpHN+pqOolgME3guiHU5T3TsejuyteqyEyzdEyLHod+jcYH6ft7UZ71a6TdOewvmbLOtzHW2O8A==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.6.tgz", + "integrity": "sha512-kxyEXnYHpOEkFnmrlwB1QlzJtjC6sAJytKcceIyFUHbCaD3W/Qb5tnclcnHKTaFccizZRePXvV25Ok/eUSpKTw==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.6.tgz", + "integrity": "sha512-N0c6gubS3WW1oYYgo02xzZnNatfVQP/CiJq2ax+DJ55ePV62IACbRCU99TZNXXg+Kos6vNW4k+/qgvkvpGDeyA==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.6.tgz", + "integrity": "sha512-QjeMB2EBqBFPb/ac0CYr7GytbhUkrG4EwFWbcE0vsRp4H8grt25kYpFQckL4Jak3SUrp7vKfDwZ/SwO7QdO8vw==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.6.tgz", + "integrity": "sha512-EQzXtdqRTcmhT/tCq81rIwE36Y3fNHPInaCuJzM/kftdXfa0F+64y7FAoMO13npX8EG1+SamXgp/emSusKrCXg==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.6.tgz", + "integrity": "sha512-pSkqZ//UP/f2sS9T7IvHLfEWDPTX0vRyXJnAUNisKvO3eF3e1xdhDX7dix/X3Z3lnN4UjSwOzclAI87JFbOwmQ==", + "optional": true } } } diff --git a/package.json b/package.json index da5527322b..8237f9f8d4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Run Next.js seamlessly on Netlify", "scripts": { "build:demo": "cd demos/default && npm run build", - "cy:open": "cypress open --config-file cypress/config/all.json", + "cy:open": "cypress open --config-file cypress/config/canary.json", "dev:demo": "next dev demos/default", "format": "run-s format:check-fix:*", "format:ci": "run-s format:check:*", @@ -21,6 +21,7 @@ "test:next": "jest -c test/e2e/jest.config.js", "test:next:disabled": "RUN_SKIPPED_TESTS=1 jest -c test/e2e/jest.config.disabled.js", "test:next:all": "RUN_SKIPPED_TESTS=1 jest -c test/e2e/jest.config.all.js", + "test:next:appdir": "NEXT_TEST_VERSION=canary jest -c test/e2e/jest.config.appdir.js", "test:jest": "jest", "playwright:install": "playwright install --with-deps chromium", "test:jest:update": "jest --updateSnapshot", @@ -70,6 +71,7 @@ "execa": "^5.1.1", "husky": "^7.0.4", "jest": "^27.0.0", + "jest-extended": "^3.2.0", "jest-fetch-mock": "^3.0.3", "jest-junit": "^14.0.1", "netlify-plugin-cypress": "^2.2.0", @@ -85,7 +87,7 @@ "typescript": "^4.3.4" }, "dependencies": { - "next": "^13.0.3" + "next": "^13.0.6" }, "engines": { "node": ">=16.0.0" @@ -118,7 +120,6 @@ }, "workspaces": [ "packages/*", - "demos/canary", "demos/default", "demos/next-auth", "demos/static-root", diff --git a/packages/next/package.json b/packages/next/package.json index dd986e83f4..0a23a770e6 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -8,7 +8,7 @@ ], "devDependencies": { "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3", "@netlify/edge-functions": "^2.0.0" diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 8afc6f17cc..17f7187082 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -41,7 +41,7 @@ "@types/jest": "^27.4.1", "@types/merge-stream": "^1.1.2", "@types/node": "^17.0.25", - "next": "^13.0.3", + "next": "^13.0.6", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, diff --git a/packages/runtime/src/helpers/config.ts b/packages/runtime/src/helpers/config.ts index 9eecd91a26..9cd17265a4 100644 --- a/packages/runtime/src/helpers/config.ts +++ b/packages/runtime/src/helpers/config.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import destr from 'destr' import { readJSON, writeJSON } from 'fs-extra' @@ -239,4 +238,3 @@ export const generateCustomHeaders = (nextConfig: NextConfig, netlifyHeaders: Ne } } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index b42dcfecd3..927ac58783 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { promises as fs, existsSync } from 'fs' import { resolve, join } from 'path' @@ -12,6 +11,7 @@ import { outdent } from 'outdent' import { getRequiredServerFiles, NextConfig } from './config' import { makeLocaleOptional, stripLookahead } from './matchers' +import { RoutesManifest } from './types' // This is the format as of next@12.2 interface EdgeFunctionDefinitionV1 { @@ -52,24 +52,30 @@ export interface FunctionManifest { function: string name?: string path: string + cache?: 'manual' } | { function: string name?: string pattern: string + cache?: 'manual' } > import_map?: string } -export const loadMiddlewareManifest = (netlifyConfig: NetlifyConfig): Promise => { - const middlewarePath = resolve(netlifyConfig.build.publish, 'server', 'middleware-manifest.json') - if (!existsSync(middlewarePath)) { - return null +const maybeLoadJson = (path: string): Promise | null => { + if (existsSync(path)) { + return readJson(path) } - return readJson(middlewarePath) } +export const loadMiddlewareManifest = (netlifyConfig: NetlifyConfig): Promise => + maybeLoadJson(resolve(netlifyConfig.build.publish, 'server', 'middleware-manifest.json')) + +export const loadAppPathRoutesManifest = (netlifyConfig: NetlifyConfig): Promise | null> => + maybeLoadJson(resolve(netlifyConfig.build.publish, 'app-path-routes-manifest.json')) + /** * Convert the Next middleware name into a valid Edge Function name */ @@ -85,6 +91,7 @@ import { // Deno defines "window", but naughty libraries think this means it's a browser delete globalThis.window globalThis.process = { env: {...Deno.env.toObject(), NEXT_RUNTIME: 'edge', 'NEXT_PRIVATE_MINIMAL_MODE': '1' } } +globalThis.EdgeRuntime = "netlify-edge" let _ENTRIES = {} // Next.js uses this extension to the Headers API implemented by Cloudflare workerd @@ -189,12 +196,18 @@ const writeEdgeFunction = async ({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest = {}, nextConfig, + cache, }: { edgeFunctionDefinition: EdgeFunctionDefinition edgeFunctionRoot: string netlifyConfig: NetlifyConfig + pageRegexMap?: Map + appPathRoutesManifest?: Record nextConfig: NextConfig + cache?: 'manual' }): Promise< Array<{ function: string @@ -235,12 +248,21 @@ const writeEdgeFunction = async ({ matchers.push(...edgeFunctionDefinition.matchers) } + // If the EF matches a page, it's an app dir page so needs a matcher too + // The object will be empty if appDir isn't enabled in the Next config + if (pageRegexMap && edgeFunctionDefinition.page in appPathRoutesManifest) { + const regexp = pageRegexMap.get(appPathRoutesManifest[edgeFunctionDefinition.page]) + if (regexp) { + matchers.push({ regexp }) + } + } + await writeJson(join(edgeFunctionDir, 'matchers.json'), matchers) // We add a defintion for each matching path return matchers.map((matcher) => { const pattern = stripLookahead(matcher.regexp) - return { function: name, pattern, name: edgeFunctionDefinition.name } + return { function: name, pattern, name: edgeFunctionDefinition.name, cache } }) } export const cleanupEdgeFunctions = ({ @@ -273,7 +295,13 @@ export const writeDevEdgeFunction = async ({ /** * Writes Edge Functions for the Next middleware */ -export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { +export const writeEdgeFunctions = async ({ + netlifyConfig, + routesManifest, +}: { + netlifyConfig: NetlifyConfig + routesManifest: RoutesManifest +}) => { const manifest: FunctionManifest = { functions: [], version: 1, @@ -285,6 +313,7 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { const { publish } = netlifyConfig.build const nextConfigFile = await getRequiredServerFiles(publish) const nextConfig = nextConfigFile.config + const usesAppDir = nextConfig.experimental?.appDir await copy(getEdgeTemplatePath('../edge-shared'), join(edgeFunctionRoot, 'edge-shared')) await writeJSON(join(edgeFunctionRoot, 'edge-shared', 'nextConfig.json'), nextConfig) @@ -332,13 +361,27 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { // Older versions of the manifest format don't have the functions field // No, the version field was not incremented if (typeof middlewareManifest.functions === 'object') { + // When using the app dir, we also need to check if the EF matches a page + const appPathRoutesManifest = await loadAppPathRoutesManifest(netlifyConfig) + + const pageRegexMap = new Map( + [...(routesManifest.dynamicRoutes || []), ...(routesManifest.staticRoutes || [])].map((route) => [ + route.page, + route.regex, + ]), + ) + for (const edgeFunctionDefinition of Object.values(middlewareManifest.functions)) { usesEdge = true const functionDefinitions = await writeEdgeFunction({ edgeFunctionDefinition, edgeFunctionRoot, netlifyConfig, + pageRegexMap, + appPathRoutesManifest, nextConfig, + // cache: "manual" is currently experimental, so we restrict it to sites that use experimental appDir + cache: usesAppDir ? 'manual' : undefined, }) manifest.functions.push(...functionDefinitions) } @@ -352,5 +395,3 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { } await writeJson(join(edgeFunctionRoot, 'manifest.json'), manifest) } - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/files.ts b/packages/runtime/src/helpers/files.ts index ef43af64e4..02c397e4c1 100644 --- a/packages/runtime/src/helpers/files.ts +++ b/packages/runtime/src/helpers/files.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { cpus } from 'os' import type { NetlifyConfig } from '@netlify/build' @@ -86,7 +85,6 @@ export const moveStaticPages = async ({ }): Promise => { console.log('Moving static page files to serve from CDN...') const outputDir = join(netlifyConfig.build.publish, target === 'server' ? 'server' : 'serverless') - const root = join(outputDir, 'pages') const buildId = readFileSync(join(netlifyConfig.build.publish, 'BUILD_ID'), 'utf8').trim() const dataDir = join('_next', 'data', buildId) await ensureDir(join(netlifyConfig.build.publish, dataDir)) @@ -117,15 +115,18 @@ export const moveStaticPages = async ({ } }) - const files: Array = [] + let fileCount = 0 const filesManifest: Record = {} - const moveFile = async (file) => { + const moveFile = async (file: string) => { + // Strip the initial 'app' or 'pages' directory from the output path + const pathname = file.split('/').slice(1).join('/') + // .rsc data files go next to the html file const isData = file.endsWith('.json') - const source = join(root, file) - const targetFile = isData ? join(dataDir, file) : file + const source = join(outputDir, file) + const targetFile = isData ? join(dataDir, pathname) : pathname const targetPath = basePath ? join(basePath, targetFile) : targetFile - files.push(file) + fileCount += 1 filesManifest[file] = targetPath const dest = join(netlifyConfig.build.publish, targetPath) @@ -137,8 +138,8 @@ export const moveStaticPages = async ({ } } // Move all static files, except error documents and nft manifests - const pages = await globby(['**/*.{html,json}', '!**/(500|404|*.js.nft).{html,json}'], { - cwd: root, + const pages = await globby(['{app,pages}/**/*.{html,json,rsc}', '!**/(500|404|*.js.nft).{html,json}'], { + cwd: outputDir, dot: true, }) @@ -150,35 +151,38 @@ export const moveStaticPages = async ({ // Limit concurrent file moves to number of cpus or 2 if there is only 1 const limit = pLimit(Math.max(2, cpus().length)) const promises = pages.map((rawPath) => { + // Convert to POSIX path const filePath = slash(rawPath) + // Remove the initial 'app' or 'pages' directory from the output path + const pagePath = filePath.split('/').slice(1).join('/') // Don't move ISR files, as they're used for the first request - if (isrFiles.has(filePath)) { + if (isrFiles.has(pagePath)) { return } - if (isDynamicRoute(filePath)) { + if (isDynamicRoute(pagePath)) { return } - if (matchesRedirect(filePath, redirects)) { - matchedRedirects.add(filePath) + if (matchesRedirect(pagePath, redirects)) { + matchedRedirects.add(pagePath) return } - if (matchesRewrite(filePath, rewrites)) { - matchedRewrites.add(filePath) + if (matchesRewrite(pagePath, rewrites)) { + matchedRewrites.add(pagePath) return } // Middleware matches against the unlocalised path - const unlocalizedPath = stripLocale(rawPath, i18n?.locales) + const unlocalizedPath = stripLocale(pagePath, i18n?.locales) const middlewarePath = matchMiddleware(middleware, unlocalizedPath) // If a file matches middleware it can't be offloaded to the CDN, and needs to stay at the origin to be served by next/server if (middlewarePath) { matchingMiddleware.add(middlewarePath) - matchedPages.add(rawPath) + matchedPages.add(filePath) return } return limit(moveFile, filePath) }) await Promise.all(promises) - console.log(`Moved ${files.length} files`) + console.log(`Moved ${fileCount} files`) if (matchedPages.size !== 0) { console.log( @@ -446,4 +450,3 @@ export const movePublicFiles = async ({ await copy(publicDir, `${publish}/`) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/functions.ts b/packages/runtime/src/helpers/functions.ts index 5015726dd7..f451abb321 100644 --- a/packages/runtime/src/helpers/functions.ts +++ b/packages/runtime/src/helpers/functions.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig, NetlifyPluginConstants } from '@netlify/build' import bridgeFile from '@vercel/node-bridge' import chalk from 'chalk' @@ -30,11 +29,14 @@ export const generateFunctions = async ( ): Promise => { const publish = resolve(PUBLISH_DIR) const functionsDir = resolve(INTERNAL_FUNCTIONS_SRC || FUNCTIONS_SRC) - console.log({ functionsDir }) const functionDir = join(functionsDir, HANDLER_FUNCTION_NAME) const publishDir = relative(functionDir, publish) for (const { route, config, compiled } of apiRoutes) { + // Don't write a lambda if the runtime is edge + if (config.runtime === 'experimental-edge') { + continue + } const apiHandlerSource = await getApiHandler({ page: route, config, @@ -230,4 +232,3 @@ export const warnOnApiRoutes = async ({ ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/redirects.ts b/packages/runtime/src/helpers/redirects.ts index 22d777c88b..3781712e95 100644 --- a/packages/runtime/src/helpers/redirects.ts +++ b/packages/runtime/src/helpers/redirects.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import { yellowBright } from 'chalk' import { readJSON } from 'fs-extra' @@ -330,4 +329,3 @@ export const generateRedirects = async ({ ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/utils.ts b/packages/runtime/src/helpers/utils.ts index 35e5487ba4..2a12ff2a50 100644 --- a/packages/runtime/src/helpers/utils.ts +++ b/packages/runtime/src/helpers/utils.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import type { NetlifyConfig } from '@netlify/build' import type { Header } from '@netlify/build/types/config/netlify_config' import globby from 'globby' @@ -291,5 +290,3 @@ export const getRemotePatterns = (experimental: ExperimentalConfigWithLegacy, im } return [] } - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/helpers/verification.ts b/packages/runtime/src/helpers/verification.ts index 3d94517b6e..ed1f6e1108 100644 --- a/packages/runtime/src/helpers/verification.ts +++ b/packages/runtime/src/helpers/verification.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { existsSync, promises } from 'fs' import path, { relative, join } from 'path' @@ -213,4 +212,3 @@ export const warnForRootRedirects = ({ appDir }: { appDir: string }) => { ) } } -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts index 05f9eb0b2d..8806d686a9 100644 --- a/packages/runtime/src/index.ts +++ b/packages/runtime/src/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-lines */ import { join, relative } from 'path' import type { NetlifyPlugin } from '@netlify/build' @@ -80,12 +79,11 @@ const plugin: NetlifyPlugin = { checkNextSiteHasBuilt({ publish, failBuild }) - const { appDir, basePath, i18n, images, target, ignore, trailingSlash, outdir, experimental } = await getNextConfig( - { + const { appDir, basePath, i18n, images, target, ignore, trailingSlash, outdir, experimental, routesManifest } = + await getNextConfig({ publish, failBuild, - }, - ) + }) await cleanupEdgeFunctions(constants) const middlewareManifest = await loadMiddlewareManifest(netlifyConfig) @@ -186,7 +184,7 @@ const plugin: NetlifyPlugin = { apiRoutes, }) - await writeEdgeFunctions(netlifyConfig) + await writeEdgeFunctions({ netlifyConfig, routesManifest }) }, async onPostBuild({ @@ -221,13 +219,18 @@ const plugin: NetlifyPlugin = { await checkZipSize(join(FUNCTIONS_DIST, `${ODB_FUNCTION_NAME}.zip`)) const nextConfig = await getNextConfig({ publish, failBuild }) - const { basePath, appDir } = nextConfig + const { basePath, appDir, experimental } = nextConfig generateCustomHeaders(nextConfig, headers) warnForProblematicUserRewrites({ basePath, redirects }) warnForRootRedirects({ appDir }) await warnOnApiRoutes({ FUNCTIONS_DIST }) + if (experimental?.appDir) { + console.log( + '🧪 Thank you for testing "appDir" support on Netlify. For known issues and to give feedback, visit https://ntl.fyi/next-13-feedback', + ) + } }, } // The types haven't been updated yet @@ -254,5 +257,3 @@ const nextRuntime = ( } module.exports = nextRuntime - -/* eslint-enable max-lines */ diff --git a/packages/runtime/src/templates/edge/runtime.ts b/packages/runtime/src/templates/edge/runtime.ts index 59d7a4a9cd..45c25eb94a 100644 --- a/packages/runtime/src/templates/edge/runtime.ts +++ b/packages/runtime/src/templates/edge/runtime.ts @@ -13,6 +13,12 @@ export interface FetchEventResult { waitUntil: Promise } +export interface I18NConfig { + defaultLocale: string + localeDetection?: false + locales: string[] +} + export interface RequestData { geo?: { city?: string @@ -27,7 +33,7 @@ export interface RequestData { method: string nextConfig?: { basePath?: string - i18n?: Record + i18n?: I18NConfig | null trailingSlash?: boolean } page?: { diff --git a/packages/runtime/src/templates/getApiHandler.ts b/packages/runtime/src/templates/getApiHandler.ts index 9c7b17e702..b0b82bd76c 100644 --- a/packages/runtime/src/templates/getApiHandler.ts +++ b/packages/runtime/src/templates/getApiHandler.ts @@ -137,7 +137,7 @@ export const getApiHandler = ({ const { config } = require("${publishDir}/required-server-files.json") let staticManifest const path = require("path"); - const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "serverless", "pages")); + const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "server")); const handler = (${makeHandler.toString()})(config, "${appDir}", pageRoot, ${JSON.stringify(page)}) exports.handler = ${ config.type === ApiRouteType.SCHEDULED ? `schedule(${JSON.stringify(config.schedule)}, handler);` : 'handler' diff --git a/packages/runtime/src/templates/getHandler.ts b/packages/runtime/src/templates/getHandler.ts index 4bd1dfec96..0e62c09855 100644 --- a/packages/runtime/src/templates/getHandler.ts +++ b/packages/runtime/src/templates/getHandler.ts @@ -17,7 +17,13 @@ const { URLSearchParams, URL } = require('url') const { Bridge } = require('@vercel/node-bridge/bridge') -const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = require('./handlerUtils') +const { + augmentFsModule, + getMaxAge, + getMultiValueHeaders, + getPrefetchResponse, + getNextServer, +} = require('./handlerUtils') /* eslint-enable @typescript-eslint/no-var-requires */ type Mutable = { @@ -53,8 +59,8 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str for (const [key, value] of Object.entries(conf.env)) { process.env[key] = String(value) } - // Set during the request as it needs the host header. Hoisted so we can define the function once - let base: string + // Set during the request as it needs to get it from the request URL. Defaults to the URL env var + let base = process.env.URL augmentFsModule({ promises, staticManifest, pageRoot, getBase: () => base }) @@ -67,9 +73,7 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str } const url = new URL(event.rawUrl) const port = Number.parseInt(url.port) || 80 - const { host } = event.headers - const protocol = event.headers['x-forwarded-proto'] || 'http' - base = `${protocol}://${host}` + base = url.origin const NextServer: NextServerType = getNextServer() const nextServer = new NextServer({ @@ -95,6 +99,10 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str return async function handler(event: HandlerEvent, context: HandlerContext) { let requestMode = mode + const prefetchResponse = getPrefetchResponse(event, mode) + if (prefetchResponse) { + return prefetchResponse + } // Ensure that paths are encoded - but don't double-encode them event.path = new URL(event.rawUrl).pathname // Next expects to be able to parse the query from the URL @@ -169,7 +177,7 @@ export const getHandler = ({ isODB = false, publishDir = '../../../.next', appDi const { promises } = require("fs"); // We copy the file here rather than requiring from the node module const { Bridge } = require("./bridge"); - const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = require('./handlerUtils') + const { augmentFsModule, getMaxAge, getMultiValueHeaders, getPrefetchResponse, getNextServer } = require('./handlerUtils') ${isODB ? `const { builder } = require("@netlify/functions")` : ''} const { config } = require("${publishDir}/required-server-files.json") @@ -178,7 +186,7 @@ export const getHandler = ({ isODB = false, publishDir = '../../../.next', appDi staticManifest = require("${publishDir}/static-manifest.json") } catch {} const path = require("path"); - const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", config.target === "server" ? "server" : "serverless", "pages")); + const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "server")); exports.handler = ${ isODB ? `builder((${makeHandler.toString()})(config, "${appDir}", pageRoot, staticManifest, 'odb'));` diff --git a/packages/runtime/src/templates/handlerUtils.ts b/packages/runtime/src/templates/handlerUtils.ts index b68a8b5f30..c2af09db9a 100644 --- a/packages/runtime/src/templates/handlerUtils.ts +++ b/packages/runtime/src/templates/handlerUtils.ts @@ -4,6 +4,7 @@ import path from 'path' import { pipeline } from 'stream' import { promisify } from 'util' +import { HandlerEvent, HandlerResponse } from '@netlify/functions' import { http, https } from 'follow-redirects' import type NextNodeServer from 'next/dist/server/next-server' @@ -107,24 +108,25 @@ export const augmentFsModule = ({ const statsOrig = promises.stat // ...then money-patch it to see if it's requesting a CDN file promises.readFile = (async (file, options) => { - const base = getBase() + const baseUrl = getBase() + // We only care about page files if (file.startsWith(pageRoot)) { - // We only want the part after `pages/` + // We only want the part after `.next/server/` const filePath = file.slice(pageRoot.length + 1) // Is it in the CDN and not local? if (staticFiles.has(filePath) && !existsSync(file)) { // This name is safe to use, because it's one that was already created by Next const cacheFile = path.join(cacheDir, filePath) - const url = `${base}/${staticFiles.get(filePath)}` + const url = `${baseUrl}/${staticFiles.get(filePath)}` // If it's already downloading we can wait for it to finish if (downloadPromises.has(url)) { await downloadPromises.get(url) } // Have we already cached it? We download every time if running locally to avoid staleness - if ((!existsSync(cacheFile) || process.env.NETLIFY_DEV) && base) { + if ((!existsSync(cacheFile) || process.env.NETLIFY_DEV) && baseUrl) { await promises.mkdir(path.dirname(cacheFile), { recursive: true }) try { @@ -147,7 +149,7 @@ export const augmentFsModule = ({ promises.stat = ((file, options) => { // We only care about page files if (file.startsWith(pageRoot)) { - // We only want the part after `pages/` + // We only want the part after `.next/server` const cacheFile = path.join(cacheDir, file.slice(pageRoot.length + 1)) if (existsSync(cacheFile)) { return statsOrig(cacheFile, options) @@ -188,3 +190,21 @@ export const getNextServer = (): NextServerType => { } return NextServer } +/** + * Prefetch requests are used to check for middleware redirects, and shouldn't trigger SSR. + */ +export const getPrefetchResponse = (event: HandlerEvent, mode: string): HandlerResponse | false => { + if (event.headers['x-middleware-prefetch'] && mode === 'ssr') { + return { + statusCode: 200, + body: '{}', + headers: { + 'Content-Type': 'application/json', + 'x-middleware-skip': '1', + // https://github.com/vercel/next.js/pull/42936/files#r1027563953 + vary: 'x-middleware-prefetch', + }, + } + } + return false +} diff --git a/test/__snapshots__/index.js.snap b/test/__snapshots__/index.js.snap index e9bea87306..8ae1301935 100644 --- a/test/__snapshots__/index.js.snap +++ b/test/__snapshots__/index.js.snap @@ -288,235 +288,355 @@ exports.resolvePages = () => { exports[`onBuild() generates static files manifest 1`] = ` Array [ Array [ - "en/broken-image.html", + "pages/en/broken-image.html", "en/broken-image.html", ], Array [ - "en/css.html", + "pages/en/css.html", "en/css.html", ], Array [ - "en/env.html", + "pages/en/env.html", "en/env.html", ], Array [ - "en/font.html", + "pages/en/font.html", "en/font.html", ], Array [ - "en/getStaticProps/1.html", + "pages/en/getStaticProps/1.html", "en/getStaticProps/1.html", ], Array [ - "en/getStaticProps/1.json", + "pages/en/getStaticProps/1.json", "_next/data/build-id/en/getStaticProps/1.json", ], Array [ - "en/getStaticProps/2.html", + "pages/en/getStaticProps/2.html", "en/getStaticProps/2.html", ], Array [ - "en/getStaticProps/2.json", + "pages/en/getStaticProps/2.json", "_next/data/build-id/en/getStaticProps/2.json", ], Array [ - "en/getStaticProps/env.html", + "pages/en/getStaticProps/env.html", "en/getStaticProps/env.html", ], Array [ - "en/getStaticProps/env.json", + "pages/en/getStaticProps/env.json", "_next/data/build-id/en/getStaticProps/env.json", ], Array [ - "en/getStaticProps/static.html", + "pages/en/getStaticProps/static.html", "en/getStaticProps/static.html", ], Array [ - "en/getStaticProps/static.json", + "pages/en/getStaticProps/static.json", "_next/data/build-id/en/getStaticProps/static.json", ], Array [ - "en/getStaticProps/withFallback/1.html", + "pages/en/getStaticProps/with-revalidate-404.html", + "en/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/en/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/en/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/en/getStaticProps/with-revalidate.html", + "en/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/en/getStaticProps/with-revalidate.json", + "_next/data/build-id/en/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/en/getStaticProps/withFallback/1.html", "en/getStaticProps/withFallback/1.html", ], Array [ - "en/getStaticProps/withFallback/1.json", + "pages/en/getStaticProps/withFallback/1.json", "_next/data/build-id/en/getStaticProps/withFallback/1.json", ], Array [ - "en/getStaticProps/withFallback/2.html", + "pages/en/getStaticProps/withFallback/2.html", "en/getStaticProps/withFallback/2.html", ], Array [ - "en/getStaticProps/withFallback/2.json", + "pages/en/getStaticProps/withFallback/2.json", "_next/data/build-id/en/getStaticProps/withFallback/2.json", ], Array [ - "en/getStaticProps/withFallback/my/path/1.html", + "pages/en/getStaticProps/withFallback/my/path/1.html", "en/getStaticProps/withFallback/my/path/1.html", ], Array [ - "en/getStaticProps/withFallback/my/path/1.json", + "pages/en/getStaticProps/withFallback/my/path/1.json", "_next/data/build-id/en/getStaticProps/withFallback/my/path/1.json", ], Array [ - "en/getStaticProps/withFallback/my/path/2.html", + "pages/en/getStaticProps/withFallback/my/path/2.html", "en/getStaticProps/withFallback/my/path/2.html", ], Array [ - "en/getStaticProps/withFallback/my/path/2.json", + "pages/en/getStaticProps/withFallback/my/path/2.json", "_next/data/build-id/en/getStaticProps/withFallback/my/path/2.json", ], Array [ - "en/getStaticProps/withFallbackBlocking/1.html", + "pages/en/getStaticProps/withFallbackBlocking/1.html", "en/getStaticProps/withFallbackBlocking/1.html", ], Array [ - "en/getStaticProps/withFallbackBlocking/1.json", + "pages/en/getStaticProps/withFallbackBlocking/1.json", "_next/data/build-id/en/getStaticProps/withFallbackBlocking/1.json", ], Array [ - "en/getStaticProps/withFallbackBlocking/2.html", + "pages/en/getStaticProps/withFallbackBlocking/2.html", "en/getStaticProps/withFallbackBlocking/2.html", ], Array [ - "en/getStaticProps/withFallbackBlocking/2.json", + "pages/en/getStaticProps/withFallbackBlocking/2.json", "_next/data/build-id/en/getStaticProps/withFallbackBlocking/2.json", ], Array [ - "en/image.html", + "pages/en/getStaticProps/withRevalidate/1.html", + "en/getStaticProps/withRevalidate/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/2.html", + "en/getStaticProps/withRevalidate/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/2.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/1.html", + "en/getStaticProps/withRevalidate/withFallback/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallback/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/2.html", + "en/getStaticProps/withRevalidate/withFallback/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallback/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallback/2.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/1.html", + "en/getStaticProps/withRevalidate/withFallbackBlocking/1.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/1.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallbackBlocking/1.json", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/2.html", + "en/getStaticProps/withRevalidate/withFallbackBlocking/2.html", + ], + Array [ + "pages/en/getStaticProps/withRevalidate/withFallbackBlocking/2.json", + "_next/data/build-id/en/getStaticProps/withRevalidate/withFallbackBlocking/2.json", + ], + Array [ + "pages/en/image.html", "en/image.html", ], Array [ - "en/layouts.html", + "pages/en/layouts.html", "en/layouts.html", ], Array [ - "en/previewTest.html", + "pages/en/old/image.html", + "en/old/image.html", + ], + Array [ + "pages/en/previewTest.html", "en/previewTest.html", ], Array [ - "en/previewTest.json", + "pages/en/previewTest.json", "_next/data/build-id/en/previewTest.json", ], Array [ - "en/script.html", + "pages/en/redirectme.html", + "en/redirectme.html", + ], + Array [ + "pages/en/script.html", "en/script.html", ], Array [ - "en/static.html", + "pages/en/static.html", "en/static.html", ], Array [ - "es/broken-image.html", + "pages/es/broken-image.html", "es/broken-image.html", ], Array [ - "es/css.html", + "pages/es/css.html", "es/css.html", ], Array [ - "es/env.html", + "pages/es/env.html", "es/env.html", ], Array [ - "es/font.html", + "pages/es/font.html", "es/font.html", ], Array [ - "es/getStaticProps/env.html", + "pages/es/getStaticProps/env.html", "es/getStaticProps/env.html", ], Array [ - "es/getStaticProps/env.json", + "pages/es/getStaticProps/env.json", "_next/data/build-id/es/getStaticProps/env.json", ], Array [ - "es/getStaticProps/static.html", + "pages/es/getStaticProps/static.html", "es/getStaticProps/static.html", ], Array [ - "es/getStaticProps/static.json", + "pages/es/getStaticProps/static.json", "_next/data/build-id/es/getStaticProps/static.json", ], Array [ - "es/image.html", + "pages/es/getStaticProps/with-revalidate-404.html", + "es/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/es/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/es/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/es/getStaticProps/with-revalidate.html", + "es/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/es/getStaticProps/with-revalidate.json", + "_next/data/build-id/es/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/es/image.html", "es/image.html", ], Array [ - "es/layouts.html", + "pages/es/layouts.html", "es/layouts.html", ], Array [ - "es/previewTest.html", + "pages/es/old/image.html", + "es/old/image.html", + ], + Array [ + "pages/es/previewTest.html", "es/previewTest.html", ], Array [ - "es/previewTest.json", + "pages/es/previewTest.json", "_next/data/build-id/es/previewTest.json", ], Array [ - "es/script.html", + "pages/es/redirectme.html", + "es/redirectme.html", + ], + Array [ + "pages/es/script.html", "es/script.html", ], Array [ - "es/static.html", + "pages/es/static.html", "es/static.html", ], Array [ - "fr/broken-image.html", + "pages/fr/broken-image.html", "fr/broken-image.html", ], Array [ - "fr/css.html", + "pages/fr/css.html", "fr/css.html", ], Array [ - "fr/env.html", + "pages/fr/env.html", "fr/env.html", ], Array [ - "fr/font.html", + "pages/fr/font.html", "fr/font.html", ], Array [ - "fr/getStaticProps/env.html", + "pages/fr/getStaticProps/env.html", "fr/getStaticProps/env.html", ], Array [ - "fr/getStaticProps/env.json", + "pages/fr/getStaticProps/env.json", "_next/data/build-id/fr/getStaticProps/env.json", ], Array [ - "fr/getStaticProps/static.html", + "pages/fr/getStaticProps/static.html", "fr/getStaticProps/static.html", ], Array [ - "fr/getStaticProps/static.json", + "pages/fr/getStaticProps/static.json", "_next/data/build-id/fr/getStaticProps/static.json", ], Array [ - "fr/image.html", + "pages/fr/getStaticProps/with-revalidate-404.html", + "fr/getStaticProps/with-revalidate-404.html", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate-404.json", + "_next/data/build-id/fr/getStaticProps/with-revalidate-404.json", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate.html", + "fr/getStaticProps/with-revalidate.html", + ], + Array [ + "pages/fr/getStaticProps/with-revalidate.json", + "_next/data/build-id/fr/getStaticProps/with-revalidate.json", + ], + Array [ + "pages/fr/image.html", "fr/image.html", ], Array [ - "fr/layouts.html", + "pages/fr/layouts.html", "fr/layouts.html", ], Array [ - "fr/previewTest.html", + "pages/fr/old/image.html", + "fr/old/image.html", + ], + Array [ + "pages/fr/previewTest.html", "fr/previewTest.html", ], Array [ - "fr/previewTest.json", + "pages/fr/previewTest.json", "_next/data/build-id/fr/previewTest.json", ], Array [ - "fr/script.html", + "pages/fr/redirectme.html", + "fr/redirectme.html", + ], + Array [ + "pages/fr/script.html", "fr/script.html", ], Array [ - "fr/static.html", + "pages/fr/static.html", "fr/static.html", ], ] diff --git a/test/e2e/app-dir/app-alias.test.ts b/test/e2e/app-dir/app-alias.test.ts new file mode 100644 index 0000000000..4b24e0d8c3 --- /dev/null +++ b/test/e2e/app-dir/app-alias.test.ts @@ -0,0 +1,52 @@ +import { createNext, FileRef } from 'e2e-utils' +import { NextInstance } from 'test/lib/next-modes/base' +import { renderViaHTTP } from 'next-test-utils' +import webdriver from 'next-webdriver' +import path from 'path' +import { readJSON } from 'fs-extra' + +describe('app-dir alias handling', () => { + //if ((global as any).isNextDeploy) { + // it('should skip next deploy for now', () => {}) + // return + //} + + let next: NextInstance + + beforeAll(async () => { + next = await createNext({ + files: new FileRef(path.join(__dirname, 'app-alias')), + dependencies: { + react: 'latest', + 'react-dom': 'latest', + typescript: 'latest', + '@types/react': 'latest', + '@types/node': 'latest', + }, + packageJson: { + type: 'module', + }, + }) + }, 600000) + afterAll(() => next.destroy()) + + it('should handle typescript paths alias correctly', async () => { + const html = await renderViaHTTP(next.url, '/button') + expect(html).toContain('click') + }) + + it('should resolve css imports from outside with src folder presented', async () => { + const browser = await webdriver(next.url, '/button') + const fontSize = await browser.elementByCss('button').getComputedCss('font-size') + expect(fontSize).toBe('50px') + }) + + if (!(global as any).isNextDev) { + it('should generate app-build-manifest correctly', async () => { + // Remove other page CSS files: + const manifest = await readJSON(path.join(next.testDir, '.next', 'app-build-manifest.json')) + + expect(manifest.pages).not.toBeEmptyObject() + }) + } +}) diff --git a/test/e2e/app-dir/app-alias/next.config.js b/test/e2e/app-dir/app-alias/next.config.js new file mode 100644 index 0000000000..3d6be3a00f --- /dev/null +++ b/test/e2e/app-dir/app-alias/next.config.js @@ -0,0 +1,5 @@ +export default { + experimental: { + appDir: true, + }, +} diff --git a/test/e2e/app-dir/app-alias/package.json b/test/e2e/app-dir/app-alias/package.json new file mode 100644 index 0000000000..3dbc1ca591 --- /dev/null +++ b/test/e2e/app-dir/app-alias/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/e2e/app-dir/app-alias/src/app/button/page.tsx b/test/e2e/app-dir/app-alias/src/app/button/page.tsx new file mode 100644 index 0000000000..54c20b4f88 --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/button/page.tsx @@ -0,0 +1,10 @@ +import Button from '@/ui/button' +import React from 'react' + +export default function page() { + if ('useState' in React) { + throw new Error('React is not resolved correctly.') + } + + return +} diff --git a/test/e2e/app-dir/app-alias/src/app/layout.tsx b/test/e2e/app-dir/app-alias/src/app/layout.tsx new file mode 100644 index 0000000000..cbdfcab503 --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/layout.tsx @@ -0,0 +1,10 @@ +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + +
top bar
+ {children} + + + ) +} diff --git a/test/e2e/app-dir/app-alias/src/app/typing/page.tsx b/test/e2e/app-dir/app-alias/src/app/typing/page.tsx new file mode 100644 index 0000000000..593d8b7f4b --- /dev/null +++ b/test/e2e/app-dir/app-alias/src/app/typing/page.tsx @@ -0,0 +1,11 @@ +// Typing test +// eslint-disable-next-line +function noop() { + fetch('/button', { next: { revalidate: 0 } }) + const request = new Request('/button', { next: { revalidate: 0 } }) + fetch(request) +} + +export default function page() { + return 'typing' +} diff --git a/test/e2e/app-dir/app-alias/tsconfig.json b/test/e2e/app-dir/app-alias/tsconfig.json new file mode 100644 index 0000000000..5939f6892d --- /dev/null +++ b/test/e2e/app-dir/app-alias/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "ES6", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "baseUrl": ".", + "paths": { + "@/ui/*": ["ui/*"] + }, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/test/e2e/app-dir/app-alias/ui/button.tsx b/test/e2e/app-dir/app-alias/ui/button.tsx new file mode 100644 index 0000000000..4219fce04e --- /dev/null +++ b/test/e2e/app-dir/app-alias/ui/button.tsx @@ -0,0 +1,5 @@ +import styles from './style.module.css' + +export default function Button(props: any) { + return + + + ) +} diff --git a/test/e2e/app-dir/app/app/catch-all-link/page.js b/test/e2e/app-dir/app/app/catch-all-link/page.js new file mode 100644 index 0000000000..1170d49fa5 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all-link/page.js @@ -0,0 +1,21 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +
+ + To catch-all + +
+
+ + To optional catch-all + +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js b/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js new file mode 100644 index 0000000000..7a7a7b4d92 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all-optional/[[...slug]]/page.js @@ -0,0 +1,7 @@ +export default function Page({ params }) { + return ( +

+ hello from /catch-all-optional/{params.slug?.join('/')} +

+ ) +} diff --git a/test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js b/test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js new file mode 100644 index 0000000000..606d3f10a2 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all/[...slug]/components/widget.js @@ -0,0 +1,2 @@ +// components under catch-all should not throw errors +export default () =>

widget

diff --git a/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js b/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js new file mode 100644 index 0000000000..b49da2a9ee --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all/[...slug]/not-a-page.js @@ -0,0 +1,3 @@ +export default function NotAPage() { + return

Not a page

+} diff --git a/test/e2e/app-dir/app/app/catch-all/[...slug]/page.js b/test/e2e/app-dir/app/app/catch-all/[...slug]/page.js new file mode 100644 index 0000000000..55ba1e4559 --- /dev/null +++ b/test/e2e/app-dir/app/app/catch-all/[...slug]/page.js @@ -0,0 +1,14 @@ +import Widget from './components/widget' +import NotAPage from './not-a-page' + +export default function Page({ params }) { + return ( + <> +

+ hello from /catch-all/{params.slug.join('/')} +

+ + + + ) +} diff --git a/test/e2e/app-dir/app/app/client-component-route/page.js b/test/e2e/app-dir/app/app/client-component-route/page.js new file mode 100644 index 0000000000..95f2952533 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/page.js @@ -0,0 +1,20 @@ +'use client' + +import { useState, useEffect } from 'react' + +import style from './style.module.css' +import './style.css' + +export default function ClientComponentRoute() { + const [count, setCount] = useState(0) + useEffect(() => { + setCount(1) + }, [count]) + return ( + <> +

+ hello from app/client-component-route. count: {count} +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/client-component-route/style.css b/test/e2e/app-dir/app/app/client-component-route/style.css new file mode 100644 index 0000000000..073d4283ae --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/style.css @@ -0,0 +1,3 @@ +b { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/client-component-route/style.module.css b/test/e2e/app-dir/app/app/client-component-route/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/client-component-route/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/client-nested/layout.js b/test/e2e/app-dir/app/app/client-nested/layout.js new file mode 100644 index 0000000000..51cc84b7b6 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/layout.js @@ -0,0 +1,20 @@ +'use client' + +import { useState, useEffect } from 'react' + +import styles from './style.module.css' +import './style.css' + +export default function ClientNestedLayout({ children }) { + const [count, setCount] = useState(0) + useEffect(() => { + setCount(1) + }, []) + return ( + <> +

Client Nested. Count: {count}

+ + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/client-nested/page.js b/test/e2e/app-dir/app/app/client-nested/page.js new file mode 100644 index 0000000000..2b6a107426 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/page.js @@ -0,0 +1,7 @@ +export default function ClientPage() { + return ( + <> +

hello from app/client-nested

+ + ) +} diff --git a/test/e2e/app-dir/app/app/client-nested/style.css b/test/e2e/app-dir/app/app/client-nested/style.css new file mode 100644 index 0000000000..23b1956407 --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/style.css @@ -0,0 +1,3 @@ +button { + color: red; +} diff --git a/test/e2e/app-dir/app/app/client-nested/style.module.css b/test/e2e/app-dir/app/app/client-nested/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/client-nested/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-foo.css b/test/e2e/app-dir/app/app/css/css-client/client-foo.css new file mode 100644 index 0000000000..94ff8d4b48 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-foo.css @@ -0,0 +1,3 @@ +.foo { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-layout.css b/test/e2e/app-dir/app/app/css/css-client/client-layout.css new file mode 100644 index 0000000000..5bc2906308 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-layout.css @@ -0,0 +1,3 @@ +body { + background: cyan; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/client-page.css b/test/e2e/app-dir/app/app/css/css-client/client-page.css new file mode 100644 index 0000000000..f3e551c053 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/client-page.css @@ -0,0 +1,6 @@ +h1 { + color: red !important; +} +h1::after { + content: ' (from css-client!!!!)'; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/foo.js b/test/e2e/app-dir/app/app/css/css-client/foo.js new file mode 100644 index 0000000000..98d4f855cc --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/foo.js @@ -0,0 +1,5 @@ +import './client-foo.css' + +export default function Foo() { + return foo +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css b/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css new file mode 100644 index 0000000000..3d250634ed --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/ClientComponent.module.css @@ -0,0 +1,3 @@ +.yuge { + font-size: 100px; +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/foo.js b/test/e2e/app-dir/app/app/css/css-client/inner/foo.js new file mode 100644 index 0000000000..b607d6dde7 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/foo.js @@ -0,0 +1,11 @@ +'use client' + +import styles from './ClientComponent.module.css' + +export default function ClientComponent() { + return ( +
+ Client Component +
+ ) +} diff --git a/test/e2e/app-dir/app/app/css/css-client/inner/page.js b/test/e2e/app-dir/app/app/css/css-client/inner/page.js new file mode 100644 index 0000000000..5c14cc9307 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/inner/page.js @@ -0,0 +1,5 @@ +import Foo from './foo' + +export default function Page() { + return +} diff --git a/test/e2e/app-dir/app/app/css/css-client/layout.js b/test/e2e/app-dir/app/app/css/css-client/layout.js new file mode 100644 index 0000000000..f460e79edb --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/layout.js @@ -0,0 +1,14 @@ +'use client' + +import './client-layout.css' + +import Foo from './foo' + +export default function ServerLayout({ children }) { + return ( + <> + {children} + + + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-client/page.js b/test/e2e/app-dir/app/app/css/css-client/page.js new file mode 100644 index 0000000000..c62ea6373f --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-client/page.js @@ -0,0 +1,17 @@ +'use client' + +import 'next/link' + +import './client-page.css' +import styles from './inner/ClientComponent.module.css' + +export default function Page() { + return ( + <> +

Page!!!

+
+ huge +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/layout.js b/test/e2e/app-dir/app/app/css/css-nested/layout.js new file mode 100644 index 0000000000..348b447307 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/layout.js @@ -0,0 +1,14 @@ +'use client' + +import './style.css' +import styles from './style.module.css' + +export default function ClientLayout({ children }) { + return ( + <> +
Client Layout: CSS Modules
+
Client Layout: Global CSS
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/page.js b/test/e2e/app-dir/app/app/css/css-nested/page.js new file mode 100644 index 0000000000..47bf2fce4f --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/page.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/style.css b/test/e2e/app-dir/app/app/css/css-nested/style.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/style.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/css/css-nested/style.module.css b/test/e2e/app-dir/app/app/css/css-nested/style.module.css new file mode 100644 index 0000000000..3eeea95774 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-nested/style.module.css @@ -0,0 +1,3 @@ +.client-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/layout.js b/test/e2e/app-dir/app/app/css/css-page/layout.js new file mode 100644 index 0000000000..81c0ed0f47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/layout.js @@ -0,0 +1,5 @@ +import './style2.css' + +export default function ServerLayout({ children }) { + return <>{children} +} diff --git a/test/e2e/app-dir/app/app/css/css-page/page.js b/test/e2e/app-dir/app/app/css/css-page/page.js new file mode 100644 index 0000000000..10799b9671 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/page.js @@ -0,0 +1,14 @@ +import './style.css' + +import styles from './style.module.css' + +export default function Page() { + return ( + <> +

Page

+
+ CSSM +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style.css b/test/e2e/app-dir/app/app/css/css-page/style.css new file mode 100644 index 0000000000..adc68fa6a4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style.css @@ -0,0 +1,3 @@ +h1 { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style.module.css b/test/e2e/app-dir/app/app/css/css-page/style.module.css new file mode 100644 index 0000000000..3991f65d58 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style.module.css @@ -0,0 +1,3 @@ +.mod { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/style2.css b/test/e2e/app-dir/app/app/css/css-page/style2.css new file mode 100644 index 0000000000..cfddd0e039 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/style2.css @@ -0,0 +1,3 @@ +body { + background: #ccc; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js new file mode 100644 index 0000000000..6878a343aa --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/inner/page.js @@ -0,0 +1,3 @@ +export default function Inner() { + return

Inner Page

+} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js new file mode 100644 index 0000000000..38e9850585 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/layout.js @@ -0,0 +1,10 @@ +import { layout } from './styles' + +export default function ServerLayout({ children }) { + return ( + <> +

Layout

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css new file mode 100644 index 0000000000..c71dcc347d --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-first-page.module.css @@ -0,0 +1,3 @@ +.this_should_not_be_included_in_inner_path { + color: wheat; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css new file mode 100644 index 0000000000..43b5b99d39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/only-used-in-layout.module.css @@ -0,0 +1,3 @@ +.mod { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js new file mode 100644 index 0000000000..531ae6e120 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/page.js @@ -0,0 +1,5 @@ +import { page } from './styles' + +export default function Page() { + return

Page

+} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js b/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js new file mode 100644 index 0000000000..f649cef70e --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused-nested/styles.js @@ -0,0 +1,4 @@ +import layout from './only-used-in-layout.module.css' +import page from './only-used-in-first-page.module.css' + +export { layout, page } diff --git a/test/e2e/app-dir/app/app/css/css-page/unused/page.js b/test/e2e/app-dir/app/app/css/css-page/unused/page.js new file mode 100644 index 0000000000..b3fa35d7cf --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused/page.js @@ -0,0 +1,12 @@ +import { styles } from './styles' + +export default function Page() { + return ( + <> +

Page

+
+ CSSM +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/css-page/unused/styles.js b/test/e2e/app-dir/app/app/css/css-page/unused/styles.js new file mode 100644 index 0000000000..d191a9a4e1 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused/styles.js @@ -0,0 +1,4 @@ +import unused from './unused.module.css' +import styles from '../style.module.css' + +export { unused, styles } diff --git a/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css b/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css new file mode 100644 index 0000000000..67ed738ab1 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/css-page/unused/unused.module.css @@ -0,0 +1,3 @@ +.this_should_not_be_included { + color: red; +} diff --git a/test/e2e/app-dir/app/app/css/foo.js b/test/e2e/app-dir/app/app/css/foo.js new file mode 100644 index 0000000000..d31bab07a9 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/foo.js @@ -0,0 +1 @@ +import './style.module.css' diff --git a/test/e2e/app-dir/app/app/css/layout.js b/test/e2e/app-dir/app/app/css/layout.js new file mode 100644 index 0000000000..3b1bdd72bb --- /dev/null +++ b/test/e2e/app-dir/app/app/css/layout.js @@ -0,0 +1,15 @@ +import './style.css' +import './css-page/style.css' +import styles from './style.module.css' + +export default function ServerLayout({ children }) { + return ( + <> +
+ Server Layout: CSS Modules +
+
Server Layout: Global CSS
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/global.sass b/test/e2e/app-dir/app/app/css/sass-client/global.sass new file mode 100644 index 0000000000..febf593dd7 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/global.sass @@ -0,0 +1,3 @@ +#sass-client-layout + color: brown + diff --git a/test/e2e/app-dir/app/app/css/sass-client/global.scss b/test/e2e/app-dir/app/app/css/sass-client/global.scss new file mode 100644 index 0000000000..d9a5d9d523 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/global.scss @@ -0,0 +1,3 @@ +#scss-client-layout { + color: burlywood; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass b/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass new file mode 100644 index 0000000000..6cf30f33ff --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/global.sass @@ -0,0 +1,3 @@ +#sass-client-page + color: wheat + diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss b/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss new file mode 100644 index 0000000000..05c93b6448 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/global.scss @@ -0,0 +1,3 @@ +#scss-client-page { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/page.js b/test/e2e/app-dir/app/app/css/sass-client/inner/page.js new file mode 100644 index 0000000000..ad208ca881 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/page.js @@ -0,0 +1,19 @@ +'use client' + +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Page() { + return ( + <> +
+ sass client page +
+
+ scss client page +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass new file mode 100644 index 0000000000..e1f5b5d0e4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: indigo diff --git a/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss new file mode 100644 index 0000000000..e84d60fe47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/inner/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: aqua; +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/layout.js b/test/e2e/app-dir/app/app/css/sass-client/layout.js new file mode 100644 index 0000000000..fa6713af90 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/layout.js @@ -0,0 +1,20 @@ +'use client' + +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Layout({ children }) { + return ( + <> +
+ sass client layout +
+
+ scss client layout +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass b/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass new file mode 100644 index 0000000000..725bb78d16 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: darksalmon diff --git a/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss b/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss new file mode 100644 index 0000000000..185167dd39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass-client/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: darkred; +} diff --git a/test/e2e/app-dir/app/app/css/sass/global.sass b/test/e2e/app-dir/app/app/css/sass/global.sass new file mode 100644 index 0000000000..f692b6266a --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/global.sass @@ -0,0 +1,3 @@ +#sass-server-layout + color: brown + diff --git a/test/e2e/app-dir/app/app/css/sass/global.scss b/test/e2e/app-dir/app/app/css/sass/global.scss new file mode 100644 index 0000000000..1f8677ff44 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/global.scss @@ -0,0 +1,3 @@ +#scss-server-layout { + color: burlywood; +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/global.sass b/test/e2e/app-dir/app/app/css/sass/inner/global.sass new file mode 100644 index 0000000000..509da5744d --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/global.sass @@ -0,0 +1,3 @@ +#sass-server-page + color: wheat + diff --git a/test/e2e/app-dir/app/app/css/sass/inner/global.scss b/test/e2e/app-dir/app/app/css/sass/inner/global.scss new file mode 100644 index 0000000000..8cce88945a --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/global.scss @@ -0,0 +1,3 @@ +#scss-server-page { + color: tomato; +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/page.js b/test/e2e/app-dir/app/app/css/sass/inner/page.js new file mode 100644 index 0000000000..fdb01e5056 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/page.js @@ -0,0 +1,17 @@ +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Page() { + return ( + <> +
+ sass server page +
+
+ scss server page +
+ + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass new file mode 100644 index 0000000000..e1f5b5d0e4 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: indigo diff --git a/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss new file mode 100644 index 0000000000..e84d60fe47 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/inner/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: aqua; +} diff --git a/test/e2e/app-dir/app/app/css/sass/layout.js b/test/e2e/app-dir/app/app/css/sass/layout.js new file mode 100644 index 0000000000..a0b928bdf9 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/layout.js @@ -0,0 +1,18 @@ +import './global.scss' +import './global.sass' +import sass from './styles.module.sass' +import scss from './styles.module.scss' + +export default function Layout({ children }) { + return ( + <> +
+ sass server layout +
+
+ scss server layout +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/css/sass/styles.module.sass b/test/e2e/app-dir/app/app/css/sass/styles.module.sass new file mode 100644 index 0000000000..725bb78d16 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/styles.module.sass @@ -0,0 +1,2 @@ +.mod + background-color: darksalmon diff --git a/test/e2e/app-dir/app/app/css/sass/styles.module.scss b/test/e2e/app-dir/app/app/css/sass/styles.module.scss new file mode 100644 index 0000000000..185167dd39 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/sass/styles.module.scss @@ -0,0 +1,3 @@ +.mod { + background-color: darkred; +} diff --git a/test/e2e/app-dir/app/app/css/style.css b/test/e2e/app-dir/app/app/css/style.css new file mode 100644 index 0000000000..26994cddda --- /dev/null +++ b/test/e2e/app-dir/app/app/css/style.css @@ -0,0 +1,3 @@ +.server-css { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/css/style.module.css b/test/e2e/app-dir/app/app/css/style.module.css new file mode 100644 index 0000000000..efd81fda05 --- /dev/null +++ b/test/e2e/app-dir/app/app/css/style.module.css @@ -0,0 +1,3 @@ +.server-css { + color: green; +} diff --git a/test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js b/test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js new file mode 100644 index 0000000000..b4cdd2011b --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/(custom)/deployments/breakdown/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsBreakdownPage(props) { + return ( + <> +

hello from app/dashboard/(custom)/deployments/breakdown

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js b/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js new file mode 100644 index 0000000000..e861cd39c8 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/(custom)/layout.js @@ -0,0 +1,8 @@ +export default function CustomDashboardRootLayout({ children }) { + return ( + <> +

Custom dashboard

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx b/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx new file mode 100644 index 0000000000..30ff456074 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/client-comp-client.jsx @@ -0,0 +1,18 @@ +'use client' + +import styles from './client-comp.module.css' + +import { useEffect, useState } from 'react' + +export default function ClientComp() { + const [state, setState] = useState({}) + useEffect(() => { + setState({ test: 'HELLOOOO' }) + }, []) + return ( + <> +

Hello

+ {state.test} + + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/client-comp.module.css b/test/e2e/app-dir/app/app/dashboard/client-comp.module.css new file mode 100644 index 0000000000..c0ddc6d764 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/client-comp.module.css @@ -0,0 +1,3 @@ +.client { + color: #2e5aea; +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json new file mode 100644 index 0000000000..f2a886f39d --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/data.json @@ -0,0 +1,3 @@ +{ + "hello": "world" +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js new file mode 100644 index 0000000000..363008ebc1 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/[id]/page.js @@ -0,0 +1,26 @@ +import { use } from 'react' +import fs from 'fs' +import path from 'path' + +async function getData({ params }) { + const data = JSON.parse( + fs.readFileSync( + path.join(process.cwd(), 'app/dashboard/deployments/[id]/data.json') + ) + ) + console.log('data.json', data) + + return { + id: params.id, + } +} + +export default function DeploymentsPage(props) { + const data = use(getData(props)) + + return ( + <> +

hello from app/dashboard/deployments/[id]. ID is: {data.id}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js new file mode 100644 index 0000000000..df11944f5a --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/info/[id]/page.js @@ -0,0 +1,9 @@ +export default function Page({ params }) { + return ( + <> +

+ hello from app/dashboard/deployments/info/[id]. ID is: {params.id} +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/info/page.js b/test/e2e/app-dir/app/app/dashboard/deployments/info/page.js new file mode 100644 index 0000000000..b435a2cba7 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/info/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsInfoPage(props) { + return ( + <> +

hello from app/dashboard/deployments/info

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/deployments/layout.js b/test/e2e/app-dir/app/app/dashboard/deployments/layout.js new file mode 100644 index 0000000000..ebcc23c1d3 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/deployments/layout.js @@ -0,0 +1,18 @@ +import { use } from 'react' + +async function getData() { + return { + message: 'hello', + } +} + +export default function DeploymentsLayout({ children }) { + const { message } = use(getData()) + + return ( + <> +

Deployments {message}

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/global.css b/test/e2e/app-dir/app/app/dashboard/global.css new file mode 100644 index 0000000000..a83c888e23 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/global.css @@ -0,0 +1,3 @@ +.dangerous-text { + color: red; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js new file mode 100644 index 0000000000..bfa17f6a14 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-client.js @@ -0,0 +1,9 @@ +'use client' + +import dynamic from 'next/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-client')) + +export function NextDynamicClientComponent() { + return +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js new file mode 100644 index 0000000000..267a1febc5 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/dynamic-server.js @@ -0,0 +1,9 @@ +import dynamic from 'next/dynamic' + +const Dynamic = dynamic(() => import('../text-dynamic-server'), { + ssr: false, +}) + +export function NextDynamicServerComponent() { + return +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js new file mode 100644 index 0000000000..e8010fd28c --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic-imports/react-lazy-client.js @@ -0,0 +1,15 @@ +'use client' + +import { useState, lazy } from 'react' + +const Lazy = lazy(() => import('../text-lazy-client.js')) + +export function LazyClientComponent() { + let [state] = useState('use client') + return ( + <> + +

hello from {state}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css b/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css new file mode 100644 index 0000000000..97af642339 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/dynamic.module.css @@ -0,0 +1,3 @@ +.dynamic { + color: blue; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css b/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css new file mode 100644 index 0000000000..4369b2c770 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/lazy.module.css @@ -0,0 +1,3 @@ +.lazy { + color: purple; +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/page.js b/test/e2e/app-dir/app/app/dashboard/index/page.js new file mode 100644 index 0000000000..c946b76e18 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/page.js @@ -0,0 +1,14 @@ +import { LazyClientComponent } from './dynamic-imports/react-lazy-client' +import { NextDynamicServerComponent } from './dynamic-imports/dynamic-server' +import { NextDynamicClientComponent } from './dynamic-imports/dynamic-client' + +export default function DashboardIndexPage() { + return ( + <> +

hello from app/dashboard/index

+ + + + + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js new file mode 100644 index 0000000000..55479cd44b --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-client.js @@ -0,0 +1,13 @@ +'use client' + +import { useState } from 'react' +import styles from './dynamic.module.css' + +export default function Dynamic() { + let [state] = useState('dynamic on client') + return ( +

+ {`hello from ${state}`} +

+ ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js new file mode 100644 index 0000000000..9f87f73b47 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/text-dynamic-server.js @@ -0,0 +1,9 @@ +import styles from './dynamic.module.css' + +export default function Dynamic() { + return ( +

+ hello from dynamic on server +

+ ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js b/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js new file mode 100644 index 0000000000..53a7186881 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/index/text-lazy-client.js @@ -0,0 +1,13 @@ +'use client' + +import styles from './lazy.module.css' + +export default function LazyComponent() { + return ( + <> +

+ hello from lazy +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/integrations/page.js b/test/e2e/app-dir/app/app/dashboard/integrations/page.js new file mode 100644 index 0000000000..683d131ef9 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/integrations/page.js @@ -0,0 +1,7 @@ +export default function IntegrationsPage(props) { + return ( + <> +

hello from app/dashboard/integrations

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/layout.js b/test/e2e/app-dir/app/app/dashboard/layout.js new file mode 100644 index 0000000000..ff3ee29947 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/layout.js @@ -0,0 +1,11 @@ +import './style.css' +import './global.css' + +export default function DashboardLayout(props) { + return ( +
+

Dashboard

+ {props.children} +
+ ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/page.js b/test/e2e/app-dir/app/app/dashboard/page.js new file mode 100644 index 0000000000..5a3e15c25c --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/page.js @@ -0,0 +1,16 @@ +import ClientComp from './client-comp-client' + +export default function DashboardPage(props) { + return ( + <> +

+ hello from app/dashboard +

+

BOLD

+

this is green

+ + + ) +} + +export const runtime = 'experimental-edge' diff --git a/test/e2e/app-dir/app/app/dashboard/page/page.jsx b/test/e2e/app-dir/app/app/dashboard/page/page.jsx new file mode 100644 index 0000000000..d328445b83 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/page/page.jsx @@ -0,0 +1,7 @@ +export default function DashboardPagePage() { + return ( + <> +

hello dashboard/page!

+ + ) +} diff --git a/test/e2e/app-dir/app/app/dashboard/style.css b/test/e2e/app-dir/app/app/dashboard/style.css new file mode 100644 index 0000000000..fa95e11ba9 --- /dev/null +++ b/test/e2e/app-dir/app/app/dashboard/style.css @@ -0,0 +1,3 @@ +.green { + color: green; +} diff --git a/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js b/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js new file mode 100644 index 0000000000..2b52933140 --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic-pages-route-app-overlap/app-dir/page.js @@ -0,0 +1,7 @@ +export default function Page() { + return ( +

+ hello from app/dynamic-pages-route-app-overlap/app-dir/page +

+ ) +} diff --git a/test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js new file mode 100644 index 0000000000..0d09ad0787 --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/layout.js @@ -0,0 +1,11 @@ +export default function IdLayout({ children, params }) { + return ( + <> +

+ Id Layout. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js new file mode 100644 index 0000000000..02df487f6d --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic/[category]/[id]/page.js @@ -0,0 +1,11 @@ +export default function IdPage({ children, params }) { + return ( + <> +

+ Id Page. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dynamic/[category]/layout.js b/test/e2e/app-dir/app/app/dynamic/[category]/layout.js new file mode 100644 index 0000000000..2744b8a839 --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic/[category]/layout.js @@ -0,0 +1,11 @@ +export default function CategoryLayout({ children, params }) { + return ( + <> +

+ Category Layout. Params:{' '} + {JSON.stringify(params)}{' '} +

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/dynamic/layout.js b/test/e2e/app-dir/app/app/dynamic/layout.js new file mode 100644 index 0000000000..549e0e30e6 --- /dev/null +++ b/test/e2e/app-dir/app/app/dynamic/layout.js @@ -0,0 +1,11 @@ +export default function DynamicLayout({ children, params }) { + return ( + <> +

+ Dynamic Layout. Params:{' '} + {JSON.stringify(params)} +

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/edge-apis/cookies/page.js b/test/e2e/app-dir/app/app/edge-apis/cookies/page.js new file mode 100644 index 0000000000..15fa568241 --- /dev/null +++ b/test/e2e/app-dir/app/app/edge-apis/cookies/page.js @@ -0,0 +1,8 @@ +import { cookies } from 'next/headers' + +export const runtime = 'experimental-edge' + +export default function Page() { + cookies() + return

Hello!

+} diff --git a/test/e2e/app-dir/app/app/error/client-component/error.js b/test/e2e/app-dir/app/app/error/client-component/error.js new file mode 100644 index 0000000000..305cea13a0 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/error.js @@ -0,0 +1,14 @@ +'use client' + +import styles from './style.module.css' + +export default function ErrorBoundary({ error, reset }) { + return ( + <> +

An error occurred: {error.message}

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/error/client-component/page.js b/test/e2e/app-dir/app/app/error/client-component/page.js new file mode 100644 index 0000000000..a7801e4f11 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/page.js @@ -0,0 +1,20 @@ +'use client' + +import { useState } from 'react' + +export default function Page() { + const [clicked, setClicked] = useState(false) + if (clicked) { + throw new Error('this is a test') + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/error/client-component/style.module.css b/test/e2e/app-dir/app/app/error/client-component/style.module.css new file mode 100644 index 0000000000..4a83fef4cc --- /dev/null +++ b/test/e2e/app-dir/app/app/error/client-component/style.module.css @@ -0,0 +1,3 @@ +.button { + font-size: 50px; +} diff --git a/test/e2e/app-dir/app/app/error/global-error-boundary/page.js b/test/e2e/app-dir/app/app/error/global-error-boundary/page.js new file mode 100644 index 0000000000..a7801e4f11 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/global-error-boundary/page.js @@ -0,0 +1,20 @@ +'use client' + +import { useState } from 'react' + +export default function Page() { + const [clicked, setClicked] = useState(false) + if (clicked) { + throw new Error('this is a test') + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js b/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js new file mode 100644 index 0000000000..3c1af09b5b --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/custom-digest/page.js @@ -0,0 +1,7 @@ +export const revalidate = 0 + +export default function Page() { + const err = new Error('this is a test') + err.digest = 'custom' + throw err +} diff --git a/test/e2e/app-dir/app/app/error/server-component/error.js b/test/e2e/app-dir/app/app/error/server-component/error.js new file mode 100644 index 0000000000..e1089170d0 --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/error.js @@ -0,0 +1,13 @@ +'use client' + +export default function ErrorBoundary({ error, reset }) { + return ( + <> +

{error.message}

+

{error.digest}

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/error/server-component/page.js b/test/e2e/app-dir/app/app/error/server-component/page.js new file mode 100644 index 0000000000..35108577dc --- /dev/null +++ b/test/e2e/app-dir/app/app/error/server-component/page.js @@ -0,0 +1,5 @@ +export const revalidate = 0 + +export default function Page() { + throw new Error('this is a test') +} diff --git a/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js b/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js new file mode 100644 index 0000000000..92a343352a --- /dev/null +++ b/test/e2e/app-dir/app/app/error/ssr-error-client-component/client-component.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + throw new Error('Error during SSR') +} diff --git a/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js b/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js new file mode 100644 index 0000000000..5b6bb43c2c --- /dev/null +++ b/test/e2e/app-dir/app/app/error/ssr-error-client-component/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/extension/page.server.js b/test/e2e/app-dir/app/app/extension/page.server.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/test/e2e/app-dir/app/app/extension/page.server.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/test/e2e/app-dir/app/app/hooks/use-cookies/page.js b/test/e2e/app-dir/app/app/hooks/use-cookies/page.js new file mode 100644 index 0000000000..f8095a3682 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-cookies/page.js @@ -0,0 +1,17 @@ +import { cookies } from 'next/headers' + +export default function Page() { + const cookiesList = cookies() + const hasCookie = cookiesList.has('use-cookies') + + return ( + <> +

hello from /hooks/use-cookies

+ {hasCookie ? ( + + ) : ( + + )} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-headers/page.js b/test/e2e/app-dir/app/app/hooks/use-headers/page.js new file mode 100644 index 0000000000..c55642f17f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-headers/page.js @@ -0,0 +1,19 @@ +import { headers } from 'next/headers' + +export default function Page() { + const headersList = headers() + const hasHeader = headersList.get('x-use-headers') === 'value' + const referer = headersList.get('referer') + + return ( + <> +

hello from /hooks/use-headers

+ {hasHeader ? ( +

Has x-use-headers header

+ ) : ( +

Does not have x-use-headers header

+ )} + {referer &&

Has referer header

} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-layout-segments/server/page.js b/test/e2e/app-dir/app/app/hooks/use-layout-segments/server/page.js new file mode 100644 index 0000000000..0b21a87348 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-layout-segments/server/page.js @@ -0,0 +1,10 @@ +'use client' +// TODO-APP: enable once test is not skipped. +// import { useLayoutSegments } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useLayoutSegments() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-params/server/page.js b/test/e2e/app-dir/app/app/hooks/use-params/server/page.js new file mode 100644 index 0000000000..53d2be8f6b --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-params/server/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable when implemented. +// import { useParams } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useParams() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-pathname/page.js b/test/e2e/app-dir/app/app/hooks/use-pathname/page.js new file mode 100644 index 0000000000..df89081381 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-pathname/page.js @@ -0,0 +1,15 @@ +'use client' + +import { usePathname } from 'next/navigation' + +export default function Page() { + const pathname = usePathname() + + return ( + <> +

+ hello from {pathname} +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js b/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js new file mode 100644 index 0000000000..ef644a55fd --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-pathname/server/page.js @@ -0,0 +1,8 @@ +// import { usePathname } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // usePathname() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js b/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js new file mode 100644 index 0000000000..bff5cf0c25 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-preview-data/page.js @@ -0,0 +1,18 @@ +import { previewData } from 'next/headers' + +export default function Page() { + const data = previewData() + + const hasData = !!data && data.key === 'value' + + return ( + <> +

hello from /hooks/use-preview-data

+ {hasData ? ( +

Has preview data

+ ) : ( +

Does not have preview data

+ )} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-router/page.js b/test/e2e/app-dir/app/app/hooks/use-router/page.js new file mode 100644 index 0000000000..cd9dd1a5a2 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/page.js @@ -0,0 +1,19 @@ +'use client' + +import { useRouter } from 'next/navigation' + +export default function Page() { + const router = useRouter() + + return ( + <> +

hello from /hooks/use-router

+ + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-router/server/page.js b/test/e2e/app-dir/app/app/hooks/use-router/server/page.js new file mode 100644 index 0000000000..7a426aed28 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/server/page.js @@ -0,0 +1,8 @@ +// import { useRouter } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useRouter() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js b/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js new file mode 100644 index 0000000000..5d4d6fb4b4 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-router/sub-page/page.js @@ -0,0 +1,5 @@ +'use client' + +export default function Page() { + return

hello from /hooks/use-router/sub-page

+} diff --git a/test/e2e/app-dir/app/app/hooks/use-search-params/page.js b/test/e2e/app-dir/app/app/hooks/use-search-params/page.js new file mode 100644 index 0000000000..d84e0f522c --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-search-params/page.js @@ -0,0 +1,16 @@ +'use client' + +import { useSearchParams } from 'next/navigation' + +export default function Page() { + const params = useSearchParams() + + return ( + <> +

{params.get('first') ?? 'N/A'}

+

{params.get('second') ?? 'N/A'}

+

{params.get('third') ?? 'N/A'}

+

{params.get('notReal') ?? 'N/A'}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js b/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js new file mode 100644 index 0000000000..b84536b7ec --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-search-params/server/page.js @@ -0,0 +1,8 @@ +// import { useSearchParams } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useSearchParams() + + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js new file mode 100644 index 0000000000..5cda7e23ca --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/[...catchall]/page.js @@ -0,0 +1,18 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Page() { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/(group)/second/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/[dynamic]/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js new file mode 100644 index 0000000000..e79045c5ed --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/layout.js @@ -0,0 +1,19 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Layout({ children }) { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js new file mode 100644 index 0000000000..c17431379f --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/first/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return null +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js new file mode 100644 index 0000000000..3eeae83e65 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/layout.js @@ -0,0 +1,19 @@ +'use client' + +import { + useSelectedLayoutSegments, + useSelectedLayoutSegment, +} from 'next/navigation' + +export default function Layout({ children }) { + const selectedLayoutSegments = useSelectedLayoutSegments() + const selectedLayoutSegment = useSelectedLayoutSegment() + + return ( + <> +

{JSON.stringify(selectedLayoutSegments)}

+

{JSON.stringify(selectedLayoutSegment)}

+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js new file mode 100644 index 0000000000..c38d4f5ab1 --- /dev/null +++ b/test/e2e/app-dir/app/app/hooks/use-selected-layout-segment/server/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable once test is not skipped. +// import { useSelectedLayoutSegment } from 'next/navigation' + +export default function Page() { + // This should throw an error. + // useSelectedLayoutSegment() + + return null +} diff --git a/test/e2e/app-dir/app/app/internal/failure/page.js b/test/e2e/app-dir/app/app/internal/failure/page.js new file mode 100644 index 0000000000..9bd06ec2a3 --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/failure/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Failure
+} diff --git a/test/e2e/app-dir/app/app/internal/page.js b/test/e2e/app-dir/app/app/internal/page.js new file mode 100644 index 0000000000..134daec5bb --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/page.js @@ -0,0 +1,23 @@ +import Link from 'next/link' +import Head from 'next/head' + +export default function Page() { + return ( +
+
+ {/* NOTE: next/head will not work in RSC for now but not break either */} + + internal-title + + + Navigate Rewrite + +
+
+ + Navigate Redirect + +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/internal/success/page.js b/test/e2e/app-dir/app/app/internal/success/page.js new file mode 100644 index 0000000000..90c6aecd4e --- /dev/null +++ b/test/e2e/app-dir/app/app/internal/success/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Success
+} diff --git a/test/e2e/app-dir/app/app/layout.js b/test/e2e/app-dir/app/app/layout.js new file mode 100644 index 0000000000..65adafbd7e --- /dev/null +++ b/test/e2e/app-dir/app/app/layout.js @@ -0,0 +1,25 @@ +import { use } from 'react' + +import '../styles/global.css' +import './style.css' + +export const revalidate = 0 + +async function getData() { + return { + world: 'world', + } +} + +export default function Root({ children }) { + const { world } = use(getData()) + + return ( + + + {`hello ${world}`} + + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js new file mode 100644 index 0000000000..0ce09bfa6a --- /dev/null +++ b/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js @@ -0,0 +1,14 @@ +import Link from 'next/link' +import { nanoid } from 'nanoid' + +export default function Page({ params }) { + const other = params.id === '123' ? '456' : '123' + return ( + <> +

{nanoid()}

{' '} + + To{other} + + + ) +} diff --git a/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js new file mode 100644 index 0000000000..6f69c10520 --- /dev/null +++ b/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js @@ -0,0 +1,14 @@ +import Link from 'next/link' +import { nanoid } from 'nanoid' + +export default function Page({ params }) { + const other = params.id === '123' ? '456' : '123' + return ( + <> +

{nanoid()}

{' '} + + To{other} + + + ) +} diff --git a/test/e2e/app-dir/app/app/link-hard-replace/page.js b/test/e2e/app-dir/app/app/link-hard-replace/page.js new file mode 100644 index 0000000000..0f099a798f --- /dev/null +++ b/test/e2e/app-dir/app/app/link-hard-replace/page.js @@ -0,0 +1,16 @@ +import { nanoid } from 'nanoid' +import Link from 'next/link' + +export default function Page() { + return ( + <> +

{nanoid()}

+ + Self Link + + + Subpage + + + ) +} diff --git a/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js new file mode 100644 index 0000000000..ecb43519aa --- /dev/null +++ b/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + Self Link + + ) +} diff --git a/test/e2e/app-dir/app/app/link-soft-push/page.js b/test/e2e/app-dir/app/app/link-soft-push/page.js new file mode 100644 index 0000000000..a83690e8b5 --- /dev/null +++ b/test/e2e/app-dir/app/app/link-soft-push/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + With ID + + ) +} diff --git a/test/e2e/app-dir/app/app/link-soft-replace/page.js b/test/e2e/app-dir/app/app/link-soft-replace/page.js new file mode 100644 index 0000000000..26a535bb1a --- /dev/null +++ b/test/e2e/app-dir/app/app/link-soft-replace/page.js @@ -0,0 +1,16 @@ +import { nanoid } from 'nanoid' +import Link from 'next/link' + +export default function Page() { + return ( + <> +

{nanoid()}

+ + Self Link + + + Subpage + + + ) +} diff --git a/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js new file mode 100644 index 0000000000..b1fe8890da --- /dev/null +++ b/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + Self Link + + ) +} diff --git a/test/e2e/app-dir/app/app/link-with-as/page.js b/test/e2e/app-dir/app/app/link-with-as/page.js new file mode 100644 index 0000000000..8e3eff7d0c --- /dev/null +++ b/test/e2e/app-dir/app/app/link-with-as/page.js @@ -0,0 +1,15 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To info 123 + + + ) +} diff --git a/test/e2e/app-dir/app/app/linking/about/page.js b/test/e2e/app-dir/app/app/linking/about/page.js new file mode 100644 index 0000000000..dfc1aee084 --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/about/page.js @@ -0,0 +1,3 @@ +export default function AboutPage() { + return

About page

+} diff --git a/test/e2e/app-dir/app/app/linking/layout.js b/test/e2e/app-dir/app/app/linking/layout.js new file mode 100644 index 0000000000..f836cd6b0c --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/layout.js @@ -0,0 +1,15 @@ +import Link from 'next/link' + +export default function Layout({ children }) { + return ( + <> +
+ +
+ {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/linking/page.js b/test/e2e/app-dir/app/app/linking/page.js new file mode 100644 index 0000000000..ee48946c44 --- /dev/null +++ b/test/e2e/app-dir/app/app/linking/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Home page

+} diff --git a/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js new file mode 100644 index 0000000000..1ddb4d6b40 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/loading.js @@ -0,0 +1,5 @@ +import './style.css' + +export default function Loading() { + return

Loading...

+} diff --git a/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js new file mode 100644 index 0000000000..ade6718153 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/page.js @@ -0,0 +1,15 @@ +// @ts-ignore +import { use } from 'react' + +const fetchCategory = async (categorySlug) => { + // artificial delay + await new Promise((resolve) => setTimeout(resolve, 3000)) + + return categorySlug + 'abc' +} + +export default function Page({ params }) { + const category = use(fetchCategory(params.categorySlug)) + + return
{category}
+} diff --git a/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css new file mode 100644 index 0000000000..60f1eab971 --- /dev/null +++ b/test/e2e/app-dir/app/app/loading-bug/[categorySlug]/style.css @@ -0,0 +1,3 @@ +body { + color: red; +} diff --git a/test/e2e/app-dir/app/app/navigation/link.js b/test/e2e/app-dir/app/app/navigation/link.js new file mode 100644 index 0000000000..a0ffc24e69 --- /dev/null +++ b/test/e2e/app-dir/app/app/navigation/link.js @@ -0,0 +1,27 @@ +'use client' + +import { useRouter } from 'next/navigation' +import React from 'react' +import { useEffect } from 'react' + +export default function HardLink({ href, children, ...props }) { + const router = useRouter() + useEffect(() => { + router.prefetch(href) + }, [router, href]) + return ( + { + e.preventDefault() + React.startTransition(() => { + router.push(href) + router.refresh() + }) + }} + > + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/navigation/page.js b/test/e2e/app-dir/app/app/navigation/page.js new file mode 100644 index 0000000000..3cd67c44d3 --- /dev/null +++ b/test/e2e/app-dir/app/app/navigation/page.js @@ -0,0 +1,17 @@ +import { nanoid } from 'nanoid' +import Link from './link.js' + +export default function Page() { + return ( + <> +

{nanoid()}

+

hello from /navigation

+ + Cookies + + + Headers + + + ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js b/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js new file mode 100644 index 0000000000..506b8204f6 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/CategoryNav.js @@ -0,0 +1,28 @@ +'use client' + +import { TabNavItem } from './TabNavItem' +import { useSelectedLayoutSegments } from 'next/navigation' + +const CategoryNav = ({ categories }) => { + const selectedLayoutSegment = useSelectedLayoutSegments() + + return ( +
+ + Home + + + {categories.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default CategoryNav diff --git a/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js new file mode 100644 index 0000000000..3e74c679f9 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export const TabNavItem = ({ children, href }) => { + return ( + + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js new file mode 100644 index 0000000000..83b738afdd --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/SubCategoryNav.js @@ -0,0 +1,31 @@ +'use client' + +import { TabNavItem } from '../TabNavItem' +import { useSelectedLayoutSegments } from 'next/navigation' + +const SubCategoryNav = ({ category }) => { + const selectedLayoutSegment = useSelectedLayoutSegments() + + return ( +
+ + All + + + {category.items.map((item) => ( + + {item.name} + + ))} +
+ ) +} + +export default SubCategoryNav diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js new file mode 100644 index 0000000000..87b6421410 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/[subCategorySlug]/page.js @@ -0,0 +1,11 @@ +import { use } from 'react' +import { fetchSubCategory } from '../../getCategories' + +export default function Page({ params }) { + const category = use( + fetchSubCategory(params.categorySlug, params.subCategorySlug) + ) + if (!category) return null + + return

{category.name}

+} diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js new file mode 100644 index 0000000000..7e4117a4c6 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/layout.js @@ -0,0 +1,14 @@ +import { use } from 'react' +import { fetchCategoryBySlug } from '../getCategories' +import SubCategoryNav from './SubCategoryNav' + +export default function Layout({ children, params }) { + const category = use(fetchCategoryBySlug(params.categorySlug)) + if (!category) return null + return ( + <> + + {children} + + ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js new file mode 100644 index 0000000000..2b8e7512dc --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/[categorySlug]/page.js @@ -0,0 +1,9 @@ +import { use } from 'react' +import { fetchCategoryBySlug } from '../getCategories' + +export default function Page({ params }) { + const category = use(fetchCategoryBySlug(params.categorySlug)) + if (!category) return null + + return

All {category.name}

+} diff --git a/test/e2e/app-dir/app/app/nested-navigation/getCategories.js b/test/e2e/app-dir/app/app/nested-navigation/getCategories.js new file mode 100644 index 0000000000..c5da031c72 --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/getCategories.js @@ -0,0 +1,50 @@ +export const getCategories = () => [ + { + name: 'Electronics', + slug: 'electronics', + count: 11, + items: [ + { name: 'Phones', slug: 'phones', count: 4 }, + { name: 'Tablets', slug: 'tablets', count: 5 }, + { name: 'Laptops', slug: 'laptops', count: 2 }, + ], + }, + { + name: 'Clothing', + slug: 'clothing', + count: 12, + items: [ + { name: 'Tops', slug: 'tops', count: 3 }, + { name: 'Shorts', slug: 'shorts', count: 4 }, + { name: 'Shoes', slug: 'shoes', count: 5 }, + ], + }, + { + name: 'Books', + slug: 'books', + count: 10, + items: [ + { name: 'Fiction', slug: 'fiction', count: 5 }, + { name: 'Biography', slug: 'biography', count: 2 }, + { name: 'Education', slug: 'education', count: 3 }, + ], + }, +] + +export async function fetchCategoryBySlug(slug) { + // Assuming it always return expected categories + return getCategories().find((category) => category.slug === slug) +} + +export async function fetchCategories() { + return getCategories() +} + +async function findSubCategory(category, subCategorySlug) { + return category?.items.find((category) => category.slug === subCategorySlug) +} + +export async function fetchSubCategory(categorySlug, subCategorySlug) { + const category = await fetchCategoryBySlug(categorySlug) + return findSubCategory(category, subCategorySlug) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/layout.js b/test/e2e/app-dir/app/app/nested-navigation/layout.js new file mode 100644 index 0000000000..0eac112eea --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/layout.js @@ -0,0 +1,17 @@ +import { use } from 'react' +import { fetchCategories } from './getCategories' +import React from 'react' +import CategoryNav from './CategoryNav' + +export default function Layout({ children }) { + const categories = use(fetchCategories()) + return ( +
+
+ +
+ +
{children}
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/nested-navigation/page.js b/test/e2e/app-dir/app/app/nested-navigation/page.js new file mode 100644 index 0000000000..9833f2b17c --- /dev/null +++ b/test/e2e/app-dir/app/app/nested-navigation/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Home

+} diff --git a/test/e2e/app-dir/app/app/not-found/client-side/page.js b/test/e2e/app-dir/app/app/not-found/client-side/page.js new file mode 100644 index 0000000000..17f0fe828d --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/client-side/page.js @@ -0,0 +1,17 @@ +'use client' + +import { notFound } from 'next/navigation' +import React from 'react' + +export default function Page() { + const [notFoundEnabled, enableNotFound] = React.useState(false) + + if (notFoundEnabled) { + notFound() + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js b/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js new file mode 100644 index 0000000000..f75ceca70c --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'use client' +import { notFound } from 'next/navigation' + +export default function ClientComp() { + notFound() + return <> +} diff --git a/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js b/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js new file mode 100644 index 0000000000..0664907792 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/clientcomponent/page.js @@ -0,0 +1,9 @@ +// TODO-APP: enable when flight error serialization is implemented +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/not-found/not-found.js b/test/e2e/app-dir/app/app/not-found/not-found.js new file mode 100644 index 0000000000..eab732a108 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/not-found.js @@ -0,0 +1,9 @@ +import styles from './style.module.css' + +export default function NotFound() { + return ( +

+ Not Found! +

+ ) +} diff --git a/test/e2e/app-dir/app/app/not-found/servercomponent/page.js b/test/e2e/app-dir/app/app/not-found/servercomponent/page.js new file mode 100644 index 0000000000..180403e6e0 --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/servercomponent/page.js @@ -0,0 +1,7 @@ +// TODO-APP: enable when flight error serialization is implemented +import { notFound } from 'next/navigation' + +export default function Page() { + notFound() + return <> +} diff --git a/test/e2e/app-dir/app/app/not-found/style.module.css b/test/e2e/app-dir/app/app/not-found/style.module.css new file mode 100644 index 0000000000..c6dd2c88fa --- /dev/null +++ b/test/e2e/app-dir/app/app/not-found/style.module.css @@ -0,0 +1,3 @@ +.red { + color: red; +} diff --git a/test/e2e/app-dir/app/app/pages-linking/page.js b/test/e2e/app-dir/app/app/pages-linking/page.js new file mode 100644 index 0000000000..d32b739de9 --- /dev/null +++ b/test/e2e/app-dir/app/app/pages-linking/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page(props) { + return ( + + To Pages Page + + ) +} diff --git a/test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js b/test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js new file mode 100644 index 0000000000..05c172f81b --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/(new)/@baz/nested-2/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/(new)/@baz/nested/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/(new)/layout.js b/test/e2e/app-dir/app/app/parallel/(new)/layout.js new file mode 100644 index 0000000000..491d122a96 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/(new)/layout.js @@ -0,0 +1,10 @@ +export default function Layout({ baz }) { + return ( +
+ parallel/(new)/layout: +
+ {baz} +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js new file mode 100644 index 0000000000..d1c6fc71e1 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@a/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js new file mode 100644 index 0000000000..15ef0b7a39 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@bar/nested/@b/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js b/test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js new file mode 100644 index 0000000000..4ba7b39938 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/nested/layout.js @@ -0,0 +1,16 @@ +export default function Parallel({ a, b, children }) { + return ( +
+ parallel/@bar/nested/layout +
+ {a} +
+
+ {b} +
+
+ {children} +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/parallel/@bar/page.js b/test/e2e/app-dir/app/app/parallel/@bar/page.js new file mode 100644 index 0000000000..568f5ed064 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@bar/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Bar
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js new file mode 100644 index 0000000000..31c604844a --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/nested/@a/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@a/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js new file mode 100644 index 0000000000..79481da1a0 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/nested/@b/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/@foo/nested/@b/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js b/test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js new file mode 100644 index 0000000000..19d532a374 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/nested/layout.js @@ -0,0 +1,16 @@ +export default function Parallel({ a, b, children }) { + return ( +
+ parallel/@foo/nested/layout +
+ {a} +
+
+ {b} +
+
+ {children} +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/parallel/@foo/page.js b/test/e2e/app-dir/app/app/parallel/@foo/page.js new file mode 100644 index 0000000000..9e30ce2b2b --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/@foo/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
Foo
+} diff --git a/test/e2e/app-dir/app/app/parallel/layout.js b/test/e2e/app-dir/app/app/parallel/layout.js new file mode 100644 index 0000000000..a1474ba6d0 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/layout.js @@ -0,0 +1,18 @@ +import './style.css' + +export default function Parallel({ foo, bar, children }) { + return ( +
+ parallel/layout: +
+ {foo} +
+
+ {bar} +
+
+ {children} +
+
+ ) +} diff --git a/test/e2e/app-dir/app/app/parallel/nested/page.js b/test/e2e/app-dir/app/app/parallel/nested/page.js new file mode 100644 index 0000000000..d7992d7198 --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/nested/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return
parallel/nested/page
+} diff --git a/test/e2e/app-dir/app/app/parallel/style.css b/test/e2e/app-dir/app/app/parallel/style.css new file mode 100644 index 0000000000..723ece56ac --- /dev/null +++ b/test/e2e/app-dir/app/app/parallel/style.css @@ -0,0 +1,15 @@ +div { + font-size: 16px; +} + +.parallel { + border: 1px solid; + margin: 10px; +} + +.parallel::before { + content: attr(title); + background: black; + color: white; + padding: 1px; +} diff --git a/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js b/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js new file mode 100644 index 0000000000..fab82d7a8a --- /dev/null +++ b/test/e2e/app-dir/app/app/param-and-query/[slug]/page.js @@ -0,0 +1,13 @@ +'use client' + +export default function Page({ params, searchParams }) { + return ( +

+ hello from /param-and-query/{params.slug}?slug={searchParams.slug} +

+ ) +} diff --git a/test/e2e/app-dir/app/app/partial-match-[id]/page.js b/test/e2e/app-dir/app/app/partial-match-[id]/page.js new file mode 100644 index 0000000000..33429192f2 --- /dev/null +++ b/test/e2e/app-dir/app/app/partial-match-[id]/page.js @@ -0,0 +1,7 @@ +export default function DeploymentsPage(props) { + return ( + <> +

hello from app/partial-match-[id]. ID is: {props.params.id}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-cache/client-component/page.js b/test/e2e/app-dir/app/app/react-cache/client-component/page.js new file mode 100644 index 0000000000..5cca1ce3ad --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/client-component/page.js @@ -0,0 +1,16 @@ +'use client' +import { cache } from 'react' + +const getRandomMemoized = cache(() => Math.random()) + +export default function Page() { + const val1 = getRandomMemoized() + const val2 = getRandomMemoized() + return ( + <> +

React Cache Client Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-cache/page.js b/test/e2e/app-dir/app/app/react-cache/page.js new file mode 100644 index 0000000000..14049016a7 --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/page.js @@ -0,0 +1,17 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

+ + To Server Component + +

+

+ + To Client Component + +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-cache/server-component/page.js b/test/e2e/app-dir/app/app/react-cache/server-component/page.js new file mode 100644 index 0000000000..94ecf7429b --- /dev/null +++ b/test/e2e/app-dir/app/app/react-cache/server-component/page.js @@ -0,0 +1,15 @@ +import { cache } from 'react' + +const getRandomMemoized = cache(() => Math.random()) + +export default function Page() { + const val1 = getRandomMemoized() + const val2 = getRandomMemoized() + return ( + <> +

React Cache Server Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-fetch/page.js b/test/e2e/app-dir/app/app/react-fetch/page.js new file mode 100644 index 0000000000..59e6d2a8bd --- /dev/null +++ b/test/e2e/app-dir/app/app/react-fetch/page.js @@ -0,0 +1,17 @@ +import Link from 'next/link' +export default function Page() { + return ( + <> +

+ + To Server Component + +

+

+ + To Client Component + +

+ + ) +} diff --git a/test/e2e/app-dir/app/app/react-fetch/server-component/page.js b/test/e2e/app-dir/app/app/react-fetch/server-component/page.js new file mode 100644 index 0000000000..a1ae02f41e --- /dev/null +++ b/test/e2e/app-dir/app/app/react-fetch/server-component/page.js @@ -0,0 +1,18 @@ +async function getRandomMemoizedByFetch() { + const res = await fetch( + 'https://next-data-api-endpoint.vercel.app/api/random' + ) + return res.text() +} + +export default async function Page() { + const val1 = await getRandomMemoizedByFetch() + const val2 = await getRandomMemoizedByFetch() + return ( + <> +

React Fetch Server Component

+

{val1}

+

{val2}

+ + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/client-side/page.js b/test/e2e/app-dir/app/app/redirect/client-side/page.js new file mode 100644 index 0000000000..1e05432703 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/client-side/page.js @@ -0,0 +1,19 @@ +'use client' + +import { redirect } from 'next/navigation' +import React from 'react' + +export default function Page() { + const [shouldRedirect, setShouldRedirect] = React.useState(false) + + if (shouldRedirect) { + redirect('/redirect/result') + } + return ( + + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js b/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js new file mode 100644 index 0000000000..8539aedf94 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/clientcomponent/client-component.js @@ -0,0 +1,7 @@ +'use client' +import { redirect } from 'next/navigation' + +export default function ClientComp() { + redirect('/redirect/result') + return <> +} diff --git a/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js b/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js new file mode 100644 index 0000000000..5b6bb43c2c --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/clientcomponent/page.js @@ -0,0 +1,8 @@ +import ClientComp from './client-component' +import { headers } from 'next/headers' + +export default function Page() { + // Opt-in to SSR. + headers() + return +} diff --git a/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js new file mode 100644 index 0000000000..b2f96fb405 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To Dashboard through /redirect/a + + + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js new file mode 100644 index 0000000000..7323ef64ad --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js @@ -0,0 +1,11 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> + + To Dashboard through /redirect/a + + + ) +} diff --git a/test/e2e/app-dir/app/app/redirect/result/page.js b/test/e2e/app-dir/app/app/redirect/result/page.js new file mode 100644 index 0000000000..6e4c138067 --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/result/page.js @@ -0,0 +1,3 @@ +export default function Page() { + return

Result Page

+} diff --git a/test/e2e/app-dir/app/app/redirect/servercomponent/page.js b/test/e2e/app-dir/app/app/redirect/servercomponent/page.js new file mode 100644 index 0000000000..f89eb0874b --- /dev/null +++ b/test/e2e/app-dir/app/app/redirect/servercomponent/page.js @@ -0,0 +1,6 @@ +import { redirect } from 'next/navigation' + +export default function Page() { + redirect('/redirect/result') + return <> +} diff --git a/test/e2e/app-dir/app/app/rewrites/page.js b/test/e2e/app-dir/app/app/rewrites/page.js new file mode 100644 index 0000000000..eeae4be136 --- /dev/null +++ b/test/e2e/app-dir/app/app/rewrites/page.js @@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default function Page() { + return ( + + To Dashboard Rewritten + + ) +} diff --git a/test/e2e/app-dir/app/app/same-layout/first/page.js b/test/e2e/app-dir/app/app/same-layout/first/page.js new file mode 100644 index 0000000000..2c2ebede77 --- /dev/null +++ b/test/e2e/app-dir/app/app/same-layout/first/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

hello from same-layout/first

+ + To Second + + + ) +} diff --git a/test/e2e/app-dir/app/app/same-layout/layout.js b/test/e2e/app-dir/app/app/same-layout/layout.js new file mode 100644 index 0000000000..42734ad725 --- /dev/null +++ b/test/e2e/app-dir/app/app/same-layout/layout.js @@ -0,0 +1,10 @@ +import { nanoid } from 'nanoid' + +export default function Layout({ children }) { + return ( + <> +

{nanoid()}

+
{children}
+ + ) +} diff --git a/test/e2e/app-dir/app/app/same-layout/second/page.js b/test/e2e/app-dir/app/app/same-layout/second/page.js new file mode 100644 index 0000000000..9eefb7df26 --- /dev/null +++ b/test/e2e/app-dir/app/app/same-layout/second/page.js @@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default function Page() { + return ( + <> +

hello from same-layout/second

+ + To First + + + ) +} diff --git a/test/e2e/app-dir/app/app/script/client.js b/test/e2e/app-dir/app/app/script/client.js new file mode 100644 index 0000000000..5372bb0d48 --- /dev/null +++ b/test/e2e/app-dir/app/app/script/client.js @@ -0,0 +1,15 @@ +'use client' + +export default function Client() { + if (typeof window !== 'undefined') { + window._script_order = window._script_order || [] + + if (window._script_order[window._script_order.length - 1] !== 'render') { + window._script_order.push('render') + } + + console.log(window._script_order) + } + + return null +} diff --git a/test/e2e/app-dir/app/app/script/page.js b/test/e2e/app-dir/app/app/script/page.js new file mode 100644 index 0000000000..2ee6b4c273 --- /dev/null +++ b/test/e2e/app-dir/app/app/script/page.js @@ -0,0 +1,30 @@ +import Script from 'next/script' + +import Client from './client' + +export default function Page() { + return ( +
+

next/script

+ + + "'`) + + expect(res.status).toBe(500) + }) + }) + + describe('template component', () => { + it('should render the template that holds state in a client component and reset on navigation', async () => { + const browser = await webdriver(next.url, '/template/clientcomponent') + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + await browser.elementByCss('button').click() + expect(await browser.elementByCss('h1').text()).toBe('Template 1') + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + expect(await browser.elementByCss('h1').text()).toBe('Template 0') + }) + + // TODO-APP: disable failing test and investigate later + ;(isDev ? it.skip : it)( + 'should render the template that is a server component and rerender on navigation', + async () => { + const browser = await webdriver(next.url, '/template/servercomponent') + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + const currentTime = await browser.elementByCss('#performance-now').text() + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#other-page') + + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('h1').text()).toStartWith('Template') + + // template should rerender on navigation even when it's a server component + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + + await browser.elementByCss('#link').click() + await browser.waitForElementByCss('#page') + + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#performance-now').text()).toBe(currentTime) + }, + ) + }) + + describe('error component', () => { + it('should trigger error component when an error happens during rendering', async () => { + const browser = await webdriver(next.url, '/error/client-component') + await browser.elementByCss('#error-trigger-button').click() + + if (isDev) { + expect(await hasRedbox(browser)).toBe(true) + expect(await getRedboxHeader(browser)).toMatch(/this is a test/) + } else { + await browser + expect( + await browser.waitForElementByCss('#error-boundary-message').elementByCss('#error-boundary-message').text(), + ).toBe('An error occurred: this is a test') + } + }) + + it('should trigger error component when an error happens during server components rendering', async () => { + const browser = await webdriver(next.url, '/error/server-component') + + if (isDev) { + expect( + await browser.waitForElementByCss('#error-boundary-message').elementByCss('#error-boundary-message').text(), + ).toBe('this is a test') + expect( + await browser.waitForElementByCss('#error-boundary-digest').text(), + // Digest of the error message should be stable. + ).not.toBe('') + // TODO-APP: ensure error overlay is shown for errors that happened before/during hydration + // expect(await hasRedbox(browser)).toBe(true) + // expect(await getRedboxHeader(browser)).toMatch(/this is a test/) + } else { + await browser + expect(await browser.waitForElementByCss('#error-boundary-message').text()).toBe( + 'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.', + ) + expect( + await browser.waitForElementByCss('#error-boundary-digest').text(), + // Digest of the error message should be stable. + ).not.toBe('') + } + }) + + it('should use default error boundary for prod and overlay for dev when no error component specified', async () => { + const browser = await webdriver(next.url, '/error/global-error-boundary') + await browser.elementByCss('#error-trigger-button').click() + // .waitForElementByCss('body') + + if (isDev) { + expect(await hasRedbox(browser)).toBe(true) + console.log('getRedboxHeader', await getRedboxHeader(browser)) + // expect(await getRedboxHeader(browser)).toMatch(/An error occurred: this is a test/) + } else { + expect(await browser.waitForElementByCss('body').elementByCss('body').text()).toBe( + 'Application error: a client-side exception has occurred (see the browser console for more information).', + ) + } + }) + + if (!isDev) { + it('should allow resetting error boundary', async () => { + const browser = await webdriver(next.url, '/error/client-component') + + // Try triggering and resetting a few times in a row + for (let i = 0; i < 5; i++) { + await browser.elementByCss('#error-trigger-button').click().waitForElementByCss('#error-boundary-message') + + expect(await browser.elementByCss('#error-boundary-message').text()).toBe( + 'An error occurred: this is a test', + ) + + await browser.elementByCss('#reset').click().waitForElementByCss('#error-trigger-button') + + expect(await browser.elementByCss('#error-trigger-button').text()).toBe('Trigger Error!') + } + }) + + it('should hydrate empty shell to handle server-side rendering errors', async () => { + const browser = await webdriver(next.url, '/error/ssr-error-client-component') + const logs = await browser.log() + const errors = logs + .filter((x) => x.source === 'error') + .map((x) => x.message) + .join('\n') + expect(errors).toInclude('Error during SSR') + }) + } + }) + + describe('known bugs', () => { + describe('should support React cache', () => { + it('server component', async () => { + const browser = await webdriver(next.url, '/react-cache/server-component') + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('server component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-cache') + + await browser.elementByCss('#to-server-component').click().waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('client component', async () => { + const browser = await webdriver(next.url, '/react-cache/client-component') + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('client component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-cache') + + await browser.elementByCss('#to-client-component').click().waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + }) + + describe('should support React fetch instrumentation', () => { + it('server component', async () => { + const browser = await webdriver(next.url, '/react-fetch/server-component') + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + it('server component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-fetch') + + await browser.elementByCss('#to-server-component').click().waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + // TODO-APP: React doesn't have fetch deduping for client components yet. + it.skip('client component', async () => { + const browser = await webdriver(next.url, '/react-fetch/client-component') + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + + // TODO-APP: React doesn't have fetch deduping for client components yet. + it.skip('client component client-navigation', async () => { + const browser = await webdriver(next.url, '/react-fetch') + + await browser.elementByCss('#to-client-component').click().waitForElementByCss('#value-1', 10000) + const val1 = await browser.elementByCss('#value-1').text() + const val2 = await browser.elementByCss('#value-2').text() + expect(val1).toBe(val2) + }) + }) + it('should not share flight data between requests', async () => { + const fetches = await Promise.all( + [...new Array(5)].map(() => renderViaHTTP(next.url, '/loading-bug/electronics')), + ) + + for (const text of fetches) { + const $ = cheerio.load(text) + expect($('#category-id').text()).toBe('electronicsabc') + } + }) + it('should handle as on next/link', async () => { + const browser = await webdriver(next.url, '/link-with-as') + expect(await browser.elementByCss('#link-to-info-123').click().waitForElementByCss('#message').text()).toBe( + `hello from app/dashboard/deployments/info/[id]. ID is: 123`, + ) + }) + it('should handle next/link back to initially loaded page', async () => { + const browser = await webdriver(next.url, '/linking/about') + expect(await browser.elementByCss('a[href="/linking"]').click().waitForElementByCss('#home-page').text()).toBe( + `Home page`, + ) + + expect( + await browser.elementByCss('a[href="/linking/about"]').click().waitForElementByCss('#about-page').text(), + ).toBe(`About page`) + }) + it('should not do additional pushState when already on the page', async () => { + const browser = await webdriver(next.url, '/linking/about') + const goToLinkingPage = async () => { + expect( + await browser.elementByCss('a[href="/linking"]').click().waitForElementByCss('#home-page').text(), + ).toBe(`Home page`) + } + + await goToLinkingPage() + await waitFor(1000) + await goToLinkingPage() + await waitFor(1000) + await goToLinkingPage() + await waitFor(1000) + + expect(await browser.back().waitForElementByCss('#about-page', 2000).text()).toBe(`About page`) + }) + }) + + describe('not-found', () => { + it('should trigger not-found in a server component', async () => { + const browser = await webdriver(next.url, '/not-found/servercomponent') + + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') + }) + + it('should trigger not-found in a client component', async () => { + const browser = await webdriver(next.url, '/not-found/clientcomponent') + expect(await browser.waitForElementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') + }) + it('should trigger not-found client-side', async () => { + const browser = await webdriver(next.url, '/not-found/client-side') + await browser.elementByCss('button').click().waitForElementByCss('#not-found-component') + expect(await browser.elementByCss('#not-found-component').text()).toBe('Not Found!') + expect(await browser.waitForElementByCss('meta[name="robots"]').getAttribute('content')).toBe('noindex') + }) + }) + + describe('bots', () => { + if (!(global as any).isNextDeploy) { + it('should block rendering for bots and return 404 status', async () => { + const res = await fetchViaHTTP(next.url, '/not-found/servercomponent', '', { + headers: { + 'User-Agent': 'Googlebot', + }, + }) + + expect(res.status).toBe(404) + expect(await res.text()).toInclude('"noindex"') + }) + } + }) + + describe('redirect', () => { + describe('components', () => { + it('should redirect in a server component', async () => { + const browser = await webdriver(next.url, '/redirect/servercomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + + it('should redirect in a client component', async () => { + const browser = await webdriver(next.url, '/redirect/clientcomponent') + await browser.waitForElementByCss('#result-page') + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + + // TODO-APP: Enable in development + it('should redirect client-side', async () => { + const browser = await webdriver(next.url, '/redirect/client-side') + await browser.elementByCss('button').click().waitForElementByCss('#result-page') + // eslint-disable-next-line jest/no-standalone-expect + expect(await browser.elementByCss('#result-page').text()).toBe('Result Page') + }) + }) + + describe('next.config.js redirects', () => { + it('should redirect from next.config.js', async () => { + const browser = await webdriver(next.url, '/redirect/a') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + + it('should redirect from next.config.js with link navigation', async () => { + const browser = await webdriver(next.url, '/redirect/next-config-redirect') + await browser.elementByCss('#redirect-a').click().waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + }) + + describe('middleware redirects', () => { + it('should redirect from middleware', async () => { + const browser = await webdriver(next.url, '/redirect-middleware-to-dashboard') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + + it('should redirect from middleware with link navigation', async () => { + const browser = await webdriver(next.url, '/redirect/next-middleware-redirect') + await browser.elementByCss('#redirect-middleware').click().waitForElementByCss('h1') + expect(await browser.elementByCss('h1').text()).toBe('Dashboard') + expect(await browser.url()).toBe(next.url + '/dashboard') + }) + }) + }) + + describe('nested navigation', () => { + it('should navigate to nested pages', async () => { + const browser = await webdriver(next.url, '/nested-navigation') + expect(await browser.elementByCss('h1').text()).toBe('Home') + + const pages = [ + ['Electronics', ['Phones', 'Tablets', 'Laptops']], + ['Clothing', ['Tops', 'Shorts', 'Shoes']], + ['Books', ['Fiction', 'Biography', 'Education']], + ] as const + + for (const [category, subCategories] of pages) { + expect( + await browser + .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}"]`) + .click() + .waitForElementByCss(`#all-${category.toLowerCase()}`) + .text(), + ).toBe(`All ${category}`) + + for (const subcategory of subCategories) { + expect( + await browser + .elementByCss(`a[href="/nested-navigation/${category.toLowerCase()}/${subcategory.toLowerCase()}"]`) + .click() + .waitForElementByCss(`#${subcategory.toLowerCase()}`) + .text(), + ).toBe(`${subcategory}`) + } + } + }) + }) + + describe('next/script', () => { + if (!(global as any).isNextDeploy) { + it('should support next/script and render in correct order', async () => { + const browser = await webdriver(next.url, '/script') + + // Wait for lazyOnload scripts to be ready. + await new Promise((resolve) => setTimeout(resolve, 1000)) + + expect(await browser.eval(`window._script_order`)).toStrictEqual([1, 1.5, 2, 2.5, 'render', 3, 4]) + }) + } + + it('should insert preload tags for beforeInteractive and afterInteractive scripts', async () => { + const html = await renderViaHTTP(next.url, '/script') + expect(html).toContain('') + expect(html).toContain('') + expect(html).toContain('') + + // test4.js has lazyOnload which doesn't need to be preloaded + expect(html).not.toContain('