Skip to content

Commit

Permalink
Merge pull request #360 from teamleadercrm/GUILD-903-replace-lodash-p…
Browse files Browse the repository at this point in the history
…er-method-packages

[GUILD-903] Replace lodash per-method packages
  • Loading branch information
jelledc authored Oct 14, 2024
2 parents 9e9f652 + 4fbc75c commit 443db64
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 184 deletions.
14 changes: 13 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"]
"@typescript-eslint/no-redeclare": ["error"],
"no-restricted-imports": [
"error",
{
"paths": [{ "name": "lodash", "message": "Please import from 'lodash/[module]' instead." }],
"patterns": [
{
"group": ["lodash.*"],
"message": "Please import from 'lodash/[module]' instead."
}
]
}
]
}
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
"@babel/preset-typescript": "^7.18.6",
"@types/humps": "^2.0.2",
"@types/jest": "^28.1.7",
"@types/lodash.merge": "^4.6.7",
"@types/lodash.mergewith": "^4.6.7",
"@types/lodash": "^4.17.10",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"babel-jest": "^28.1.3",
"eslint": "^7.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^6.1.0",
"eslint-config-standard": "^14.0.0",
"eslint-plugin-babel": "^5.3.0",
Expand All @@ -44,8 +43,7 @@
},
"dependencies": {
"humps": "^2.0.1",
"lodash.merge": "^4.6.1",
"lodash.mergewith": "^4.6.2"
"lodash": "^4.17.21"
},
"scripts": {
"build": "rimraf dist && rollup -c",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fetchAllRequest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import singleRequest from './singleRequest';
import merge from 'lodash.merge';
import merge from 'lodash/merge';
import { Configuration } from '../types';

const fetchAllRequest = async (
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mergeConfigurations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mergePlugins from './mergePlugins';
import merge from 'lodash.merge';
import merge from 'lodash/merge';

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

Expand Down
4 changes: 2 additions & 2 deletions src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import applyPlugins from './applyPlugins';
import mergeArraysOnProperty from './mergeArraysOnProperty';
import fetchAllRequest from './fetchAllRequest';
import createRequestUrl from './createRequestUrl';
import merge from 'lodash.merge';
import mergeWith from 'lodash.mergewith';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import { Configuration } from '../types';

const request = async ({
Expand Down
Loading

0 comments on commit 443db64

Please sign in to comment.