Skip to content

Commit b51f89d

Browse files
authored
chore: remove lodash (#3419)
1 parent 9f74bfd commit b51f89d

File tree

18 files changed

+167
-37
lines changed

18 files changed

+167
-37
lines changed

@commitlint/cli/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@
3939
"devDependencies": {
4040
"@commitlint/test": "^17.2.0",
4141
"@commitlint/utils": "^17.0.0",
42+
"@types/lodash.isfunction": "^3.0.7",
43+
"@types/lodash.merge": "^4.6.7",
4244
"@types/node": "^14.0.0",
4345
"@types/yargs": "^17.0.0",
44-
"fs-extra": "^10.0.0"
46+
"fs-extra": "^10.0.0",
47+
"lodash.merge": "^4.6.2"
4548
},
4649
"dependencies": {
4750
"@commitlint/format": "^17.0.0",
@@ -50,7 +53,7 @@
5053
"@commitlint/read": "^17.2.0",
5154
"@commitlint/types": "^17.0.0",
5255
"execa": "^5.0.0",
53-
"lodash": "^4.17.19",
56+
"lodash.isfunction": "^3.0.9",
5457
"resolve-from": "5.0.0",
5558
"resolve-global": "1.0.0",
5659
"yargs": "^17.0.0"

@commitlint/cli/src/cli.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {fix, git} from '@commitlint/test';
22
import execa from 'execa';
33
import fs from 'fs-extra';
4-
import merge from 'lodash/merge';
4+
import merge from 'lodash.merge';
55
import path from 'path';
66

77
const bin = require.resolve('../cli.js');

@commitlint/cli/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import execa, {ExecaError} from 'execa';
22
import load from '@commitlint/load';
33
import lint from '@commitlint/lint';
44
import read from '@commitlint/read';
5-
import isFunction from 'lodash/isFunction';
5+
import isFunction from 'lodash.isfunction';
66
import resolveFrom from 'resolve-from';
77
import resolveGlobal from 'resolve-global';
88
import yargs, {Arguments} from 'yargs';

@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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
"dependencies": {
3333
"@commitlint/config-angular": "^17.2.0",
3434
"globby": "^11.0.0",
35-
"lodash": "^4.17.19"
35+
"lodash.merge": "^4.6.2"
3636
},
3737
"devDependencies": {
38-
"@commitlint/utils": "^17.0.0"
38+
"@commitlint/utils": "^17.0.0",
39+
"@types/lodash.merge": "^4.6.7"
3940
},
4041
"gitHead": "d829bf6260304ca8d6811f329fcdd1b6c50e9749"
4142
}

@commitlint/cz-commitlint/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@commitlint/load": "^17.2.0",
4242
"@commitlint/types": "^17.0.0",
4343
"chalk": "^4.1.0",
44-
"lodash": "^4.17.21",
44+
"lodash.isplainobject": "^4.0.6",
4545
"word-wrap": "^1.2.3"
4646
},
4747
"peerDependencies": {
@@ -50,6 +50,9 @@
5050
},
5151
"devDependencies": {
5252
"@types/inquirer": "^8.0.0",
53-
"commitizen": "^4.2.4"
53+
"@types/lodash.isfunction": "^3.0.7",
54+
"@types/lodash.isplainobject": "^4.0.7",
55+
"commitizen": "^4.2.4",
56+
"lodash.isfunction": "^3.0.9"
5457
}
5558
}

@commitlint/cz-commitlint/src/Process.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {QualifiedRules, UserPromptConfig} from '@commitlint/types';
22
import {Answers, DistinctQuestion} from 'inquirer';
3-
import isFunction from 'lodash/isFunction';
3+
import isFunction from 'lodash.isfunction';
44
import process from './Process';
55

66
const mockShowTitle = jest.fn();

@commitlint/cz-commitlint/src/store/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {PromptConfig, UserPromptConfig} from '@commitlint/types';
2-
import isPlainObject from 'lodash/isPlainObject';
2+
import isPlainObject from 'lodash.isplainobject';
33
import defaultPromptConfigs from './defaultPromptConfigs';
44

55
const storeKey = Symbol('promptConfig');

@commitlint/ensure/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,20 @@
3636
"license": "MIT",
3737
"devDependencies": {
3838
"@commitlint/utils": "^17.0.0",
39-
"@types/lodash": "^4.14.161",
39+
"@types/lodash.camelcase": "^4.3.7",
40+
"@types/lodash.kebabcase": "^4.1.7",
41+
"@types/lodash.snakecase": "^4.1.7",
42+
"@types/lodash.startcase": "^4.4.7",
43+
"@types/lodash.upperfirst": "^4.3.7",
4044
"globby": "^11.0.0"
4145
},
4246
"dependencies": {
4347
"@commitlint/types": "^17.0.0",
44-
"lodash": "^4.17.19"
48+
"lodash.camelcase": "^4.3.0",
49+
"lodash.kebabcase": "^4.1.1",
50+
"lodash.snakecase": "^4.1.1",
51+
"lodash.startcase": "^4.4.0",
52+
"lodash.upperfirst": "^4.3.1"
4553
},
4654
"gitHead": "d829bf6260304ca8d6811f329fcdd1b6c50e9749"
4755
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import globby from 'globby';
3-
import camelCase from 'lodash/camelCase';
3+
import camelCase from 'lodash.camelcase';
44
import * as ensure from '.';
55

66
test('exports all checkers', async () => {

0 commit comments

Comments
 (0)