diff --git a/packages/js/src/generators/release-version/release-version.ts b/packages/js/src/generators/release-version/release-version.ts index 45c5631a1e366..725ade98f429c 100644 --- a/packages/js/src/generators/release-version/release-version.ts +++ b/packages/js/src/generators/release-version/release-version.ts @@ -350,6 +350,13 @@ To fix this you will either need to add a package.json file at that location, or options.conventionalCommitsConfig ); + // No changes detected. + // Pretty common for fresh repos created from a Web UI and where the first commits are usually something like "Initial commit". + // Make it a bit less confusing for such first releases by defaulting to patch. + if (!specifier && !latestMatchingGitTag && options.firstRelease) { + specifier = 'patch'; + } + if (!specifier) { log( `🚫 No changes were detected using git history and the conventional commits standard.`