@infomaximum/package-cli 2.10.0 → 2.10.1

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
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.10.1](https://github.com/Infomaximum/package-cli/compare/v2.10.0...v2.10.1) (2024-09-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * запись в манифест только валидной версии ([fd07f58](https://github.com/Infomaximum/package-cli/commit/fd07f58b9eeeda5a43798160a34ce5e0590a580f))
11
+
5
12
  ## [2.10.0](https://github.com/Infomaximum/package-cli/compare/v2.9.0...v2.10.0) (2024-09-30)
6
13
 
7
14
 
package/README.md CHANGED
@@ -97,7 +97,7 @@
97
97
 
98
98
  Эта конфигурация определяет, как будет собираться и запускаться ваш пакет с использованием `@infomaximum/package-cli`.
99
99
 
100
- ## Версионирование пакета
100
+ ## Версионирование пакета `(2.10.0)`
101
101
 
102
102
  `@infomaximum/package-cli` реализует возможность автоматизированного [семантического версионирования](https://semver.org/lang/ru/) для управления версиями пакетов. Версия пакета автоматически вычисляется на основе сообщений коммитов в репозиторий:
103
103
 
@@ -30,7 +30,13 @@ const getBumpFiles = (manifestWidgetPath) => {
30
30
  };
31
31
  const writeVersionManifest = (contents, version) => {
32
32
  const { json, indent, newline } = getJsonContentFile(contents);
33
- json[MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME] = String(semver.major(version));
33
+ const newVersion = semver.major(version);
34
+ const currentMajorVersion = semver.major(readVersionManifest(contents));
35
+ const validator = validateSystemVersion(currentMajorVersion);
36
+ const isValid = validator(newVersion);
37
+ if (isValid === true) {
38
+ json[MIN_SYSTEM_VERSION_MANIFEST_FIELD_NAME] = String(newVersion);
39
+ }
34
40
  return stringifyPackage(json, indent, newline);
35
41
  };
36
42
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -73,7 +73,7 @@
73
73
  "@types/standard-version": "^7.1.3",
74
74
  "@types/webpack": "^5.28.5",
75
75
  "@types/zip-webpack-plugin": "^3.0.6",
76
- "prettier": "^3.1.1",
76
+ "prettier": "^3.3.3",
77
77
  "rimraf": "^5.0.5",
78
78
  "typescript": "5.6.2"
79
79
  },