@soybeanjs/changelog 0.0.2 → 0.0.4
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.cjs +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +12 -10
package/dist/index.cjs
CHANGED
|
@@ -201,7 +201,8 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
201
201
|
try {
|
|
202
202
|
const data = await ofetch.ofetch(`https://ungh.cc/users/find/${email}`);
|
|
203
203
|
login = data?.user?.username || "";
|
|
204
|
-
} catch {
|
|
204
|
+
} catch (e) {
|
|
205
|
+
console.log("e: ", e);
|
|
205
206
|
}
|
|
206
207
|
if (login) {
|
|
207
208
|
return login;
|
|
@@ -217,6 +218,7 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
217
218
|
});
|
|
218
219
|
login = data?.author?.login || "";
|
|
219
220
|
} catch (e) {
|
|
221
|
+
console.log("e: ", e);
|
|
220
222
|
}
|
|
221
223
|
}
|
|
222
224
|
if (login) {
|
|
@@ -228,6 +230,7 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
228
230
|
});
|
|
229
231
|
login = data.items[0].login;
|
|
230
232
|
} catch (e) {
|
|
233
|
+
console.log("e: ", e);
|
|
231
234
|
}
|
|
232
235
|
return login;
|
|
233
236
|
}
|
|
@@ -434,10 +437,10 @@ ${unloginLine}`;
|
|
|
434
437
|
function generateMarkdown(params) {
|
|
435
438
|
const { commits, options, showTitle, contributors } = params;
|
|
436
439
|
const lines = [];
|
|
437
|
-
const
|
|
440
|
+
const isNewVersion = !VERSION_REG.test(options.to);
|
|
441
|
+
const version = isNewVersion ? options.newVersion : options.to;
|
|
442
|
+
const url = `https://github.com/${options.github.repo}/compare/${options.from}...${version}`;
|
|
438
443
|
if (showTitle) {
|
|
439
|
-
const isNewVersion = !VERSION_REG.test(options.to);
|
|
440
|
-
const version = isNewVersion ? options.newVersion : options.to;
|
|
441
444
|
const date = isNewVersion ? dayjs__default().format("YY-MM-DD") : options.tagDateMap.get(options.to);
|
|
442
445
|
let title = `## [${version}](${url})`;
|
|
443
446
|
if (date) {
|
package/dist/index.mjs
CHANGED
|
@@ -194,7 +194,8 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
194
194
|
try {
|
|
195
195
|
const data = await ofetch(`https://ungh.cc/users/find/${email}`);
|
|
196
196
|
login = data?.user?.username || "";
|
|
197
|
-
} catch {
|
|
197
|
+
} catch (e) {
|
|
198
|
+
console.log("e: ", e);
|
|
198
199
|
}
|
|
199
200
|
if (login) {
|
|
200
201
|
return login;
|
|
@@ -210,6 +211,7 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
210
211
|
});
|
|
211
212
|
login = data?.author?.login || "";
|
|
212
213
|
} catch (e) {
|
|
214
|
+
console.log("e: ", e);
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
if (login) {
|
|
@@ -221,6 +223,7 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
|
|
|
221
223
|
});
|
|
222
224
|
login = data.items[0].login;
|
|
223
225
|
} catch (e) {
|
|
226
|
+
console.log("e: ", e);
|
|
224
227
|
}
|
|
225
228
|
return login;
|
|
226
229
|
}
|
|
@@ -427,10 +430,10 @@ ${unloginLine}`;
|
|
|
427
430
|
function generateMarkdown(params) {
|
|
428
431
|
const { commits, options, showTitle, contributors } = params;
|
|
429
432
|
const lines = [];
|
|
430
|
-
const
|
|
433
|
+
const isNewVersion = !VERSION_REG.test(options.to);
|
|
434
|
+
const version = isNewVersion ? options.newVersion : options.to;
|
|
435
|
+
const url = `https://github.com/${options.github.repo}/compare/${options.from}...${version}`;
|
|
431
436
|
if (showTitle) {
|
|
432
|
-
const isNewVersion = !VERSION_REG.test(options.to);
|
|
433
|
-
const version = isNewVersion ? options.newVersion : options.to;
|
|
434
437
|
const date = isNewVersion ? dayjs().format("YY-MM-DD") : options.tagDateMap.get(options.to);
|
|
435
438
|
let title = `## [${version}](${url})`;
|
|
436
439
|
if (date) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/changelog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "generate changelog form git tags and commits for github",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Soybean",
|
|
@@ -36,31 +36,33 @@
|
|
|
36
36
|
"convert-gitmoji": "0.1.3",
|
|
37
37
|
"dayjs": "1.11.8",
|
|
38
38
|
"execa": "7.1.1",
|
|
39
|
-
"ofetch": "1.0
|
|
39
|
+
"ofetch": "1.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@soybeanjs/cli": "0.
|
|
42
|
+
"@soybeanjs/cli": "0.6.0",
|
|
43
43
|
"@types/cli-progress": "3.11.0",
|
|
44
|
-
"@types/node": "20.
|
|
45
|
-
"eslint": "8.
|
|
46
|
-
"eslint-config-soybeanjs": "0.4.
|
|
44
|
+
"@types/node": "20.3.0",
|
|
45
|
+
"eslint": "8.42.0",
|
|
46
|
+
"eslint-config-soybeanjs": "0.4.9",
|
|
47
47
|
"simple-git-hooks": "2.8.1",
|
|
48
48
|
"tsx": "3.12.7",
|
|
49
|
-
"typescript": "5.
|
|
49
|
+
"typescript": "5.1.3",
|
|
50
50
|
"unbuild": "1.2.1"
|
|
51
51
|
},
|
|
52
52
|
"simple-git-hooks": {
|
|
53
53
|
"commit-msg": "pnpm soy git-commit-verify",
|
|
54
54
|
"pre-commit": "pnpm typecheck && pnpm soy lint-staged"
|
|
55
55
|
},
|
|
56
|
-
"
|
|
56
|
+
"soybean": {
|
|
57
|
+
"useSoybeanToken": true
|
|
58
|
+
},
|
|
57
59
|
"scripts": {
|
|
58
60
|
"build": "pnpm typecheck && unbuild",
|
|
59
61
|
"lint": "eslint . --fix",
|
|
60
|
-
"format": "soy prettier-
|
|
62
|
+
"format": "soy prettier-write",
|
|
61
63
|
"commit": "soy git-commit",
|
|
62
64
|
"cleanup": "soy cleanup",
|
|
63
|
-
"
|
|
65
|
+
"ncu": "soy ncu",
|
|
64
66
|
"publish-pkg": "pnpm -r publish --access public",
|
|
65
67
|
"typecheck": "tsc --noEmit",
|
|
66
68
|
"release": "soy release && pnpm build && pnpm publish-pkg"
|