Skip to content

Commit e4c8839

Browse files
authored
Merge pull request #1388 from snyk/fix/use-upstream-deps
Use upstream deps
2 parents 54700c1 + d2ea109 commit e4c8839

39 files changed

+73
-62
lines changed

package.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,10 @@
5353
"author": "snyk.io",
5454
"license": "Apache-2.0",
5555
"dependencies": {
56-
"@snyk/cli-interface": "2.9.0",
57-
"@snyk/dep-graph": "1.19.3",
56+
"@snyk/cli-interface": "2.9.2",
57+
"@snyk/dep-graph": "1.19.4",
5858
"@snyk/gemfile": "1.2.0",
59-
"@snyk/graphlib": "2.1.9-patch",
60-
"@snyk/inquirer": "6.2.2-patch",
61-
"@snyk/lodash": "^4.17.15-patch",
62-
"@snyk/ruby-semver": "2.2.0",
63-
"@snyk/snyk-cocoapods-plugin": "2.5.0",
59+
"@snyk/snyk-cocoapods-plugin": "2.5.1",
6460
"abbrev": "^1.1.1",
6561
"ansi-escapes": "3.2.0",
6662
"chalk": "^2.4.2",
@@ -69,22 +65,25 @@
6965
"debug": "^4.1.1",
7066
"diff": "^4.0.1",
7167
"glob": "^7.1.3",
68+
"graphlib": "^2.1.8",
69+
"inquirer": "^7.3.3",
70+
"lodash": "^4.17.20",
7271
"needle": "2.5.0",
7372
"open": "^7.0.3",
7473
"os-name": "^3.0.0",
7574
"proxy-agent": "^3.1.1",
7675
"proxy-from-env": "^1.0.0",
7776
"semver": "^6.0.0",
78-
"snyk-config": "3.1.0",
77+
"snyk-config": "3.1.1",
7978
"snyk-cpp-plugin": "1.4.3",
8079
"snyk-docker-plugin": "3.20.0",
81-
"snyk-go-plugin": "1.16.0",
82-
"snyk-gradle-plugin": "3.6.2",
80+
"snyk-go-plugin": "1.16.2",
81+
"snyk-gradle-plugin": "3.6.3",
8382
"snyk-module": "3.1.0",
84-
"snyk-mvn-plugin": "2.19.3",
85-
"snyk-nodejs-lockfile-parser": "1.28.0",
86-
"snyk-nuget-plugin": "1.18.1",
87-
"snyk-php-plugin": "1.9.0",
83+
"snyk-mvn-plugin": "2.19.4",
84+
"snyk-nodejs-lockfile-parser": "1.28.1",
85+
"snyk-nuget-plugin": "1.19.3",
86+
"snyk-php-plugin": "1.9.2",
8887
"snyk-policy": "1.14.1",
8988
"snyk-python-plugin": "1.17.1",
9089
"snyk-resolve": "1.0.1",
@@ -102,7 +101,9 @@
102101
"devDependencies": {
103102
"@types/agent-base": "^4.2.1",
104103
"@types/diff": "^3.5.2",
104+
"@types/graphlib": "^2.1.7",
105105
"@types/jest": "^25.2.3",
106+
"@types/lodash": "^4.14.161",
106107
"@types/needle": "^2.0.4",
107108
"@types/node": "8.10.59",
108109
"@types/restify": "^8.4.2",

src/cli/commands/monitor/formatters/format-monitor-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import chalk from 'chalk';
33
import * as url from 'url';
44

src/cli/commands/protect/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export {
99
startOver,
1010
};
1111

12-
import * as _ from '@snyk/lodash';
12+
import * as _ from 'lodash';
1313
import * as semver from 'semver';
1414
import { format as fmt } from 'util';
1515
import * as debugModule from 'debug';

src/cli/commands/protect/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export = answersToTasks;
22

33
import * as debugModule from 'debug';
44
const debug = debugModule('snyk');
5-
import * as _ from '@snyk/lodash';
5+
import * as _ from 'lodash';
66

77
function answersToTasks(answers) {
88
const tasks = {

src/cli/commands/protect/wizard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import * as debugModule from 'debug';
1010
const debug = debugModule('snyk');
1111

1212
import * as path from 'path';
13-
import * as inquirer from '@snyk/inquirer';
13+
import * as inquirer from 'inquirer';
1414
import * as fs from 'fs';
1515
import * as tryRequire from 'snyk-try-require';
1616
import chalk from 'chalk';
1717
import * as url from 'url';
18-
import * as _ from '@snyk/lodash';
18+
import * as _ from 'lodash';
1919
import { exec } from 'child_process';
2020
import { apiTokenExists } from '../../../lib/api-token';
2121
import * as auth from '../auth/is-authed';

src/cli/commands/test/formatters/docker/format-docker-binary-heading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import chalk from 'chalk';
33

44
export function createDockerBinaryHeading(pkgInfo): string {

src/cli/commands/test/formatters/docker/format-docker-binary-issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import { createDockerBinaryHeading } from './format-docker-binary-heading';
33
import { Options, TestOptions } from '../../../../../lib/types';
44
import { formatIssues } from '../legacy-format-issue';

src/cli/commands/test/formatters/legacy-format-issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import chalk from 'chalk';
33
import * as config from '../../../../lib/config';
44
import { Options, TestOptions, ShowVulnPaths } from '../../../../lib/types';

src/cli/commands/test/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export = test;
22

3-
import * as _ from '@snyk/lodash';
3+
import * as _ from 'lodash';
44
import chalk from 'chalk';
55
import * as snyk from '../../../lib';
66
import * as config from '../../../lib/config';

src/lib/detect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from 'fs';
22
import * as pathLib from 'path';
33
import * as debugLib from 'debug';
4-
import * as _ from '@snyk/lodash';
4+
import * as _ from 'lodash';
55
import { NoSupportedManifestsFoundError } from './errors';
66
import { SupportedPackageManagers } from './package-managers';
77
import { validateK8sFile } from './iac/iac-parser';

src/lib/find-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs';
22
import * as pathLib from 'path';
3-
import * as _ from '@snyk/lodash';
3+
import * as _ from 'lodash';
44
import { detectPackageManagerFromFile } from './detect';
55
import * as debugModule from 'debug';
66
const debug = debugModule('snyk:find-files');

src/lib/module-info/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import * as Debug from 'debug';
33
import { legacyPlugin as pluginApi } from '@snyk/cli-interface';
44

src/lib/monitor/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { apiTokenExists } from '../api-token';
77
import request = require('../request');
88
import * as config from '../config';
99
import * as os from 'os';
10-
import * as _ from '@snyk/lodash';
10+
import * as _ from 'lodash';
1111
import { isCI } from '../is-ci';
1212
import * as analytics from '../analytics';
1313
import {
@@ -221,7 +221,10 @@ async function monitorDepTree(
221221
depTree = dropEmptyDeps(depTree);
222222

223223
let callGraphPayload;
224-
if (options.reachableVulns && scannedProject.callGraph?.innerError) {
224+
if (
225+
options.reachableVulns &&
226+
(scannedProject.callGraph as CallGraphError)?.innerError
227+
) {
225228
const err = scannedProject.callGraph as CallGraphError;
226229
analytics.add(
227230
'callGraphError',
@@ -239,7 +242,7 @@ async function monitorDepTree(
239242
]);
240243
} else if (scannedProject.callGraph) {
241244
const { callGraph, nodeCount, edgeCount } = serializeCallGraphWithMetrics(
242-
scannedProject.callGraph,
245+
scannedProject.callGraph as CallGraph,
243246
);
244247
debug(
245248
`Adding call graph to payload, node count: ${nodeCount}, edge count: ${edgeCount}`,

src/lib/plugins/convert-single-splugin-res-to-multi-custom.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { legacyPlugin as pluginApi } from '@snyk/cli-interface';
22
import { MultiProjectResultCustom } from './get-multi-plugin-result';
33
import { SupportedPackageManagers } from '../package-managers';
4+
import { CallGraph } from '@snyk/cli-interface/legacy/common';
45

56
export function convertSingleResultToMultiCustom(
67
inspectRes: pluginApi.SinglePackageResult,
@@ -28,7 +29,7 @@ function convertDepGraphResult(
2829
{
2930
plugin: plugin as any,
3031
depGraph,
31-
callGraph,
32+
callGraph: callGraph as CallGraph,
3233
meta,
3334
targetFile: plugin.targetFile,
3435
packageManager,
@@ -63,7 +64,7 @@ function convertDepTreeResult(
6364
{
6465
plugin: plugin as any,
6566
depTree,
66-
callGraph,
67+
callGraph: callGraph as CallGraph,
6768
meta,
6869
targetFile: plugin.targetFile,
6970
packageManager,

src/lib/plugins/get-multi-plugin-result.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import * as path from 'path';
33
import * as cliInterface from '@snyk/cli-interface';
44
import chalk from 'chalk';

src/lib/plugins/nodejs-plugin/npm-modules-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'path';
22
import * as fs from 'fs';
33
import * as resolveNodeDeps from 'snyk-resolve-deps';
44
import * as baseDebug from 'debug';
5-
import * as _ from '@snyk/lodash';
5+
import * as _ from 'lodash';
66

77
import * as spinner from '../../spinner';
88
import * as analytics from '../../analytics';

src/lib/plugins/nodejs-plugin/yarn-workspaces-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as baseDebug from 'debug';
22
import * as pathUtil from 'path';
3-
import * as _ from '@snyk/lodash';
3+
import * as _ from 'lodash';
44

55
const debug = baseDebug('snyk:yarn-workspaces');
66
import * as lockFileParser from 'snyk-nodejs-lockfile-parser';

src/lib/plugins/rubygems/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { inspectors, Spec } from './inspectors';
22
import { MissingTargetFileError } from '../../errors/missing-targetfile-error';
33
import gemfileLockToDependencies = require('./gemfile-lock-to-dependencies');
4-
import * as _ from '@snyk/lodash';
4+
import * as _ from 'lodash';
55
import { MultiProjectResult } from '@snyk/cli-interface/legacy/plugin';
66

77
export async function inspect(

src/lib/policy/pluck-policies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import { PackageExpanded } from 'snyk-resolve-deps';
33

44
export function pluckPolicies(pkg: PackageExpanded): string[] | string {

src/lib/protect/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const protect = (module.exports = {
99
});
1010

1111
const debug = require('debug')('snyk');
12-
const _ = require('@snyk/lodash');
12+
const _ = require('lodash');
1313

1414
function generatePolicy(policy, tasks, live, packageManager) {
1515
const promises = ['ignore', 'update', 'patch']

src/lib/protect/patch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const glob = require('glob');
88
const tempfile = require('tempfile');
99
const fs = require('fs');
1010
const path = require('path');
11-
const _ = require('@snyk/lodash');
11+
const _ = require('lodash');
1212
const applyPatch = require('./apply-patch');
1313
const stripVersions = require('./strip-versions');
1414
const getVulnSource = require('./get-vuln-source');

src/lib/protect/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports.installDev = installDev;
44

55
const debug = require('debug')('snyk');
66
const chalk = require('chalk');
7-
const _ = require('@snyk/lodash');
7+
const _ = require('lodash');
88
const { parsePackageString: moduleToObject } = require('snyk-module');
99
const semver = require('semver');
1010
const errors = require('../errors/legacy-errors');

src/lib/reachable-vulns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as graphlib from '@snyk/graphlib';
1+
import * as graphlib from 'graphlib';
22
import { CallGraph } from '@snyk/cli-interface/legacy/common';
33

44
import {

src/lib/snyk-test/legacy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import * as depGraphLib from '@snyk/dep-graph';
33
import { SupportedPackageManagers } from '../package-managers';
44
import { SupportedProjectTypes } from '../types';

src/lib/snyk-test/run-test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as fs from 'fs';
2-
import * as _ from '@snyk/lodash';
2+
import * as _ from 'lodash';
33
import * as path from 'path';
44
import * as debugModule from 'debug';
55
import chalk from 'chalk';
@@ -57,7 +57,7 @@ import { validateOptions } from '../options-validator';
5757
import { findAndLoadPolicy } from '../policy';
5858
import { assembleIacLocalPayloads, parseIacTestResult } from './run-iac-test';
5959
import { Payload, PayloadBody, DepTreeFromResolveDeps } from './types';
60-
import { CallGraphError } from '@snyk/cli-interface/legacy/common';
60+
import { CallGraphError, CallGraph } from '@snyk/cli-interface/legacy/common';
6161
import * as alerts from '../alerts';
6262
import { abridgeErrorMessage } from '../error-format';
6363
import { getDockerToken } from '../api-token';
@@ -533,7 +533,10 @@ async function assembleLocalPayloads(
533533
body.depGraph = depGraph;
534534
}
535535

536-
if (options.reachableVulns && scannedProject.callGraph?.message) {
536+
if (
537+
options.reachableVulns &&
538+
(scannedProject.callGraph as CallGraphError)?.message
539+
) {
537540
const err = scannedProject.callGraph as CallGraphError;
538541
const analyticsError = err.innerError || err;
539542
analytics.add('callGraphError', {
@@ -555,7 +558,9 @@ async function assembleLocalPayloads(
555558
callGraph,
556559
nodeCount,
557560
edgeCount,
558-
} = serializeCallGraphWithMetrics(scannedProject.callGraph);
561+
} = serializeCallGraphWithMetrics(
562+
scannedProject.callGraph as CallGraph,
563+
);
559564
debug(
560565
`Adding call graph to payload, node count: ${nodeCount}, edge count: ${edgeCount}`,
561566
);

test/acceptance/cli-monitor/cli-monitor.acceptance.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as subProcess from '../../../src/lib/sub-process';
99
import { getVersion } from '../../../src/lib/version';
1010
import { config as userConfig } from '../../../src/lib/user-config';
1111
import { chdirWorkspaces, getWorkspaceJSON } from '../workspace-helper';
12-
import * as _ from '@snyk/lodash';
12+
import * as _ from 'lodash';
1313

1414
// ensure this is required *after* the demo server, since this will
1515
// configure our fake configuration too

test/acceptance/cli-monitor/cli-monitor.all-projects.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as sinon from 'sinon';
2-
import * as _ from '@snyk/lodash';
2+
import * as _ from 'lodash';
33
import * as path from 'path';
44
import * as depGraphLib from '@snyk/dep-graph';
55

test/acceptance/cli-test/cli-test.iac-k8s.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import {
33
iacTest,
44
iacTestJson,

test/acceptance/cli-test/cli-test.iac-k8s.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import {
33
mapIacTestResult,
44
AnnotatedIacIssue,

test/acceptance/cli-test/cli-test.ruby.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import { AcceptanceTests } from './cli-test.acceptance.test';
33
import { getWorkspaceJSON } from '../workspace-helper';
44
import { CommandResult } from '../../../src/cli/commands/types';

test/acceptance/cli-test/cli-test.sbt.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as sinon from 'sinon';
22
import { AcceptanceTests } from './cli-test.acceptance.test';
33

4-
import * as _ from '@snyk/lodash';
4+
import * as _ from 'lodash';
55

66
export const SbtTests: AcceptanceTests = {
77
language: 'SBT',

test/monitor-target.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { test, afterEach, afterAll } from 'tap';
22
import * as requestLib from 'needle';
33
import * as path from 'path';
44

5-
import * as _ from '@snyk/lodash';
5+
import * as _ from 'lodash';
66
import * as sinon from 'sinon';
77

88
import * as cli from '../src/cli/commands';

test/prompts.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as fs from 'fs';
22
import { test } from 'tap';
3-
import * as _ from '@snyk/lodash';
3+
import * as _ from 'lodash';
44
import * as path from 'path';
55
import * as sinon from 'sinon';
6-
import * as inquirer from '@snyk/inquirer';
6+
import * as inquirer from 'inquirer';
77

88
import wizard = require('../src/cli/commands/protect/wizard');
99

test/system/cli.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as util from 'util';
2-
import * as _ from '@snyk/lodash';
2+
import * as _ from 'lodash';
33
import { test } from 'tap';
44
import * as ciChecker from '../../src/lib/is-ci';
55
import { makeTmpDirectory, silenceLog } from '../utils';

test/system/remote-package.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from '@snyk/lodash';
1+
import * as _ from 'lodash';
22
import { test } from 'tap';
33
import * as ciChecker from '../../src/lib/is-ci';
44
import * as sinon from 'sinon';

0 commit comments

Comments
 (0)