fix(monorepo-scripts): Move the creation of the .installation-test directory OUTSIDE of the monorepo root, so that the installed packages can't reference the hoisted node_modules folder

This commit is contained in:
Fabio Berger
2018-10-16 13:22:15 +01:00
parent 5bdfad9b41
commit 8cffe65047

View File

@@ -104,13 +104,7 @@ async function testInstallPackageAsync(
const packageName = installablePackage.packageJson.name;
utils.log(`Testing ${packageName}@${lastChangelogVersion}`);
const packageDirName = path.join(...(packageName + '-test').split('/'));
const testDirectory = path.join(
monorepoRootPath,
'packages',
'monorepo-scripts',
'.installation-test',
packageDirName,
);
const testDirectory = path.join(monorepoRootPath, '..', '.installation-test', packageDirName);
await rimrafAsync(testDirectory);
await mkdirpAsync(testDirectory);
await execAsync('yarn init --yes', { cwd: testDirectory });