From 2073aa9abcdaee04834b972bbafb455260a67e99 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 24 Jul 2018 15:19:57 +0200 Subject: Test installation on latest version, not the packed one --- packages/monorepo-scripts/src/test_installation.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages') 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 = { -- cgit v1.2.3