@itcase/config 1.6.31 → 1.6.33

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.31",
3
+ "version": "1.6.33",
4
4
  "author": "ITCase",
5
5
  "description": "ITCase Config ",
6
6
  "engines": {
@@ -84,8 +84,19 @@
84
84
  "postcss-unitlist": "^1.0.4",
85
85
  "postcss-unroot": "^1.0.2",
86
86
  "postcss-url": "^10.1.3",
87
- "postcss-urlrewrite": "^0.3.0",
88
- "semantic-release": "^24.2.9"
87
+ "@rollup/plugin-alias": "^6.0.0",
88
+ "@rollup/plugin-babel": "^6.1.0",
89
+ "@rollup/plugin-image": "^3.0.3",
90
+ "@rollup/plugin-json": "^6.1.0",
91
+ "@rollup/plugin-node-resolve": "^16.0.3",
92
+ "@rollup/plugin-terser": "^0.4.4",
93
+ "@rollup/plugin-typescript": "^12.3.0",
94
+ "rollup-plugin-copy": "^3.5.0",
95
+ "rollup-plugin-dts": "^6.3.0",
96
+ "rollup-plugin-peer-deps-external": "^2.2.4",
97
+ "rollup-preserve-directives": "^1.1.3",
98
+ "semantic-release": "^25.0.2",
99
+ "postcss-urlrewrite": "^0.3.0"
89
100
  },
90
101
  "devDependencies": {
91
102
  "@itcase/lint": "^1.1.78",
@@ -14,7 +14,22 @@ const releaseNotesGeneratorConfig = {
14
14
  presetConfig: {
15
15
  types: releaseNotesTypes,
16
16
  },
17
- writerOpts: { commitsSort: COMMITS_SORT },
17
+ writerOpts: {
18
+ commitsSort: COMMITS_SORT,
19
+ commitFilter: (commit) => {
20
+ // Фильтруем merge коммиты
21
+ if (
22
+ !commit.type &&
23
+ commit.subject &&
24
+ /^Merge (branch|pull request|commit|remote-tracking|.*into|.*of)/i.test(
25
+ commit.subject,
26
+ )
27
+ ) {
28
+ return false
29
+ }
30
+ return true
31
+ },
32
+ },
18
33
  }
19
34
 
20
35
  const commonPlugins = {
@@ -44,9 +59,10 @@ const commonPlugins = {
44
59
  * Создает базовую конфигурацию semantic-release с общими плагинами
45
60
  * @param {Object} options - Опции для кастомизации конфигурации
46
61
  * @param {string|string[]} options.branches - Ветки для релиза
47
- * @param {Object} options.npmConfig - Конфигурация для @semantic-release/npm
62
+ * @param {Object|null} options.npmConfig - Конфигурация для @semantic-release/npm. Если null, плагин не добавляется
48
63
  * @param {Object} options.gitConfig - Конфигурация для @semantic-release/git
49
- * @param {Array} options.additionalPlugins - Дополнительные плагины для добавления
64
+ * @param {Array} options.additionalPlugins - Дополнительные плагины для добавления перед changelog и git
65
+ * @param {boolean} options.skipReleaseNotesGenerator - Пропустить @semantic-release/release-notes-generator
50
66
  * @returns {Object} Конфигурация semantic-release
51
67
  */
52
68
  function createSemanticReleaseConfig({
@@ -54,16 +70,26 @@ function createSemanticReleaseConfig({
54
70
  npmConfig = {},
55
71
  gitConfig,
56
72
  additionalPlugins = [],
73
+ skipReleaseNotesGenerator = false,
57
74
  }) {
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
- ]
75
+ const plugins = [commonPlugins.commitAnalyzer]
76
+
77
+ // Добавляем release-notes-generator только если не пропущен
78
+ if (!skipReleaseNotesGenerator) {
79
+ plugins.push(commonPlugins.releaseNotesGenerator)
80
+ }
81
+
82
+ // Дополнительные плагины (например, semantic-release-lerna) должны идти перед changelog и git
83
+ plugins.push(...additionalPlugins)
84
+
85
+ plugins.push(commonPlugins.changelog)
86
+
87
+ // Добавляем npm плагин только если передан конфиг
88
+ if (npmConfig !== null) {
89
+ plugins.push(['@semantic-release/npm', npmConfig])
90
+ }
91
+
92
+ plugins.push(['@semantic-release/git', gitConfig], commonPlugins.github)
67
93
 
68
94
  const preset = PRESET
69
95
 
@@ -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 }