snyk-go-parser
Advanced tools
Comparing version 1.4.1 to 1.5.0
"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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
30
22038
3
310
1
+ Added@snyk/dep-graph@^1.20.0
+ Added@snyk/dep-graph@1.31.0(transitive)
+ Addedevent-loop-spinner@2.3.2(transitive)
+ Addedlodash.clone@4.5.0(transitive)
+ Addedlodash.constant@3.0.0(transitive)
+ Addedlodash.filter@4.6.0(transitive)
+ Addedlodash.foreach@4.5.0(transitive)
+ Addedlodash.isempty@4.4.0(transitive)
+ Addedlodash.isequal@4.5.0(transitive)
+ Addedlodash.isfunction@3.0.9(transitive)
+ Addedlodash.isundefined@3.0.1(transitive)
+ Addedlodash.keys@4.2.0(transitive)
+ Addedlodash.map@4.6.0(transitive)
+ Addedlodash.reduce@4.6.0(transitive)
+ Addedlodash.size@4.2.0(transitive)
+ Addedlodash.transform@4.6.0(transitive)
+ Addedlodash.union@4.6.0(transitive)
+ Addedlodash.values@4.3.0(transitive)
+ Addedobject-hash@2.2.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedtslib@2.8.1(transitive)