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

npm-git-info

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-git-info - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

test/fixtures/range.json

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# [v1.0.3](https://github.com/tricknotes/npm-git-info/tree/v1.0.3)
* Correct version detection if package is type range ([#3](https://github.com/tricknotes/npm-git-info/pull/3))
# [v1.0.2](https://github.com/tricknotes/npm-git-info/tree/v1.0.2)

@@ -2,0 +6,0 @@

@@ -32,2 +32,3 @@ var proto = {

case 'range':
case 'tag':

@@ -34,0 +35,0 @@ case 'npm2':

2

package.json
{
"name": "npm-git-info",
"version": "1.0.2",
"version": "1.0.3",
"description": "Retrieves git information from package that installed as NPM package.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -116,2 +116,18 @@ var expect = require('expect.js');

});
it('should detect info from NPM installed package with a range', function() {
// this tests the result of: npm install ember-data@^2.4.3
var subject = info(fixture('range.json'));
expect(subject).to.eql({
name: 'ember-data',
version: '2.4.3',
sha: 'a3e2521f85c91f18dd455f316572068566ff1a3b',
abbreviatedSha: 'a3e2521f85',
ref: '2.4.3'
});
expect(subject.isInstalledAsNpmPackage()).to.be(true);
expect(subject.hasVersionInRef()).to.be(true);
});
});
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