Skip to content

Commit

Permalink
chore: Revert one-time hack on lerna conventional commits
Browse files Browse the repository at this point in the history
This reverts commit da8e977.
  • Loading branch information
kriskowal committed Dec 12, 2023
1 parent bcbe46b commit b769e04
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions patches/@lerna+conventional-commits+5.6.2.patch
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
diff --git a/node_modules/@lerna/conventional-commits/lib/recommend-version.js b/node_modules/@lerna/conventional-commits/lib/recommend-version.js
index a982adf..1d5d8bd 100644
index 4551feb..b678322 100644
--- a/node_modules/@lerna/conventional-commits/lib/recommend-version.js
+++ b/node_modules/@lerna/conventional-commits/lib/recommend-version.js
@@ -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";
@@ -82,6 +82,8 @@ function recommendVersion(pkg, type, { changelogPreset, rootPath, tagPrefix, pre
//
if (releaseType === "major") {
releaseType = "minor";
+ } else if (releaseType === "minor") {
+ releaseType = "patch";
}
}
log.verbose(type, "increment %s by %s", pkg.version, releaseType);
resolve(semver.inc(pkg.version, releaseType));
}

0 comments on commit b769e04

Please sign in to comment.