New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snyk-go-plugin

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-go-plugin - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

test/fixtures/gopath/src/path/to/pkg-with-local-import/Gopkg.lock

7

lib/index.js

@@ -62,3 +62,8 @@ var fs = require('fs');

pkg.version = (isRoot ? '0.0.0' : depLocks[pkg.name].version);
if (isRoot) {
pkg.version = '0.0.0';
} else {
pkg.version = depLocks[pkg.name] ? depLocks[pkg.name].version : '';
}
pkg.from = fromPath.concat(pkg.name + '@' + pkg.version)

@@ -65,0 +70,0 @@

4

package.json

@@ -12,3 +12,3 @@ {

"lint": "jscs `find ./lib -name '*.js'` -v && jscs `find ./test -name '*.js'` -v",
"test": "tap -R=spec `find ./test -name '*.test.js'`",
"test": "tap `find ./test -name '*.test.js'`",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",

@@ -29,3 +29,3 @@ "watch": "nodemon -x 'npm test'"

},
"version": "1.1.1"
"version": "1.1.2"
}

@@ -73,2 +73,51 @@ var test = require('tap').test;

test('pkg with local import', function (t) {
chdirToPkg(['path', 'to', 'pkg-with-local-import']);
return plugin.inspect('.', 'Gopkg.lock')
.then(function (result) {
var plugin = result.plugin;
var pkg = result.package;
t.test('plugin', function (t) {
t.ok(plugin, 'plugin');
t.equal(plugin.name, 'snyk-go-plugin', 'name');
t.end();
});
t.test('dependencies', function (t) {
var deps = pkg.dependencies;
t.match(deps['path/to/pkg-with-local-import/subpkg'], {
version: '',
dependencies: {
'gitpub.com/meal/dinner': {
version: 'v0.0.7',
dependencies: {
'gitpub.com/food/salad': {
version: 'v1.3.7',
dependencies: {
'gitpub.com/nature/vegetables/tomato': {
version: '#b6ffb7d62206806b573348160795ea16a00940a6',
from: [
'path/to/pkg-with-local-import@0.0.0',
'path/to/pkg-with-local-import/subpkg@',
'gitpub.com/meal/dinner@v0.0.7',
'gitpub.com/food/salad@v1.3.7',
'gitpub.com/nature/vegetables/tomato@#b6ffb7d62206806b573348160795ea16a00940a6', // jscs:ignore maximumLineLength
],
},
},
},
},
},
},
}, 'local subpkg is a dep with no version');
t.end();
});
});
});
test('missing vendor/ folder', function (t) {

@@ -75,0 +124,0 @@ chdirToPkg(['path', 'to', 'pkg-with-missing-vendor-folder']);

Sorry, the diff of this file is not supported yet

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