Skip to content

Commit

Permalink
chore(deps): update lodash, mocha away from vulnerable versions (#175)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Stephanemw authored and johnnyreilly committed Oct 25, 2018
1 parent 9e408c5 commit 79ce006
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
],
"scripts": {
"build": "tsc --version && tsc --project \"./src\"",
"test:unit": "mocha -R spec ./test/unit",
"test:integration": "mocha -R spec ./test/integration && rimraf tmp",
"test:unit": "mocha -R spec ./test/unit --exit",
"test:integration": "mocha -R spec ./test/integration --exit && rimraf tmp",
"test": "npm run build && npm run test:unit && npm run test:integration",
"test:watch": "mocha -R spec --watch ./test/unit",
"test:coverage": "rimraf coverage && istanbul cover -root lib --include-all-sources mocha -- -R spec ./test/unit ./test/integration",
Expand Down Expand Up @@ -51,10 +51,7 @@
"devDependencies": {
"@types/babel-code-frame": "^6.20.1",
"@types/chokidar": "^1.7.5",
"@types/lodash.endswith": "^4.2.3",
"@types/lodash.isfunction": "^3.0.3",
"@types/lodash.isstring": "^4.0.3",
"@types/lodash.startswith": "^4.2.3",
"@types/lodash": "^4.14.117",
"@types/minimatch": "^3.0.1",
"@types/node": "^8.0.26",
"@types/resolve": "0.0.4",
Expand All @@ -65,7 +62,7 @@
"husky": "^1.1.2",
"istanbul": "^0.4.5",
"lint-staged": "^7.3.0",
"mocha": "^3.4.1",
"mocha": "^5.2.0",
"mock-fs": "^4.3.0",
"mock-require": "^2.0.2",
"prettier": "^1.14.3",
Expand All @@ -90,10 +87,7 @@
"babel-code-frame": "^6.22.0",
"chalk": "^2.4.1",
"chokidar": "^2.0.4",
"lodash.endswith": "^4.2.1",
"lodash.isfunction": "^3.0.8",
"lodash.isstring": "^4.0.1",
"lodash.startswith": "^4.2.1",
"lodash": "^4.17.11",
"minimatch": "^3.0.4",
"resolve": "^1.5.0",
"tapable": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/FilesWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as chokidar from 'chokidar';
import * as path from 'path';
import startsWith = require('lodash.startswith');
import startsWith = require('lodash/startsWith');

export class FilesWatcher {
watchPaths: string[];
Expand Down
2 changes: 1 addition & 1 deletion src/IncrementalChecker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from 'fs';
import endsWith = require('lodash.endswith');
import endsWith = require('lodash/endsWith');
import * as path from 'path';
import * as ts from 'typescript';
import { Configuration, Linter } from 'tslint'; // Imported for types alone; actual requires take place in methods below
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import chalk, { Chalk } from 'chalk';
import * as fs from 'fs';
import * as os from 'os';
import * as webpack from 'webpack';
import isString = require('lodash.isstring');
import isFunction = require('lodash.isfunction');
import isString = require('lodash/isString');
import isFunction = require('lodash/isFunction');
import { CancellationToken } from './CancellationToken';
import { NormalizedMessage } from './NormalizedMessage';
import { createDefaultFormatter } from './formatter/defaultFormatter';
Expand Down
2 changes: 1 addition & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"noUnusedParameters": true,
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": false,
"lib": ["es5", "es2015.core", "dom"],
"lib": ["es5", "es2015", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
Expand Down
4 changes: 3 additions & 1 deletion src/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"allow-pascal-case"
],
"no-namespace": false,
"array-type": [true, "array"]
"array-type": [true, "array"],
"no-submodule-imports": [true, "lodash"]

}
}

0 comments on commit 79ce006

Please sign in to comment.