You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README.md to enhance documentation on automatic version calculation and public API detection. Added detailed criteria for version increments based on commit history, including explicit version tags and public API changes, to clarify semantic versioning practices.
Copy file name to clipboardExpand all lines: scripts/README.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,12 +93,32 @@ Commits can include the following tags to control version increments:
93
93
94
94
### Automatic Version Calculation
95
95
96
-
The module analyzes commit history to determine appropriate version increments:
96
+
The module analyzes commit history to determine appropriate version increments, following semantic versioning principles:
97
97
98
-
1. Checks for explicit version tags in commit messages
99
-
2. Analyzes code changes vs. documentation changes
100
-
3. Considers the scope and impact of changes
101
-
4. Maintains semantic versioning principles
98
+
1. Checks for explicit version tags in commit messages ([major], [minor], [patch], [pre])
99
+
2. Detects public API changes by analyzing code diffs
100
+
- Adding, modifying, or removing public classes, interfaces, enums, structs, or records
101
+
- Changes to public methods, properties, or constants
102
+
- Any public API surface change triggers a minor version bump
103
+
3. Non-API changing code commits trigger patch version increments
104
+
4. Minimal changes default to prerelease increments
105
+
106
+
This approach ensures that:
107
+
- Breaking changes are always major version increments (manually tagged)
108
+
- Public API additions or modifications are minor version increments (automatically detected)
109
+
- Bug fixes and internal changes are patch version increments
110
+
- Trivial changes result in prerelease increments
111
+
112
+
### Public API Detection
113
+
114
+
The module automatically analyzes code changes to detect modifications to the public API surface:
115
+
116
+
- Added, modified, or removed public/protected classes, interfaces, enums, structs, or records
117
+
- Added, modified, or removed public/protected methods
118
+
- Added, modified, or removed public/protected properties
119
+
- Added or removed public constants
120
+
121
+
When any of these changes are detected, the module automatically triggers a minor version increment, following semantic versioning best practices where non-breaking API changes warrant a minor version bump.
0 commit comments