Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 6c2722e

Browse files
fix: reduce set of dependencies (#876)
1 parent 1e7e0f0 commit 6c2722e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"extend": "^3.0.2",
5252
"findit2": "^2.2.3",
5353
"gcp-metadata": "^4.0.0",
54-
"lodash.pickby": "^4.6.0",
5554
"p-limit": "^2.2.0",
5655
"semver": "^7.0.0",
5756
"source-map": "^0.6.1",
@@ -63,8 +62,6 @@
6362
"@types/console-log-level": "^1.4.0",
6463
"@types/estree": "0.0.44",
6564
"@types/extend": "^3.0.0",
66-
"@types/lodash.pickby": "^4.6.4",
67-
"@types/mkdirp": "^1.0.0",
6865
"@types/mocha": "^7.0.0",
6966
"@types/mv": "^2.1.0",
7067
"@types/ncp": "^2.0.3",
@@ -73,13 +70,11 @@
7370
"@types/semver": "^7.0.0",
7471
"@types/tmp": "^0.2.0",
7572
"@types/uuid": "^7.0.0",
76-
"codecov": "^3.0.4",
7773
"cpy-cli": "^3.1.0",
7874
"cross-env": "^7.0.0",
7975
"execa": "^4.0.0",
8076
"gts": "^2.0.0",
8177
"linkinator": "^2.0.0",
82-
"mkdirp": "^1.0.3",
8378
"mocha": "^7.0.0",
8479
"mv": "^2.1.1",
8580
"ncp": "^2.0.0",

src/agent/io/scanner.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import * as crypto from 'crypto';
1616
import * as events from 'events';
1717
import * as fs from 'fs';
1818
import * as path from 'path';
19-
import pickBy = require('lodash.pickby');
2019

2120
// TODO: Make this more precise.
2221
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -84,7 +83,13 @@ class ScanResultsImpl implements ScanResults {
8483
* should be included in the returned results.
8584
*/
8685
selectStats(regex: RegExp): ScanStats | {} {
87-
return pickBy(this.stats, (_, key) => regex.test(key));
86+
const obj = {} as {[index: string]: {} | undefined};
87+
Object.keys(this.stats).forEach(key => {
88+
if (regex.test(key)) {
89+
obj[key] = this.stats[key];
90+
}
91+
});
92+
return obj;
8893
}
8994

9095
/**

0 commit comments

Comments
 (0)