autorel 2.2.3 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -81,7 +81,7 @@ async function autorel(args) {
81
81
  output_1.default.log('No release is needed. Have a nice day (^_^)/');
82
82
  return;
83
83
  }
84
- const nextTagCalculated = semver.incrementVersion(lastProdTag || 'v0.0.1', lastTag || 'v0.0.1', releaseType, prereleaseChannel);
84
+ let nextTagCalculated = '';
85
85
  if (args.useVersion) {
86
86
  if (/^v(.+)$/.test(args.useVersion))
87
87
  throw new Error('useVersion should not start with a "v".');
@@ -91,11 +91,11 @@ async function autorel(args) {
91
91
  output_1.default.warn(`We didn't find any commmits that would create a release, but you have set 'useVersion', which will force a release as: ${color.bold(args.useVersion)}.`);
92
92
  }
93
93
  else {
94
- output_1.default.warn(`The next version would be ${nextTagCalculated}, but the version was set by useVersion to be: ${color.bold(args.useVersion)}.`);
94
+ output_1.default.warn(`The next version was set by useVersion to be: ${color.bold(args.useVersion)}.`);
95
95
  }
96
- output_1.default.warn('I hope you know what you\'re doing. (=^・ω・^=)');
97
96
  }
98
97
  else {
98
+ nextTagCalculated = semver.incrementVersion(lastProdTag || 'v0.0.1', lastTag || 'v0.0.1', releaseType, prereleaseChannel);
99
99
  output_1.default.log(`The next version is: ${color.bold(nextTagCalculated)}`);
100
100
  }
101
101
  const nextTag = args.useVersion ? `v${args.useVersion}` : nextTagCalculated;
package/dist/semver.js CHANGED
@@ -38,7 +38,7 @@ function incrementVersion(lastProductionTag, lastTag, releaseType, prereleaseCha
38
38
  throw new Error('lastProductionTag is not a valid semver tag');
39
39
  const { major: prodMajor, minor: prodMinor, patch: prodPatch } = lastProductionVersion;
40
40
  // some sanity checks
41
- const lastVersionLessThanLastProdError = 'The current version cannot be less than the last production version (following SemVer).\n\nTo fix this, we recommend using the --useVersion flag to specify the version you want to use.';
41
+ const lastVersionLessThanLastProdError = 'The current version cannot be less than the last production version (following SemVer).\n\nTo fix this, we recommend using the --use-version flag to specify the version you want to use.';
42
42
  if (major < prodMajor)
43
43
  throw new Error(lastVersionLessThanLastProdError);
44
44
  if (major === prodMajor && minor < prodMinor)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autorel",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.",
5
5
  "license": "MIT",
6
6
  "author": "Marc H. Weiner <mhweiner234@gmail.com> (https://mhweiner.com)",