Update to run Next.js integration with Node.js v18 (#10740)

Co-authored-by: Chris Barber <chris.barber@vercel.com>
Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
JJ Kasper
2023-10-20 07:36:50 -07:00
committed by GitHub
parent ce54ca631b
commit 39ce9166ba
9 changed files with 321 additions and 292 deletions

12
utils/chunk-tests.js vendored
View File

@@ -12,7 +12,14 @@ const runnersMap = new Map([
},
],
['test-e2e', { min: 1, max: 7, runners: ['ubuntu-latest'] }],
['test-next-local', { min: 1, max: 5, runners: ['ubuntu-latest'] }],
[
'test-next-local',
{ min: 1, max: 5, runners: ['ubuntu-latest'], nodeVersion: '18' },
],
[
'test-next-local-legacy',
{ min: 1, max: 5, runners: ['ubuntu-latest'], nodeVersion: '16' },
],
['test-dev', { min: 1, max: 7, runners: ['ubuntu-latest', 'macos-latest'] }],
]);
@@ -91,7 +98,7 @@ async function getChunkedTests() {
const [packagePath, packageName] = packagePathAndName.split(',');
return Object.entries(scriptNames).flatMap(([scriptName, testPaths]) => {
const runnerOptions = getRunnerOptions(scriptName, packageName);
const { runners, min, max } = runnerOptions;
const { runners, min, max, nodeVersion } = runnerOptions;
const sortedTestPaths = testPaths.sort((a, b) => a.localeCompare(b));
return intoChunks(min, max, sortedTestPaths).flatMap(
@@ -102,6 +109,7 @@ async function getChunkedTests() {
packagePath,
packageName,
scriptName,
nodeVersion,
testPaths: chunk.map(testFile =>
path.relative(
path.join(__dirname, '../', packagePath),