Skip to content

Commit 79ce006

Browse files
Stephanemwjohnnyreilly
authored andcommitted
chore(deps): update lodash, mocha away from vulnerable versions (#175)
* chore(deps): update lodash, mocha away from vulnerable versions, fix associated code and npm scripts, update tslint config * chore(config): use full es2015 instead of 2015.core+es2016 in tsconfig libs
1 parent 9e408c5 commit 79ce006

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

package.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
],
1010
"scripts": {
1111
"build": "tsc --version && tsc --project \"./src\"",
12-
"test:unit": "mocha -R spec ./test/unit",
13-
"test:integration": "mocha -R spec ./test/integration && rimraf tmp",
12+
"test:unit": "mocha -R spec ./test/unit --exit",
13+
"test:integration": "mocha -R spec ./test/integration --exit && rimraf tmp",
1414
"test": "npm run build && npm run test:unit && npm run test:integration",
1515
"test:watch": "mocha -R spec --watch ./test/unit",
1616
"test:coverage": "rimraf coverage && istanbul cover -root lib --include-all-sources mocha -- -R spec ./test/unit ./test/integration",
@@ -51,10 +51,7 @@
5151
"devDependencies": {
5252
"@types/babel-code-frame": "^6.20.1",
5353
"@types/chokidar": "^1.7.5",
54-
"@types/lodash.endswith": "^4.2.3",
55-
"@types/lodash.isfunction": "^3.0.3",
56-
"@types/lodash.isstring": "^4.0.3",
57-
"@types/lodash.startswith": "^4.2.3",
54+
"@types/lodash": "^4.14.117",
5855
"@types/minimatch": "^3.0.1",
5956
"@types/node": "^8.0.26",
6057
"@types/resolve": "0.0.4",
@@ -65,7 +62,7 @@
6562
"husky": "^1.1.2",
6663
"istanbul": "^0.4.5",
6764
"lint-staged": "^7.3.0",
68-
"mocha": "^3.4.1",
65+
"mocha": "^5.2.0",
6966
"mock-fs": "^4.3.0",
7067
"mock-require": "^2.0.2",
7168
"prettier": "^1.14.3",
@@ -90,10 +87,7 @@
9087
"babel-code-frame": "^6.22.0",
9188
"chalk": "^2.4.1",
9289
"chokidar": "^2.0.4",
93-
"lodash.endswith": "^4.2.1",
94-
"lodash.isfunction": "^3.0.8",
95-
"lodash.isstring": "^4.0.1",
96-
"lodash.startswith": "^4.2.1",
90+
"lodash": "^4.17.11",
9791
"minimatch": "^3.0.4",
9892
"resolve": "^1.5.0",
9993
"tapable": "^1.0.0"

src/FilesWatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as chokidar from 'chokidar';
22
import * as path from 'path';
3-
import startsWith = require('lodash.startswith');
3+
import startsWith = require('lodash/startsWith');
44

55
export class FilesWatcher {
66
watchPaths: string[];

src/IncrementalChecker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as fs from 'fs';
2-
import endsWith = require('lodash.endswith');
2+
import endsWith = require('lodash/endsWith');
33
import * as path from 'path';
44
import * as ts from 'typescript';
55
import { Configuration, Linter } from 'tslint'; // Imported for types alone; actual requires take place in methods below

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import chalk, { Chalk } from 'chalk';
55
import * as fs from 'fs';
66
import * as os from 'os';
77
import * as webpack from 'webpack';
8-
import isString = require('lodash.isstring');
9-
import isFunction = require('lodash.isfunction');
8+
import isString = require('lodash/isString');
9+
import isFunction = require('lodash/isFunction');
1010
import { CancellationToken } from './CancellationToken';
1111
import { NormalizedMessage } from './NormalizedMessage';
1212
import { createDefaultFormatter } from './formatter/defaultFormatter';

src/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"noUnusedParameters": true,
99
"suppressImplicitAnyIndexErrors": true,
1010
"strictNullChecks": false,
11-
"lib": ["es5", "es2015.core", "dom"],
11+
"lib": ["es5", "es2015", "dom"],
1212
"module": "commonjs",
1313
"moduleResolution": "node",
1414
"declaration": true,

src/tslint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"allow-pascal-case"
2323
],
2424
"no-namespace": false,
25-
"array-type": [true, "array"]
25+
"array-type": [true, "array"],
26+
"no-submodule-imports": [true, "lodash"]
27+
2628
}
2729
}

0 commit comments

Comments
 (0)