git-repo-info
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -52,3 +52,3 @@ 'use strict'; | ||
if (!zlib.inflateSync) { | ||
if (!zlib.inflateSync || !fs.existsSync(objectPath)) { | ||
// we cannot support annotated tags on node v0.10 because | ||
@@ -55,0 +55,0 @@ // zlib does not allow sync access |
{ | ||
"name": "git-repo-info", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Retrieve current sha and branch name from a git repo.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -115,2 +115,16 @@ 'use strict'; | ||
it('returns an object with repo info, including the tag (unpacked tags) when a tag object does not exist', function() { | ||
var repoRoot = path.join(testFixturesPath, 'tagged-commit-unpacked-no-object'); | ||
var result = repoInfo(path.join(repoRoot, gitDir)); | ||
var expected = { | ||
branch: 'master', | ||
sha: 'c1ee41c325d54f410b133e0018c7a6b1316f6cda', | ||
abbreviatedSha: 'c1ee41c325', | ||
tag: 'awesome-tag' | ||
}; | ||
assert.deepEqual(result, expected); | ||
}); | ||
if (zlib.inflateSync) { | ||
@@ -117,0 +131,0 @@ it('returns an object with repo info, including the tag (annotated tags)', function() { |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances 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
45163
72
234
11