@modern-js/plugin-changeset 2.22.1-beta.1 → 2.22.1-beta.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.
@@ -88,16 +88,16 @@ async function getReleaseInfo(commit, commitObj, authToken) {
88
88
  const commitRegex = /(.*)\(#(\d*)\)/;
89
89
  const [commitId, message, email] = commit.split("--");
90
90
  const author = AuthorMap.get(email);
91
- const AuthToken = authToken || process.env.GITHUB_AUTH_TOKEN;
91
+ const token = authToken || process.env.GITHUB_AUTH_TOKEN;
92
92
  if (author) {
93
93
  commitObj.author = author;
94
- } else if (AuthToken) {
94
+ } else if (token) {
95
95
  try {
96
96
  const res = await _axios.default.get(`https://api.github.com/repos/web-infra-dev/modern.js/commits/${commitId}`, {
97
97
  method: "GET",
98
98
  headers: {
99
99
  "Content-Type": "application/json",
100
- Authorization: AuthToken
100
+ Authorization: token
101
101
  }
102
102
  });
103
103
  const author2 = res.data.author.login;
@@ -195,7 +195,7 @@ async function genReleaseNote(options) {
195
195
  if (customReleaseNoteFunction === null || customReleaseNoteFunction === void 0 ? void 0 : customReleaseNoteFunction.getReleaseInfo) {
196
196
  commitObj = await customReleaseNoteFunction.getReleaseInfo(stdout, commitObj);
197
197
  } else {
198
- commitObj = await getReleaseInfo(stdout, commitObj);
198
+ commitObj = await getReleaseInfo(stdout, commitObj, options.authToken);
199
199
  }
200
200
  releaseNote[commitObj.type].en.push(commitObj);
201
201
  if (commitObj.summary_zh) {
@@ -47,16 +47,16 @@ export async function getReleaseInfo(commit, commitObj, authToken) {
47
47
  const commitRegex = /(.*)\(#(\d*)\)/;
48
48
  const [commitId, message, email] = commit.split("--");
49
49
  const author = AuthorMap.get(email);
50
- const AuthToken = authToken || process.env.GITHUB_AUTH_TOKEN;
50
+ const token = authToken || process.env.GITHUB_AUTH_TOKEN;
51
51
  if (author) {
52
52
  commitObj.author = author;
53
- } else if (AuthToken) {
53
+ } else if (token) {
54
54
  try {
55
55
  const res = await axios.get(`https://api.github.com/repos/web-infra-dev/modern.js/commits/${commitId}`, {
56
56
  method: "GET",
57
57
  headers: {
58
58
  "Content-Type": "application/json",
59
- Authorization: AuthToken
59
+ Authorization: token
60
60
  }
61
61
  });
62
62
  const author2 = res.data.author.login;
@@ -154,7 +154,7 @@ export async function genReleaseNote(options) {
154
154
  if (customReleaseNoteFunction === null || customReleaseNoteFunction === void 0 ? void 0 : customReleaseNoteFunction.getReleaseInfo) {
155
155
  commitObj = await customReleaseNoteFunction.getReleaseInfo(stdout, commitObj);
156
156
  } else {
157
- commitObj = await getReleaseInfo(stdout, commitObj);
157
+ commitObj = await getReleaseInfo(stdout, commitObj, options.authToken);
158
158
  }
159
159
  releaseNote[commitObj.type].en.push(commitObj);
160
160
  if (commitObj.summary_zh) {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.22.1-beta.1",
18
+ "version": "2.22.1-beta.2",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",