Skip to content

fix: update lodash to 4.17.11 to fix vulenrabilities #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@
"babel-polyfill": "6.26.0",
"chalk": "2.3.1",
"get-stdin": "5.0.1",
"lodash.merge": "4.6.1",
"lodash.pick": "4.4.0",
"lodash": "^4.17.11",
"meow": "5.0.0",
"resolve-from": "^4.0.0",
"resolve-global": "^0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const load = require('@commitlint/load');
const lint = require('@commitlint/lint');
const read = require('@commitlint/read');
const meow = require('meow');
const merge = require('lodash.merge');
const pick = require('lodash.pick');
const merge = require('lodash/merge');
const pick = require('lodash/pick');
const stdin = require('get-stdin');
const resolveFrom = require('resolve-from');
const resolveGlobal = require('resolve-global');
Expand Down
20 changes: 15 additions & 5 deletions @commitlint/cli/src/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path';
import {fix, git} from '@commitlint/test';
import test from 'ava';
import execa from 'execa';
import merge from 'lodash.merge';
import merge from 'lodash/merge';
import * as sander from 'sander';
import stream from 'string-to-stream';

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

test('should work with absolute formatter path', async t => {
const formatterPath = path.resolve(__dirname, '../fixtures/custom-formatter/formatters/custom.js');
const formatterPath = path.resolve(
__dirname,
'../fixtures/custom-formatter/formatters/custom.js'
);
const cwd = await git.bootstrap('fixtures/custom-formatter');
const actual = await cli(['--format', formatterPath], {cwd})('test: this should work');
const actual = await cli(['--format', formatterPath], {cwd})(
'test: this should work'
);

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

test('should work with relative formatter path', async t => {
const cwd = path.resolve(await git.bootstrap('fixtures/custom-formatter'), './formatters');
const actual = await cli(['--format', './custom.js'], {cwd})('test: this should work');
const cwd = path.resolve(
await git.bootstrap('fixtures/custom-formatter'),
'./formatters'
);
const actual = await cli(['--format', './custom.js'], {cwd})(
'test: this should work'
);

t.true(actual.stdout.includes('custom-formatter-ok'));
t.is(actual.code, 0);
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/config-patternplate/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');
const globby = require('globby');
const merge = require('lodash.merge');
const merge = require('lodash/merge');

function pathToId(root, filePath) {
const relativePath = path.relative(root, filePath);
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/config-patternplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@commitlint/config-angular": "^7.1.2",
"globby": "8.0.1",
"lodash.merge": "4.6.1"
"lodash": "4.17.11"
},
"devDependencies": {
"@commitlint/utils": "^7.1.2",
Expand Down
7 changes: 1 addition & 6 deletions @commitlint/ensure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,10 @@
"concurrently": "3.5.1",
"cross-env": "5.1.1",
"globby": "8.0.1",
"lodash.values": "4.3.0",
"rimraf": "2.6.1",
"xo": "0.20.3"
},
"dependencies": {
"lodash.camelcase": "4.3.0",
"lodash.kebabcase": "4.1.1",
"lodash.snakecase": "4.1.1",
"lodash.startcase": "4.4.0",
"lodash.upperfirst": "4.3.1"
"lodash": "^4.17.11"
}
}
10 changes: 5 additions & 5 deletions @commitlint/ensure/src/case.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import camelCase from 'lodash.camelcase';
import kebabCase from 'lodash.kebabcase';
import snakeCase from 'lodash.snakecase';
import upperFirst from 'lodash.upperfirst';
import startCase from 'lodash.startcase';
import camelCase from 'lodash/camelCase';
import kebabCase from 'lodash/kebabCase';
import snakeCase from 'lodash/snakeCase';
import upperFirst from 'lodash/upperFirst';
import startCase from 'lodash/startCase';

export default ensureCase;

Expand Down
4 changes: 2 additions & 2 deletions @commitlint/ensure/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'path';
import test from 'ava';
import globby from 'globby';
import camelCase from 'lodash.camelcase';
import values from 'lodash.values';
import camelCase from 'lodash/camelCase';
import values from 'lodash/values';
import * as ensure from '.';

test('exports all rules', async t => {
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"babel-register": "6.26.0",
"concurrently": "3.5.1",
"cross-env": "5.1.1",
"lodash.includes": "4.3.0",
"lodash": "4.17.11",
"rimraf": "2.6.1",
"xo": "0.20.3"
},
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/format/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'ava';
import chalk from 'chalk';
import includes from 'lodash.includes';
import includes from 'lodash/includes';
import format from '.';

const ok = chalk.bold(`${chalk.green('✔')} found 0 problems, 0 warnings`);
Expand Down
7 changes: 3 additions & 4 deletions @commitlint/lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@
"cross-env": "5.1.1",
"execa": "0.9.0",
"globby": "8.0.1",
"lodash.includes": "4.3.0",
"rimraf": "2.6.1",
"xo": "0.20.3"
"xo": "0.20.3",
"lodash": "4.17.11"
},
"dependencies": {
"@commitlint/is-ignored": "^7.2.1",
"@commitlint/parse": "^7.1.2",
"@commitlint/rules": "^7.2.0",
"babel-runtime": "^6.23.0",
"lodash.topairs": "4.3.0"
"babel-runtime": "^6.23.0"
}
}
2 changes: 1 addition & 1 deletion @commitlint/lint/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import util from 'util';
import isIgnored from '@commitlint/is-ignored';
import parse from '@commitlint/parse';
import implementations from '@commitlint/rules';
import entries from 'lodash.topairs';
import entries from 'lodash/toPairs';

const buildCommitMesage = ({header, body, footer}) => {
let message = header;
Expand Down
1 change: 1 addition & 0 deletions @commitlint/load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@commitlint/resolve-extends": "^7.1.2",
"babel-runtime": "^6.23.0",
"cosmiconfig": "^4.0.0",
"lodash": "^4.17.11",
"lodash.merge": "4.6.1",
"lodash.mergewith": "4.6.1",
"lodash.pick": "4.4.0",
Expand Down
11 changes: 6 additions & 5 deletions @commitlint/load/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import path from 'path';
import executeRule from '@commitlint/execute-rule';
import resolveExtends from '@commitlint/resolve-extends';
import cosmiconfig from 'cosmiconfig';
import entries from 'lodash.topairs';
import merge from 'lodash.merge';
import mergeWith from 'lodash.mergewith';
import pick from 'lodash.pick';
import entries from 'lodash/toPairs';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import pick from 'lodash/pick';
import resolveFrom from 'resolve-from';

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

// Resolve config-relative formatter module
if (typeof config.formatter === 'string') {
preset.formatter = resolveFrom.silent(base, config.formatter) || config.formatter;
preset.formatter =
resolveFrom.silent(base, config.formatter) || config.formatter;
}

// Execute rule config functions if needed
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
"conventional-changelog-angular": "^1.3.3",
"conventional-commits-parser": "^2.1.0"
}
}
}
7 changes: 1 addition & 6 deletions @commitlint/prompt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@
"@commitlint/load": "^7.2.1",
"babel-runtime": "^6.23.0",
"chalk": "^2.0.0",
"lodash.camelcase": "4.3.0",
"lodash.kebabcase": "4.1.1",
"lodash.snakecase": "4.1.1",
"lodash.startcase": "4.4.0",
"lodash.topairs": "4.3.0",
"lodash.upperfirst": "4.3.1",
"lodash": "4.17.11",
"throat": "^4.1.0",
"vorpal": "^1.10.0"
}
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/prompt/src/library/format.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import entries from 'lodash.topairs';
import entries from 'lodash/toPairs';

