aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/src/test_installation.ts16
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 => {