From a8cbdd8854e4b121157abac1812a0b81501f9974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 27 Oct 2022 17:40:59 -0700 Subject: [PATCH 01/11] add test --- test/e2e/app-dir/app/app/very-large-data-fetch/page.js | 6 ++++++ test/e2e/app-dir/index.test.ts | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/e2e/app-dir/app/app/very-large-data-fetch/page.js diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js new file mode 100644 index 000000000000000..35e6b824dd5abdd --- /dev/null +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -0,0 +1,6 @@ +import fetch from 'node-fetch' +export default async function Home() { + const res = await fetch('https://pokeapi.co/api/v2/pokemon/bulbasaur') + await res.json() + return

Hello world

+} diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index 28faf234e6b04cd..7c5dede157548af 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -2186,6 +2186,15 @@ describe('app dir', () => { ) }) }) + + describe('very-large-data-fetch', () => { + it('should load crash when fetching a large amount of data', async () => { + const browser = await webdriver(next.url, '/very-large-data-fetch') + expect( + await (await browser.waitForElementByCss('#done', 10000)).text() + ).toBe('Hello world') + }) + }) } runTests() From 6f64eb984578cdc4488188ea605ebe332262a780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 27 Oct 2022 17:42:53 -0700 Subject: [PATCH 02/11] remove `node-fetch` --- test/e2e/app-dir/app/app/very-large-data-fetch/page.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js index 35e6b824dd5abdd..a5613a97e954d5a 100644 --- a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -1,4 +1,3 @@ -import fetch from 'node-fetch' export default async function Home() { const res = await fetch('https://pokeapi.co/api/v2/pokemon/bulbasaur') await res.json() From dc5d9e04de6ea57a31f43e9b8068ed2eb4209888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 27 Oct 2022 17:43:47 -0700 Subject: [PATCH 03/11] fix test name --- test/e2e/app-dir/index.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index 7c5dede157548af..64c936bdbd38479 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -2188,7 +2188,7 @@ describe('app dir', () => { }) describe('very-large-data-fetch', () => { - it('should load crash when fetching a large amount of data', async () => { + it('should load page when fetching a large amount of data', async () => { const browser = await webdriver(next.url, '/very-large-data-fetch') expect( await (await browser.waitForElementByCss('#done', 10000)).text() From 8289fe4bc9979989bb00b969bbfe1349347f0f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Fri, 28 Oct 2022 13:29:11 -0700 Subject: [PATCH 04/11] use undici when `appDir` is enabled --- packages/next/server/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/server/config.ts b/packages/next/server/config.ts index 018de2e5432d3bb..f416e6264da99fa 100644 --- a/packages/next/server/config.ts +++ b/packages/next/server/config.ts @@ -54,6 +54,8 @@ const experimentalWarning = execOnce( export function setHttpClientAndAgentOptions(options: NextConfig) { if (semverGte(process.version, '16.8.0')) { + if (options.experimental?.appDir) options.experimental.enableUndici = true + if ( options.experimental?.enableUndici && semverGte(process.version, '18.0.0') @@ -608,8 +610,6 @@ function assignDefaults(dir: string, userConfig: { [key: string]: any }) { result.output = undefined } - // TODO: Change defaultConfig type to NextConfigComplete - // so we don't need "!" here. setHttpClientAndAgentOptions(result || defaultConfig) if (result.i18n) { From ccd20927bd61f40c07fe58d9439723e2876ffe85 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 28 Oct 2022 19:13:50 -0700 Subject: [PATCH 05/11] Fix debug --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index e88773d91c2cac1..31757a73457093a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "cwd": "${workspaceFolder}", "runtimeExecutable": "pnpm", - "runtimeArgs": ["debug-react-exp", "dev", "test/e2e/app-dir/app"], + "runtimeArgs": ["debug", "dev", "test/e2e/app-dir/app"], "skipFiles": ["/**"], "env": { "NEXT_PRIVATE_LOCAL_WEBPACK": "1" From 38f0f7b42fc654840480bbc40592e60cf313fbd4 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 28 Oct 2022 19:20:29 -0700 Subject: [PATCH 06/11] Add large data --- .../app/app/very-large-data-fetch/page.js | 8 +- test/e2e/app-dir/app/pages/api/large-data.js | 2078 +++++++++++++++++ 2 files changed, 2083 insertions(+), 3 deletions(-) create mode 100644 test/e2e/app-dir/app/pages/api/large-data.js diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js index a5613a97e954d5a..8437c49ff7c83cc 100644 --- a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -1,5 +1,7 @@ export default async function Home() { - const res = await fetch('https://pokeapi.co/api/v2/pokemon/bulbasaur') - await res.json() - return

Hello world

+ // debugger + const res = await fetch('http://localhost:3000/api/large-data') + const resClone = res.clone() + const json = await resClone.json() + return
{JSON.stringify(json, null, ' ')}
} diff --git a/test/e2e/app-dir/app/pages/api/large-data.js b/test/e2e/app-dir/app/pages/api/large-data.js new file mode 100644 index 000000000000000..7deb8cbad2c7f8b --- /dev/null +++ b/test/e2e/app-dir/app/pages/api/large-data.js @@ -0,0 +1,2078 @@ +export default function largeData(req, res) { + return res.json({ + 'array of objects': [ + { + index: '0', + 'index start at 5': '5', + }, + { + index: '1', + 'index start at 5': '6', + }, + { + index: '2', + 'index start at 5': '7', + }, + { + index: '3', + 'index start at 5': '8', + }, + { + index: '4', + 'index start at 5': '9', + }, + { + index: '5', + 'index start at 5': '10', + }, + { + index: '6', + 'index start at 5': '11', + }, + { + index: '7', + 'index start at 5': '12', + }, + { + index: '8', + 'index start at 5': '13', + }, + { + index: '9', + 'index start at 5': '14', + }, + { + index: '10', + 'index start at 5': '15', + }, + { + index: '11', + 'index start at 5': '16', + }, + { + index: '12', + 'index start at 5': '17', + }, + { + index: '13', + 'index start at 5': '18', + }, + { + index: '14', + 'index start at 5': '19', + }, + { + index: '15', + 'index start at 5': '20', + }, + { + index: '16', + 'index start at 5': '21', + }, + { + index: '17', + 'index start at 5': '22', + }, + { + index: '18', + 'index start at 5': '23', + }, + { + index: '19', + 'index start at 5': '24', + }, + { + index: '20', + 'index start at 5': '25', + }, + { + index: '21', + 'index start at 5': '26', + }, + { + index: '22', + 'index start at 5': '27', + }, + { + index: '23', + 'index start at 5': '28', + }, + { + index: '24', + 'index start at 5': '29', + }, + { + index: '25', + 'index start at 5': '30', + }, + { + index: '26', + 'index start at 5': '31', + }, + { + index: '27', + 'index start at 5': '32', + }, + { + index: '28', + 'index start at 5': '33', + }, + { + index: '29', + 'index start at 5': '34', + }, + { + index: '30', + 'index start at 5': '35', + }, + { + index: '31', + 'index start at 5': '36', + }, + { + index: '32', + 'index start at 5': '37', + }, + { + index: '33', + 'index start at 5': '38', + }, + { + index: '34', + 'index start at 5': '39', + }, + { + index: '35', + 'index start at 5': '40', + }, + { + index: '36', + 'index start at 5': '41', + }, + { + index: '37', + 'index start at 5': '42', + }, + { + index: '38', + 'index start at 5': '43', + }, + { + index: '39', + 'index start at 5': '44', + }, + { + index: '40', + 'index start at 5': '45', + }, + { + index: '41', + 'index start at 5': '46', + }, + { + index: '42', + 'index start at 5': '47', + }, + { + index: '43', + 'index start at 5': '48', + }, + { + index: '44', + 'index start at 5': '49', + }, + { + index: '45', + 'index start at 5': '50', + }, + { + index: '46', + 'index start at 5': '51', + }, + { + index: '47', + 'index start at 5': '52', + }, + { + index: '48', + 'index start at 5': '53', + }, + { + index: '49', + 'index start at 5': '54', + }, + { + index: '50', + 'index start at 5': '55', + }, + { + index: '51', + 'index start at 5': '56', + }, + { + index: '52', + 'index start at 5': '57', + }, + { + index: '53', + 'index start at 5': '58', + }, + { + index: '54', + 'index start at 5': '59', + }, + { + index: '55', + 'index start at 5': '60', + }, + { + index: '56', + 'index start at 5': '61', + }, + { + index: '57', + 'index start at 5': '62', + }, + { + index: '58', + 'index start at 5': '63', + }, + { + index: '59', + 'index start at 5': '64', + }, + { + index: '60', + 'index start at 5': '65', + }, + { + index: '61', + 'index start at 5': '66', + }, + { + index: '62', + 'index start at 5': '67', + }, + { + index: '63', + 'index start at 5': '68', + }, + { + index: '64', + 'index start at 5': '69', + }, + { + index: '65', + 'index start at 5': '70', + }, + { + index: '66', + 'index start at 5': '71', + }, + { + index: '67', + 'index start at 5': '72', + }, + { + index: '68', + 'index start at 5': '73', + }, + { + index: '69', + 'index start at 5': '74', + }, + { + index: '70', + 'index start at 5': '75', + }, + { + index: '71', + 'index start at 5': '76', + }, + { + index: '72', + 'index start at 5': '77', + }, + { + index: '73', + 'index start at 5': '78', + }, + { + index: '74', + 'index start at 5': '79', + }, + { + index: '75', + 'index start at 5': '80', + }, + { + index: '76', + 'index start at 5': '81', + }, + { + index: '77', + 'index start at 5': '82', + }, + { + index: '78', + 'index start at 5': '83', + }, + { + index: '79', + 'index start at 5': '84', + }, + { + index: '80', + 'index start at 5': '85', + }, + { + index: '81', + 'index start at 5': '86', + }, + { + index: '82', + 'index start at 5': '87', + }, + { + index: '83', + 'index start at 5': '88', + }, + { + index: '84', + 'index start at 5': '89', + }, + { + index: '85', + 'index start at 5': '90', + }, + { + index: '86', + 'index start at 5': '91', + }, + { + index: '87', + 'index start at 5': '92', + }, + { + index: '88', + 'index start at 5': '93', + }, + { + index: '89', + 'index start at 5': '94', + }, + { + index: '90', + 'index start at 5': '95', + }, + { + index: '91', + 'index start at 5': '96', + }, + { + index: '92', + 'index start at 5': '97', + }, + { + index: '93', + 'index start at 5': '98', + }, + { + index: '94', + 'index start at 5': '99', + }, + { + index: '95', + 'index start at 5': '100', + }, + { + index: '96', + 'index start at 5': '101', + }, + { + index: '97', + 'index start at 5': '102', + }, + { + index: '98', + 'index start at 5': '103', + }, + { + index: '99', + 'index start at 5': '104', + }, + { + index: '100', + 'index start at 5': '105', + }, + { + index: '101', + 'index start at 5': '106', + }, + { + index: '102', + 'index start at 5': '107', + }, + { + index: '103', + 'index start at 5': '108', + }, + { + index: '104', + 'index start at 5': '109', + }, + { + index: '105', + 'index start at 5': '110', + }, + { + index: '106', + 'index start at 5': '111', + }, + { + index: '107', + 'index start at 5': '112', + }, + { + index: '108', + 'index start at 5': '113', + }, + { + index: '109', + 'index start at 5': '114', + }, + { + index: '110', + 'index start at 5': '115', + }, + { + index: '111', + 'index start at 5': '116', + }, + { + index: '112', + 'index start at 5': '117', + }, + { + index: '113', + 'index start at 5': '118', + }, + { + index: '114', + 'index start at 5': '119', + }, + { + index: '115', + 'index start at 5': '120', + }, + { + index: '116', + 'index start at 5': '121', + }, + { + index: '117', + 'index start at 5': '122', + }, + { + index: '118', + 'index start at 5': '123', + }, + { + index: '119', + 'index start at 5': '124', + }, + { + index: '120', + 'index start at 5': '125', + }, + { + index: '121', + 'index start at 5': '126', + }, + { + index: '122', + 'index start at 5': '127', + }, + { + index: '123', + 'index start at 5': '128', + }, + { + index: '124', + 'index start at 5': '129', + }, + { + index: '125', + 'index start at 5': '130', + }, + { + index: '126', + 'index start at 5': '131', + }, + { + index: '127', + 'index start at 5': '132', + }, + { + index: '128', + 'index start at 5': '133', + }, + { + index: '129', + 'index start at 5': '134', + }, + { + index: '130', + 'index start at 5': '135', + }, + { + index: '131', + 'index start at 5': '136', + }, + { + index: '132', + 'index start at 5': '137', + }, + { + index: '133', + 'index start at 5': '138', + }, + { + index: '134', + 'index start at 5': '139', + }, + { + index: '135', + 'index start at 5': '140', + }, + { + index: '136', + 'index start at 5': '141', + }, + { + index: '137', + 'index start at 5': '142', + }, + { + index: '138', + 'index start at 5': '143', + }, + { + index: '139', + 'index start at 5': '144', + }, + { + index: '140', + 'index start at 5': '145', + }, + { + index: '141', + 'index start at 5': '146', + }, + { + index: '142', + 'index start at 5': '147', + }, + { + index: '143', + 'index start at 5': '148', + }, + { + index: '144', + 'index start at 5': '149', + }, + { + index: '145', + 'index start at 5': '150', + }, + { + index: '146', + 'index start at 5': '151', + }, + { + index: '147', + 'index start at 5': '152', + }, + { + index: '148', + 'index start at 5': '153', + }, + { + index: '149', + 'index start at 5': '154', + }, + { + index: '150', + 'index start at 5': '155', + }, + { + index: '151', + 'index start at 5': '156', + }, + { + index: '152', + 'index start at 5': '157', + }, + { + index: '153', + 'index start at 5': '158', + }, + { + index: '154', + 'index start at 5': '159', + }, + { + index: '155', + 'index start at 5': '160', + }, + { + index: '156', + 'index start at 5': '161', + }, + { + index: '157', + 'index start at 5': '162', + }, + { + index: '158', + 'index start at 5': '163', + }, + { + index: '159', + 'index start at 5': '164', + }, + { + index: '160', + 'index start at 5': '165', + }, + { + index: '161', + 'index start at 5': '166', + }, + { + index: '162', + 'index start at 5': '167', + }, + { + index: '163', + 'index start at 5': '168', + }, + { + index: '164', + 'index start at 5': '169', + }, + { + index: '165', + 'index start at 5': '170', + }, + { + index: '166', + 'index start at 5': '171', + }, + { + index: '167', + 'index start at 5': '172', + }, + { + index: '168', + 'index start at 5': '173', + }, + { + index: '169', + 'index start at 5': '174', + }, + { + index: '170', + 'index start at 5': '175', + }, + { + index: '171', + 'index start at 5': '176', + }, + { + index: '172', + 'index start at 5': '177', + }, + { + index: '173', + 'index start at 5': '178', + }, + { + index: '174', + 'index start at 5': '179', + }, + { + index: '175', + 'index start at 5': '180', + }, + { + index: '176', + 'index start at 5': '181', + }, + { + index: '177', + 'index start at 5': '182', + }, + { + index: '178', + 'index start at 5': '183', + }, + { + index: '179', + 'index start at 5': '184', + }, + { + index: '180', + 'index start at 5': '185', + }, + { + index: '181', + 'index start at 5': '186', + }, + { + index: '182', + 'index start at 5': '187', + }, + { + index: '183', + 'index start at 5': '188', + }, + { + index: '184', + 'index start at 5': '189', + }, + { + index: '185', + 'index start at 5': '190', + }, + { + index: '186', + 'index start at 5': '191', + }, + { + index: '187', + 'index start at 5': '192', + }, + { + index: '188', + 'index start at 5': '193', + }, + { + index: '189', + 'index start at 5': '194', + }, + { + index: '190', + 'index start at 5': '195', + }, + { + index: '191', + 'index start at 5': '196', + }, + { + index: '192', + 'index start at 5': '197', + }, + { + index: '193', + 'index start at 5': '198', + }, + { + index: '194', + 'index start at 5': '199', + }, + { + index: '195', + 'index start at 5': '200', + }, + { + index: '196', + 'index start at 5': '201', + }, + { + index: '197', + 'index start at 5': '202', + }, + { + index: '198', + 'index start at 5': '203', + }, + { + index: '199', + 'index start at 5': '204', + }, + { + index: '200', + 'index start at 5': '205', + }, + { + index: '201', + 'index start at 5': '206', + }, + { + index: '202', + 'index start at 5': '207', + }, + { + index: '203', + 'index start at 5': '208', + }, + { + index: '204', + 'index start at 5': '209', + }, + { + index: '205', + 'index start at 5': '210', + }, + { + index: '206', + 'index start at 5': '211', + }, + { + index: '207', + 'index start at 5': '212', + }, + { + index: '208', + 'index start at 5': '213', + }, + { + index: '209', + 'index start at 5': '214', + }, + { + index: '210', + 'index start at 5': '215', + }, + { + index: '211', + 'index start at 5': '216', + }, + { + index: '212', + 'index start at 5': '217', + }, + { + index: '213', + 'index start at 5': '218', + }, + { + index: '214', + 'index start at 5': '219', + }, + { + index: '215', + 'index start at 5': '220', + }, + { + index: '216', + 'index start at 5': '221', + }, + { + index: '217', + 'index start at 5': '222', + }, + { + index: '218', + 'index start at 5': '223', + }, + { + index: '219', + 'index start at 5': '224', + }, + { + index: '220', + 'index start at 5': '225', + }, + { + index: '221', + 'index start at 5': '226', + }, + { + index: '222', + 'index start at 5': '227', + }, + { + index: '223', + 'index start at 5': '228', + }, + { + index: '224', + 'index start at 5': '229', + }, + { + index: '225', + 'index start at 5': '230', + }, + { + index: '226', + 'index start at 5': '231', + }, + { + index: '227', + 'index start at 5': '232', + }, + { + index: '228', + 'index start at 5': '233', + }, + { + index: '229', + 'index start at 5': '234', + }, + { + index: '230', + 'index start at 5': '235', + }, + { + index: '231', + 'index start at 5': '236', + }, + { + index: '232', + 'index start at 5': '237', + }, + { + index: '233', + 'index start at 5': '238', + }, + { + index: '234', + 'index start at 5': '239', + }, + { + index: '235', + 'index start at 5': '240', + }, + { + index: '236', + 'index start at 5': '241', + }, + { + index: '237', + 'index start at 5': '242', + }, + { + index: '238', + 'index start at 5': '243', + }, + { + index: '239', + 'index start at 5': '244', + }, + { + index: '240', + 'index start at 5': '245', + }, + { + index: '241', + 'index start at 5': '246', + }, + { + index: '242', + 'index start at 5': '247', + }, + { + index: '243', + 'index start at 5': '248', + }, + { + index: '244', + 'index start at 5': '249', + }, + { + index: '245', + 'index start at 5': '250', + }, + { + index: '246', + 'index start at 5': '251', + }, + { + index: '247', + 'index start at 5': '252', + }, + { + index: '248', + 'index start at 5': '253', + }, + { + index: '249', + 'index start at 5': '254', + }, + { + index: '250', + 'index start at 5': '255', + }, + { + index: '251', + 'index start at 5': '256', + }, + { + index: '252', + 'index start at 5': '257', + }, + { + index: '253', + 'index start at 5': '258', + }, + { + index: '254', + 'index start at 5': '259', + }, + { + index: '255', + 'index start at 5': '260', + }, + { + index: '256', + 'index start at 5': '261', + }, + { + index: '257', + 'index start at 5': '262', + }, + { + index: '258', + 'index start at 5': '263', + }, + { + index: '259', + 'index start at 5': '264', + }, + { + index: '260', + 'index start at 5': '265', + }, + { + index: '261', + 'index start at 5': '266', + }, + { + index: '262', + 'index start at 5': '267', + }, + { + index: '263', + 'index start at 5': '268', + }, + { + index: '264', + 'index start at 5': '269', + }, + { + index: '265', + 'index start at 5': '270', + }, + { + index: '266', + 'index start at 5': '271', + }, + { + index: '267', + 'index start at 5': '272', + }, + { + index: '268', + 'index start at 5': '273', + }, + { + index: '269', + 'index start at 5': '274', + }, + { + index: '270', + 'index start at 5': '275', + }, + { + index: '271', + 'index start at 5': '276', + }, + { + index: '272', + 'index start at 5': '277', + }, + { + index: '273', + 'index start at 5': '278', + }, + { + index: '274', + 'index start at 5': '279', + }, + { + index: '275', + 'index start at 5': '280', + }, + { + index: '276', + 'index start at 5': '281', + }, + { + index: '277', + 'index start at 5': '282', + }, + { + index: '278', + 'index start at 5': '283', + }, + { + index: '279', + 'index start at 5': '284', + }, + { + index: '280', + 'index start at 5': '285', + }, + { + index: '281', + 'index start at 5': '286', + }, + { + index: '282', + 'index start at 5': '287', + }, + { + index: '283', + 'index start at 5': '288', + }, + { + index: '284', + 'index start at 5': '289', + }, + { + index: '285', + 'index start at 5': '290', + }, + { + index: '286', + 'index start at 5': '291', + }, + { + index: '287', + 'index start at 5': '292', + }, + { + index: '288', + 'index start at 5': '293', + }, + { + index: '289', + 'index start at 5': '294', + }, + { + index: '290', + 'index start at 5': '295', + }, + { + index: '291', + 'index start at 5': '296', + }, + { + index: '292', + 'index start at 5': '297', + }, + { + index: '293', + 'index start at 5': '298', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + ], + }) +} From 22dc447ab2629750f6b24a63512cee6916c2e51e Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 28 Oct 2022 20:40:16 -0700 Subject: [PATCH 07/11] Enable undici by default when appDir: true and require Node.js 16.8.0 when appDir: true --- packages/next/server/config.ts | 37 +++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/packages/next/server/config.ts b/packages/next/server/config.ts index 018de2e5432d3bb..634120104d6c1fd 100644 --- a/packages/next/server/config.ts +++ b/packages/next/server/config.ts @@ -28,6 +28,9 @@ import { getDependencies } from '../lib/get-package-version' export { DomainLocale, NextConfig, normalizeConfig } from './config-shared' +const isAboveNodejs16 = semverGte(process.version, '16.8.0') +const isAboveNodejs18 = semverGte(process.version, '18.0.0') + const experimentalWarning = execOnce( (configFileName: string, features: string[]) => { const s = features.length > 1 ? 's' : '' @@ -52,19 +55,19 @@ const experimentalWarning = execOnce( } ) -export function setHttpClientAndAgentOptions(options: NextConfig) { - if (semverGte(process.version, '16.8.0')) { - if ( - options.experimental?.enableUndici && - semverGte(process.version, '18.0.0') - ) { +export function setHttpClientAndAgentOptions(config: NextConfig) { + if (isAboveNodejs16) { + if (config.experimental?.enableUndici && isAboveNodejs18) { Log.warn( '`enableUndici` option is unnecessary in Node.js v18.0.0 or greater.' ) } else { - ;(global as any).__NEXT_USE_UNDICI = options.experimental?.enableUndici + // When appDir is enabled undici is the default because of Response.clone() issues in node-fetch + ;(global as any).__NEXT_USE_UNDICI = config.experimental?.appDir + ? true + : config.experimental?.enableUndici } - } else if (options.experimental?.enableUndici) { + } else if (config.experimental?.enableUndici) { Log.warn( '`enableUndici` option requires Node.js v16.8.0 or greater. Falling back to `node-fetch`' ) @@ -75,13 +78,13 @@ export function setHttpClientAndAgentOptions(options: NextConfig) { return } - if (!options) { + if (!config) { throw new Error('Expected config.httpAgentOptions to be an object') } - ;(global as any).__NEXT_HTTP_AGENT_OPTIONS = options.httpAgentOptions - ;(global as any).__NEXT_HTTP_AGENT = new HttpAgent(options.httpAgentOptions) - ;(global as any).__NEXT_HTTPS_AGENT = new HttpsAgent(options.httpAgentOptions) + ;(global as any).__NEXT_HTTP_AGENT_OPTIONS = config.httpAgentOptions + ;(global as any).__NEXT_HTTP_AGENT = new HttpAgent(config.httpAgentOptions) + ;(global as any).__NEXT_HTTPS_AGENT = new HttpsAgent(config.httpAgentOptions) } async function setFontLoaderDefaults(config: NextConfigComplete, dir: string) { @@ -154,6 +157,16 @@ function assignDefaults(dir: string, userConfig: { [key: string]: any }) { for (const featureName of Object.keys( value ) as (keyof ExperimentalConfig)[]) { + const featureValue = value[featureName] + if ( + featureName === 'appDir' && + featureValue === true && + !isAboveNodejs16 + ) { + throw new Error( + 'experimental.appDir requires Node 16.8.0 or later.' + ) + } if ( value[featureName] !== defaultConfig.experimental[featureName] ) { From 83850207fc5c34a0fd14dfa6c9c3cf317a9a72c2 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 28 Oct 2022 20:44:24 -0700 Subject: [PATCH 08/11] Use const for node versions --- packages/next/server/config.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/next/server/config.ts b/packages/next/server/config.ts index 32b5e50d122faee..c852c647bfe0b9b 100644 --- a/packages/next/server/config.ts +++ b/packages/next/server/config.ts @@ -28,8 +28,10 @@ import { getDependencies } from '../lib/get-package-version' export { DomainLocale, NextConfig, normalizeConfig } from './config-shared' -const isAboveNodejs16 = semverGte(process.version, '16.8.0') -const isAboveNodejs18 = semverGte(process.version, '18.0.0') +const NODE_16_VERSION = '16.8.0' +const NODE_18_VERSION = '18.0.0' +const isAboveNodejs16 = semverGte(process.version, NODE_16_VERSION) +const isAboveNodejs18 = semverGte(process.version, NODE_18_VERSION) const experimentalWarning = execOnce( (configFileName: string, features: string[]) => { @@ -59,7 +61,7 @@ export function setHttpClientAndAgentOptions(config: NextConfig) { if (isAboveNodejs16) { if (config.experimental?.enableUndici && isAboveNodejs18) { Log.warn( - '`enableUndici` option is unnecessary in Node.js v18.0.0 or greater.' + `\`enableUndici\` option is unnecessary in Node.js v${NODE_18_VERSION} or greater.` ) } else { // When appDir is enabled undici is the default because of Response.clone() issues in node-fetch @@ -69,7 +71,7 @@ export function setHttpClientAndAgentOptions(config: NextConfig) { } } else if (config.experimental?.enableUndici) { Log.warn( - '`enableUndici` option requires Node.js v16.8.0 or greater. Falling back to `node-fetch`' + `\`enableUndici\` option requires Node.js v${NODE_16_VERSION} or greater. Falling back to \`node-fetch\`` ) } if ((global as any).__NEXT_HTTP_AGENT) { @@ -164,7 +166,7 @@ function assignDefaults(dir: string, userConfig: { [key: string]: any }) { !isAboveNodejs16 ) { throw new Error( - 'experimental.appDir requires Node 16.8.0 or later.' + `experimental.appDir requires Node v${NODE_16_VERSION} or later.` ) } if ( From 2c3aa8d5b53264297c4a9ad09a2fdc5936bcbc8c Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 28 Oct 2022 20:51:50 -0700 Subject: [PATCH 09/11] Remove debugger statement --- test/e2e/app-dir/app/app/very-large-data-fetch/page.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js index 8437c49ff7c83cc..236bbcd05538d8c 100644 --- a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -1,5 +1,4 @@ export default async function Home() { - // debugger const res = await fetch('http://localhost:3000/api/large-data') const resClone = res.clone() const json = await resClone.json() From 1d54a93e59a5494028f5bff1d25d612c1d853fc9 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 29 Oct 2022 19:03:54 +0200 Subject: [PATCH 10/11] Update test --- .../e2e/app-dir/app/app/very-large-data-fetch/page.js | 10 +++++++++- test/e2e/app-dir/app/pages/api/large-data.js | 4 ++-- test/e2e/app-dir/index.test.ts | 11 +++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js index 236bbcd05538d8c..a1a50b838be7d0e 100644 --- a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -2,5 +2,13 @@ export default async function Home() { const res = await fetch('http://localhost:3000/api/large-data') const resClone = res.clone() const json = await resClone.json() - return
{JSON.stringify(json, null, ' ')}
+ const firstItem = json.arrayOfObjects[0] + + return ( + <> +

Hello World

+

{firstItem.index}

+

{firstItem.random}

+ + ) } diff --git a/test/e2e/app-dir/app/pages/api/large-data.js b/test/e2e/app-dir/app/pages/api/large-data.js index 7deb8cbad2c7f8b..c04c6233aa24090 100644 --- a/test/e2e/app-dir/app/pages/api/large-data.js +++ b/test/e2e/app-dir/app/pages/api/large-data.js @@ -1,9 +1,9 @@ export default function largeData(req, res) { return res.json({ - 'array of objects': [ + arrayOfObjects: [ { index: '0', - 'index start at 5': '5', + random: '5', }, { index: '1', diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index 64c936bdbd38479..d5aaa4156a9a2ca 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -2187,12 +2187,19 @@ describe('app dir', () => { }) }) - describe('very-large-data-fetch', () => { + describe('data fetch with response over 16KB with chunked encoding', () => { it('should load page when fetching a large amount of data', async () => { const browser = await webdriver(next.url, '/very-large-data-fetch') + await new Promise(() => {}) expect( - await (await browser.waitForElementByCss('#done', 10000)).text() + await (await browser.waitForElementByCss('#done', 5000)).text() ).toBe('Hello world') + expect( + await (await browser.waitForElementByCss('#index', 2000)).text() + ).toBe('0') + expect( + await (await browser.waitForElementByCss('#random', 2000)).text() + ).toBe('5') }) }) } From fa31fee5d18d604d1b72ec026d501b96f39891d6 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 29 Oct 2022 21:09:07 +0200 Subject: [PATCH 11/11] Update test --- test/e2e/app-dir/app/api-server.js | 2087 +++++++++++++++++ .../app/app/very-large-data-fetch/page.js | 6 +- test/e2e/app-dir/app/pages/api/large-data.js | 2078 ---------------- test/e2e/app-dir/index.test.ts | 24 +- 4 files changed, 2113 insertions(+), 2082 deletions(-) create mode 100644 test/e2e/app-dir/app/api-server.js delete mode 100644 test/e2e/app-dir/app/pages/api/large-data.js diff --git a/test/e2e/app-dir/app/api-server.js b/test/e2e/app-dir/app/api-server.js new file mode 100644 index 000000000000000..f256a412a4acff8 --- /dev/null +++ b/test/e2e/app-dir/app/api-server.js @@ -0,0 +1,2087 @@ +function largeData(_req, res) { + res.setHeader('Content-Type', 'application/json; charset=utf-8') + return res.end( + JSON.stringify({ + arrayOfObjects: [ + { + index: '0', + random: '5', + }, + { + index: '1', + 'index start at 5': '6', + }, + { + index: '2', + 'index start at 5': '7', + }, + { + index: '3', + 'index start at 5': '8', + }, + { + index: '4', + 'index start at 5': '9', + }, + { + index: '5', + 'index start at 5': '10', + }, + { + index: '6', + 'index start at 5': '11', + }, + { + index: '7', + 'index start at 5': '12', + }, + { + index: '8', + 'index start at 5': '13', + }, + { + index: '9', + 'index start at 5': '14', + }, + { + index: '10', + 'index start at 5': '15', + }, + { + index: '11', + 'index start at 5': '16', + }, + { + index: '12', + 'index start at 5': '17', + }, + { + index: '13', + 'index start at 5': '18', + }, + { + index: '14', + 'index start at 5': '19', + }, + { + index: '15', + 'index start at 5': '20', + }, + { + index: '16', + 'index start at 5': '21', + }, + { + index: '17', + 'index start at 5': '22', + }, + { + index: '18', + 'index start at 5': '23', + }, + { + index: '19', + 'index start at 5': '24', + }, + { + index: '20', + 'index start at 5': '25', + }, + { + index: '21', + 'index start at 5': '26', + }, + { + index: '22', + 'index start at 5': '27', + }, + { + index: '23', + 'index start at 5': '28', + }, + { + index: '24', + 'index start at 5': '29', + }, + { + index: '25', + 'index start at 5': '30', + }, + { + index: '26', + 'index start at 5': '31', + }, + { + index: '27', + 'index start at 5': '32', + }, + { + index: '28', + 'index start at 5': '33', + }, + { + index: '29', + 'index start at 5': '34', + }, + { + index: '30', + 'index start at 5': '35', + }, + { + index: '31', + 'index start at 5': '36', + }, + { + index: '32', + 'index start at 5': '37', + }, + { + index: '33', + 'index start at 5': '38', + }, + { + index: '34', + 'index start at 5': '39', + }, + { + index: '35', + 'index start at 5': '40', + }, + { + index: '36', + 'index start at 5': '41', + }, + { + index: '37', + 'index start at 5': '42', + }, + { + index: '38', + 'index start at 5': '43', + }, + { + index: '39', + 'index start at 5': '44', + }, + { + index: '40', + 'index start at 5': '45', + }, + { + index: '41', + 'index start at 5': '46', + }, + { + index: '42', + 'index start at 5': '47', + }, + { + index: '43', + 'index start at 5': '48', + }, + { + index: '44', + 'index start at 5': '49', + }, + { + index: '45', + 'index start at 5': '50', + }, + { + index: '46', + 'index start at 5': '51', + }, + { + index: '47', + 'index start at 5': '52', + }, + { + index: '48', + 'index start at 5': '53', + }, + { + index: '49', + 'index start at 5': '54', + }, + { + index: '50', + 'index start at 5': '55', + }, + { + index: '51', + 'index start at 5': '56', + }, + { + index: '52', + 'index start at 5': '57', + }, + { + index: '53', + 'index start at 5': '58', + }, + { + index: '54', + 'index start at 5': '59', + }, + { + index: '55', + 'index start at 5': '60', + }, + { + index: '56', + 'index start at 5': '61', + }, + { + index: '57', + 'index start at 5': '62', + }, + { + index: '58', + 'index start at 5': '63', + }, + { + index: '59', + 'index start at 5': '64', + }, + { + index: '60', + 'index start at 5': '65', + }, + { + index: '61', + 'index start at 5': '66', + }, + { + index: '62', + 'index start at 5': '67', + }, + { + index: '63', + 'index start at 5': '68', + }, + { + index: '64', + 'index start at 5': '69', + }, + { + index: '65', + 'index start at 5': '70', + }, + { + index: '66', + 'index start at 5': '71', + }, + { + index: '67', + 'index start at 5': '72', + }, + { + index: '68', + 'index start at 5': '73', + }, + { + index: '69', + 'index start at 5': '74', + }, + { + index: '70', + 'index start at 5': '75', + }, + { + index: '71', + 'index start at 5': '76', + }, + { + index: '72', + 'index start at 5': '77', + }, + { + index: '73', + 'index start at 5': '78', + }, + { + index: '74', + 'index start at 5': '79', + }, + { + index: '75', + 'index start at 5': '80', + }, + { + index: '76', + 'index start at 5': '81', + }, + { + index: '77', + 'index start at 5': '82', + }, + { + index: '78', + 'index start at 5': '83', + }, + { + index: '79', + 'index start at 5': '84', + }, + { + index: '80', + 'index start at 5': '85', + }, + { + index: '81', + 'index start at 5': '86', + }, + { + index: '82', + 'index start at 5': '87', + }, + { + index: '83', + 'index start at 5': '88', + }, + { + index: '84', + 'index start at 5': '89', + }, + { + index: '85', + 'index start at 5': '90', + }, + { + index: '86', + 'index start at 5': '91', + }, + { + index: '87', + 'index start at 5': '92', + }, + { + index: '88', + 'index start at 5': '93', + }, + { + index: '89', + 'index start at 5': '94', + }, + { + index: '90', + 'index start at 5': '95', + }, + { + index: '91', + 'index start at 5': '96', + }, + { + index: '92', + 'index start at 5': '97', + }, + { + index: '93', + 'index start at 5': '98', + }, + { + index: '94', + 'index start at 5': '99', + }, + { + index: '95', + 'index start at 5': '100', + }, + { + index: '96', + 'index start at 5': '101', + }, + { + index: '97', + 'index start at 5': '102', + }, + { + index: '98', + 'index start at 5': '103', + }, + { + index: '99', + 'index start at 5': '104', + }, + { + index: '100', + 'index start at 5': '105', + }, + { + index: '101', + 'index start at 5': '106', + }, + { + index: '102', + 'index start at 5': '107', + }, + { + index: '103', + 'index start at 5': '108', + }, + { + index: '104', + 'index start at 5': '109', + }, + { + index: '105', + 'index start at 5': '110', + }, + { + index: '106', + 'index start at 5': '111', + }, + { + index: '107', + 'index start at 5': '112', + }, + { + index: '108', + 'index start at 5': '113', + }, + { + index: '109', + 'index start at 5': '114', + }, + { + index: '110', + 'index start at 5': '115', + }, + { + index: '111', + 'index start at 5': '116', + }, + { + index: '112', + 'index start at 5': '117', + }, + { + index: '113', + 'index start at 5': '118', + }, + { + index: '114', + 'index start at 5': '119', + }, + { + index: '115', + 'index start at 5': '120', + }, + { + index: '116', + 'index start at 5': '121', + }, + { + index: '117', + 'index start at 5': '122', + }, + { + index: '118', + 'index start at 5': '123', + }, + { + index: '119', + 'index start at 5': '124', + }, + { + index: '120', + 'index start at 5': '125', + }, + { + index: '121', + 'index start at 5': '126', + }, + { + index: '122', + 'index start at 5': '127', + }, + { + index: '123', + 'index start at 5': '128', + }, + { + index: '124', + 'index start at 5': '129', + }, + { + index: '125', + 'index start at 5': '130', + }, + { + index: '126', + 'index start at 5': '131', + }, + { + index: '127', + 'index start at 5': '132', + }, + { + index: '128', + 'index start at 5': '133', + }, + { + index: '129', + 'index start at 5': '134', + }, + { + index: '130', + 'index start at 5': '135', + }, + { + index: '131', + 'index start at 5': '136', + }, + { + index: '132', + 'index start at 5': '137', + }, + { + index: '133', + 'index start at 5': '138', + }, + { + index: '134', + 'index start at 5': '139', + }, + { + index: '135', + 'index start at 5': '140', + }, + { + index: '136', + 'index start at 5': '141', + }, + { + index: '137', + 'index start at 5': '142', + }, + { + index: '138', + 'index start at 5': '143', + }, + { + index: '139', + 'index start at 5': '144', + }, + { + index: '140', + 'index start at 5': '145', + }, + { + index: '141', + 'index start at 5': '146', + }, + { + index: '142', + 'index start at 5': '147', + }, + { + index: '143', + 'index start at 5': '148', + }, + { + index: '144', + 'index start at 5': '149', + }, + { + index: '145', + 'index start at 5': '150', + }, + { + index: '146', + 'index start at 5': '151', + }, + { + index: '147', + 'index start at 5': '152', + }, + { + index: '148', + 'index start at 5': '153', + }, + { + index: '149', + 'index start at 5': '154', + }, + { + index: '150', + 'index start at 5': '155', + }, + { + index: '151', + 'index start at 5': '156', + }, + { + index: '152', + 'index start at 5': '157', + }, + { + index: '153', + 'index start at 5': '158', + }, + { + index: '154', + 'index start at 5': '159', + }, + { + index: '155', + 'index start at 5': '160', + }, + { + index: '156', + 'index start at 5': '161', + }, + { + index: '157', + 'index start at 5': '162', + }, + { + index: '158', + 'index start at 5': '163', + }, + { + index: '159', + 'index start at 5': '164', + }, + { + index: '160', + 'index start at 5': '165', + }, + { + index: '161', + 'index start at 5': '166', + }, + { + index: '162', + 'index start at 5': '167', + }, + { + index: '163', + 'index start at 5': '168', + }, + { + index: '164', + 'index start at 5': '169', + }, + { + index: '165', + 'index start at 5': '170', + }, + { + index: '166', + 'index start at 5': '171', + }, + { + index: '167', + 'index start at 5': '172', + }, + { + index: '168', + 'index start at 5': '173', + }, + { + index: '169', + 'index start at 5': '174', + }, + { + index: '170', + 'index start at 5': '175', + }, + { + index: '171', + 'index start at 5': '176', + }, + { + index: '172', + 'index start at 5': '177', + }, + { + index: '173', + 'index start at 5': '178', + }, + { + index: '174', + 'index start at 5': '179', + }, + { + index: '175', + 'index start at 5': '180', + }, + { + index: '176', + 'index start at 5': '181', + }, + { + index: '177', + 'index start at 5': '182', + }, + { + index: '178', + 'index start at 5': '183', + }, + { + index: '179', + 'index start at 5': '184', + }, + { + index: '180', + 'index start at 5': '185', + }, + { + index: '181', + 'index start at 5': '186', + }, + { + index: '182', + 'index start at 5': '187', + }, + { + index: '183', + 'index start at 5': '188', + }, + { + index: '184', + 'index start at 5': '189', + }, + { + index: '185', + 'index start at 5': '190', + }, + { + index: '186', + 'index start at 5': '191', + }, + { + index: '187', + 'index start at 5': '192', + }, + { + index: '188', + 'index start at 5': '193', + }, + { + index: '189', + 'index start at 5': '194', + }, + { + index: '190', + 'index start at 5': '195', + }, + { + index: '191', + 'index start at 5': '196', + }, + { + index: '192', + 'index start at 5': '197', + }, + { + index: '193', + 'index start at 5': '198', + }, + { + index: '194', + 'index start at 5': '199', + }, + { + index: '195', + 'index start at 5': '200', + }, + { + index: '196', + 'index start at 5': '201', + }, + { + index: '197', + 'index start at 5': '202', + }, + { + index: '198', + 'index start at 5': '203', + }, + { + index: '199', + 'index start at 5': '204', + }, + { + index: '200', + 'index start at 5': '205', + }, + { + index: '201', + 'index start at 5': '206', + }, + { + index: '202', + 'index start at 5': '207', + }, + { + index: '203', + 'index start at 5': '208', + }, + { + index: '204', + 'index start at 5': '209', + }, + { + index: '205', + 'index start at 5': '210', + }, + { + index: '206', + 'index start at 5': '211', + }, + { + index: '207', + 'index start at 5': '212', + }, + { + index: '208', + 'index start at 5': '213', + }, + { + index: '209', + 'index start at 5': '214', + }, + { + index: '210', + 'index start at 5': '215', + }, + { + index: '211', + 'index start at 5': '216', + }, + { + index: '212', + 'index start at 5': '217', + }, + { + index: '213', + 'index start at 5': '218', + }, + { + index: '214', + 'index start at 5': '219', + }, + { + index: '215', + 'index start at 5': '220', + }, + { + index: '216', + 'index start at 5': '221', + }, + { + index: '217', + 'index start at 5': '222', + }, + { + index: '218', + 'index start at 5': '223', + }, + { + index: '219', + 'index start at 5': '224', + }, + { + index: '220', + 'index start at 5': '225', + }, + { + index: '221', + 'index start at 5': '226', + }, + { + index: '222', + 'index start at 5': '227', + }, + { + index: '223', + 'index start at 5': '228', + }, + { + index: '224', + 'index start at 5': '229', + }, + { + index: '225', + 'index start at 5': '230', + }, + { + index: '226', + 'index start at 5': '231', + }, + { + index: '227', + 'index start at 5': '232', + }, + { + index: '228', + 'index start at 5': '233', + }, + { + index: '229', + 'index start at 5': '234', + }, + { + index: '230', + 'index start at 5': '235', + }, + { + index: '231', + 'index start at 5': '236', + }, + { + index: '232', + 'index start at 5': '237', + }, + { + index: '233', + 'index start at 5': '238', + }, + { + index: '234', + 'index start at 5': '239', + }, + { + index: '235', + 'index start at 5': '240', + }, + { + index: '236', + 'index start at 5': '241', + }, + { + index: '237', + 'index start at 5': '242', + }, + { + index: '238', + 'index start at 5': '243', + }, + { + index: '239', + 'index start at 5': '244', + }, + { + index: '240', + 'index start at 5': '245', + }, + { + index: '241', + 'index start at 5': '246', + }, + { + index: '242', + 'index start at 5': '247', + }, + { + index: '243', + 'index start at 5': '248', + }, + { + index: '244', + 'index start at 5': '249', + }, + { + index: '245', + 'index start at 5': '250', + }, + { + index: '246', + 'index start at 5': '251', + }, + { + index: '247', + 'index start at 5': '252', + }, + { + index: '248', + 'index start at 5': '253', + }, + { + index: '249', + 'index start at 5': '254', + }, + { + index: '250', + 'index start at 5': '255', + }, + { + index: '251', + 'index start at 5': '256', + }, + { + index: '252', + 'index start at 5': '257', + }, + { + index: '253', + 'index start at 5': '258', + }, + { + index: '254', + 'index start at 5': '259', + }, + { + index: '255', + 'index start at 5': '260', + }, + { + index: '256', + 'index start at 5': '261', + }, + { + index: '257', + 'index start at 5': '262', + }, + { + index: '258', + 'index start at 5': '263', + }, + { + index: '259', + 'index start at 5': '264', + }, + { + index: '260', + 'index start at 5': '265', + }, + { + index: '261', + 'index start at 5': '266', + }, + { + index: '262', + 'index start at 5': '267', + }, + { + index: '263', + 'index start at 5': '268', + }, + { + index: '264', + 'index start at 5': '269', + }, + { + index: '265', + 'index start at 5': '270', + }, + { + index: '266', + 'index start at 5': '271', + }, + { + index: '267', + 'index start at 5': '272', + }, + { + index: '268', + 'index start at 5': '273', + }, + { + index: '269', + 'index start at 5': '274', + }, + { + index: '270', + 'index start at 5': '275', + }, + { + index: '271', + 'index start at 5': '276', + }, + { + index: '272', + 'index start at 5': '277', + }, + { + index: '273', + 'index start at 5': '278', + }, + { + index: '274', + 'index start at 5': '279', + }, + { + index: '275', + 'index start at 5': '280', + }, + { + index: '276', + 'index start at 5': '281', + }, + { + index: '277', + 'index start at 5': '282', + }, + { + index: '278', + 'index start at 5': '283', + }, + { + index: '279', + 'index start at 5': '284', + }, + { + index: '280', + 'index start at 5': '285', + }, + { + index: '281', + 'index start at 5': '286', + }, + { + index: '282', + 'index start at 5': '287', + }, + { + index: '283', + 'index start at 5': '288', + }, + { + index: '284', + 'index start at 5': '289', + }, + { + index: '285', + 'index start at 5': '290', + }, + { + index: '286', + 'index start at 5': '291', + }, + { + index: '287', + 'index start at 5': '292', + }, + { + index: '288', + 'index start at 5': '293', + }, + { + index: '289', + 'index start at 5': '294', + }, + { + index: '290', + 'index start at 5': '295', + }, + { + index: '291', + 'index start at 5': '296', + }, + { + index: '292', + 'index start at 5': '297', + }, + { + index: '293', + 'index start at 5': '298', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + { + index: '294', + 'index start at 5': '299', + }, + { + index: '295', + 'index start at 5': '300', + }, + { + index: '296', + 'index start at 5': '301', + }, + { + index: '297', + 'index start at 5': '302', + }, + { + index: '298', + 'index start at 5': '303', + }, + { + index: '299', + 'index start at 5': '304', + }, + { + index: '300', + 'index start at 5': '305', + }, + { + index: '301', + 'index start at 5': '306', + }, + { + index: '302', + 'index start at 5': '307', + }, + { + index: '303', + 'index start at 5': '308', + }, + { + index: '304', + 'index start at 5': '309', + }, + { + index: '305', + 'index start at 5': '310', + }, + { + index: '306', + 'index start at 5': '311', + }, + { + index: '307', + 'index start at 5': '312', + }, + { + index: '308', + 'index start at 5': '313', + }, + { + index: '309', + 'index start at 5': '314', + }, + { + index: '310', + 'index start at 5': '315', + }, + { + index: '311', + 'index start at 5': '316', + }, + { + index: '312', + 'index start at 5': '317', + }, + { + index: '313', + 'index start at 5': '318', + }, + { + index: '314', + 'index start at 5': '319', + }, + { + index: '315', + 'index start at 5': '320', + }, + { + index: '316', + 'index start at 5': '321', + }, + { + index: '317', + 'index start at 5': '322', + }, + { + index: '318', + 'index start at 5': '323', + }, + { + index: '319', + 'index start at 5': '324', + }, + { + index: '320', + 'index start at 5': '325', + }, + { + index: '321', + 'index start at 5': '326', + }, + { + index: '322', + 'index start at 5': '327', + }, + { + index: '323', + 'index start at 5': '328', + }, + { + index: '324', + 'index start at 5': '329', + }, + { + index: '325', + 'index start at 5': '330', + }, + { + index: '326', + 'index start at 5': '331', + }, + { + index: '327', + 'index start at 5': '332', + }, + { + index: '328', + 'index start at 5': '333', + }, + { + index: '329', + 'index start at 5': '334', + }, + { + index: '330', + 'index start at 5': '335', + }, + { + index: '331', + 'index start at 5': '336', + }, + { + index: '332', + 'index start at 5': '337', + }, + { + index: '333', + 'index start at 5': '338', + }, + { + index: '334', + 'index start at 5': '339', + }, + { + index: '335', + 'index start at 5': '340', + }, + { + index: '336', + 'index start at 5': '341', + }, + { + index: '337', + 'index start at 5': '342', + }, + { + index: '338', + 'index start at 5': '343', + }, + { + index: '339', + 'index start at 5': '344', + }, + { + index: '340', + 'index start at 5': '345', + }, + { + index: '341', + 'index start at 5': '346', + }, + { + index: '342', + 'index start at 5': '347', + }, + { + index: '343', + 'index start at 5': '348', + }, + { + index: '344', + 'index start at 5': '349', + }, + { + index: '345', + 'index start at 5': '350', + }, + { + index: '346', + 'index start at 5': '351', + }, + { + index: '347', + 'index start at 5': '352', + }, + { + index: '348', + 'index start at 5': '353', + }, + { + index: '349', + 'index start at 5': '354', + }, + ], + }) + ) +} + +const server = require('http').Server(largeData) + +server.listen(process.env.PORT || 3000, () => { + console.log('Listening on port 3000') +}) diff --git a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js index a1a50b838be7d0e..8bd01d09ef96f26 100644 --- a/test/e2e/app-dir/app/app/very-large-data-fetch/page.js +++ b/test/e2e/app-dir/app/app/very-large-data-fetch/page.js @@ -1,12 +1,14 @@ export default async function Home() { - const res = await fetch('http://localhost:3000/api/large-data') + const res = await fetch( + `http://localhost:${process.env.API_SERVER_PORT || 3000}/api/large-data` + ) const resClone = res.clone() const json = await resClone.json() const firstItem = json.arrayOfObjects[0] return ( <> -

Hello World

+

Hello world

{firstItem.index}

{firstItem.random}

diff --git a/test/e2e/app-dir/app/pages/api/large-data.js b/test/e2e/app-dir/app/pages/api/large-data.js deleted file mode 100644 index c04c6233aa24090..000000000000000 --- a/test/e2e/app-dir/app/pages/api/large-data.js +++ /dev/null @@ -1,2078 +0,0 @@ -export default function largeData(req, res) { - return res.json({ - arrayOfObjects: [ - { - index: '0', - random: '5', - }, - { - index: '1', - 'index start at 5': '6', - }, - { - index: '2', - 'index start at 5': '7', - }, - { - index: '3', - 'index start at 5': '8', - }, - { - index: '4', - 'index start at 5': '9', - }, - { - index: '5', - 'index start at 5': '10', - }, - { - index: '6', - 'index start at 5': '11', - }, - { - index: '7', - 'index start at 5': '12', - }, - { - index: '8', - 'index start at 5': '13', - }, - { - index: '9', - 'index start at 5': '14', - }, - { - index: '10', - 'index start at 5': '15', - }, - { - index: '11', - 'index start at 5': '16', - }, - { - index: '12', - 'index start at 5': '17', - }, - { - index: '13', - 'index start at 5': '18', - }, - { - index: '14', - 'index start at 5': '19', - }, - { - index: '15', - 'index start at 5': '20', - }, - { - index: '16', - 'index start at 5': '21', - }, - { - index: '17', - 'index start at 5': '22', - }, - { - index: '18', - 'index start at 5': '23', - }, - { - index: '19', - 'index start at 5': '24', - }, - { - index: '20', - 'index start at 5': '25', - }, - { - index: '21', - 'index start at 5': '26', - }, - { - index: '22', - 'index start at 5': '27', - }, - { - index: '23', - 'index start at 5': '28', - }, - { - index: '24', - 'index start at 5': '29', - }, - { - index: '25', - 'index start at 5': '30', - }, - { - index: '26', - 'index start at 5': '31', - }, - { - index: '27', - 'index start at 5': '32', - }, - { - index: '28', - 'index start at 5': '33', - }, - { - index: '29', - 'index start at 5': '34', - }, - { - index: '30', - 'index start at 5': '35', - }, - { - index: '31', - 'index start at 5': '36', - }, - { - index: '32', - 'index start at 5': '37', - }, - { - index: '33', - 'index start at 5': '38', - }, - { - index: '34', - 'index start at 5': '39', - }, - { - index: '35', - 'index start at 5': '40', - }, - { - index: '36', - 'index start at 5': '41', - }, - { - index: '37', - 'index start at 5': '42', - }, - { - index: '38', - 'index start at 5': '43', - }, - { - index: '39', - 'index start at 5': '44', - }, - { - index: '40', - 'index start at 5': '45', - }, - { - index: '41', - 'index start at 5': '46', - }, - { - index: '42', - 'index start at 5': '47', - }, - { - index: '43', - 'index start at 5': '48', - }, - { - index: '44', - 'index start at 5': '49', - }, - { - index: '45', - 'index start at 5': '50', - }, - { - index: '46', - 'index start at 5': '51', - }, - { - index: '47', - 'index start at 5': '52', - }, - { - index: '48', - 'index start at 5': '53', - }, - { - index: '49', - 'index start at 5': '54', - }, - { - index: '50', - 'index start at 5': '55', - }, - { - index: '51', - 'index start at 5': '56', - }, - { - index: '52', - 'index start at 5': '57', - }, - { - index: '53', - 'index start at 5': '58', - }, - { - index: '54', - 'index start at 5': '59', - }, - { - index: '55', - 'index start at 5': '60', - }, - { - index: '56', - 'index start at 5': '61', - }, - { - index: '57', - 'index start at 5': '62', - }, - { - index: '58', - 'index start at 5': '63', - }, - { - index: '59', - 'index start at 5': '64', - }, - { - index: '60', - 'index start at 5': '65', - }, - { - index: '61', - 'index start at 5': '66', - }, - { - index: '62', - 'index start at 5': '67', - }, - { - index: '63', - 'index start at 5': '68', - }, - { - index: '64', - 'index start at 5': '69', - }, - { - index: '65', - 'index start at 5': '70', - }, - { - index: '66', - 'index start at 5': '71', - }, - { - index: '67', - 'index start at 5': '72', - }, - { - index: '68', - 'index start at 5': '73', - }, - { - index: '69', - 'index start at 5': '74', - }, - { - index: '70', - 'index start at 5': '75', - }, - { - index: '71', - 'index start at 5': '76', - }, - { - index: '72', - 'index start at 5': '77', - }, - { - index: '73', - 'index start at 5': '78', - }, - { - index: '74', - 'index start at 5': '79', - }, - { - index: '75', - 'index start at 5': '80', - }, - { - index: '76', - 'index start at 5': '81', - }, - { - index: '77', - 'index start at 5': '82', - }, - { - index: '78', - 'index start at 5': '83', - }, - { - index: '79', - 'index start at 5': '84', - }, - { - index: '80', - 'index start at 5': '85', - }, - { - index: '81', - 'index start at 5': '86', - }, - { - index: '82', - 'index start at 5': '87', - }, - { - index: '83', - 'index start at 5': '88', - }, - { - index: '84', - 'index start at 5': '89', - }, - { - index: '85', - 'index start at 5': '90', - }, - { - index: '86', - 'index start at 5': '91', - }, - { - index: '87', - 'index start at 5': '92', - }, - { - index: '88', - 'index start at 5': '93', - }, - { - index: '89', - 'index start at 5': '94', - }, - { - index: '90', - 'index start at 5': '95', - }, - { - index: '91', - 'index start at 5': '96', - }, - { - index: '92', - 'index start at 5': '97', - }, - { - index: '93', - 'index start at 5': '98', - }, - { - index: '94', - 'index start at 5': '99', - }, - { - index: '95', - 'index start at 5': '100', - }, - { - index: '96', - 'index start at 5': '101', - }, - { - index: '97', - 'index start at 5': '102', - }, - { - index: '98', - 'index start at 5': '103', - }, - { - index: '99', - 'index start at 5': '104', - }, - { - index: '100', - 'index start at 5': '105', - }, - { - index: '101', - 'index start at 5': '106', - }, - { - index: '102', - 'index start at 5': '107', - }, - { - index: '103', - 'index start at 5': '108', - }, - { - index: '104', - 'index start at 5': '109', - }, - { - index: '105', - 'index start at 5': '110', - }, - { - index: '106', - 'index start at 5': '111', - }, - { - index: '107', - 'index start at 5': '112', - }, - { - index: '108', - 'index start at 5': '113', - }, - { - index: '109', - 'index start at 5': '114', - }, - { - index: '110', - 'index start at 5': '115', - }, - { - index: '111', - 'index start at 5': '116', - }, - { - index: '112', - 'index start at 5': '117', - }, - { - index: '113', - 'index start at 5': '118', - }, - { - index: '114', - 'index start at 5': '119', - }, - { - index: '115', - 'index start at 5': '120', - }, - { - index: '116', - 'index start at 5': '121', - }, - { - index: '117', - 'index start at 5': '122', - }, - { - index: '118', - 'index start at 5': '123', - }, - { - index: '119', - 'index start at 5': '124', - }, - { - index: '120', - 'index start at 5': '125', - }, - { - index: '121', - 'index start at 5': '126', - }, - { - index: '122', - 'index start at 5': '127', - }, - { - index: '123', - 'index start at 5': '128', - }, - { - index: '124', - 'index start at 5': '129', - }, - { - index: '125', - 'index start at 5': '130', - }, - { - index: '126', - 'index start at 5': '131', - }, - { - index: '127', - 'index start at 5': '132', - }, - { - index: '128', - 'index start at 5': '133', - }, - { - index: '129', - 'index start at 5': '134', - }, - { - index: '130', - 'index start at 5': '135', - }, - { - index: '131', - 'index start at 5': '136', - }, - { - index: '132', - 'index start at 5': '137', - }, - { - index: '133', - 'index start at 5': '138', - }, - { - index: '134', - 'index start at 5': '139', - }, - { - index: '135', - 'index start at 5': '140', - }, - { - index: '136', - 'index start at 5': '141', - }, - { - index: '137', - 'index start at 5': '142', - }, - { - index: '138', - 'index start at 5': '143', - }, - { - index: '139', - 'index start at 5': '144', - }, - { - index: '140', - 'index start at 5': '145', - }, - { - index: '141', - 'index start at 5': '146', - }, - { - index: '142', - 'index start at 5': '147', - }, - { - index: '143', - 'index start at 5': '148', - }, - { - index: '144', - 'index start at 5': '149', - }, - { - index: '145', - 'index start at 5': '150', - }, - { - index: '146', - 'index start at 5': '151', - }, - { - index: '147', - 'index start at 5': '152', - }, - { - index: '148', - 'index start at 5': '153', - }, - { - index: '149', - 'index start at 5': '154', - }, - { - index: '150', - 'index start at 5': '155', - }, - { - index: '151', - 'index start at 5': '156', - }, - { - index: '152', - 'index start at 5': '157', - }, - { - index: '153', - 'index start at 5': '158', - }, - { - index: '154', - 'index start at 5': '159', - }, - { - index: '155', - 'index start at 5': '160', - }, - { - index: '156', - 'index start at 5': '161', - }, - { - index: '157', - 'index start at 5': '162', - }, - { - index: '158', - 'index start at 5': '163', - }, - { - index: '159', - 'index start at 5': '164', - }, - { - index: '160', - 'index start at 5': '165', - }, - { - index: '161', - 'index start at 5': '166', - }, - { - index: '162', - 'index start at 5': '167', - }, - { - index: '163', - 'index start at 5': '168', - }, - { - index: '164', - 'index start at 5': '169', - }, - { - index: '165', - 'index start at 5': '170', - }, - { - index: '166', - 'index start at 5': '171', - }, - { - index: '167', - 'index start at 5': '172', - }, - { - index: '168', - 'index start at 5': '173', - }, - { - index: '169', - 'index start at 5': '174', - }, - { - index: '170', - 'index start at 5': '175', - }, - { - index: '171', - 'index start at 5': '176', - }, - { - index: '172', - 'index start at 5': '177', - }, - { - index: '173', - 'index start at 5': '178', - }, - { - index: '174', - 'index start at 5': '179', - }, - { - index: '175', - 'index start at 5': '180', - }, - { - index: '176', - 'index start at 5': '181', - }, - { - index: '177', - 'index start at 5': '182', - }, - { - index: '178', - 'index start at 5': '183', - }, - { - index: '179', - 'index start at 5': '184', - }, - { - index: '180', - 'index start at 5': '185', - }, - { - index: '181', - 'index start at 5': '186', - }, - { - index: '182', - 'index start at 5': '187', - }, - { - index: '183', - 'index start at 5': '188', - }, - { - index: '184', - 'index start at 5': '189', - }, - { - index: '185', - 'index start at 5': '190', - }, - { - index: '186', - 'index start at 5': '191', - }, - { - index: '187', - 'index start at 5': '192', - }, - { - index: '188', - 'index start at 5': '193', - }, - { - index: '189', - 'index start at 5': '194', - }, - { - index: '190', - 'index start at 5': '195', - }, - { - index: '191', - 'index start at 5': '196', - }, - { - index: '192', - 'index start at 5': '197', - }, - { - index: '193', - 'index start at 5': '198', - }, - { - index: '194', - 'index start at 5': '199', - }, - { - index: '195', - 'index start at 5': '200', - }, - { - index: '196', - 'index start at 5': '201', - }, - { - index: '197', - 'index start at 5': '202', - }, - { - index: '198', - 'index start at 5': '203', - }, - { - index: '199', - 'index start at 5': '204', - }, - { - index: '200', - 'index start at 5': '205', - }, - { - index: '201', - 'index start at 5': '206', - }, - { - index: '202', - 'index start at 5': '207', - }, - { - index: '203', - 'index start at 5': '208', - }, - { - index: '204', - 'index start at 5': '209', - }, - { - index: '205', - 'index start at 5': '210', - }, - { - index: '206', - 'index start at 5': '211', - }, - { - index: '207', - 'index start at 5': '212', - }, - { - index: '208', - 'index start at 5': '213', - }, - { - index: '209', - 'index start at 5': '214', - }, - { - index: '210', - 'index start at 5': '215', - }, - { - index: '211', - 'index start at 5': '216', - }, - { - index: '212', - 'index start at 5': '217', - }, - { - index: '213', - 'index start at 5': '218', - }, - { - index: '214', - 'index start at 5': '219', - }, - { - index: '215', - 'index start at 5': '220', - }, - { - index: '216', - 'index start at 5': '221', - }, - { - index: '217', - 'index start at 5': '222', - }, - { - index: '218', - 'index start at 5': '223', - }, - { - index: '219', - 'index start at 5': '224', - }, - { - index: '220', - 'index start at 5': '225', - }, - { - index: '221', - 'index start at 5': '226', - }, - { - index: '222', - 'index start at 5': '227', - }, - { - index: '223', - 'index start at 5': '228', - }, - { - index: '224', - 'index start at 5': '229', - }, - { - index: '225', - 'index start at 5': '230', - }, - { - index: '226', - 'index start at 5': '231', - }, - { - index: '227', - 'index start at 5': '232', - }, - { - index: '228', - 'index start at 5': '233', - }, - { - index: '229', - 'index start at 5': '234', - }, - { - index: '230', - 'index start at 5': '235', - }, - { - index: '231', - 'index start at 5': '236', - }, - { - index: '232', - 'index start at 5': '237', - }, - { - index: '233', - 'index start at 5': '238', - }, - { - index: '234', - 'index start at 5': '239', - }, - { - index: '235', - 'index start at 5': '240', - }, - { - index: '236', - 'index start at 5': '241', - }, - { - index: '237', - 'index start at 5': '242', - }, - { - index: '238', - 'index start at 5': '243', - }, - { - index: '239', - 'index start at 5': '244', - }, - { - index: '240', - 'index start at 5': '245', - }, - { - index: '241', - 'index start at 5': '246', - }, - { - index: '242', - 'index start at 5': '247', - }, - { - index: '243', - 'index start at 5': '248', - }, - { - index: '244', - 'index start at 5': '249', - }, - { - index: '245', - 'index start at 5': '250', - }, - { - index: '246', - 'index start at 5': '251', - }, - { - index: '247', - 'index start at 5': '252', - }, - { - index: '248', - 'index start at 5': '253', - }, - { - index: '249', - 'index start at 5': '254', - }, - { - index: '250', - 'index start at 5': '255', - }, - { - index: '251', - 'index start at 5': '256', - }, - { - index: '252', - 'index start at 5': '257', - }, - { - index: '253', - 'index start at 5': '258', - }, - { - index: '254', - 'index start at 5': '259', - }, - { - index: '255', - 'index start at 5': '260', - }, - { - index: '256', - 'index start at 5': '261', - }, - { - index: '257', - 'index start at 5': '262', - }, - { - index: '258', - 'index start at 5': '263', - }, - { - index: '259', - 'index start at 5': '264', - }, - { - index: '260', - 'index start at 5': '265', - }, - { - index: '261', - 'index start at 5': '266', - }, - { - index: '262', - 'index start at 5': '267', - }, - { - index: '263', - 'index start at 5': '268', - }, - { - index: '264', - 'index start at 5': '269', - }, - { - index: '265', - 'index start at 5': '270', - }, - { - index: '266', - 'index start at 5': '271', - }, - { - index: '267', - 'index start at 5': '272', - }, - { - index: '268', - 'index start at 5': '273', - }, - { - index: '269', - 'index start at 5': '274', - }, - { - index: '270', - 'index start at 5': '275', - }, - { - index: '271', - 'index start at 5': '276', - }, - { - index: '272', - 'index start at 5': '277', - }, - { - index: '273', - 'index start at 5': '278', - }, - { - index: '274', - 'index start at 5': '279', - }, - { - index: '275', - 'index start at 5': '280', - }, - { - index: '276', - 'index start at 5': '281', - }, - { - index: '277', - 'index start at 5': '282', - }, - { - index: '278', - 'index start at 5': '283', - }, - { - index: '279', - 'index start at 5': '284', - }, - { - index: '280', - 'index start at 5': '285', - }, - { - index: '281', - 'index start at 5': '286', - }, - { - index: '282', - 'index start at 5': '287', - }, - { - index: '283', - 'index start at 5': '288', - }, - { - index: '284', - 'index start at 5': '289', - }, - { - index: '285', - 'index start at 5': '290', - }, - { - index: '286', - 'index start at 5': '291', - }, - { - index: '287', - 'index start at 5': '292', - }, - { - index: '288', - 'index start at 5': '293', - }, - { - index: '289', - 'index start at 5': '294', - }, - { - index: '290', - 'index start at 5': '295', - }, - { - index: '291', - 'index start at 5': '296', - }, - { - index: '292', - 'index start at 5': '297', - }, - { - index: '293', - 'index start at 5': '298', - }, - { - index: '294', - 'index start at 5': '299', - }, - { - index: '295', - 'index start at 5': '300', - }, - { - index: '296', - 'index start at 5': '301', - }, - { - index: '297', - 'index start at 5': '302', - }, - { - index: '298', - 'index start at 5': '303', - }, - { - index: '299', - 'index start at 5': '304', - }, - { - index: '300', - 'index start at 5': '305', - }, - { - index: '301', - 'index start at 5': '306', - }, - { - index: '302', - 'index start at 5': '307', - }, - { - index: '303', - 'index start at 5': '308', - }, - { - index: '304', - 'index start at 5': '309', - }, - { - index: '305', - 'index start at 5': '310', - }, - { - index: '306', - 'index start at 5': '311', - }, - { - index: '307', - 'index start at 5': '312', - }, - { - index: '308', - 'index start at 5': '313', - }, - { - index: '309', - 'index start at 5': '314', - }, - { - index: '310', - 'index start at 5': '315', - }, - { - index: '311', - 'index start at 5': '316', - }, - { - index: '312', - 'index start at 5': '317', - }, - { - index: '313', - 'index start at 5': '318', - }, - { - index: '314', - 'index start at 5': '319', - }, - { - index: '315', - 'index start at 5': '320', - }, - { - index: '316', - 'index start at 5': '321', - }, - { - index: '317', - 'index start at 5': '322', - }, - { - index: '318', - 'index start at 5': '323', - }, - { - index: '319', - 'index start at 5': '324', - }, - { - index: '320', - 'index start at 5': '325', - }, - { - index: '321', - 'index start at 5': '326', - }, - { - index: '322', - 'index start at 5': '327', - }, - { - index: '323', - 'index start at 5': '328', - }, - { - index: '324', - 'index start at 5': '329', - }, - { - index: '325', - 'index start at 5': '330', - }, - { - index: '326', - 'index start at 5': '331', - }, - { - index: '327', - 'index start at 5': '332', - }, - { - index: '328', - 'index start at 5': '333', - }, - { - index: '329', - 'index start at 5': '334', - }, - { - index: '330', - 'index start at 5': '335', - }, - { - index: '331', - 'index start at 5': '336', - }, - { - index: '332', - 'index start at 5': '337', - }, - { - index: '333', - 'index start at 5': '338', - }, - { - index: '334', - 'index start at 5': '339', - }, - { - index: '335', - 'index start at 5': '340', - }, - { - index: '336', - 'index start at 5': '341', - }, - { - index: '337', - 'index start at 5': '342', - }, - { - index: '338', - 'index start at 5': '343', - }, - { - index: '339', - 'index start at 5': '344', - }, - { - index: '340', - 'index start at 5': '345', - }, - { - index: '341', - 'index start at 5': '346', - }, - { - index: '342', - 'index start at 5': '347', - }, - { - index: '343', - 'index start at 5': '348', - }, - { - index: '344', - 'index start at 5': '349', - }, - { - index: '345', - 'index start at 5': '350', - }, - { - index: '346', - 'index start at 5': '351', - }, - { - index: '347', - 'index start at 5': '352', - }, - { - index: '348', - 'index start at 5': '353', - }, - { - index: '349', - 'index start at 5': '354', - }, - { - index: '294', - 'index start at 5': '299', - }, - { - index: '295', - 'index start at 5': '300', - }, - { - index: '296', - 'index start at 5': '301', - }, - { - index: '297', - 'index start at 5': '302', - }, - { - index: '298', - 'index start at 5': '303', - }, - { - index: '299', - 'index start at 5': '304', - }, - { - index: '300', - 'index start at 5': '305', - }, - { - index: '301', - 'index start at 5': '306', - }, - { - index: '302', - 'index start at 5': '307', - }, - { - index: '303', - 'index start at 5': '308', - }, - { - index: '304', - 'index start at 5': '309', - }, - { - index: '305', - 'index start at 5': '310', - }, - { - index: '306', - 'index start at 5': '311', - }, - { - index: '307', - 'index start at 5': '312', - }, - { - index: '308', - 'index start at 5': '313', - }, - { - index: '309', - 'index start at 5': '314', - }, - { - index: '310', - 'index start at 5': '315', - }, - { - index: '311', - 'index start at 5': '316', - }, - { - index: '312', - 'index start at 5': '317', - }, - { - index: '313', - 'index start at 5': '318', - }, - { - index: '314', - 'index start at 5': '319', - }, - { - index: '315', - 'index start at 5': '320', - }, - { - index: '316', - 'index start at 5': '321', - }, - { - index: '317', - 'index start at 5': '322', - }, - { - index: '318', - 'index start at 5': '323', - }, - { - index: '319', - 'index start at 5': '324', - }, - { - index: '320', - 'index start at 5': '325', - }, - { - index: '321', - 'index start at 5': '326', - }, - { - index: '322', - 'index start at 5': '327', - }, - { - index: '323', - 'index start at 5': '328', - }, - { - index: '324', - 'index start at 5': '329', - }, - { - index: '325', - 'index start at 5': '330', - }, - { - index: '326', - 'index start at 5': '331', - }, - { - index: '327', - 'index start at 5': '332', - }, - { - index: '328', - 'index start at 5': '333', - }, - { - index: '329', - 'index start at 5': '334', - }, - { - index: '330', - 'index start at 5': '335', - }, - { - index: '331', - 'index start at 5': '336', - }, - { - index: '332', - 'index start at 5': '337', - }, - { - index: '333', - 'index start at 5': '338', - }, - { - index: '334', - 'index start at 5': '339', - }, - { - index: '335', - 'index start at 5': '340', - }, - { - index: '336', - 'index start at 5': '341', - }, - { - index: '337', - 'index start at 5': '342', - }, - { - index: '338', - 'index start at 5': '343', - }, - { - index: '339', - 'index start at 5': '344', - }, - { - index: '340', - 'index start at 5': '345', - }, - { - index: '341', - 'index start at 5': '346', - }, - { - index: '342', - 'index start at 5': '347', - }, - { - index: '343', - 'index start at 5': '348', - }, - { - index: '344', - 'index start at 5': '349', - }, - { - index: '345', - 'index start at 5': '350', - }, - { - index: '346', - 'index start at 5': '351', - }, - { - index: '347', - 'index start at 5': '352', - }, - { - index: '348', - 'index start at 5': '353', - }, - { - index: '349', - 'index start at 5': '354', - }, - { - index: '294', - 'index start at 5': '299', - }, - { - index: '295', - 'index start at 5': '300', - }, - { - index: '296', - 'index start at 5': '301', - }, - { - index: '297', - 'index start at 5': '302', - }, - { - index: '298', - 'index start at 5': '303', - }, - { - index: '299', - 'index start at 5': '304', - }, - { - index: '300', - 'index start at 5': '305', - }, - { - index: '301', - 'index start at 5': '306', - }, - { - index: '302', - 'index start at 5': '307', - }, - { - index: '303', - 'index start at 5': '308', - }, - { - index: '304', - 'index start at 5': '309', - }, - { - index: '305', - 'index start at 5': '310', - }, - { - index: '306', - 'index start at 5': '311', - }, - { - index: '307', - 'index start at 5': '312', - }, - { - index: '308', - 'index start at 5': '313', - }, - { - index: '309', - 'index start at 5': '314', - }, - { - index: '310', - 'index start at 5': '315', - }, - { - index: '311', - 'index start at 5': '316', - }, - { - index: '312', - 'index start at 5': '317', - }, - { - index: '313', - 'index start at 5': '318', - }, - { - index: '314', - 'index start at 5': '319', - }, - { - index: '315', - 'index start at 5': '320', - }, - { - index: '316', - 'index start at 5': '321', - }, - { - index: '317', - 'index start at 5': '322', - }, - { - index: '318', - 'index start at 5': '323', - }, - { - index: '319', - 'index start at 5': '324', - }, - { - index: '320', - 'index start at 5': '325', - }, - { - index: '321', - 'index start at 5': '326', - }, - { - index: '322', - 'index start at 5': '327', - }, - { - index: '323', - 'index start at 5': '328', - }, - { - index: '324', - 'index start at 5': '329', - }, - { - index: '325', - 'index start at 5': '330', - }, - { - index: '326', - 'index start at 5': '331', - }, - { - index: '327', - 'index start at 5': '332', - }, - { - index: '328', - 'index start at 5': '333', - }, - { - index: '329', - 'index start at 5': '334', - }, - { - index: '330', - 'index start at 5': '335', - }, - { - index: '331', - 'index start at 5': '336', - }, - { - index: '332', - 'index start at 5': '337', - }, - { - index: '333', - 'index start at 5': '338', - }, - { - index: '334', - 'index start at 5': '339', - }, - { - index: '335', - 'index start at 5': '340', - }, - { - index: '336', - 'index start at 5': '341', - }, - { - index: '337', - 'index start at 5': '342', - }, - { - index: '338', - 'index start at 5': '343', - }, - { - index: '339', - 'index start at 5': '344', - }, - { - index: '340', - 'index start at 5': '345', - }, - { - index: '341', - 'index start at 5': '346', - }, - { - index: '342', - 'index start at 5': '347', - }, - { - index: '343', - 'index start at 5': '348', - }, - { - index: '344', - 'index start at 5': '349', - }, - { - index: '345', - 'index start at 5': '350', - }, - { - index: '346', - 'index start at 5': '351', - }, - { - index: '347', - 'index start at 5': '352', - }, - { - index: '348', - 'index start at 5': '353', - }, - { - index: '349', - 'index start at 5': '354', - }, - { - index: '294', - 'index start at 5': '299', - }, - { - index: '295', - 'index start at 5': '300', - }, - { - index: '296', - 'index start at 5': '301', - }, - { - index: '297', - 'index start at 5': '302', - }, - { - index: '298', - 'index start at 5': '303', - }, - { - index: '299', - 'index start at 5': '304', - }, - { - index: '300', - 'index start at 5': '305', - }, - { - index: '301', - 'index start at 5': '306', - }, - { - index: '302', - 'index start at 5': '307', - }, - { - index: '303', - 'index start at 5': '308', - }, - { - index: '304', - 'index start at 5': '309', - }, - { - index: '305', - 'index start at 5': '310', - }, - { - index: '306', - 'index start at 5': '311', - }, - { - index: '307', - 'index start at 5': '312', - }, - { - index: '308', - 'index start at 5': '313', - }, - { - index: '309', - 'index start at 5': '314', - }, - { - index: '310', - 'index start at 5': '315', - }, - { - index: '311', - 'index start at 5': '316', - }, - { - index: '312', - 'index start at 5': '317', - }, - { - index: '313', - 'index start at 5': '318', - }, - { - index: '314', - 'index start at 5': '319', - }, - { - index: '315', - 'index start at 5': '320', - }, - { - index: '316', - 'index start at 5': '321', - }, - { - index: '317', - 'index start at 5': '322', - }, - { - index: '318', - 'index start at 5': '323', - }, - { - index: '319', - 'index start at 5': '324', - }, - { - index: '320', - 'index start at 5': '325', - }, - { - index: '321', - 'index start at 5': '326', - }, - { - index: '322', - 'index start at 5': '327', - }, - { - index: '323', - 'index start at 5': '328', - }, - { - index: '324', - 'index start at 5': '329', - }, - { - index: '325', - 'index start at 5': '330', - }, - { - index: '326', - 'index start at 5': '331', - }, - { - index: '327', - 'index start at 5': '332', - }, - { - index: '328', - 'index start at 5': '333', - }, - { - index: '329', - 'index start at 5': '334', - }, - { - index: '330', - 'index start at 5': '335', - }, - { - index: '331', - 'index start at 5': '336', - }, - { - index: '332', - 'index start at 5': '337', - }, - { - index: '333', - 'index start at 5': '338', - }, - { - index: '334', - 'index start at 5': '339', - }, - { - index: '335', - 'index start at 5': '340', - }, - { - index: '336', - 'index start at 5': '341', - }, - { - index: '337', - 'index start at 5': '342', - }, - { - index: '338', - 'index start at 5': '343', - }, - { - index: '339', - 'index start at 5': '344', - }, - { - index: '340', - 'index start at 5': '345', - }, - { - index: '341', - 'index start at 5': '346', - }, - { - index: '342', - 'index start at 5': '347', - }, - { - index: '343', - 'index start at 5': '348', - }, - { - index: '344', - 'index start at 5': '349', - }, - { - index: '345', - 'index start at 5': '350', - }, - { - index: '346', - 'index start at 5': '351', - }, - { - index: '347', - 'index start at 5': '352', - }, - { - index: '348', - 'index start at 5': '353', - }, - { - index: '349', - 'index start at 5': '354', - }, - ], - }) -} diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index d5aaa4156a9a2ca..e0fe1939d3aa795 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -4,8 +4,11 @@ import { NextInstance } from 'test/lib/next-modes/base' import { check, fetchViaHTTP, + findPort, getRedboxHeader, hasRedbox, + initNextServerScript, + killApp, renderViaHTTP, waitFor, } from 'next-test-utils' @@ -16,9 +19,13 @@ import webdriver from 'next-webdriver' describe('app dir', () => { const isDev = (global as any).isNextDev let next: NextInstance + let apiServerPort: number + let apiInstance: any function runTests() { beforeAll(async () => { + apiServerPort = await findPort() + next = await createNext({ files: new FileRef(path.join(__dirname, 'app')), dependencies: { @@ -27,12 +34,26 @@ describe('app dir', () => { 'react-dom': 'latest', sass: 'latest', }, + env: { + API_SERVER_PORT: apiServerPort.toString(), + }, skipStart: true, }) + apiInstance = await initNextServerScript( + path.join(__dirname, 'app', 'api-server.js'), + /Listening on/, + { ...process.env, PORT: apiServerPort }, + undefined, + { cwd: next.testDir } + ) + await next.start() }) - afterAll(() => next.destroy()) + afterAll(() => { + next.destroy() + killApp(apiInstance) + }) if (!(global as any).isNextDeploy) { it('should not share edge workers', async () => { @@ -2190,7 +2211,6 @@ describe('app dir', () => { describe('data fetch with response over 16KB with chunked encoding', () => { it('should load page when fetching a large amount of data', async () => { const browser = await webdriver(next.url, '/very-large-data-fetch') - await new Promise(() => {}) expect( await (await browser.waitForElementByCss('#done', 5000)).text() ).toBe('Hello world')