diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-26 22:20:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-26 22:20:20 +0800 |
commit | 0187e0c47df98bac67da135b55e2630e25ffd513 (patch) | |
tree | c1a3c894e893b581778bc8554862ce22b04da4c4 /packages/monorepo-scripts | |
parent | 8732d8ece89360155a4df27b2bd57b63ffad02a7 (diff) | |
download | dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar.gz dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar.bz2 dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar.lz dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar.xz dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.tar.zst dexon-sol-tools-0187e0c47df98bac67da135b55e2630e25ffd513.zip |
Still test unrunnable packages for compilation issues
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/src/test_installation.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index bbaf9b056..a8ddf0c58 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -21,14 +21,11 @@ const UNRUNNABLE_PACKAGES = [ const registry = IS_LOCAL_PUBLISH ? 'http://localhost:4873/' : 'https://registry.npmjs.org/'; const monorepoRootPath = path.join(__dirname, '../../..'); const packages = utils.getTopologicallySortedPackages(monorepoRootPath); - const preInstallablePackages = _.filter( + const installablePackages = _.filter( packages, pkg => !pkg.packageJson.private && !_.isUndefined(pkg.packageJson.main) && pkg.packageJson.main.endsWith('.js'), ); utils.log('Testing packages:'); - const installablePackages = _.filter(preInstallablePackages, pkg => { - return !_.includes(UNRUNNABLE_PACKAGES, pkg.packageJson.name); - }); _.map(installablePackages, pkg => utils.log(`* ${pkg.packageJson.name}`)); for (const installablePackage of installablePackages) { const changelogPath = path.join(installablePackage.location, 'CHANGELOG.json'); @@ -66,10 +63,13 @@ const UNRUNNABLE_PACKAGES = [ const tscBinaryPath = path.join(monorepoRootPath, './node_modules/typescript/bin/tsc'); await execAsync(tscBinaryPath, { cwd: testDirectory }); utils.log(`Successfully compiled with ${packageName} as a dependency`); - const transpiledIndexFilePath = path.join(testDirectory, 'index.js'); - utils.log(`Running test script with ${packageName} imported`); - await execAsync(`node ${transpiledIndexFilePath}`); - utils.log(`Successfilly ran test script with ${packageName} imported`); + const isUnrunnablePkg = _.includes(UNRUNNABLE_PACKAGES, packageName); + if (!isUnrunnablePkg) { + const transpiledIndexFilePath = path.join(testDirectory, 'index.js'); + utils.log(`Running test script with ${packageName} imported`); + await execAsync(`node ${transpiledIndexFilePath}`); + utils.log(`Successfilly ran test script with ${packageName} imported`); + } rimraf.sync(testDirectory); } })().catch(err => { |