Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
perf: Switched to lodash-es as a peerDependency.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Install lodash-es instead of lodash now. Previously lodash was installed with angular automatically.
  • Loading branch information
ffriedl89 committed May 12, 2020
1 parent c831b03 commit 37d626c
Show file tree
Hide file tree
Showing 65 changed files with 138 additions and 62 deletions.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ module.exports = {
},
],
],
moduleNameMapper: {
// map lodash-es to lodash bundle since jest needs commonjs
'^lodash-es$': 'node_modules/lodash/index.js',
},
};
3 changes: 2 additions & 1 deletion libs/barista-components/alert/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/autocomplete/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/bar-indicator/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/breadcrumbs/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/button-group/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/button/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/card/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
2 changes: 1 addition & 1 deletion libs/barista-components/chart/src/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
SeriesOptionsType,
setOptions,
} from 'highcharts';
import { merge as lodashMerge } from 'lodash';
import { merge as lodashMerge } from 'lodash-es';
import {
BehaviorSubject,
defer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
isDefined,
mixinColor,
} from '@dynatrace/barista-components/core';
import { clamp, round } from 'lodash';
import { clamp, round } from 'lodash-es';
import { Subject } from 'rxjs';
import { PlotBackgroundInfo } from '../utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Options as HighchartsOptions,
SeriesPieOptions,
} from 'highcharts';
import { merge as lodashMerge } from 'lodash';
import { merge as lodashMerge } from 'lodash-es';

import {
DtTheme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { ElementRef, NgZone, QueryList } from '@angular/core';
import { isEqual } from 'lodash';
import { isEqual } from 'lodash-es';
import {
Observable,
SchedulerLike,
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/chart/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/checkbox/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/consumption/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/context-dialog/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/copy-to-clipboard/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/core/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/drawer/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/empty-state/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/event-chart/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/expandable-panel/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/expandable-text/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/filter-field/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/formatters/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/highlight/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/icon/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/info-group/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/inline-editor/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/input/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/key-value-list/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/legend/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/menu/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
SeriesLineOptions,
SeriesLineDataOptions,
} from 'highcharts';
import { merge } from 'lodash';
import { merge } from 'lodash-es';
import { BehaviorSubject } from 'rxjs';
import {
DtMicroChart,
Expand Down
2 changes: 1 addition & 1 deletion libs/barista-components/micro-chart/src/micro-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
SeriesLineDataOptions,
SeriesLineOptions,
} from 'highcharts';
import { merge as lodashMerge } from 'lodash';
import { merge as lodashMerge } from 'lodash-es';
import { Observable, Subscription } from 'rxjs';
import { map } from 'rxjs/operators';
import { getDtMicrochartColorPalette } from './micro-chart-colors';
Expand Down
3 changes: 2 additions & 1 deletion libs/barista-components/micro-chart/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
Expand Down
Loading

0 comments on commit 37d626c

Please sign in to comment.