git-describe
Advanced tools
Comparing version 4.0.4 to 4.1.0
@@ -27,2 +27,3 @@ 'use strict'; | ||
longSemver: false, | ||
long: true, | ||
requireAnnotated: false, | ||
@@ -47,3 +48,3 @@ match: 'v[0-9]*', | ||
var result = execFunc(); | ||
return resultHandler(result, result.stdout, result.stderr, null); | ||
return resultHandler(result.error, result.stdout, result.stderr, null); | ||
} | ||
@@ -71,4 +72,4 @@ }; | ||
var code = result.status || result.code; | ||
var errMsg = 'Git returned with status ' + code + ': ' + | ||
stderr.toString().trim(); | ||
var errMsg = 'Git returned with status ' + code + | ||
(stderr ? ': ' + stderr.toString().trim() : ''); | ||
switch (code) { | ||
@@ -132,3 +133,8 @@ case 'ENOENT': | ||
} | ||
output.suffix = suffixTokens.join('-'); | ||
if (!options.long && output.tag && output.distance === 0) { | ||
output.suffix = ''; | ||
output.raw = output.tag; | ||
} else { | ||
output.suffix = suffixTokens.join('-'); | ||
} | ||
if (output.dirty) output.suffix += options.dirtyMark; | ||
@@ -135,0 +141,0 @@ output.toString = function() { return output.raw; }; |
{ | ||
"name": "git-describe", | ||
"version": "4.0.4", | ||
"version": "4.1.0", | ||
"description": "Git describe information at runtime, with semver support", | ||
@@ -11,3 +11,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "mocha test/index.js" | ||
"test": "mocha test/index.js", | ||
"release": "standard-version" | ||
}, | ||
@@ -25,3 +26,4 @@ "repository": { | ||
"dependencies": { | ||
"lodash": "^4.17.11" | ||
"@types/semver": "^7.3.8", | ||
"lodash": "^4.17.21" | ||
}, | ||
@@ -33,5 +35,42 @@ "optionalDependencies": { | ||
"chai": "^4.2.0", | ||
"mocha": "^5.2.0", | ||
"rimraf": "^2.6.3" | ||
"mocha": "^9.0.3", | ||
"rimraf": "^2.6.3", | ||
"standard-version": "^9.3.1" | ||
}, | ||
"standard-version": { | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Fixes and Improvements" | ||
}, | ||
{ | ||
"type": "chore", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "docs", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "style", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "refactor", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "perf", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "test", | ||
"hidden": true | ||
} | ||
] | ||
}, | ||
"engines": { | ||
@@ -38,0 +77,0 @@ "node": ">=4.0.0" |
@@ -96,3 +96,4 @@ # git-describe | ||
`dirtySemver` | `true` | Appends the dirty mark to `semverString` if repo state is dirty. | ||
`longSemver` | `false` | Always adds commit distance and hash to `semverString` (similar to git describe's `--long`). | ||
`long` | `true` | Always adds commit distance and hash to `raw`, `suffix` and `.toString()` (matches the behaviour of git describe's `--long`) | ||
`longSemver` | `false` | Always adds commit distance and hash to `semverString` (similar to git describe's `--long`, but for semver). | ||
`requireAnnotated` | `false` | Uses `--tags` if false, so that simple git tags are allowed. | ||
@@ -99,0 +100,0 @@ `match` | `'v[0-9]*'` | Uses `--match` to filter tag names. By default only tags resembling a version number are considered. |
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
16129
7
207
104
3
4
+ Added@types/semver@^7.3.8
+ Added@types/semver@7.5.8(transitive)
Updatedlodash@^4.17.21