@soybeanjs/changelog 0.3.9-beta.1 → 0.3.9

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
@@ -2290,6 +2290,11 @@ async function createOptions(options) {
2290
2290
  opts.tags = await getTotalGitTags();
2291
2291
  opts.tagDateMap = await getTagDateMap();
2292
2292
  opts.prerelease || (opts.prerelease = isPrerelease(opts.to));
2293
+ const isFromPrerelease = isPrerelease(opts.from);
2294
+ if (!opts.prerelease && isFromPrerelease) {
2295
+ const allReleaseTags = opts.tags.filter((tag) => !isPrerelease(tag));
2296
+ opts.from = allReleaseTags[allReleaseTags.length - 2];
2297
+ }
2293
2298
  return opts;
2294
2299
  }
2295
2300
 
package/dist/index.js CHANGED
@@ -354,6 +354,11 @@ async function createOptions(options) {
354
354
  opts.tags = await getTotalGitTags();
355
355
  opts.tagDateMap = await getTagDateMap();
356
356
  opts.prerelease || (opts.prerelease = isPrerelease(opts.to));
357
+ const isFromPrerelease = isPrerelease(opts.from);
358
+ if (!opts.prerelease && isFromPrerelease) {
359
+ const allReleaseTags = opts.tags.filter((tag) => !isPrerelease(tag));
360
+ opts.from = allReleaseTags[allReleaseTags.length - 2];
361
+ }
357
362
  return opts;
358
363
  }
359
364
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soybeanjs/changelog",
3
3
  "type": "module",
4
- "version": "0.3.9-beta.1",
4
+ "version": "0.3.9",
5
5
  "packageManager": "pnpm@8.14.1",
6
6
  "description": "generate changelog form git tags and commits for github",
7
7
  "author": {
@@ -24,12 +24,12 @@
24
24
  "exports": {
25
25
  ".": {
26
26
  "types": "./dist/index.d.ts",
27
- "import": "./dist/index.mjs",
27
+ "import": "./dist/index.js",
28
28
  "require": "./dist/index.cjs"
29
29
  }
30
30
  },
31
31
  "main": "./dist/index.cjs",
32
- "module": "./dist/index.mjs",
32
+ "module": "./dist/index.js",
33
33
  "types": "./dist/index.d.ts",
34
34
  "files": [
35
35
  "dist"
@@ -38,7 +38,7 @@
38
38
  "node": ">=14"
39
39
  },
40
40
  "dependencies": {
41
- "@soybeanjs/eslint-config": "^1.1.4",
41
+ "@soybeanjs/eslint-config": "^1.1.5",
42
42
  "cli-progress": "3.12.0",
43
43
  "convert-gitmoji": "0.1.3",
44
44
  "dayjs": "1.11.10",
@@ -46,7 +46,7 @@
46
46
  "ofetch": "1.3.3"
47
47
  },
48
48
  "devDependencies": {
49
- "@soybeanjs/cli": "1.0.1",
49
+ "@soybeanjs/cli": "1.0.2-beta.0",
50
50
  "@types/cli-progress": "3.11.5",
51
51
  "@types/node": "20.11.0",
52
52
  "eslint": "8.56.0",