aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/monorepo-scripts/src/publish.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 4d5425ac6..4506595e1 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -196,11 +196,16 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string
const isVersionPrompt = _.includes(output, 'Select a new version');
if (isVersionPrompt) {
const outputStripLeft = output.split('new version for ')[1];
- packageName = outputStripLeft.split(' ')[0];
+ const packageNameFound = outputStripLeft.split(' ')[0];
+ if (packageName === packageNameFound) {
+ return; // noop
+ }
+ packageName = packageNameFound;
sleepAndWrite(child.stdin, SemVerIndex.Custom);
}
const isCustomVersionPrompt = output === '? Enter a custom version ';
if (isCustomVersionPrompt) {
+ console.log('custom version prompt hit!');
const versionChange = packageToNextVersion[packageName];
if (_.isUndefined(versionChange)) {
throw new Error(`Must have a nextVersion for each packageName. Didn't find one for ${packageName}`);
@@ -225,8 +230,9 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string
}
function sleepAndWrite(fileDescriptor: any, input: string | number): void {
- const TIMEOUT = 100;
+ const TIMEOUT = 1000;
setTimeout(() => {
+ console.log('Printing to console:', input);
fileDescriptor.write(`${input}\n`);
}, TIMEOUT);
}