Skip to content

Commit

Permalink
move yarn add to setupPackageManager
Browse files Browse the repository at this point in the history
  • Loading branch information
0618 committed Jan 16, 2024
1 parent 4c9ecde commit d88ef61
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions packages/integration-tests/src/e2e-flow/e2e_flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ const setupPackageManager = async (
['config', 'set', 'nodeLinker', 'node-modules'],
execaOptions
);

await execa(
'yarn',
[
'add',
'-D',
'tsx',
'graphql',
'pluralize',
'zod',
'@aws-amplify/platform-core',
'esbuild',
],
execaOptions
);

await execa('node', ['--version'], execaOptions);
} else {
await execa('npm', ['install', '-g', 'yarn'], { stdio: 'inherit' });
await execa(
Expand All @@ -74,6 +91,9 @@ const setupPackageManager = async (
);
await execa('yarn', ['config', 'get', 'registry'], execaOptions);
}
await execa('yarn', ['add', 'aws-cdk', 'aws-cdk-lib', 'constructs'], {
execaOptions,
});
await execa('yarn', ['cache', 'clean'], execaOptions);
} else if (packageManager === 'pnpm') {
await execa('npm', ['install', '-g', packageManager], {
Expand Down Expand Up @@ -200,36 +220,6 @@ void describe('installs expected packages and scaffolds expected files', async (
}
);

if (packageManager.startsWith('yarn')) {
await execa('yarn', ['add', 'aws-cdk', 'aws-cdk-lib', 'constructs'], {
cwd: tempDir,
stdio: 'inherit',
});
if (packageManager === 'yarn-modern') {
await execa(
'yarn',
[
'add',
'-D',
'tsx',
'graphql',
'pluralize',
'zod',
'@aws-amplify/platform-core',
'esbuild',
],
{
cwd: tempDir,
stdio: 'inherit',
}
);

await execa('node', ['--version'], {
cwd: tempDir,
});
}
}

await execa(
packageManagerExecutable,
[
Expand Down

0 comments on commit d88ef61

Please sign in to comment.