spectrum-cli 1.2.1 → 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 CHANGED
@@ -35,6 +35,13 @@ _Список правок для обеспечения безопасност
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
+
38
45
  ## 🚀 [1.2.1] - 2026-03-05
39
46
 
40
47
  ### 🗑 Removed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spectrum-cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "🚀 Modern CLI for development workflow automation - release management, versioning, and changelog generation",
5
5
  "main": "index.js",
6
6
  "bin": {
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
- requireOnReleaseBranch,
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-release-branch', run: requireOnReleaseBranch },
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 },