Skip to content

Commit fbba806

Browse files
refactor: use lodash-es instead of lodash (CirclonGroup#839)
1 parent 23d755e commit fbba806

File tree

9 files changed

+16
-39
lines changed

9 files changed

+16
-39
lines changed

package-lock.json

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
],
7171
"dependencies": {
7272
"core-js": "^2.5.4",
73-
"lodash": "^4.17.11",
73+
"lodash-es": "^4.17.15",
7474
"mobx": "^4.15.1",
7575
"tslib": "^1.10.0"
7676
},
@@ -90,7 +90,6 @@
9090
"@angular/router": "^9.0.0",
9191
"@types/jasmine": "2.5.38",
9292
"@types/jasminewd2": "~2.0.3",
93-
"@types/lodash": "^4.14.62",
9493
"@types/node": "^12.11.7",
9594
"@types/rx": "2.5.34",
9695
"@types/webpack": "^1.12.29",

projects/angular-tree-component/ng-package.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,7 @@
66
"entryFile": "src/public-api.ts",
77
"umdModuleIds": {
88
"mobx": "mobx",
9-
"lodash/defaultsDeep": "lodash",
10-
"lodash/get": "lodash",
11-
"lodash/omit": "lodash",
12-
"lodash/isNumber": "lodash",
13-
"lodash/first": "lodash",
14-
"lodash/last": "lodash",
15-
"lodash/some": "lodash",
16-
"lodash/every": "lodash",
17-
"lodash/compact": "lodash",
18-
"lodash/find": "lodash",
19-
"lodash/isString": "lodash",
20-
"lodash/isFunction": "lodash",
21-
"lodash/throttle": "lodash",
22-
"lodash/includes": "lodash",
23-
"lodash/pick": "lodash"
9+
"lodash-es": "lodash-es"
2410
}
2511
}
2612
}

projects/angular-tree-component/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "9.0.0",
44
"peerDependencies": {
55
"core-js": "^2.5.4",
6-
"lodash": "^4.17.11",
6+
"lodash-es": "^4.17.15",
77
"mobx": "^4.15.1"
88
},
99
"dependencies": {
@@ -25,7 +25,6 @@
2525
"@angular/router": "^9.0.0",
2626
"@types/jasmine": "2.5.38",
2727
"@types/jasminewd2": "~2.0.3",
28-
"@types/lodash": "^4.14.62",
2928
"@types/node": "^12.11.7",
3029
"@types/rx": "2.5.34",
3130
"@types/webpack": "^1.12.29",

projects/angular-tree-component/src/lib/components/tree-viewport.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
} from '@angular/core';
1010
import { TreeVirtualScroll } from '../models/tree-virtual-scroll.model';
1111
import { TREE_EVENTS } from '../constants/events';
12-
import { Cancelable } from 'lodash';
13-
import throttle from 'lodash/throttle';
12+
import { throttle } from 'lodash-es';
1413

1514
@Component({
1615
selector: 'tree-viewport',

projects/angular-tree-component/src/lib/components/tree.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { TreeOptions } from '../models/tree-options.model';
55
import { ITreeOptions } from '../defs/api';
66
import { TreeViewportComponent } from './tree-viewport.component';
77

8-
import includes from 'lodash/includes';
9-
import pick from 'lodash/pick';
8+
import { includes, pick } from 'lodash-es';
109

1110
@Component({
1211
selector: 'Tree, tree-root',

projects/angular-tree-component/src/lib/models/tree-node.model.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import { TreeOptions } from './tree-options.model';
44
import { ITreeNode } from '../defs/api';
55
import { TREE_EVENTS } from '../constants/events';
66

7-
import first from 'lodash/first';
8-
import last from 'lodash/last';
9-
import some from 'lodash/some';
10-
import every from 'lodash/every';
7+
import { first, last, some, every } from 'lodash-es';
118

129
export class TreeNode implements ITreeNode {
1310
private handler: IReactionDisposer;

projects/angular-tree-component/src/lib/models/tree-options.model.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { TreeModel } from './tree.model';
33
import { KEYS } from '../constants/keys';
44
import { ITreeOptions } from '../defs/api';
55

6-
import defaultsDeep from 'lodash/defaultsDeep';
7-
import get from 'lodash/get';
8-
import omit from 'lodash/omit';
9-
import isNumber from 'lodash/isNumber';
6+
import { defaultsDeep, get, omit, isNumber } from 'lodash-es';
107

118
export interface IActionHandler {
129
(tree: TreeModel, node: TreeNode, $event: any, ...rest);

projects/angular-tree-component/src/lib/models/tree.model.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ import { TreeVirtualScroll } from './tree-virtual-scroll.model';
77
import { ITreeModel, IDType, IDTypeDictionary } from '../defs/api';
88
import { TREE_EVENTS } from '../constants/events';
99

10-
import first from 'lodash/first';
11-
import last from 'lodash/last';
12-
import compact from 'lodash/compact';
13-
import find from 'lodash/find';
14-
import isString from 'lodash/isString';
15-
import isFunction from 'lodash/isFunction';
10+
import { first, last, compact, find, isString, isFunction } from 'lodash-es';
1611

1712
@Injectable()
1813
export class TreeModel implements ITreeModel, OnDestroy {

0 commit comments

Comments
 (0)