aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/test_installation.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts
index 668d4ef1d..52868483f 100644
--- a/packages/monorepo-scripts/src/test_installation.ts
+++ b/packages/monorepo-scripts/src/test_installation.ts
@@ -16,16 +16,14 @@ import { utils } from './utils/utils';
pkg => !pkg.packageJson.private && !_.isUndefined(pkg.packageJson.main) && pkg.packageJson.main.endsWith('.js'),
);
for (const installablePackage of installablePackages) {
- const packagePath = installablePackage.location;
const packageName = installablePackage.packageJson.name;
+ const packageVersion = installablePackage.packageJson.version;
utils.log(`Testing ${packageName}`);
- let result = await execAsync('npm pack', { cwd: packagePath });
- const packedPackageFileName = result.stdout.trim();
const testDirectory = path.join(monorepoRootPath, '../test-env');
fs.mkdirSync(testDirectory);
- result = await execAsync('yarn init --yes', { cwd: testDirectory });
- utils.log(`Installing ${packedPackageFileName}`);
- result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory });
+ let result = await execAsync('yarn init --yes', { cwd: testDirectory });
+ utils.log(`Installing ${packageName}@${packageVersion}`);
+ result = await execAsync(`yarn add ${packageName}@${packageVersion}`, { cwd: testDirectory });
const indexFilePath = path.join(testDirectory, 'index.ts');
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\n`);
const tsConfig = {