@deot/dev-releaser 2.5.2 → 2.6.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.
package/dist/index.cjs CHANGED
@@ -97,11 +97,12 @@ class Release {
97
97
  ({ stdout } = await devShared.Shell.exec("git", params));
98
98
  }
99
99
  const allowTypes = ["feat", `fix`, `break change`, `style`, `perf`, `types`, `refactor`, `chore`];
100
- const rePlugin = new RegExp(`^(${allowTypes.join("|")})${workspace ? `\\(([\\w-]+(,))?${packageFolderName}((,)[\\w-]+)?\\)` : "(\\(.+\\))?"}: .*`, "i");
101
- const allCommits = stdout.split(SUFFIX);
100
+ const rePlugin = new RegExp(`^(${allowTypes.join("|")})${workspace ? `\\(([,\\w-]+(,))?${packageFolderName}((,)[,\\w-]+)?\\)` : "(\\(.+\\))?"}: .*`, "i");
101
+ const reAll = workspace && new RegExp(`^(${allowTypes.join("|")})\\(\\*\\): .*`, "i");
102
+ const allCommits = commandOptions.commits || stdout.split(SUFFIX);
102
103
  const commits = allCommits.filter((commit) => {
103
104
  const chunk = commit.trim();
104
- return chunk && rePlugin.test(chunk);
105
+ return chunk && (rePlugin.test(chunk) || reAll && reAll.test(chunk));
105
106
  }).map((commit) => {
106
107
  const node = parser.sync(commit);
107
108
  const body = node.body || node.footer;
@@ -488,6 +489,8 @@ const run = (options) => devShared.Utils.autoCatch(async () => {
488
489
  ...options
489
490
  };
490
491
  const locals = devShared.Locals.impl();
492
+ options.forceUpdateName = devShared.Locals.getRealPackageName(options.forceUpdateName);
493
+ options.skipUpdateName = devShared.Locals.getRealPackageName(options.skipUpdateName);
491
494
  if (options.dryRun) {
492
495
  devShared.Logger.log(
493
496
  chalk.magenta(`DRY RUN: `) + "No files will be modified."
@@ -74,11 +74,12 @@ class Release {
74
74
  ({ stdout } = await Shell.exec("git", params));
75
75
  }
76
76
  const allowTypes = ["feat", `fix`, `break change`, `style`, `perf`, `types`, `refactor`, `chore`];
77
- const rePlugin = new RegExp(`^(${allowTypes.join("|")})${workspace ? `\\(([\\w-]+(,))?${packageFolderName}((,)[\\w-]+)?\\)` : "(\\(.+\\))?"}: .*`, "i");
78
- const allCommits = stdout.split(SUFFIX);
77
+ const rePlugin = new RegExp(`^(${allowTypes.join("|")})${workspace ? `\\(([,\\w-]+(,))?${packageFolderName}((,)[,\\w-]+)?\\)` : "(\\(.+\\))?"}: .*`, "i");
78
+ const reAll = workspace && new RegExp(`^(${allowTypes.join("|")})\\(\\*\\): .*`, "i");
79
+ const allCommits = commandOptions.commits || stdout.split(SUFFIX);
79
80
  const commits = allCommits.filter((commit) => {
80
81
  const chunk = commit.trim();
81
- return chunk && rePlugin.test(chunk);
82
+ return chunk && (rePlugin.test(chunk) || reAll && reAll.test(chunk));
82
83
  }).map((commit) => {
83
84
  const node = parser.sync(commit);
84
85
  const body = node.body || node.footer;
@@ -465,6 +466,8 @@ const run = (options) => Utils.autoCatch(async () => {
465
466
  ...options
466
467
  };
467
468
  const locals = Locals.impl();
469
+ options.forceUpdateName = Locals.getRealPackageName(options.forceUpdateName);
470
+ options.skipUpdateName = Locals.getRealPackageName(options.skipUpdateName);
468
471
  if (options.dryRun) {
469
472
  Logger.log(
470
473
  chalk.magenta(`DRY RUN: `) + "No files will be modified."
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@deot/dev-releaser",
3
- "version": "2.5.2",
3
+ "version": "2.6.2",
4
4
  "type": "module",
5
- "main": "dist/index.es.js",
5
+ "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/index.es.js",
9
+ "import": "./dist/index.js",
10
10
  "require": "./dist/index.cjs",
11
11
  "types": "./dist/index.d.ts"
12
12
  }
@@ -19,12 +19,12 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@deot/dev-shared": "^2.5.0",
22
+ "@deot/dev-shared": "^2.6.2",
23
23
  "conventional-commits-parser": "^5.0.0",
24
24
  "chalk": "^5.3.0",
25
25
  "fs-extra": "^11.1.1",
26
- "inquirer": "^9.2.10",
27
- "inquirer-autocomplete-prompt": "^3.0.0",
26
+ "inquirer": "^9.2.12",
27
+ "inquirer-autocomplete-prompt": "^3.0.1",
28
28
  "semver": "^7.5.4"
29
29
  },
30
30
  "devDependencies": {