Skip to content

Commit f65f4f9

Browse files
danielsoglAkshat55
andauthored
fix: replace 'lodash' with 'lodash-es' to reduce bundle size (#2993)
Signed-off-by: Akshat Patel <[email protected]> Co-authored-by: Akshat Patel <[email protected]> Co-authored-by: Akshat Patel <[email protected]>
1 parent c1475d2 commit f65f4f9

File tree

7 files changed

+14
-25
lines changed

7 files changed

+14
-25
lines changed

package-lock.json

Lines changed: 7 additions & 8 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
@@ -121,7 +121,6 @@
121121
"karma-coverage-istanbul-reporter": "3.0.2",
122122
"karma-jasmine": "4.0.0",
123123
"karma-jasmine-html-reporter": "1.7.0",
124-
"lodash-es": "4.17.21",
125124
"ng-packagr": "14.2.2",
126125
"postcss": "8.4.14",
127126
"postcss-loader": "7.0.0",
@@ -145,7 +144,7 @@
145144
"@floating-ui/dom": "1.6.3",
146145
"@ibm/telemetry-js": "^1.5.0",
147146
"flatpickr": "4.6.13",
148-
"lodash": "4.17.21",
147+
"lodash-es": "4.17.21",
149148
"tslib": "2.3.0"
150149
}
151150
}

src/checkbox/checkbox-exported-tests.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { expect } from "chai";
2-
32
import merge from "lodash/merge";
4-
53
import ComponentTests from "../exported-tests/component-tests";
64

75
const defaults = {
@@ -35,7 +33,7 @@ class CheckboxExportedTests extends ComponentTests {
3533
afterClickState
3634
});
3735
}),
38-
runComparison: results => {
36+
runComparison: results => {
3937
// tslint:disable-next-line
4038
expect(results.initialState).to.be.false;
4139
// tslint:disable-next-line

src/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"@floating-ui/dom",
1212
"@ibm/telemetry-js",
1313
"flatpickr",
14-
"lodash"
14+
"lodash-es"
1515
]
1616
}

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@floating-ui/dom": "1.6.3",
2323
"@ibm/telemetry-js": "^1.5.0",
2424
"flatpickr": "4.6.13",
25-
"lodash": "4.17.21",
25+
"lodash-es": "4.17.21",
2626
"tslib": "2.3.0"
2727
}
2828
}

src/treeview/treeview.stories.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
/* tslint:disable variable-name */
22

33
import { CommonModule } from "@angular/common";
4-
import { moduleMetadata, Meta } from "@storybook/angular";
5-
import {
6-
TreeviewModule,
7-
TreeViewComponent,
8-
TreeNodeComponent
9-
} from "./";
10-
import cloneDeep from "lodash-es/cloneDeep";
4+
import { Meta, moduleMetadata } from "@storybook/angular";
115
import { IconModule } from "../icon";
12-
6+
import { TreeNodeComponent, TreeViewComponent, TreeviewModule } from "./";
137
import { IconTreeviewDemoComponent } from "./stories/app-treeview-icons.component";
148

159
export default {
@@ -186,7 +180,6 @@ const nodes = [
186180
}
187181
];
188182

189-
190183
const Template = (args) => ({
191184
props: args,
192185
template: `

src/ui-shell/sidenav/routerlink-extended.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Directive, Input, OnChanges, SimpleChanges } from "@angular/core";
22
import { NavigationExtras, RouterLinkWithHref } from "@angular/router";
3-
import { keys } from "lodash";
3+
import keys from "lodash/keys";
44

55
@Directive({
66
// tslint:disable-next-line

0 commit comments

Comments
 (0)