Skip to content

Commit

Permalink
chore: One-time hack on lerna conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Dec 12, 2023
1 parent 98b1712 commit da8e977
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions patches/@lerna+conventional-commits+5.6.2.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
diff --git a/node_modules/@lerna/conventional-commits/lib/recommend-version.js b/node_modules/@lerna/conventional-commits/lib/recommend-version.js
index 4551feb..b678322 100644
index a982adf..1d5d8bd 100644
--- a/node_modules/@lerna/conventional-commits/lib/recommend-version.js
+++ b/node_modules/@lerna/conventional-commits/lib/recommend-version.js
@@ -82,6 +82,8 @@ function recommendVersion(pkg, type, { changelogPreset, rootPath, tagPrefix, pre
//
if (releaseType === "major") {
releaseType = "minor";
+ } else if (releaseType === "minor") {
+ releaseType = "patch";
}
}
@@ -64,26 +64,8 @@ function recommendVersion(pkg, type, { changelogPreset, rootPath, tagPrefix, pre
log.verbose(type, "increment %s by %s", pkg.version, prereleaseType);
resolve(semver.inc(pkg.version, prereleaseType, prereleaseId));
} else {
- if (semver.major(pkg.version) === 0) {
- // According to semver, major version zero (0.y.z) is for initial
- // development. Anything MAY change at any time. The public API
- // SHOULD NOT be considered stable. The version 1.0.0 defines
- // the (initial stable) public API.
- //
- // To allow monorepos to use major version zero meaningfully,
- // the transition from 0.x to 1.x must be explicitly requested
- // by the user. Breaking changes MUST NOT automatically bump
- // the major version from 0.x to 1.x.
- //
- // The usual convention is to use semver-patch bumps for bugfix
- // releases and semver-minor for everything else, including
- // breaking changes. This matches the behavior of `^` operator
- // as implemented by `npm`.
- //
- if (releaseType === "major") {
- releaseType = "minor";
- }
- }
+ // One time hack.
+ releaseType = "major";
log.verbose(type, "increment %s by %s", pkg.version, releaseType);
resolve(semver.inc(pkg.version, releaseType));
}

0 comments on commit da8e977

Please sign in to comment.