@modern-js/plugin-changeset 2.21.2-alpha.0 → 2.21.2-alpha.1

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.
@@ -80,12 +80,12 @@ function getReleaseNoteLine(commit, customReleaseNoteFunction, lang = "en") {
80
80
  return customReleaseNoteFunction.getReleaseNoteLine(commit);
81
81
  }
82
82
  const { repository, pullRequestId, summary, summary_zh, author } = commit;
83
- const pullRequest = `https://github.com/${repository}/pull/${pullRequestId}`;
83
+ const pullRequest = pullRequestId ? `https://github.com/${repository}/pull/${pullRequestId}` : "";
84
84
  if (lang === "en") {
85
- return `- ${summary} by @${author} in ${pullRequest}
85
+ return `- ${summary} by @${author}${pullRequest ? ` in ${pullRequest}` : ""}
86
86
  `;
87
87
  }
88
- return `- ${summary_zh} 由 @${author} 实现,详情可查看 ${pullRequest}
88
+ return `- ${summary_zh} 由 @${author} 实现${pullRequest ? `, 详情可查看 ${pullRequest}` : ""}
89
89
  `;
90
90
  }
91
91
  async function genReleaseNote(options) {
@@ -57,12 +57,12 @@ export function getReleaseNoteLine(commit, customReleaseNoteFunction, lang = "en
57
57
  return customReleaseNoteFunction.getReleaseNoteLine(commit);
58
58
  }
59
59
  const { repository, pullRequestId, summary, summary_zh, author } = commit;
60
- const pullRequest = `https://github.com/${repository}/pull/${pullRequestId}`;
60
+ const pullRequest = pullRequestId ? `https://github.com/${repository}/pull/${pullRequestId}` : "";
61
61
  if (lang === "en") {
62
- return `- ${summary} by @${author} in ${pullRequest}
62
+ return `- ${summary} by @${author}${pullRequest ? ` in ${pullRequest}` : ""}
63
63
  `;
64
64
  }
65
- return `- ${summary_zh} 由 @${author} 实现,详情可查看 ${pullRequest}
65
+ return `- ${summary_zh} 由 @${author} 实现${pullRequest ? `, 详情可查看 ${pullRequest}` : ""}
66
66
  `;
67
67
  }
68
68
  export async function genReleaseNote(options) {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.21.2-alpha.0",
18
+ "version": "2.21.2-alpha.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",