@deot/dev-releaser 2.6.2 → 2.8.0
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 +11 -11
- package/dist/index.js +11 -11
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -53,8 +53,8 @@ class Release {
|
|
|
53
53
|
constructor(config, commandOptions) {
|
|
54
54
|
const { packageDir, packageRelation } = devShared.Locals.impl();
|
|
55
55
|
if (typeof config === "string") {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const packageFolderName = config;
|
|
57
|
+
const packageDir$ = path__namespace.resolve(packageDir, packageFolderName);
|
|
58
58
|
config = {
|
|
59
59
|
dir: packageDir$,
|
|
60
60
|
name: packageFolderName
|
|
@@ -76,7 +76,7 @@ class Release {
|
|
|
76
76
|
const { packageFolderName, commandOptions } = this;
|
|
77
77
|
const [latestTag] = await this.getTags();
|
|
78
78
|
devShared.Logger.log(chalk.yellow(`Last Release Tag`) + `: ${latestTag || "<none>"}`);
|
|
79
|
-
|
|
79
|
+
const params = ["--no-pager", "log", `${latestTag}..HEAD`, `--format=%B%n${HASH}%n%H${SUFFIX}`];
|
|
80
80
|
let {
|
|
81
81
|
stdout
|
|
82
82
|
} = await devShared.Shell.exec("git", params);
|
|
@@ -126,7 +126,7 @@ class Release {
|
|
|
126
126
|
if (commits.length && skipUpdatePackage) {
|
|
127
127
|
let skip = false;
|
|
128
128
|
if (typeof skipUpdatePackage === "boolean" && skipUpdatePackage) {
|
|
129
|
-
|
|
129
|
+
const result = await prompt([
|
|
130
130
|
{
|
|
131
131
|
type: "confirm",
|
|
132
132
|
name: "skip",
|
|
@@ -150,7 +150,7 @@ class Release {
|
|
|
150
150
|
if (!commits.length && forceUpdatePackage) {
|
|
151
151
|
let force = false;
|
|
152
152
|
if (typeof forceUpdatePackage === "boolean" && forceUpdatePackage) {
|
|
153
|
-
|
|
153
|
+
const result = await prompt([
|
|
154
154
|
{
|
|
155
155
|
type: "confirm",
|
|
156
156
|
name: "force",
|
|
@@ -247,7 +247,7 @@ class Release {
|
|
|
247
247
|
if (commandOptions.customVersion) {
|
|
248
248
|
newVersion = commandOptions.customVersion;
|
|
249
249
|
if (!/\d+.\d+.\d+/.test(newVersion) || version === newVersion) {
|
|
250
|
-
|
|
250
|
+
const result = await prompt([
|
|
251
251
|
{
|
|
252
252
|
type: "input",
|
|
253
253
|
name: "version",
|
|
@@ -329,8 +329,8 @@ class Release {
|
|
|
329
329
|
devShared.Logger.log(chalk.yellow(`New Version: `) + `${newVersion}`);
|
|
330
330
|
packageOptions.version = newVersion;
|
|
331
331
|
if (Object.keys(this.packageRelation).length) {
|
|
332
|
-
for (
|
|
333
|
-
|
|
332
|
+
for (const packageName$ in relationVerisons) {
|
|
333
|
+
const newVersion$ = relationVerisons[packageName$];
|
|
334
334
|
if (dependencies?.[packageName$]) {
|
|
335
335
|
dependencies[packageName$] = newVersion$;
|
|
336
336
|
}
|
|
@@ -517,13 +517,13 @@ const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
|
517
517
|
let message = `chore(release): publish
|
|
518
518
|
|
|
519
519
|
`;
|
|
520
|
-
|
|
520
|
+
const relationVerisons = {};
|
|
521
521
|
await inputs.reduce(
|
|
522
522
|
(preProcess, packageFolderName) => {
|
|
523
523
|
const instance = instances[packageFolderName];
|
|
524
524
|
instance.packageRelation.forEach((i) => {
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
const packageFolderName$ = devShared.Locals.getPackageFolderName(i);
|
|
526
|
+
const instance$ = instances[packageFolderName$];
|
|
527
527
|
if (instance$.commits.length > 0) {
|
|
528
528
|
instance.updateCommits(instance$.commits, instance$.packageName);
|
|
529
529
|
}
|
package/dist/index.js
CHANGED
|
@@ -30,8 +30,8 @@ class Release {
|
|
|
30
30
|
constructor(config, commandOptions) {
|
|
31
31
|
const { packageDir, packageRelation } = Locals.impl();
|
|
32
32
|
if (typeof config === "string") {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const packageFolderName = config;
|
|
34
|
+
const packageDir$ = path.resolve(packageDir, packageFolderName);
|
|
35
35
|
config = {
|
|
36
36
|
dir: packageDir$,
|
|
37
37
|
name: packageFolderName
|
|
@@ -53,7 +53,7 @@ class Release {
|
|
|
53
53
|
const { packageFolderName, commandOptions } = this;
|
|
54
54
|
const [latestTag] = await this.getTags();
|
|
55
55
|
Logger.log(chalk.yellow(`Last Release Tag`) + `: ${latestTag || "<none>"}`);
|
|
56
|
-
|
|
56
|
+
const params = ["--no-pager", "log", `${latestTag}..HEAD`, `--format=%B%n${HASH}%n%H${SUFFIX}`];
|
|
57
57
|
let {
|
|
58
58
|
stdout
|
|
59
59
|
} = await Shell.exec("git", params);
|
|
@@ -103,7 +103,7 @@ class Release {
|
|
|
103
103
|
if (commits.length && skipUpdatePackage) {
|
|
104
104
|
let skip = false;
|
|
105
105
|
if (typeof skipUpdatePackage === "boolean" && skipUpdatePackage) {
|
|
106
|
-
|
|
106
|
+
const result = await prompt([
|
|
107
107
|
{
|
|
108
108
|
type: "confirm",
|
|
109
109
|
name: "skip",
|
|
@@ -127,7 +127,7 @@ class Release {
|
|
|
127
127
|
if (!commits.length && forceUpdatePackage) {
|
|
128
128
|
let force = false;
|
|
129
129
|
if (typeof forceUpdatePackage === "boolean" && forceUpdatePackage) {
|
|
130
|
-
|
|
130
|
+
const result = await prompt([
|
|
131
131
|
{
|
|
132
132
|
type: "confirm",
|
|
133
133
|
name: "force",
|
|
@@ -224,7 +224,7 @@ class Release {
|
|
|
224
224
|
if (commandOptions.customVersion) {
|
|
225
225
|
newVersion = commandOptions.customVersion;
|
|
226
226
|
if (!/\d+.\d+.\d+/.test(newVersion) || version === newVersion) {
|
|
227
|
-
|
|
227
|
+
const result = await prompt([
|
|
228
228
|
{
|
|
229
229
|
type: "input",
|
|
230
230
|
name: "version",
|
|
@@ -306,8 +306,8 @@ class Release {
|
|
|
306
306
|
Logger.log(chalk.yellow(`New Version: `) + `${newVersion}`);
|
|
307
307
|
packageOptions.version = newVersion;
|
|
308
308
|
if (Object.keys(this.packageRelation).length) {
|
|
309
|
-
for (
|
|
310
|
-
|
|
309
|
+
for (const packageName$ in relationVerisons) {
|
|
310
|
+
const newVersion$ = relationVerisons[packageName$];
|
|
311
311
|
if (dependencies?.[packageName$]) {
|
|
312
312
|
dependencies[packageName$] = newVersion$;
|
|
313
313
|
}
|
|
@@ -494,13 +494,13 @@ const run = (options) => Utils.autoCatch(async () => {
|
|
|
494
494
|
let message = `chore(release): publish
|
|
495
495
|
|
|
496
496
|
`;
|
|
497
|
-
|
|
497
|
+
const relationVerisons = {};
|
|
498
498
|
await inputs.reduce(
|
|
499
499
|
(preProcess, packageFolderName) => {
|
|
500
500
|
const instance = instances[packageFolderName];
|
|
501
501
|
instance.packageRelation.forEach((i) => {
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
const packageFolderName$ = Locals.getPackageFolderName(i);
|
|
503
|
+
const instance$ = instances[packageFolderName$];
|
|
504
504
|
if (instance$.commits.length > 0) {
|
|
505
505
|
instance.updateCommits(instance$.commits, instance$.packageName);
|
|
506
506
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deot/dev-releaser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@deot/dev-shared": "^2.
|
|
22
|
+
"@deot/dev-shared": "^2.8.0",
|
|
23
23
|
"conventional-commits-parser": "^5.0.0",
|
|
24
24
|
"chalk": "^5.3.0",
|
|
25
|
-
"fs-extra": "^11.
|
|
25
|
+
"fs-extra": "^11.2.0",
|
|
26
26
|
"inquirer": "^9.2.12",
|
|
27
27
|
"inquirer-autocomplete-prompt": "^3.0.1",
|
|
28
28
|
"semver": "^7.5.4"
|