Skip to content

Commit c43f584

Browse files
SteinRobertjohnjbarton
authored andcommitted
fix: remove vulnerable dependency combine-lists (#3273)
Remove `combine-lists` as a dependency. Use `_.union` instead now. Fixes #3265
1 parent 4ec4f6f commit c43f584

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/preprocessor.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const fs = require('graceful-fs')
44
const mm = require('minimatch')
55
const isBinaryFile = require('isbinaryfile')
6-
const combineLists = require('combine-lists')
6+
const _ = require('lodash')
77
const CryptoUtils = require('./utils/crypto-utils')
88

99
const log = require('./logger').create('preprocess')
@@ -63,7 +63,7 @@ function createPreprocessor (config, basePath, injector) {
6363

6464
let allPreprocessors = []
6565
patterns.forEach((pattern) => {
66-
allPreprocessors = combineLists(allPreprocessors, config[pattern])
66+
allPreprocessors = _.union(allPreprocessors, config[pattern])
6767
})
6868
allPreprocessors.forEach(instantiatePreprocessor)
6969

@@ -92,7 +92,7 @@ function createPreprocessor (config, basePath, injector) {
9292
let preprocessorNames = []
9393
patterns.forEach((pattern) => {
9494
if (mm(file.originalPath, pattern, {dot: true})) {
95-
preprocessorNames = combineLists(preprocessorNames, config[pattern])
95+
preprocessorNames = _.union(preprocessorNames, config[pattern])
9696
}
9797
})
9898

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@
383383
"braces": "^2.3.2",
384384
"chokidar": "^2.0.3",
385385
"colors": "^1.1.0",
386-
"combine-lists": "^1.0.0",
387386
"connect": "^3.6.0",
388387
"core-js": "^2.2.0",
389388
"di": "^0.0.1",
@@ -393,7 +392,7 @@
393392
"graceful-fs": "^4.1.2",
394393
"http-proxy": "^1.13.0",
395394
"isbinaryfile": "^3.0.0",
396-
"lodash": "^4.17.5",
395+
"lodash": "^4.17.11",
397396
"log4js": "^4.0.0",
398397
"mime": "^2.3.1",
399398
"minimatch": "^3.0.2",

0 commit comments

Comments
 (0)