snyk-php-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -27,5 +27,4 @@ var fs = require('fs'); | ||
var baseObject = {}; | ||
var savedFromArr = fromArr; | ||
requiresKeys.forEach (function (depName) { | ||
fromArr = _.clone(savedFromArr); | ||
var clonedFromArr = _.clone(fromArr); | ||
@@ -42,3 +41,3 @@ var depFoundVersion; | ||
// we couldn't find the dependency version in the lock | ||
// here we user the version from the requires - not a locked version | ||
// here we use the version from the requires - not a locked version | ||
depFoundVersion = _.get(_.get(composerJsonObj, 'require'), depName) || | ||
@@ -48,7 +47,7 @@ _.get(requires, depName); | ||
fromArr.push(depName + '@' + depFoundVersion); | ||
clonedFromArr.push(depName + '@' + depFoundVersion); | ||
baseObject[depName] = { | ||
name: depName, | ||
version: depFoundVersion, | ||
from: _.clone(fromArr), | ||
from: clonedFromArr, | ||
dependencies: {}, | ||
@@ -59,3 +58,3 @@ }; | ||
buildDependencies(composerJsonObj, composerLockObjPackages, | ||
_.find(composerLockObjPackages, {name: depName}), _.clone(fromArr)); | ||
_.find(composerLockObjPackages, {name: depName}), clonedFromArr); | ||
}); | ||
@@ -62,0 +61,0 @@ return baseObject; |
@@ -11,5 +11,5 @@ var debug = require('debug')('snyk'); | ||
try { | ||
// fileName should be composer.lock | ||
// lockfile. usually composer.lock | ||
composerLockObj = loadJsonFile(basePath, fileName); | ||
// we want to load the composer.json too | ||
// we want to load the json file as well; usually composer.json | ||
composerJsonObj = loadJsonFile(basePath, | ||
@@ -16,0 +16,0 @@ fileName.split('.').shift() + '.json'); |
@@ -1,1 +0,1 @@ | ||
{"name":"snyk-php-plugin","description":"Snyk CLI PHP plugin","main":"lib/index.js","scripts":{"postinstall":"mkdir dist; lodash -p -o ./dist/lodash-min.js include=get,find,clone","lint":"npm run eslint","eslint":"./node_modules/.bin/eslint -c .eslintrc lib test","test-functional":"tap `ls ./test/*.test.js`","test":"npm run test-functional","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"homepage":"https://github.com/snyk/snyk-php-plugin","repository":{"type":"git","url":"https://github.com/snyk/snyk-php-plugin"},"author":"snyk.io","license":"Apache-2.0","dependencies":{"debug":"^3.1.0","lodash-cli":"^4.17.4"},"devDependencies":{"eslint":"^4.11.0","tap":"^10.7.3","semantic-release":"^8.2.0"},"version":"1.0.0"} | ||
{"name":"snyk-php-plugin","description":"Snyk CLI PHP plugin","main":"lib/index.js","scripts":{"postinstall":"mkdir dist; lodash -p -o ./dist/lodash-min.js include=get,find,clone","lint":"npm run eslint","eslint":"./node_modules/.bin/eslint -c .eslintrc lib test","test-functional":"tap `find ./test -name '*.test.js'` -R spec","test":"npm run test-functional","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"homepage":"https://github.com/snyk/snyk-php-plugin","repository":{"type":"git","url":"https://github.com/snyk/snyk-php-plugin"},"author":"snyk.io","license":"Apache-2.0","dependencies":{"debug":"^3.1.0","lodash-cli":"^4.17.4"},"devDependencies":{"eslint":"^4.11.0","tap":"^10.7.3","semantic-release":"^8.2.0"},"version":"1.0.1"} |
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
35768
181