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
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@
8
8
[](https://ui5-slack-invite.cfapps.eu10.hana.ondemand.com)
Copy file name to clipboardExpand all lines: docs/Guidelines.md
+76-34Lines changed: 76 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,55 +6,97 @@ You may also find an ESLint integration for your favorite IDE [here](https://esl
6
6
## Testing
7
7
Unit testing is based on the [ava](https://github.com/avajs/ava) test-framework. You can run all tests using `npm test` (this is what our CI will do for all pull requests).
8
8
9
-
During development, you might want to use `npm run unit` or `npm run unit-watch` (re-runs tests automatically after file changes) to quickly execute all unit tests and see whether your change just broke one of them. 😉
9
+
During development, you might want to use `npm run unit` or `npm run unit-watch` (re-runs tests automatically after file changes; only available within a specific package) to quickly execute all unit tests and see whether your change just broke one of them. 😉
10
10
11
11
## Git Guidelines
12
12
### No Merge Commits
13
13
Please use [rebase instead of merge](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) to update a branch to the latest main. This helps keeping a clean commit history in the project.
14
14
15
15
### Commit Message Style
16
-
#### Commit Summary
17
-
The commit summary is the first line of the commit message.
18
16
19
-
- It should be **50-70 characters** long.
20
-
- It must be **prefixed** by `[FIX]`, `[FEATURE]` or `[INTERNAL]` accordingly, followed by the name of the component or module which was the main subject of the change.
21
-
+ Use `[FIX]` for bugfixes.
22
-
+ Use `[FEATURE]` for new features / enhancements.
23
-
+ Use `[BREAKING]` for breaking / incompatible changes.
24
-
_**Note:** The commit body of a breaking change should also include a paragraph starting with `BREAKING CHANGE:`.
25
-
This paragraph will be highlighted in the changelog._
26
-
+ Use `[DEPENDENCY]` for dependency updates that should be mentioned in the changelog.
27
-
+ Use `[INTERNAL]` for all other changes (e.g. refactorings, documentation, etc.). These changes will not be listed in the changelog.
28
-
+ Exceptions are changes created by automated processes like releases or dependency updates
29
-
- It must not contain `[` or `]` anywhere but in the prefix.
30
-
- It shall be written in **imperative present tense** (as recommended by [Git](https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project))
31
-
+ Examples: Instead of *"Adding tests for"* or *"I added tests for"* use *"Add tests for"* or *"Add feature xy"*.
17
+
This project uses the [Conventional Commits specification](https://www.conventionalcommits.org/) to ensure a consistent way of dealing with commit messages.
32
18
33
-
#### Commit Body
34
-
After the commit summary there should be an empty line followed by the commit body.
19
+
#### Structure
35
20
36
-
- Describe the intention and reasoning of the change
37
-
- If a change fixes an issue reported on GitHub, add the following line to the commit message:
38
-
+`Fixes: #<issueNumber>` (e.g. `Fixes: #42`)
39
-
- Breaking changes should include a paragraph starting with `BREAKING CHANGE:`. This paragraph will be highlighted in the changelog.
21
+
```
22
+
type(scope): Description
23
+
```
24
+
25
+
-**Type (required)**: Every commit message must start with a lowercase `type`. The project has defined a set of [valid types](../commitlint.config.mjs#L10)
26
+
-**Scope (conditional)**: Required only for types that appear in the public changelog: `feat`, `fix`, `perf`, `deps`, and `revert`. The scope must be the package folder name (e.g. `cli`, `builder`, `fs`, `logger`, `project`, `server`, `documentation`). No other scopes are allowed (except `build(deps-dev)` for dev dependencies).
27
+
-**Description (required)**: Must follow Sentence Case style. Only the first word and proper nouns are written in uppercase.
28
+
29
+
#### Dependencies
30
+
31
+
- Use `deps(scope)` for productive dependency updates that are relevant for end users
32
+
- Use `build(deps-dev)` for development dependency updates
33
+
34
+
#### Breaking Changes
35
+
36
+
Breaking changes should follow the [Conventional Commits specification](https://www.conventionalcommits.org/):
37
+
- Add `!` after the type/scope: `feat(cli)!: Remove deprecated command`
38
+
- Include `BREAKING CHANGE:` in the commit footer with details about the change
40
39
41
-
#### Example
40
+
#### Commitlint Rules
41
+
42
+
The following rules are enforced by commitlint:
43
+
- Valid commit types are enforced (see [commitlint.config.mjs](../commitlint.config.mjs))
44
+
- When using a scope, it must be one of: package names (`builder`, `cli`, `documentation`, `fs`, `logger`, `project`, `server`) or `deps-dev` for development dependencies
45
+
- Commit messages must follow sentence case for the description
46
+
47
+
**Important**: Commitlint cannot automatically enforce that scopes are required only for public changelog types. Please manually ensure that:
48
+
-`feat`, `fix`, `perf`, `deps`, `revert` commits always include a package scope
49
+
- Other commit types should not include a scope (except `build(deps-dev)` for dev dependencies)
50
+
51
+
#### Examples
52
+
53
+
**Features and fixes:**
54
+
```
55
+
feat(cli): Add "versions" command
56
+
fix(fs): Correctly handle paths containing non-ASCII characters on Windows
57
+
perf(builder): Improve bundle generation speed by 25%
42
58
```
43
-
[FIX] npm translator: Correct handling of devDependencies
44
59
45
-
- devDevependencies should only be included in certain cases
46
-
- Was caused by a refactoring
60
+
**Dependencies:**
61
+
```
62
+
deps(cli): Update @ui5/logger to v4.0.0
63
+
build(deps-dev): Update eslint to v9.0.0
64
+
```
65
+
66
+
**Breaking changes:**
67
+
```
68
+
feat(cli)!: Remove deprecated "init" command
47
69
48
-
Fixes: #42
49
-
Fixes: #45
70
+
BREAKING CHANGE: The "init" command has been removed. Use "create" instead.
71
+
```
72
+
73
+
**Workspace-wide changes (no scope):**
74
+
```
75
+
ci: Update GitHub Actions to use Node.js 20
76
+
docs: Update contribution guidelines
77
+
build: Configure new linting rules
50
78
```
51
79
52
-
## Work on Release Branches
53
-
Major releases are typically prepared on dedicated branches like `next`.
80
+
### Multi-Package Changes
54
81
55
-
There are some things to be aware of when working on these branches.
82
+
When making changes that affect multiple packages, create individual commits for each package to maintain clear scoping and changelog generation. Each commit should follow the conventional commit format with the appropriate package scope.
56
83
57
-
### Implementing Changes in Multiple Code Lines
58
-
While working on a new major release (e.g. `5.0.0`), any fixes or new features implemented on the **current** (main) code line (e.g. 4.x) should be cherry-picked as `[INTERNAL]` to the dedicated (pre-)release branch (typically `next`). This is to prevent changes declared as `[FEATURE]` or `[FIX]` from appearing in the changelog twice, which can be confusing since the new major version has not yet been released and should naturally contain any fixes or features released in any of the preceding releases. Listing them twice might confuse users. Note that our changelog is generated based on all tags of the repository, independent of the currently checked out branch (also see [git-chglog/issues/123](https://github.com/git-chglog/git-chglog/issues/123)).
84
+
**Exception:** Create a single commit for cross-package changes that do not affect the public changelog, such as:
85
+
- Code style updates and formatting changes
86
+
- Refactoring that doesn't change public APIs
87
+
- Internal tooling and configuration updates
88
+
- Documentation updates across packages
59
89
60
-
However, once a new major release becomes **current** (i.e. "main", not a pre-release), any changes applied to multiple code lines should be cherry picked with the original prefix, so that they appear for multiple versions in the changelog.
90
+
#### Examples
91
+
92
+
For a feature spanning multiple packages:
93
+
```
94
+
feat(cli): Add support for new build option
95
+
feat(builder): Implement new build option processing
96
+
feat(fs): Add helper methods for new build option
97
+
```
98
+
99
+
For refactoring across packages:
100
+
```
101
+
refactor: Standardize error handling across packages
0 commit comments