diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-24 21:19:57 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-24 21:19:57 +0800 |
commit | 2073aa9abcdaee04834b972bbafb455260a67e99 (patch) | |
tree | 9a510b6cc3e85f264e7760bfa9e035b2146bb9b7 /packages/monorepo-scripts/src | |
parent | 038602539542a94b99198fb51d72977a8806dc09 (diff) | |
download | dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar.gz dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar.bz2 dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar.lz dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar.xz dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.tar.zst dexon-sol-tools-2073aa9abcdaee04834b972bbafb455260a67e99.zip |
Test installation on latest version, not the packed one
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r-- | packages/monorepo-scripts/src/test_installation.ts | 10 |
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 = { |