Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-repo-info

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-repo-info - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

tests/fixtures/tagged-commit-unpacked-no-object/dot-git/HEAD

2

index.js

@@ -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() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc