@commitlint/cli
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="4.2.0"></a> | ||
# [4.2.0](https://github.com/marionebl/commitlint/compare/v4.1.1...v4.2.0) (2017-10-14) | ||
### Features | ||
* edit flag now accepts the path to the commit file ([c881433](https://github.com/marionebl/commitlint/commit/c881433)), closes [#40](https://github.com/marionebl/commitlint/issues/40) | ||
<a name="4.1.1"></a> | ||
@@ -8,0 +19,0 @@ ## [4.1.1](https://github.com/marionebl/commitlint/compare/v4.1.0...v4.1.1) (2017-10-09) |
20
cli.js
@@ -26,4 +26,4 @@ #!/usr/bin/env node | ||
const configuration = { | ||
string: ['cwd', 'from', 'to', 'extends', 'parser-preset'], | ||
boolean: ['edit', 'help', 'version', 'quiet', 'color'], | ||
string: ['cwd', 'from', 'to', 'edit', 'extends', 'parser-preset'], | ||
boolean: ['help', 'version', 'quiet', 'color'], | ||
alias: { | ||
@@ -44,3 +44,4 @@ c: 'color', | ||
cwd: 'directory to execute in', | ||
edit: 'read last commit message found in ./git/COMMIT_EDITMSG', | ||
edit: | ||
'read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG', | ||
extends: 'array of shareable configurations to extend', | ||
@@ -79,2 +80,4 @@ from: 'lower end of the commit range to lint; applies if edit=false', | ||
function main(options) { | ||
normalizeOptions(options); | ||
const raw = options.input; | ||
@@ -119,2 +122,13 @@ const flags = options.flags; | ||
function normalizeOptions(options) { | ||
const flags = options.flags; | ||
// The `edit` flag is either a boolean or a string but we are only allowed | ||
// to specify one of them in minimist | ||
if (flags.edit === '') { | ||
flags.edit = true; | ||
flags.e = true; | ||
} | ||
} | ||
function getSeed(seed) { | ||
@@ -121,0 +135,0 @@ const e = Array.isArray(seed.extends) ? seed.extends : [seed.extends]; |
{ | ||
"name": "@commitlint/cli", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"description": "Lint your commit messages", | ||
@@ -11,5 +11,6 @@ "bin": { | ||
"clean": "exit 0", | ||
"prepublish": "npm test", | ||
"pretest": "dep-check", | ||
"test": "ava", | ||
"prepublish": "npm test" | ||
"start": "ava --watch --verbose", | ||
"test": "ava $AVA_VERBOSE" | ||
}, | ||
@@ -44,3 +45,3 @@ "ava": { | ||
"devDependencies": { | ||
"@commitlint/utils": "^3.1.1", | ||
"@commitlint/utils": "^4.2.0", | ||
"ava": "^0.18.2", | ||
@@ -58,3 +59,3 @@ "dependency-check": "^2.9.1", | ||
"dependencies": { | ||
"@commitlint/core": "^4.1.1", | ||
"@commitlint/core": "^4.2.0", | ||
"babel-polyfill": "^6.23.0", | ||
@@ -61,0 +62,0 @@ "chalk": "^2.0.1", |
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
17631
329
Updated@commitlint/core@^4.2.0