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

snyk-go-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-go-parser - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0

dist/parsers/gomod-graph-parser.d.ts

2

dist/errors/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var invalid_user_input_error_1 = require("./invalid-user-input-error");
exports.InvalidUserInputError = invalid_user_input_error_1.InvalidUserInputError;
Object.defineProperty(exports, "InvalidUserInputError", { enumerable: true, get: function () { return invalid_user_input_error_1.InvalidUserInputError; } });
// Other common parser error types:

@@ -6,0 +6,0 @@ // OutOfSyncError - not applicable yet, since for dep/vendor, the manifests do not contain the names of actual

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidUserInputError = void 0;
class InvalidUserInputError extends Error {

@@ -4,0 +5,0 @@ constructor(...args) {

@@ -1,7 +0,6 @@

import { parseGoPkgConfig, parseGoVendorConfig } from './parser';
import { parseGoMod, toSnykVersion, parseVersion } from './gomod-parser';
import { DepTree, GoPackageManagerType, GoProjectConfig, ModuleVersion, GoMod } from './types';
import { parseGoPkgConfig, parseGoVendorConfig, parseGoModGraph } from './parsers';
import { DepTree, GoPackageManagerType, GoPackageConfig, ModuleVersion, GoModuleConfig } from './types';
export { GoPackageManagerType };
export { parseGoPkgConfig, parseGoVendorConfig, GoProjectConfig, ModuleVersion, toSnykVersion, parseVersion, GoMod, parseGoMod, };
export { parseGoPkgConfig, parseGoVendorConfig, parseGoModGraph, GoPackageConfig, ModuleVersion, GoModuleConfig, };
export declare function buildGoPkgDepTree(manifestFileContents: string, lockFileContents: string, options?: unknown): Promise<DepTree>;
export declare function buildGoVendorDepTree(manifestFileContents: string, options?: unknown): Promise<DepTree>;
export declare function buildGoVendorDepTree(manifestFileContents: string): Promise<DepTree>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildGoVendorDepTree = exports.buildGoPkgDepTree = exports.parseGoModGraph = exports.parseGoVendorConfig = exports.parseGoPkgConfig = void 0;
const tslib_1 = require("tslib");
const parser_1 = require("./parser");
exports.parseGoPkgConfig = parser_1.parseGoPkgConfig;
exports.parseGoVendorConfig = parser_1.parseGoVendorConfig;
const gomod_parser_1 = require("./gomod-parser");
exports.parseGoMod = gomod_parser_1.parseGoMod;
exports.toSnykVersion = gomod_parser_1.toSnykVersion;
exports.parseVersion = gomod_parser_1.parseVersion;
const parsers_1 = require("./parsers");
Object.defineProperty(exports, "parseGoPkgConfig", { enumerable: true, get: function () { return parsers_1.parseGoPkgConfig; } });
Object.defineProperty(exports, "parseGoVendorConfig", { enumerable: true, get: function () { return parsers_1.parseGoVendorConfig; } });
Object.defineProperty(exports, "parseGoModGraph", { enumerable: true, get: function () { return parsers_1.parseGoModGraph; } });
const types_1 = require("./types");
// TODO(kyegupov): make all build* functions sync

@@ -18,3 +17,3 @@ // TODO(kyegupov): pin down the types for "options"

return tslib_1.__awaiter(this, void 0, void 0, function* () {
return buildGoDepTree(parser_1.parseGoPkgConfig(manifestFileContents, lockFileContents));
return buildGoDepTree(parsers_1.parseGoPkgConfig(manifestFileContents, lockFileContents));
});

@@ -26,5 +25,5 @@ }

// in particular, it cannot build the proper dependency graph (only a flat list).
function buildGoVendorDepTree(manifestFileContents, options) {
function buildGoVendorDepTree(manifestFileContents) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return buildGoDepTree(parser_1.parseGoVendorConfig(manifestFileContents));
return buildGoDepTree(parsers_1.parseGoVendorConfig(manifestFileContents));
});

@@ -36,3 +35,3 @@ }

name: goProjectConfig.packageName || 'root',
version: '0.0.0',
version: types_1.DEFAULT_INITIAL_VERSION,
dependencies: {},

@@ -39,0 +38,0 @@ };

@@ -9,3 +9,3 @@ export declare type GoPackageManagerType = 'golangdep' | 'govendor' | 'gomodules';

}
export interface GoProjectConfig {
export interface GoPackageConfig {
ignoredPkgs?: string[];

@@ -15,3 +15,3 @@ lockedVersions: LockedDeps;

}
export interface GoMod {
export interface GoModuleConfig {
moduleName: string;

@@ -56,1 +56,3 @@ golangVersion?: string;

}
export declare const DEFAULT_INITIAL_VERSION = "0.0.0";
export declare const DEFAULT_ROOT_NODE_NAME = "root-node";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_ROOT_NODE_NAME = exports.DEFAULT_INITIAL_VERSION = void 0;
exports.DEFAULT_INITIAL_VERSION = '0.0.0';
exports.DEFAULT_ROOT_NODE_NAME = 'root-node';
//# sourceMappingURL=types.js.map

@@ -8,2 +8,3 @@ {

"lint": "tslint -p tsconfig.json",
"lint:fix": "tslint -p tsconfig.json --fix",
"build": "tsc",

@@ -21,3 +22,3 @@ "build-watch": "tsc -w",

"engines": {
"node": ">=4"
"node": ">=8"
},

@@ -30,2 +31,3 @@ "files": [

"dependencies": {
"@snyk/dep-graph": "^1.20.0",
"toml": "^3.0.0",

@@ -36,3 +38,3 @@ "tslib": "^1.10.0"

"@types/jest": "^23.3.14",
"@types/node": "^6.14.4",
"@types/node": "^8.10.65",
"jest": "^23.6.0",

@@ -44,3 +46,3 @@ "ts-jest": "^23.10.5",

},
"version": "1.4.1"
"version": "1.5.0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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