New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

inst

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inst - npm Package Compare versions

Comparing version
0.1.4
to
0.2.0
+4
-1
lib/manifest.js

@@ -5,3 +5,3 @@ var crypto = require('crypto'),

exports.shasum = function(basepath) {
exports.shasum = function(basepath, opts) {
var manifests = [

@@ -14,2 +14,5 @@ basepath + '/npm-shrinkwrap.json',

if (opts.production)
manifests.push(['production: true'])
if (manifests.length === 0)

@@ -16,0 +19,0 @@ throw new Error('Cannot find any manifest files (package.json or npm-shrinkwrap.json)');

+1
-1

@@ -16,3 +16,3 @@ var fs = require('fs'),

this.shasum = manifest.shasum(this.basepath);
this.shasum = manifest.shasum(this.basepath, this.opts);
this.path = this.opts.storage + '/' + this.shasum + '.tar';

@@ -19,0 +19,0 @@ };

{
"name": "inst",
"version": "0.1.4",
"version": "0.2.0",
"dependencies": {

@@ -5,0 +5,0 @@ "npm": "~1.4.0",

@@ -36,6 +36,2 @@ node-inst

-t, --ttl [second] cache lifetime [86400]
## Limitations
Doesn't work on Windows platform (uses system's `tar` tool)
-p, --production production mode, do not install dev dependencies [false]

@@ -10,5 +10,10 @@ var assert = require('assert'),

it('should return check sum', function() {
assert.equal(manifest.shasum(__dirname + '/files/module'), '7d272278fae80d6da9680bef7fb7b92adba46466')
assert.equal(manifest.shasum(__dirname + '/files/module', {}), '7d272278fae80d6da9680bef7fb7b92adba46466')
});
it('should return check sum (production)', function() {
assert.equal(manifest.shasum(__dirname + '/files/module', {production: true}),
'd4f1f2e7336ba825047cfd679ef90745353e964d')
});
it('should return error when no manifests can be found', function() {

@@ -15,0 +20,0 @@ assert.throws(function() {

Sorry, the diff of this file is not supported yet