conventional-recommended-bump 4.0.0 → 4.1.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 +66 -0
- package/cli.js +0 -0
- package/index.js +8 -3
- package/package.json +10 -17
- package/preset-resolver.js +18 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,72 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.1.0...conventional-recommended-bump@4.1.1) (2019-04-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* preset load error message should handle objects ([fb4a8d1](https://github.com/conventional-changelog/conventional-changelog/commit/fb4a8d1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.1.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.0.4...conventional-recommended-bump@4.1.0) (2019-04-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **deps:** update dependency concat-stream to v2 ([#401](https://github.com/conventional-changelog/conventional-changelog/issues/401)) ([4c09bfc](https://github.com/conventional-changelog/conventional-changelog/commit/4c09bfc))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* conventionalcommits preset, preMajor config option ([#434](https://github.com/conventional-changelog/conventional-changelog/issues/434)) ([dde12fe](https://github.com/conventional-changelog/conventional-changelog/commit/dde12fe))
|
|
28
|
+
* **conventional-recommended-bump:** send options to whatBump ([#409](https://github.com/conventional-changelog/conventional-changelog/issues/409)) ([508d6d6](https://github.com/conventional-changelog/conventional-changelog/commit/508d6d6)), closes [/github.com/lerna/lerna/blob/a6733a2b864cf9d082d080bbd3bfedb04e59b0ab/core/conventional-commits/lib/recommend-version.js#L13-L21](https://github.com//github.com/lerna/lerna/blob/a6733a2b864cf9d082d080bbd3bfedb04e59b0ab/core/conventional-commits/lib/recommend-version.js/issues/L13-L21)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [4.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.0.3...conventional-recommended-bump@4.0.4) (2018-11-01)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* fix broken release of conventional-recommended-bump ([d9267e8](https://github.com/conventional-changelog/conventional-changelog/commit/d9267e8))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [4.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.0.2...conventional-recommended-bump@4.0.3) (2018-11-01)
|
|
46
|
+
|
|
47
|
+
**Note:** Version bump only for package conventional-recommended-bump
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [4.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.0.1...conventional-recommended-bump@4.0.2) (2018-11-01)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* Upgrade to Lerna 3, fix Node.js v11 error ([#385](https://github.com/conventional-changelog/conventional-changelog/issues/385)) ([cdef282](https://github.com/conventional-changelog/conventional-changelog/commit/cdef282))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<a name="4.0.1"></a>
|
|
65
|
+
## [4.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@4.0.0...conventional-recommended-bump@4.0.1) (2018-08-21)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package conventional-recommended-bump
|
|
71
|
+
|
|
6
72
|
<a name="4.0.0"></a>
|
|
7
73
|
# [4.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@3.0.0...conventional-recommended-bump@4.0.0) (2018-06-06)
|
|
8
74
|
|
package/cli.js
CHANGED
|
File without changes
|
package/index.js
CHANGED
|
@@ -16,7 +16,7 @@ function conventionalRecommendedBump (optionsArgument, parserOptsArgument, cbArg
|
|
|
16
16
|
throw new Error(`The 'options' argument must be an object.`)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const options = Object.assign({ignoreReverted: true}, optionsArgument)
|
|
19
|
+
const options = Object.assign({ ignoreReverted: true }, optionsArgument)
|
|
20
20
|
|
|
21
21
|
const cb = typeof parserOptsArgument === `function` ? parserOptsArgument : cbArgument
|
|
22
22
|
|
|
@@ -29,7 +29,12 @@ function conventionalRecommendedBump (optionsArgument, parserOptsArgument, cbArg
|
|
|
29
29
|
try {
|
|
30
30
|
presetPackage = conventionalChangelogPresetLoader(options.preset)
|
|
31
31
|
} catch (err) {
|
|
32
|
-
|
|
32
|
+
if (err.message === 'does not exist') {
|
|
33
|
+
const preset = typeof options.preset === 'object' ? options.preset.name : options.preset
|
|
34
|
+
return cb(new Error(`Unable to load the "${preset}" preset package. Please make sure it's installed.`))
|
|
35
|
+
} else {
|
|
36
|
+
return cb(err)
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
|
|
@@ -73,7 +78,7 @@ function conventionalRecommendedBump (optionsArgument, parserOptsArgument, cbArg
|
|
|
73
78
|
warn(`No commits since last release`)
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
let result = whatBump(commits)
|
|
81
|
+
let result = whatBump(commits, options)
|
|
77
82
|
|
|
78
83
|
if (result && result.level != null) {
|
|
79
84
|
result.releaseType = VERSIONS[result.level]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conventional-recommended-bump",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Get a recommended version bump based on conventional commits",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
|
|
@@ -31,25 +31,18 @@
|
|
|
31
31
|
"bump"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"concat-stream": "^
|
|
35
|
-
"conventional-changelog-preset-loader": "^2.
|
|
36
|
-
"conventional-commits-filter": "^2.0.
|
|
37
|
-
"conventional-commits-parser": "^3.0.
|
|
38
|
-
"git-raw-commits": "
|
|
39
|
-
"git-semver-tags": "^2.0.
|
|
34
|
+
"concat-stream": "^2.0.0",
|
|
35
|
+
"conventional-changelog-preset-loader": "^2.1.1",
|
|
36
|
+
"conventional-commits-filter": "^2.0.2",
|
|
37
|
+
"conventional-commits-parser": "^3.0.2",
|
|
38
|
+
"git-raw-commits": "2.0.0",
|
|
39
|
+
"git-semver-tags": "^2.0.2",
|
|
40
40
|
"meow": "^4.0.0",
|
|
41
41
|
"q": "^1.5.1"
|
|
42
42
|
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"better-than-before": "^1.0.0",
|
|
45
|
-
"core-assert": "^0.2.0",
|
|
46
|
-
"shelljs": "^0.8.0",
|
|
47
|
-
"temp": "^0.8.3"
|
|
48
|
-
},
|
|
49
43
|
"scripts": {
|
|
50
|
-
"
|
|
51
|
-
"test": "npm run-script lint && mocha --timeout 30000 *.spec.js",
|
|
52
|
-
"test-windows": "mocha --timeout 30000 preset-resolver.spec.js"
|
|
44
|
+
"test-windows": "mocha --timeout 30000 ./test/preset-resolver.spec.js"
|
|
53
45
|
},
|
|
54
|
-
"bin": "cli.js"
|
|
46
|
+
"bin": "cli.js",
|
|
47
|
+
"gitHead": "c0314ad9cd0b30d456a65385b70988cd5f4b3410"
|
|
55
48
|
}
|
package/preset-resolver.js
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
const Q = require(`q`)
|
|
4
4
|
|
|
5
|
-
module.exports =
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
module.exports = presetResolver
|
|
6
|
+
|
|
7
|
+
function presetResolver (presetPackage) {
|
|
8
|
+
// start the chain as a Q.Promise
|
|
9
|
+
return Q.resolve().then(() => {
|
|
10
|
+
// handle traditional node-style callbacks
|
|
11
|
+
if (typeof presetPackage === `function`) {
|
|
12
|
+
return Q.nfcall(presetPackage)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// handle object literal or Promise instance
|
|
16
|
+
if (typeof presetPackage === `object`) {
|
|
17
|
+
return Q(presetPackage)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
throw new Error(`preset package must be a promise, function, or object`)
|
|
21
|
+
})
|
|
22
|
+
}
|