@thisismanta/semantic-version 5.0.1 → 5.0.2

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.
@@ -53,7 +53,7 @@ async function main() {
53
53
  throw new Error('Expected "version" field to exist in package.json.');
54
54
  }
55
55
  const commits = getCommits(await getGitHistory(lastVersion));
56
- console.log(`Found ${commits.length} qualified commits since v${lastVersion}`);
56
+ console.log(`Found ${commits.length} qualified commit${commits.length === 1 ? '' : 's'} since v${lastVersion}`);
57
57
  (0, debug_1.debug)('commits »', JSON.stringify(commits, null, 2));
58
58
  const releaseType = getReleaseType(commits);
59
59
  (0, debug_1.debug)('releaseType »', JSON.stringify(releaseType));
@@ -73,16 +73,14 @@ async function main() {
73
73
  (0, debug_1.debug)('releaseNote »', releaseNote);
74
74
  const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
75
75
  // See https://octokit.github.io/rest.js/v19#repos-create-release
76
- const releaseRespond = await octokit.rest.repos.createRelease({
76
+ const releaseCreationRespond = await octokit.rest.repos.createRelease({
77
77
  ...github.context.repo,
78
78
  tag_name: 'v' + nextVersion,
79
79
  body: releaseNote,
80
- make_latest: 'true', // TODO: compare with the latest release
80
+ make_latest: 'legacy',
81
81
  });
82
- (0, debug_1.debug)('releaseRespond »', JSON.stringify(releaseRespond, null, 2));
83
- if (releaseRespond.status >= 200 && releaseRespond.status < 300) {
84
- console.log('Done with', releaseRespond.data.url);
85
- }
82
+ (0, debug_1.debug)('releaseCreationRespond »', JSON.stringify(releaseCreationRespond, null, 2));
83
+ console.log('Done with a new release at', releaseCreationRespond.data.html_url);
86
84
  }
87
85
  async function run(command) {
88
86
  (0, debug_1.debug)(command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisismanta/semantic-version",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "author": "Anantachai Saothong <thisismanta@gmail.com>",
5
5
  "license": "ISC",
6
6
  "engines": {