diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index df93a46a0..9268de796 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -122,6 +122,14 @@ async function updateChangeLogsAsync(updatedPublicPackages: Package[]): Promise< currentVersion, changelog, ); + if (pkg.packageJson.private) { + const nextPatchVersionIfValid = semver.inc(currentVersion, 'patch'); + if (!_.isNull(nextPatchVersionIfValid)) { + packageToNextVersion[packageName] = nextPatchVersionIfValid; + } else { + throw new Error(`Encountered invalid semver version: ${currentVersion} for package: ${packageName}`); + } + } if (shouldAddNewEntry) { // Create a new entry for a patch version with generic changelog entry. const nextPatchVersionIfValid = semver.inc(currentVersion, 'patch'); |