@soybeanjs/changelog 0.0.2 → 0.0.3

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 CHANGED
@@ -434,10 +434,10 @@ ${unloginLine}`;
434
434
  function generateMarkdown(params) {
435
435
  const { commits, options, showTitle, contributors } = params;
436
436
  const lines = [];
437
- const url = `https://github.com/${options.github.repo}/compare/${options.from}...${options.to}`;
437
+ const isNewVersion = !VERSION_REG.test(options.to);
438
+ const version = isNewVersion ? options.newVersion : options.to;
439
+ const url = `https://github.com/${options.github.repo}/compare/${options.from}...${version}`;
438
440
  if (showTitle) {
439
- const isNewVersion = !VERSION_REG.test(options.to);
440
- const version = isNewVersion ? options.newVersion : options.to;
441
441
  const date = isNewVersion ? dayjs__default().format("YY-MM-DD") : options.tagDateMap.get(options.to);
442
442
  let title = `## [${version}](${url})`;
443
443
  if (date) {
package/dist/index.mjs CHANGED
@@ -427,10 +427,10 @@ ${unloginLine}`;
427
427
  function generateMarkdown(params) {
428
428
  const { commits, options, showTitle, contributors } = params;
429
429
  const lines = [];
430
- const url = `https://github.com/${options.github.repo}/compare/${options.from}...${options.to}`;
430
+ const isNewVersion = !VERSION_REG.test(options.to);
431
+ const version = isNewVersion ? options.newVersion : options.to;
432
+ const url = `https://github.com/${options.github.repo}/compare/${options.from}...${version}`;
431
433
  if (showTitle) {
432
- const isNewVersion = !VERSION_REG.test(options.to);
433
- const version = isNewVersion ? options.newVersion : options.to;
434
434
  const date = isNewVersion ? dayjs().format("YY-MM-DD") : options.tagDateMap.get(options.to);
435
435
  let title = `## [${version}](${url})`;
436
436
  if (date) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/changelog",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
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.1"
39
+ "ofetch": "1.1.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@soybeanjs/cli": "0.5.2",
42
+ "@soybeanjs/cli": "0.6.0",
43
43
  "@types/cli-progress": "3.11.0",
44
- "@types/node": "20.2.5",
45
- "eslint": "8.41.0",
46
- "eslint-config-soybeanjs": "0.4.7",
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.0.4",
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
- "github-token": "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",
56
+ "soybean": {
57
+ "useSoybeanToken": true
58
+ },
57
59
  "scripts": {
58
60
  "build": "pnpm typecheck && unbuild",
59
61
  "lint": "eslint . --fix",
60
- "format": "soy prettier-format",
62
+ "format": "soy prettier-write",
61
63
  "commit": "soy git-commit",
62
64
  "cleanup": "soy cleanup",
63
- "update-pkg": "soy update-pkg",
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"