Skip to content

Commit 5bf44eb

Browse files
committed
bug(commitlint): update lodash to 4.17.11 to fix vulenrabilities
1 parent 65a9b3e commit 5bf44eb

File tree

26 files changed

+2770
-1874
lines changed

26 files changed

+2770
-1874
lines changed

@commitlint/cli/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@
8282
"babel-polyfill": "6.26.0",
8383
"chalk": "2.3.1",
8484
"get-stdin": "5.0.1",
85-
"lodash.merge": "4.6.1",
86-
"lodash.pick": "4.4.0",
85+
"lodash": "^4.17.11",
8786
"meow": "5.0.0",
8887
"resolve-from": "^4.0.0",
8988
"resolve-global": "^0.1.0"

@commitlint/cli/src/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const load = require('@commitlint/load');
55
const lint = require('@commitlint/lint');
66
const read = require('@commitlint/read');
77
const meow = require('meow');
8-
const merge = require('lodash.merge');
9-
const pick = require('lodash.pick');
8+
const merge = require('lodash/merge');
9+
const pick = require('lodash/pick');
1010
const stdin = require('get-stdin');
1111
const resolveFrom = require('resolve-from');
1212
const resolveGlobal = require('resolve-global');

@commitlint/cli/src/cli.test.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import {fix, git} from '@commitlint/test';
33
import test from 'ava';
44
import execa from 'execa';
5-
import merge from 'lodash.merge';
5+
import merge from 'lodash/merge';
66
import * as sander from 'sander';
77
import stream from 'string-to-stream';
88

@@ -264,17 +264,27 @@ test('should fail for invalid formatters from flags', async t => {
264264
});
265265

266266
test('should work with absolute formatter path', async t => {
267-
const formatterPath = path.resolve(__dirname, '../fixtures/custom-formatter/formatters/custom.js');
267+
const formatterPath = path.resolve(
268+
__dirname,
269+
'../fixtures/custom-formatter/formatters/custom.js'
270+
);
268271
const cwd = await git.bootstrap('fixtures/custom-formatter');
269-
const actual = await cli(['--format', formatterPath], {cwd})('test: this should work');
272+
const actual = await cli(['--format', formatterPath], {cwd})(
273+
'test: this should work'
274+
);
270275

271276
t.true(actual.stdout.includes('custom-formatter-ok'));
272277
t.is(actual.code, 0);
273278
});
274279