export default format;

Expand Down
10 changes: 5 additions & 5 deletions @commitlint/prompt/src/library/get-forced-case-fn.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import camelCase from 'lodash.camelcase';
import kebabCase from 'lodash.kebabcase';
import snakeCase from 'lodash.snakecase';
import upperFirst from 'lodash.upperfirst';
import startCase from 'lodash.startcase';
import camelCase from 'lodash/camelCase';
import kebabCase from 'lodash/kebabCase';
import snakeCase from 'lodash/snakeCase';
import upperFirst from 'lodash/upperFirst';
import startCase from 'lodash/startCase';

/**
* Get forced case for rule
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/prompt/src/library/meta.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import entries from 'lodash.topairs';
import entries from 'lodash/toPairs';

/**
* Get formatted meta hints for configuration
Expand Down
3 changes: 1 addition & 2 deletions @commitlint/resolve-extends/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
},
"dependencies": {
"babel-runtime": "6.26.0",
"lodash.merge": "4.6.1",
"lodash.omit": "4.5.0",
"lodash": "4.17.11",
"require-uncached": "^1.0.3",
"resolve-from": "^4.0.0",
"resolve-global": "^0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/resolve-extends/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import path from 'path';
import 'resolve-global'; // eslint-disable-line import/no-unassigned-import
import requireUncached from 'require-uncached';
import resolveFrom from 'resolve-from';
import merge from 'lodash.merge';
import omit from 'lodash.omit';
import merge from 'lodash/merge';
import omit from 'lodash/omit';

// Resolve extend configs
export default function resolveExtends(config = {}, context = {}) {
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
"conventional-changelog-angular": "1.6.6",
"cross-env": "5.1.1",
"globby": "8.0.1",
"lodash.values": "4.3.0",
"rimraf": "2.6.1",
"xo": "0.20.3"
},
"dependencies": {
"@commitlint/ensure": "^7.2.0",
"@commitlint/message": "^7.1.2",
"@commitlint/to-lines": "^7.1.2",
"babel-runtime": "^6.23.0"
"babel-runtime": "^6.23.0",
"lodash": "4.17.11"
}
}
2 changes: 1 addition & 1 deletion @commitlint/rules/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import test from 'ava';
import globby from 'globby';
import values from 'lodash.values';
import values from 'lodash/values';
import rules from '.';

test('exports all rules', async t => {
Expand Down
2 changes: 1 addition & 1 deletion @packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@marionebl/sander": "0.6.1",
"execa": "0.9.0",
"is-builtin-module": "2.0.0",
"lodash.values": "4.3.0",
"lodash": "^4.17.11",
"meow": "4.0.0",
"read-pkg": "3.0.0",
"require-from-string": "2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion @packages/utils/pkg-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const meow = require('meow');
const readPkg = require('read-pkg');
const requireFromString = require('require-from-string');
const tar = require('tar-fs');
const values = require('lodash.values');
const values = require('lodash/values');
const fix = require('@commitlint/test').fix;

const builtin = require.resolve('is-builtin-module');
Expand Down
Loading