e2e-test: update to use Yarn 3 production install command

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-08-23 22:40:04 +02:00
parent b21ae23321
commit e220dd6d70
+12 -2
View File
@@ -172,7 +172,7 @@ async function buildDistWorkspace(workspaceName: string, rootDir: string) {
await pinYarnVersion(workspaceDir);
print('Installing workspace dependencies');
await runPlain(['yarn', 'install', '--production', '--frozen-lockfile'], {
await runPlain(['yarn', 'workspaces', 'focus', '--all', '--production'], {
cwd: workspaceDir,
});
@@ -195,10 +195,20 @@ async function pinYarnVersion(dir: string) {
}
const [, localYarnPath] = match;
const yarnPath = paths.resolveOwnRoot(localYarnPath);
const yarnPluginPath = paths.resolveOwnRoot(
localYarnPath,
'../../plugins/@yarnpkg/plugin-workspace-tools.cjs',
);
await fs.writeFile(
resolvePath(dir, '.yarnrc.yml'),
`yarnPath: ${yarnPath}\n`,
`yarnPath: ${yarnPath}
nodeLinker: node-modules
enableGlobalCache: true
plugins:
- path: ${yarnPluginPath}
spec: '@yarnpkg/plugin-workspace-tools'
`,
);
}