Skip to content

Commit 443db64

Browse files
authored
Merge pull request #360 from teamleadercrm/GUILD-903-replace-lodash-per-method-packages
[GUILD-903] Replace lodash per-method packages
2 parents 9e9f652 + 4fbc75c commit 443db64

File tree

6 files changed

+207
-184
lines changed

6 files changed

+207
-184
lines changed

.eslintrc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@
2525
"no-use-before-define": "off",
2626
"@typescript-eslint/no-use-before-define": ["error"],
2727
"no-redeclare": "off",
28-
"@typescript-eslint/no-redeclare": ["error"]
28+
"@typescript-eslint/no-redeclare": ["error"],
29+
"no-restricted-imports": [
30+
"error",
31+
{
32+
"paths": [{ "name": "lodash", "message": "Please import from 'lodash/[module]' instead." }],
33+
"patterns": [
34+
{
35+
"group": ["lodash.*"],
36+
"message": "Please import from 'lodash/[module]' instead."
37+
}
38+
]
39+
}
40+
]
2941
}
3042
}

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
"@babel/preset-typescript": "^7.18.6",
1414
"@types/humps": "^2.0.2",
1515
"@types/jest": "^28.1.7",
16-
"@types/lodash.merge": "^4.6.7",
17-
"@types/lodash.mergewith": "^4.6.7",
16+
"@types/lodash": "^4.17.10",
1817
"@typescript-eslint/eslint-plugin": "^5.33.1",
1918
"@typescript-eslint/parser": "^5.33.1",
2019
"babel-jest": "^28.1.3",
21-
"eslint": "^7.2.0",
20+
"eslint": "^7.32.0",
2221
"eslint-config-prettier": "^6.1.0",
2322
"eslint-config-standard": "^14.0.0",
2423
"eslint-plugin-babel": "^5.3.0",
@@ -44,8 +43,7 @@
4443
},
4544
"dependencies": {
4645
"humps": "^2.0.1",
47-
"lodash.merge": "^4.6.1",
48-
"lodash.mergewith": "^4.6.2"
46+
"lodash": "^4.17.21"
4947
},
5048
"scripts": {
5149
"build": "rimraf dist && rollup -c",

src/utils/fetchAllRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import singleRequest from './singleRequest';
2-
import merge from 'lodash.merge';
2+
import merge from 'lodash/merge';
33
import { Configuration } from '../types';
44

55
const fetchAllRequest = async (

src/utils/mergeConfigurations.ts

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

44
import { Configuration, GlobalConfiguration, LocalConfiguration } from '../types';
55

src/utils/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import applyPlugins from './applyPlugins';
33
import mergeArraysOnProperty from './mergeArraysOnProperty';
44
import fetchAllRequest from './fetchAllRequest';
55
import createRequestUrl from './createRequestUrl';
6-
import merge from 'lodash.merge';
7-
import mergeWith from 'lodash.mergewith';
6+
import merge from 'lodash/merge';
7+
import mergeWith from 'lodash/mergeWith';
88
import { Configuration } from '../types';
99

1010
const request = async ({

0 commit comments

Comments
 (0)