275280
test('should work with relative formatter path', async t => {
276-
const cwd = path.resolve(await git.bootstrap('fixtures/custom-formatter'), './formatters');
277-
const actual = await cli(['--format', './custom.js'], {cwd})('test: this should work');
281+
const cwd = path.resolve(
282+
await git.bootstrap('fixtures/custom-formatter'),
283+
'./formatters'
284+
);
285+
const actual = await cli(['--format', './custom.js'], {cwd})(
286+
'test: this should work'
287+
);
278288

279289
t.true(actual.stdout.includes('custom-formatter-ok'));
280290
t.is(actual.code, 0);

@commitlint/config-patternplate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path');
22
const globby = require('globby');
3-
const merge = require('lodash.merge');
3+
const merge = require('lodash/merge');
44

55
function pathToId(root, filePath) {
66
const relativePath = path.relative(root, filePath);

@commitlint/config-patternplate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@commitlint/config-angular": "^7.1.2",
3535
"globby": "8.0.1",
36-
"lodash.merge": "4.6.1"
36+
"lodash": "4.17.11"
3737
},
3838
"devDependencies": {
3939
"@commitlint/utils": "^7.1.2",

@commitlint/ensure/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,10 @@
6868
"concurrently": "3.5.1",
6969
"cross-env": "5.1.1",
7070
"globby": "8.0.1",
71-
"lodash.values": "4.3.0",
7271
"rimraf": "2.6.1",
7372
"xo": "0.20.3"
7473
},
7574
"dependencies": {
76-
"lodash.camelcase": "4.3.0",
77-
"lodash.kebabcase": "4.1.1",
78-
"lodash.snakecase": "4.1.1",
79-
"lodash.startcase": "4.4.0",
80-
"lodash.upperfirst": "4.3.1"
75+
"lodash": "^4.17.11"
8176
}
8277
}

@commitlint/ensure/src/case.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import camelCase from 'lodash.camelcase';
2-
import kebabCase from 'lodash.kebabcase';
3-
import snakeCase from 'lodash.snakecase';
4-
import upperFirst from 'lodash.upperfirst';
5-
import startCase from 'lodash.startcase';
1+
import camelCase from 'lodash/camelcase';
2+
import kebabCase from 'lodash/kebabcase';
3+
import snakeCase from 'lodash/snakecase';
4+
import upperFirst from 'lodash/upperfirst';
5+
import startCase from 'lodash/startcase';
66

77
export default ensureCase;
88

@commitlint/ensure/src/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import path from 'path';
22
import test from 'ava';
33
import globby from 'globby';
4-
import camelCase from 'lodash.camelcase';
5-
import values from 'lodash.values';
4+
import camelCase from 'lodash/camelcase';
5+
import values from 'lodash/values';
66
import * as ensure from '.';
77

88
test('exports all rules', async t => {

@commitlint/format/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
},
7474
"dependencies": {
7575
"babel-runtime": "^6.23.0",
76-
"chalk": "^2.0.1"
76+
"chalk": "^2.0.1",
77+
"lodash": "^4.17.11"
7778
}
7879
}

@commitlint/format/src/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22
import chalk from 'chalk';
3-
import includes from 'lodash.includes';
3+
import includes from 'lodash/includes';
44
import format from '.';
55

66
const ok = chalk.bold(`${chalk.green('✔')} found 0 problems, 0 warnings`);

@commitlint/lint/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"@commitlint/parse": "^7.1.2",
7979
"@commitlint/rules": "^7.2.0",
8080
"babel-runtime": "^6.23.0",
81+
"lodash": "^4.17.11",
8182
"lodash.topairs": "4.3.0"
8283
}
8384
}

@commitlint/lint/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import util from 'util';
22
import isIgnored from '@commitlint/is-ignored';
33
import parse from '@commitlint/parse';
44
import implementations from '@commitlint/rules';
5-
import entries from 'lodash.topairs';
5+
import entries from 'lodash/topairs';
66

77
const buildCommitMesage = ({header, body, footer}) => {
88
let message = header;

@commitlint/load/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@commitlint/resolve-extends": "^7.1.2",
7878
"babel-runtime": "^6.23.0",
7979
"cosmiconfig": "^4.0.0",
80+
"lodash": "^4.17.11",
8081
"lodash.merge": "4.6.1",
8182
"lodash.mergewith": "4.6.1",
8283
"lodash.pick": "4.4.0",

@commitlint/load/src/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import path from 'path';
22
import executeRule from '@commitlint/execute-rule';
33
import resolveExtends from '@commitlint/resolve-extends';
44
import cosmiconfig from 'cosmiconfig';
5-
import entries from 'lodash.topairs';
6-
import merge from 'lodash.merge';
7-
import mergeWith from 'lodash.mergewith';
8-
import pick from 'lodash.pick';
5+
import entries from 'lodash/topairs';
6+
import merge from 'lodash/merge';
7+
import mergeWith from 'lodash/mergewith';
8+
import pick from 'lodash/pick';
99
import resolveFrom from 'resolve-from';
1010

1111
const w = (a, b) => (Array.isArray(b) ? b : undefined);
@@ -54,7 +54,8 @@ export default async (seed = {}, options = {cwd: process.cwd()}) => {
5454

5555
// Resolve config-relative formatter module
5656
if (typeof config.formatter === 'string') {
57-
preset.formatter = resolveFrom.silent(base, config.formatter) || config.formatter;
57+
preset.formatter =
58+
resolveFrom.silent(base, config.formatter) || config.formatter;
5859
}
5960

6061
// Execute rule config functions if needed

@commitlint/parse/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
},
7474
"dependencies": {
7575
"conventional-changelog-angular": "^1.3.3",
76-
"conventional-commits-parser": "^2.1.0"
76+
"conventional-commits-parser": "^2.1.0",
77+
"lodash": "^4.17.11"
7778
}
7879
}

