conventional-recommended-bump
Advanced tools
Comparing version 6.0.5 to 6.0.9
@@ -6,2 +6,13 @@ # Change Log | ||
## [6.0.9](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.5...conventional-recommended-bump@6.0.9) (2020-05-08) | ||
### Bug Fixes | ||
* **deps:** update yargs-parser to move off a flagged-vulnerable version. ([#635](https://github.com/conventional-changelog/conventional-changelog/issues/635)) ([aafc0f0](https://github.com/conventional-changelog/conventional-changelog/commit/aafc0f00412c3e4b23b8418300e5a570a48fe24d)) | ||
## [6.0.5](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.4...conventional-recommended-bump@6.0.5) (2019-11-14) | ||
@@ -8,0 +19,0 @@ |
34
cli.js
@@ -5,5 +5,5 @@ #!/usr/bin/env node | ||
const meow = require(`meow`) | ||
const conventionalRecommendedBump = require(`./`) | ||
const path = require(`path`) | ||
const meow = require('meow') | ||
const conventionalRecommendedBump = require('./') | ||
const path = require('path') | ||
@@ -32,34 +32,34 @@ const cli = meow(` | ||
flags: { | ||
'preset': { | ||
alias: `p` | ||
preset: { | ||
alias: 'p' | ||
}, | ||
'config': { | ||
alias: `g` | ||
config: { | ||
alias: 'g' | ||
}, | ||
'header-pattern': { | ||
alias: `h` | ||
alias: 'h' | ||
}, | ||
'header-correspondence': { | ||
alias: `c` | ||
alias: 'c' | ||
}, | ||
'reference-actions': { | ||
alias: `r` | ||
alias: 'r' | ||
}, | ||
'issue-prefixes': { | ||
alias: `i` | ||
alias: 'i' | ||
}, | ||
'note-keywords': { | ||
alias: `n` | ||
alias: 'n' | ||
}, | ||
'field-pattern': { | ||
alias: `f` | ||
alias: 'f' | ||
}, | ||
'verbose': { | ||
alias: `v` | ||
verbose: { | ||
alias: 'v' | ||
}, | ||
'lerna-package': { | ||
alias: `l` | ||
alias: 'l' | ||
}, | ||
'tag-prefix': { | ||
alias: `t` | ||
alias: 't' | ||
} | ||
@@ -66,0 +66,0 @@ } |
38
index.js
'use strict' | ||
const concat = require(`concat-stream`) | ||
const conventionalCommitsFilter = require(`conventional-commits-filter`) | ||
const conventionalCommitsParser = require(`conventional-commits-parser`) | ||
const conventionalChangelogPresetLoader = require(`conventional-changelog-preset-loader`) | ||
const gitSemverTags = require(`git-semver-tags`) | ||
const gitRawCommits = require(`git-raw-commits`) | ||
const presetResolver = require(`./preset-resolver`) | ||
const concat = require('concat-stream') | ||
const conventionalCommitsFilter = require('conventional-commits-filter') | ||
const conventionalCommitsParser = require('conventional-commits-parser') | ||
const conventionalChangelogPresetLoader = require('conventional-changelog-preset-loader') | ||
const gitSemverTags = require('git-semver-tags') | ||
const gitRawCommits = require('git-raw-commits') | ||
const presetResolver = require('./preset-resolver') | ||
const VERSIONS = [`major`, `minor`, `patch`] | ||
const VERSIONS = ['major', 'minor', 'patch'] | ||
@@ -15,4 +15,4 @@ module.exports = conventionalRecommendedBump | ||
function conventionalRecommendedBump (optionsArgument, parserOptsArgument, cbArgument) { | ||
if (typeof optionsArgument !== `object`) { | ||
throw new Error(`The 'options' argument must be an object.`) | ||
if (typeof optionsArgument !== 'object') { | ||
throw new Error('The \'options\' argument must be an object.') | ||
} | ||
@@ -22,6 +22,6 @@ | ||
const cb = typeof parserOptsArgument === `function` ? parserOptsArgument : cbArgument | ||
const cb = typeof parserOptsArgument === 'function' ? parserOptsArgument : cbArgument | ||
if (typeof cb !== `function`) { | ||
throw new Error(`You must provide a callback function.`) | ||
if (typeof cb !== 'function') { | ||
throw new Error('You must provide a callback function.') | ||
} | ||
@@ -49,4 +49,4 @@ | ||
if (typeof whatBump !== `function`) { | ||
throw Error(`whatBump must be a function`) | ||
if (typeof whatBump !== 'function') { | ||
throw Error('whatBump must be a function') | ||
} | ||
@@ -64,3 +64,3 @@ | ||
const warn = typeof parserOpts.warn === `function` ? parserOpts.warn : noop | ||
const warn = typeof parserOpts.warn === 'function' ? parserOpts.warn : noop | ||
@@ -77,4 +77,4 @@ gitSemverTags({ | ||
gitRawCommits({ | ||
format: `%B%n-hash-%n%H`, | ||
from: tags[0] || ``, | ||
format: '%B%n-hash-%n%H', | ||
from: tags[0] || '', | ||
path: options.path | ||
@@ -87,3 +87,3 @@ }) | ||
if (!commits || !commits.length) { | ||
warn(`No commits since last release`) | ||
warn('No commits since last release') | ||
} | ||
@@ -90,0 +90,0 @@ |
{ | ||
"name": "conventional-recommended-bump", | ||
"version": "6.0.5", | ||
"version": "6.0.9", | ||
"description": "Get a recommended version bump based on conventional commits", | ||
@@ -20,3 +20,3 @@ "bugs": { | ||
"engines": { | ||
"node": ">=6.9.0" | ||
"node": ">=10" | ||
}, | ||
@@ -36,8 +36,8 @@ "files": [ | ||
"concat-stream": "^2.0.0", | ||
"conventional-changelog-preset-loader": "^2.3.0", | ||
"conventional-commits-filter": "^2.0.2", | ||
"conventional-commits-parser": "^3.0.8", | ||
"conventional-changelog-preset-loader": "^2.3.4", | ||
"conventional-commits-filter": "^2.0.6", | ||
"conventional-commits-parser": "^3.1.0", | ||
"git-raw-commits": "2.0.0", | ||
"git-semver-tags": "^3.0.1", | ||
"meow": "^5.0.0", | ||
"git-semver-tags": "^4.0.0", | ||
"meow": "^7.0.0", | ||
"q": "^1.5.1" | ||
@@ -49,3 +49,3 @@ }, | ||
"bin": "cli.js", | ||
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789" | ||
"gitHead": "83643c5a0d2c4d7c9ba14cbf990ffbc577a51e8c" | ||
} |
'use strict' | ||
const Q = require(`q`) | ||
const Q = require('q') | ||
@@ -11,3 +11,3 @@ module.exports = presetResolver | ||
// handle traditional node-style callbacks | ||
if (typeof presetPackage === `function`) { | ||
if (typeof presetPackage === 'function') { | ||
return Q.nfcall(presetPackage) | ||
@@ -17,8 +17,8 @@ } | ||
// handle object literal or Promise instance | ||
if (typeof presetPackage === `object`) { | ||
if (typeof presetPackage === 'object') { | ||
return Q(presetPackage) | ||
} | ||
throw new Error(`preset package must be a promise, function, or object`) | ||
throw new Error('preset package must be a promise, function, or object') | ||
}) | ||
} |
@@ -22,2 +22,3 @@ # conventional-recommended-bump | ||
- [lernaPackage](#lernapackage) | ||
- [path](#path) | ||
- [parserOpts](#parseropts) | ||
@@ -123,2 +124,8 @@ - [callback](#callback) | ||
##### path | ||
**Type:** `string` | ||
Specify the path to only calculate with git commits related to the path. If you want to calculate recommended bumps of packages in a [Lerna](https://lernajs.io/)-managed repository, `path` should be use along with `lernaPackage` for each of the package. | ||
#### parserOpts | ||
@@ -125,0 +132,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
31737
185
1
+ Addedgit-semver-tags@4.1.1(transitive)
+ Addedmeow@7.1.1(transitive)
+ Addedtype-fest@0.13.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
- Removedgit-semver-tags@3.0.1(transitive)
- Removedmeow@5.0.0(transitive)
- Removedyargs-parser@10.1.0(transitive)
Updatedgit-semver-tags@^4.0.0
Updatedmeow@^7.0.0