@itcase/config 1.6.30 → 1.6.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/config",
3
- "version": "1.6.30",
3
+ "version": "1.6.32",
4
4
  "author": "ITCase",
5
5
  "description": "ITCase Config ",
6
6
  "engines": {
@@ -31,6 +31,13 @@
31
31
  "registry": "https://registry.npmjs.org/"
32
32
  },
33
33
  "dependencies": {
34
+ "@lerna-lite/cli": "^4.11.0",
35
+ "@lerna-lite/exec": "^4.11.1",
36
+ "@lerna-lite/list": "^4.11.0",
37
+ "@lerna-lite/run": "^4.11.1",
38
+ "@lerna-lite/watch": "^4.11.0",
39
+ "semantic-release-lerna": "^2.16.4",
40
+ "chokidar-cli": "^3.0.0",
34
41
  "@commitlint/cli": "^20.3.1",
35
42
  "@commitlint/config-conventional": "^20.3.1",
36
43
  "@commitlint/cz-commitlint": "^20.3.1",
@@ -44,9 +44,10 @@ const commonPlugins = {
44
44
  * Создает базовую конфигурацию semantic-release с общими плагинами
45
45
  * @param {Object} options - Опции для кастомизации конфигурации
46
46
  * @param {string|string[]} options.branches - Ветки для релиза
47
- * @param {Object} options.npmConfig - Конфигурация для @semantic-release/npm
47
+ * @param {Object|null} options.npmConfig - Конфигурация для @semantic-release/npm. Если null, плагин не добавляется
48
48
  * @param {Object} options.gitConfig - Конфигурация для @semantic-release/git
49
- * @param {Array} options.additionalPlugins - Дополнительные плагины для добавления
49
+ * @param {Array} options.additionalPlugins - Дополнительные плагины для добавления перед changelog и git
50
+ * @param {boolean} options.skipReleaseNotesGenerator - Пропустить @semantic-release/release-notes-generator
50
51
  * @returns {Object} Конфигурация semantic-release
51
52
  */
52
53
  function createSemanticReleaseConfig({
@@ -54,16 +55,26 @@ function createSemanticReleaseConfig({
54
55
  npmConfig = {},
55
56
  gitConfig,
56
57
  additionalPlugins = [],
58
+ skipReleaseNotesGenerator = false,
57
59
  }) {
58
- const plugins = [
59
- commonPlugins.commitAnalyzer,
60
- commonPlugins.releaseNotesGenerator,
61
- commonPlugins.changelog,
62
- ['@semantic-release/npm', npmConfig],
63
- ['@semantic-release/git', gitConfig],
64
- commonPlugins.github,
65
- ...additionalPlugins,
66
- ]
60
+ const plugins = [commonPlugins.commitAnalyzer]
61
+
62
+ // Добавляем release-notes-generator только если не пропущен
63
+ if (!skipReleaseNotesGenerator) {
64
+ plugins.push(commonPlugins.releaseNotesGenerator)
65
+ }
66
+
67
+ // Дополнительные плагины (например, semantic-release-lerna) должны идти перед changelog и git
68
+ plugins.push(...additionalPlugins)
69
+
70
+ plugins.push(commonPlugins.changelog)
71
+
72
+ // Добавляем npm плагин только если передан конфиг
73
+ if (npmConfig !== null) {
74
+ plugins.push(['@semantic-release/npm', npmConfig])
75
+ }
76
+
77
+ plugins.push(['@semantic-release/git', gitConfig], commonPlugins.github)
67
78
 
68
79
  const preset = PRESET
69
80
 
@@ -4,6 +4,7 @@ import { createSemanticReleaseConfig } from './common.js'
4
4
 
5
5
  const semanticReleaseMonorepo = createSemanticReleaseConfig({
6
6
  branches: ['master'],
7
+ npmConfig: null,
7
8
  gitConfig: {
8
9
  message: 'publish version ${nextRelease.version} [skip ci]',
9
10
  assets: [
@@ -18,6 +19,7 @@ const semanticReleaseMonorepo = createSemanticReleaseConfig({
18
19
  ],
19
20
  },
20
21
  additionalPlugins: [['semantic-release-lerna', { generateNotes: true }]],
22
+ skipReleaseNotesGenerator: true,
21
23
  })
22
24
 
23
25
  export { semanticReleaseMonorepo }