spectrum-cli 1.2.0 → 1.2.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/CHANGELOG.md +13 -0
- package/index.js +0 -4
- package/package.json +1 -1
- package/src/preflight.js +14 -0
- package/src/release.js +4 -2
- package/src/version.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -35,6 +35,19 @@ _Список правок для обеспечения безопасност
|
|
|
35
35
|
|
|
36
36
|
_Список правок для обеспечения технической поддержки._
|
|
37
37
|
|
|
38
|
+
## 🚀 [1.2.2] - 2026-03-10
|
|
39
|
+
|
|
40
|
+
### 🛠 Changed
|
|
41
|
+
|
|
42
|
+
- Команда `spectrum release start` теперь требует запуск из develop-ветки.
|
|
43
|
+
- Команда `spectrum release close` теперь требует запуск из main-ветки.
|
|
44
|
+
|
|
45
|
+
## 🚀 [1.2.1] - 2026-03-05
|
|
46
|
+
|
|
47
|
+
### 🗑 Removed
|
|
48
|
+
|
|
49
|
+
- Убрана проверка на наличие изменений в гит при выполнение команд связанных с версией.
|
|
50
|
+
|
|
38
51
|
## 🚀 [1.2.0] - 2026-03-03
|
|
39
52
|
|
|
40
53
|
### 🆕 Added
|
package/index.js
CHANGED
|
@@ -103,10 +103,6 @@ chartCmd
|
|
|
103
103
|
// Переопределяем help, чтобы показать кастомный формат с алиасами
|
|
104
104
|
program.configureHelp({
|
|
105
105
|
formatHelp: (cmd, helper) => {
|
|
106
|
-
const termWidth = helper.padWidth(cmd, helper);
|
|
107
|
-
const helpWidth = helper.helpWidth || 80;
|
|
108
|
-
const itemIndentWidth = 2;
|
|
109
|
-
const itemSeparatorWidth = 2;
|
|
110
106
|
const cmdUsage = helper.commandUsage(cmd);
|
|
111
107
|
const cmdDescription = helper.commandDescription(cmd);
|
|
112
108
|
const options = helper.visibleOptions(cmd);
|
package/package.json
CHANGED
package/src/preflight.js
CHANGED
|
@@ -72,6 +72,19 @@ function requireCurrentBranch(expectedBranch) {
|
|
|
72
72
|
return ok({ currentBranch });
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function requireOnDevBranch() {
|
|
76
|
+
const devBranch = getDevelopBranch();
|
|
77
|
+
const currentBranch = getCurrentBranch();
|
|
78
|
+
if (!currentBranch) {
|
|
79
|
+
return fail('Не удалось определить текущую ветку.');
|
|
80
|
+
}
|
|
81
|
+
if (currentBranch !== devBranch) {
|
|
82
|
+
return fail(`Текущая ветка "${currentBranch}", ожидалась "${devBranch}".`);
|
|
83
|
+
}
|
|
84
|
+
return ok({ devBranch, currentBranch });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
75
88
|
function requireOnMainBranch() {
|
|
76
89
|
const mainBranch = getMainBranch();
|
|
77
90
|
const currentBranch = getCurrentBranch();
|
|
@@ -532,6 +545,7 @@ module.exports = {
|
|
|
532
545
|
requireCleanWorkingTree,
|
|
533
546
|
requireMainAndDevBranches,
|
|
534
547
|
requireCurrentBranch,
|
|
548
|
+
requireOnDevBranch,
|
|
535
549
|
requireOnMainBranch,
|
|
536
550
|
requireRemoteOrigin,
|
|
537
551
|
requireRemoteReachable,
|
package/src/release.js
CHANGED
|
@@ -9,7 +9,8 @@ const {
|
|
|
9
9
|
requireCleanWorkingTree,
|
|
10
10
|
requireCurrentBranchUpToDateWithRemote,
|
|
11
11
|
requireMainAndDevBranches,
|
|
12
|
-
|
|
12
|
+
requireOnDevBranch,
|
|
13
|
+
requireOnMainBranch,
|
|
13
14
|
requireReleaseBranchMissing,
|
|
14
15
|
requirePackageVersion,
|
|
15
16
|
requireFileExists,
|
|
@@ -64,7 +65,7 @@ function releaseClose() {
|
|
|
64
65
|
{ name: 'git-repo', run: requireGitRepo },
|
|
65
66
|
{ name: 'clean-working-tree', run: requireCleanWorkingTree },
|
|
66
67
|
{ name: 'branch-up-to-date', run: requireCurrentBranchUpToDateWithRemote },
|
|
67
|
-
{ name: 'on-
|
|
68
|
+
{ name: 'on-main-branch', run: requireOnMainBranch },
|
|
68
69
|
{ name: 'main-and-dev-branches', run: requireMainAndDevBranches }
|
|
69
70
|
],
|
|
70
71
|
steps: [
|
|
@@ -107,6 +108,7 @@ function releaseStart() {
|
|
|
107
108
|
{ name: 'branch-up-to-date', run: requireCurrentBranchUpToDateWithRemote },
|
|
108
109
|
{ name: 'main-and-dev-branches', run: requireMainAndDevBranches },
|
|
109
110
|
{ name: 'package-version', run: requirePackageVersion },
|
|
111
|
+
{ name: 'on-dev-branch', run: requireOnDevBranch },
|
|
110
112
|
{ name: 'changelog-exists', run: () => requireFileExists('CHANGELOG.md') },
|
|
111
113
|
{ name: 'unreleased-template-exists', run: () => requireFileExists(path.join(__dirname, 'UNRELEASED.md')) },
|
|
112
114
|
{ name: 'changelog-prettier-check', run: requireChangelogFormatted },
|
package/src/version.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const { logSuccess, logError } = require('./utils');
|
|
4
4
|
const { runCommand } = require('./command-executor');
|
|
5
|
-
const { requireGitRepo,
|
|
5
|
+
const { requireGitRepo, requireFileExists, requirePackageVersion } = require('./preflight');
|
|
6
6
|
|
|
7
7
|
function upVersion(oldVersion, upType) {
|
|
8
8
|
const [major, minor, patch] = oldVersion.split('.').map(Number);
|
|
@@ -41,7 +41,6 @@ function setVersion(versionType) {
|
|
|
41
41
|
{ name: 'git-repo', run: requireGitRepo },
|
|
42
42
|
{ name: 'package-json-exists', run: () => requireFileExists('package.json') },
|
|
43
43
|
{ name: 'package-version', run: requirePackageVersion },
|
|
44
|
-
{ name: 'clean-working-tree', run: requireCleanWorkingTree }
|
|
45
44
|
],
|
|
46
45
|
steps: [
|
|
47
46
|
{ name: 'update-package-version', run: () => updateVersionFile(versionType) }
|