@vingy/nimver 4.0.0 → 5.0.0

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.
Files changed (3) hide show
  1. package/README.md +30 -2
  2. package/bin/nimver.js +5129 -4067
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,6 +34,12 @@ nimver install-hooks
34
34
  `init` creates `.nimver/config.ini`, pre-populated with sensible defaults.
35
35
  `install-hooks` writes a `commit-msg` hook into `.git/hooks/` that delegates to this binary, rejecting messages a release would not be able to read. `.nimver/` should be committed to Git.
36
36
 
37
+ The config is checked before it is used: an unknown section or setting, a
38
+ setting written above any section, or a line that does not parse is an error
39
+ naming what it found and the nearest thing it knows. A misspelled
40
+ `[packages.web]` would otherwise leave a workspace with no packages, which reads
41
+ exactly like a repository that never declared any.
42
+
37
43
  ## Everyday use
38
44
 
39
45
  Just commit normally, using [Conventional Commits syntax](https://www.conventionalcommits.org/):
@@ -88,6 +94,7 @@ sourceFiles = "src/cli/src/**"
88
94
 
89
95
  `sourceFiles` is optional per package, see [Change attribution](#change-attribution).
90
96
 
97
+
91
98
  ### Strategy
92
99
 
93
100
  The strategy controls how versioning is handled for the packages. There are two strategies: `independent` and `fixed`.
@@ -114,7 +121,8 @@ A changelog lives next to its manifest, so where you put manifests decides how m
114
121
  written beside the manifest, with plain `## [1.2.0]` headings.
115
122
  - **Several manifests in the same directory** (including the repository root) —
116
123
  those packages share the one `CHANGELOG.md` in that directory, and each
117
- section names its package: `## [web 1.2.0]`.
124
+ section names its package: `## [web 1.2.0]`, or `## [@acme/widgets 1.2.0]`
125
+ for a scoped one.
118
126
 
119
127
  ### Change attribution
120
128
 
@@ -147,7 +155,7 @@ A breaking change will always be treated as a major bump.
147
155
 
148
156
  Each commit is read under the configuration *it* was made with, taken from its own tree — so changing a mapping today does not rewrite what last week's commits meant, and a package added mid-cycle cannot claim changes made before it existed.
149
157
 
150
- Any commit type not listed here is rejected by the `commit-msg` hook. Add your own types (and adjust bump levels) as needed.
158
+ Any commit type not listed here is rejected by the `commit-msg` hook (this behavior can be adjusted, see [Allowing unknown types](#allowing-unknown-types) for details). Add your own types (and adjust bump levels) as needed.
151
159
 
152
160
  The default types are:
153
161
 
@@ -168,6 +176,26 @@ version = ignore
168
176
  wip = ignore
169
177
  ```
170
178
 
179
+ ### Allowing unknown types
180
+
181
+ By default any type not listed under `[types]` is refused by the `commit-msg` hook,
182
+ and skipped with a warning when a release reads the history back. You can instead allow unknown types to be treated as any of the standard types.
183
+
184
+ ```ini
185
+ [commits]
186
+ unknownType = patch ; or reject (the default) | ignore | none | minor | major
187
+ ```
188
+
189
+ ### Release notes
190
+
191
+ By default, the commit messages subject is used for the changelog, but a `Release-Note:` footer can override it.
192
+
193
+ ```
194
+ fix(parser): tighten the scope regex
195
+
196
+ Release-Note: Scopes may now contain digits, slashes and dots.
197
+ ```
198
+
171
199
  ## CLI reference
172
200
 
173
201
  ```