@commitlint/prompt/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"@commitlint/load": "^7.2.1",
7373
"babel-runtime": "^6.23.0",
7474
"chalk": "^2.0.0",
75+
"lodash": "^4.17.11",
7576
"lodash.camelcase": "4.3.0",
7677
"lodash.kebabcase": "4.1.1",
7778
"lodash.snakecase": "4.1.1",

@commitlint/prompt/src/library/format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chalk from 'chalk';
2-
import entries from 'lodash.topairs';
2+
import entries from 'lodash/topairs';
33

44
export default format;
55

@commitlint/prompt/src/library/get-forced-case-fn.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import camelCase from 'lodash.camelcase';
2-
import kebabCase from 'lodash.kebabcase';
3-
import snakeCase from 'lodash.snakecase';
4-
import upperFirst from 'lodash.upperfirst';
5-
import startCase from 'lodash.startcase';
1+
import camelCase from 'lodash/camelcase';
2+
import kebabCase from 'lodash/kebabcase';
3+
import snakeCase from 'lodash/snakecase';
4+
import upperFirst from 'lodash/upperfirst';
5+
import startCase from 'lodash/startcase';
66

77
/**
88
* Get forced case for rule

@commitlint/prompt/src/library/meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chalk from 'chalk';
2-
import entries from 'lodash.topairs';
2+
import entries from 'lodash/topairs';
33

44
/**
55
* Get formatted meta hints for configuration

@commitlint/resolve-extends/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
},
7676
"dependencies": {
7777
"babel-runtime": "6.26.0",
78+
"lodash": "^4.17.11",
7879
"lodash.merge": "4.6.1",
7980
"lodash.omit": "4.5.0",
8081
"require-uncached": "^1.0.3",

@commitlint/resolve-extends/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import path from 'path';
33
import 'resolve-global'; // eslint-disable-line import/no-unassigned-import
44
import requireUncached from 'require-uncached';
55
import resolveFrom from 'resolve-from';
6-
import merge from 'lodash.merge';
7-
import omit from 'lodash.omit';
6+
import merge from 'lodash/merge';
7+
import omit from 'lodash/omit';
88

99
// Resolve extend configs
1010
export default function resolveExtends(config = {}, context = {}) {

@commitlint/rules/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"@commitlint/ensure": "^7.2.0",
7979
"@commitlint/message": "^7.1.2",
8080
"@commitlint/to-lines": "^7.1.2",
81-
"babel-runtime": "^6.23.0"
81+
"babel-runtime": "^6.23.0",
82+
"lodash": "^4.17.11"
8283
}
8384
}

@commitlint/rules/src/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22
import test from 'ava';
33
import globby from 'globby';
4-
import values from 'lodash.values';
4+
import values from 'lodash/values';
55
import rules from '.';
66

77
test('exports all rules', async t => {

@packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@marionebl/sander": "0.6.1",
5151
"execa": "0.9.0",
5252
"is-builtin-module": "2.0.0",
53-
"lodash.values": "4.3.0",
53+
"lodash": "^4.17.11",
5454
"meow": "4.0.0",
5555
"read-pkg": "3.0.0",
5656
"require-from-string": "2.0.1",

@packages/utils/pkg-check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const meow = require('meow');
88
const readPkg = require('read-pkg');
99
const requireFromString = require('require-from-string');
1010
const tar = require('tar-fs');
11-
const values = require('lodash.values');
11+
const values = require('lodash/values');
1212
const fix = require('@commitlint/test').fix;
1313

1414
const builtin = require.resolve('is-builtin-module');

0 commit comments

Comments
 (0)