commit-and-tag-version 11.2.2 → 11.2.3
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 +7 -0
- package/lib/lifecycles/bump.js +1 -1
- package/package.json +1 -1
- package/test/config-files.spec.js +3 -3
- package/test/core.spec.js +4 -4
- package/test/git.spec.js +3 -3
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 [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [11.2.3](https://github.com/absolute-version/commit-and-tag-version/compare/v11.2.2...v11.2.3) (2023-08-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **bump:** propagate the parserOpts from args to conventionalRecommendedBump, fixing an issue with custom headerPatterns ([#89](https://github.com/absolute-version/commit-and-tag-version/issues/89)) ([bc685be](https://github.com/absolute-version/commit-and-tag-version/commit/bc685be46ca90417a03867717393bb9018e6036c))
|
|
11
|
+
|
|
5
12
|
## [11.2.2](https://github.com/absolute-version/commit-and-tag-version/compare/v11.2.1...v11.2.2) (2023-06-18)
|
|
6
13
|
|
|
7
14
|
|
package/lib/lifecycles/bump.js
CHANGED
|
@@ -124,7 +124,7 @@ function bumpVersion (releaseAs, currentVersion, args) {
|
|
|
124
124
|
path: args.path,
|
|
125
125
|
tagPrefix: args.tagPrefix,
|
|
126
126
|
lernaPackage: args.lernaPackage
|
|
127
|
-
}, function (err, release) {
|
|
127
|
+
}, args.parserOpts, function (err, release) {
|
|
128
128
|
if (err) return reject(err)
|
|
129
129
|
else return resolve(release)
|
|
130
130
|
})
|
package/package.json
CHANGED
|
@@ -22,15 +22,15 @@ function exec () {
|
|
|
22
22
|
*
|
|
23
23
|
* Mocks should be unregistered in test cleanup by calling unmock()
|
|
24
24
|
*
|
|
25
|
-
* bump?: 'major' | 'minor' | 'patch' | Error | (opt, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
25
|
+
* bump?: 'major' | 'minor' | 'patch' | Error | (opt, parserOpts, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
26
26
|
* changelog?: string | Error | Array<string | Error | (opt) => string | null>
|
|
27
27
|
* tags?: string[] | Error
|
|
28
28
|
*/
|
|
29
29
|
function mock ({ bump, changelog, tags } = {}) {
|
|
30
30
|
mockery.enable({ warnOnUnregistered: false, useCleanCache: true })
|
|
31
31
|
|
|
32
|
-
mockery.registerMock('conventional-recommended-bump', function (opt, cb) {
|
|
33
|
-
if (typeof bump === 'function') bump(opt, cb)
|
|
32
|
+
mockery.registerMock('conventional-recommended-bump', function (opt, parserOpts, cb) {
|
|
33
|
+
if (typeof bump === 'function') bump(opt, parserOpts, cb)
|
|
34
34
|
else if (bump instanceof Error) cb(bump)
|
|
35
35
|
else cb(null, bump ? { releaseType: bump } : {})
|
|
36
36
|
})
|
package/test/core.spec.js
CHANGED
|
@@ -36,7 +36,7 @@ function getPackageVersion () {
|
|
|
36
36
|
*
|
|
37
37
|
* Mocks should be unregistered in test cleanup by calling unmock()
|
|
38
38
|
*
|
|
39
|
-
* bump?: 'major' | 'minor' | 'patch' | Error | (opt, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
39
|
+
* bump?: 'major' | 'minor' | 'patch' | Error | (opt, parserOpts, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
40
40
|
* changelog?: string | Error | Array<string | Error | (opt) => string | null>
|
|
41
41
|
* execFile?: ({ dryRun, silent }, cmd, cmdArgs) => Promise<string>
|
|
42
42
|
* fs?: { [string]: string | Buffer | any }
|
|
@@ -46,8 +46,8 @@ function getPackageVersion () {
|
|
|
46
46
|
function mock ({ bump, changelog, execFile, fs, pkg, tags } = {}) {
|
|
47
47
|
mockery.enable({ warnOnUnregistered: false, useCleanCache: true })
|
|
48
48
|
|
|
49
|
-
mockery.registerMock('conventional-recommended-bump', function (opt, cb) {
|
|
50
|
-
if (typeof bump === 'function') bump(opt, cb)
|
|
49
|
+
mockery.registerMock('conventional-recommended-bump', function (opt, parserOpts, cb) {
|
|
50
|
+
if (typeof bump === 'function') bump(opt, parserOpts, cb)
|
|
51
51
|
else if (bump instanceof Error) cb(bump)
|
|
52
52
|
else cb(null, bump ? { releaseType: bump } : {})
|
|
53
53
|
})
|
|
@@ -405,7 +405,7 @@ describe('cli', function () {
|
|
|
405
405
|
|
|
406
406
|
it('creates a prerelease with a new minor version after two prerelease patches', async function () {
|
|
407
407
|
let releaseType = 'patch'
|
|
408
|
-
const bump = (_, cb) => cb(null, { releaseType })
|
|
408
|
+
const bump = (_, __, cb) => cb(null, { releaseType })
|
|
409
409
|
mock({
|
|
410
410
|
bump,
|
|
411
411
|
fs: { 'CHANGELOG.md': 'legacy header format<a name="1.0.0">\n' }
|
package/test/git.spec.js
CHANGED
|
@@ -38,7 +38,7 @@ function getPackageVersion () {
|
|
|
38
38
|
/**
|
|
39
39
|
* Mock external conventional-changelog modules
|
|
40
40
|
*
|
|
41
|
-
* bump: 'major' | 'minor' | 'patch' | Error | (opt, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
41
|
+
* bump: 'major' | 'minor' | 'patch' | Error | (opt, parserOpts, cb) => { cb(err) | cb(null, { releaseType }) }
|
|
42
42
|
* changelog?: string | Error | Array<string | Error | (opt) => string | null>
|
|
43
43
|
* tags?: string[] | Error
|
|
44
44
|
*/
|
|
@@ -46,8 +46,8 @@ function mock ({ bump, changelog, tags }) {
|
|
|
46
46
|
if (bump === undefined) throw new Error('bump must be defined for mock()')
|
|
47
47
|
mockery.enable({ warnOnUnregistered: false, useCleanCache: true })
|
|
48
48
|
|
|
49
|
-
mockery.registerMock('conventional-recommended-bump', function (opt, cb) {
|
|
50
|
-
if (typeof bump === 'function') bump(opt, cb)
|
|
49
|
+
mockery.registerMock('conventional-recommended-bump', function (opt, parserOpts, cb) {
|
|
50
|
+
if (typeof bump === 'function') bump(opt, parserOpts, cb)
|
|
51
51
|
else if (bump instanceof Error) cb(bump)
|
|
52
52
|
else cb(null, { releaseType: bump })
|
|
53
53
|
})
|