@commitlint/format
Advanced tools
Comparing version 7.5.0 to 7.6.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [7.6.0](https://github.com/conventional-changelog/commitlint/compare/v7.5.2...v7.6.0) (2019-05-06) | ||
### Bug Fixes | ||
* avoid excessive help text [#606](https://github.com/conventional-changelog/commitlint/issues/606) ([#637](https://github.com/conventional-changelog/commitlint/issues/637)) ([8f3c3b1](https://github.com/conventional-changelog/commitlint/commit/8f3c3b1)) | ||
<a name="7.5.0"></a> | ||
@@ -8,0 +19,0 @@ # [7.5.0](https://github.com/conventional-changelog/commitlint/compare/v7.4.0...v7.5.0) (2019-01-31) |
@@ -7,2 +7,3 @@ 'use strict'; | ||
exports.default = format; | ||
exports.formatResult = formatResult; | ||
@@ -95,3 +96,2 @@ var _chalk = require('chalk'); | ||
} | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=index.js.map |
@@ -124,2 +124,41 @@ 'use strict'; | ||
}); | ||
(0, _ava2.default)('format result provides summary without arguments', t => { | ||
const actual = (0, _.formatResult)(); | ||
const actualText = actual.join('\n'); | ||
t.true((0, _lodash.includes)(actualText, '0 problems, 0 warnings')); | ||
}); | ||
(0, _ava2.default)('format result transforms error to text', t => { | ||
const actual = (0, _.formatResult)({ | ||
errors: [{ | ||
level: 2, | ||
name: 'error-name', | ||
message: 'There was an error' | ||
}] | ||
}); | ||
const actualText = actual.join('\n'); | ||
t.true((0, _lodash.includes)(actualText, 'error-name')); | ||
t.true((0, _lodash.includes)(actualText, 'There was an error')); | ||
t.true((0, _lodash.includes)(actualText, '1 problems, 0 warnings')); | ||
}); | ||
(0, _ava2.default)('format result transforms warning to text', t => { | ||
const actual = (0, _.formatResult)({ | ||
warnings: [{ | ||
level: 1, | ||
name: 'warning-name', | ||
message: 'There was a warning' | ||
}] | ||
}); | ||
const actualText = actual.join('\n'); | ||
t.true((0, _lodash.includes)(actualText, 'warning-name')); | ||
t.true((0, _lodash.includes)(actualText, 'There was a warning')); | ||
t.true((0, _lodash.includes)(actualText, '0 problems, 1 warnings')); | ||
}); | ||
//# sourceMappingURL=index.test.js.map |
{ | ||
"name": "@commitlint/format", | ||
"version": "7.5.0", | ||
"version": "7.6.0", | ||
"description": "Format commitlint reports", | ||
@@ -11,3 +11,2 @@ "main": "lib/index.js", | ||
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps", | ||
"clean": "npx rimraf lib", | ||
"deps": "dep-check", | ||
@@ -61,12 +60,11 @@ "pkg": "pkg-check --skip-import", | ||
"devDependencies": { | ||
"@commitlint/test": "^7.5.0", | ||
"@commitlint/utils": "^7.5.0", | ||
"@commitlint/test": "^7.6.0", | ||
"@commitlint/utils": "^7.6.0", | ||
"ava": "0.22.0", | ||
"babel-cli": "6.26.0", | ||
"babel-preset-commitlint": "^7.5.0", | ||
"babel-preset-commitlint": "^7.6.0", | ||
"babel-register": "6.26.0", | ||
"concurrently": "3.5.1", | ||
"cross-env": "5.1.1", | ||
"lodash": "4.17.11", | ||
"rimraf": "2.6.1" | ||
"lodash": "4.17.11" | ||
}, | ||
@@ -73,0 +71,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
27722
9
203