Skip to content

Commit 4160e3d

Browse files
Merge pull request #19 from hypertrace/update-lodash
feat: switch to tree shakeable lodash-es
2 parents eef55af + ede9668 commit 4160e3d

File tree

10 files changed

+37
-14
lines changed

10 files changed

+37
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hyperdash Angular
22

3-
[![CircleCI](https://circleci.com/gh/hypertrace/hyperdash-angular.svg?style=svg)](https://circleci.com/gh/hypertrace/hyperdash-angular)
3+
[![CircleCI](https://circleci.com/gh/hypertrace/hyperdash-angular.svg?style=shield)](https://circleci.com/gh/hypertrace/hyperdash-angular)
44
[![codecov](https://codecov.io/gh/hypertrace/hyperdash-angular/branch/master/graph/badge.svg)](https://codecov.io/gh/hypertrace/hyperdash-angular)
55

66
## Prerequisites

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = {
2222
modulePathIgnorePatterns: ['<rootDir>/projects'],
2323
watchPathIgnorePatterns: ['test-results'],
2424
moduleNameMapper: {
25+
'^lodash-es$': 'lodash',
2526
'^@hypertrace/hyperdash-angular$': '<rootDir>/projects/hyperdash-angular/src/public_api.ts'
2627
}
2728
};

package-lock.json

+20-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"@angular/platform-browser": "^10.0.4",
2626
"@angular/platform-browser-dynamic": "^10.0.4",
2727
"@angular/router": "^10.0.4",
28-
"@hypertrace/hyperdash": "^1.0.0",
28+
"@hypertrace/hyperdash": "^1.1.2",
2929
"core-js": "^3.6.5",
30-
"lodash": "^4.17.15",
30+
"lodash-es": "^4.17.15",
3131
"rxjs": "^6.6.0",
3232
"tslib": "^2.0.0",
3333
"zone.js": "~0.10.3"
@@ -44,7 +44,7 @@
4444
"@compodoc/compodoc": "^1.1.11",
4545
"@ngneat/spectator": "^5.11.0",
4646
"@types/jest": "^25.0.0",
47-
"@types/lodash": "4.14.155",
47+
"@types/lodash-es": "^4.17.3",
4848
"@types/node": "^14.0.13",
4949
"@types/webpack-env": "^1.15.2",
5050
"codelyzer": "^6.0.0",
@@ -55,6 +55,7 @@
5555
"jest-config": "^25.5.0",
5656
"jest-html-reporter": "^3.1.3",
5757
"jest-junit": "^10.0.0",
58+
"lodash": "^4.17.15",
5859
"ng-packagr": "^10.0.0",
5960
"prettier": "^2.0.5",
6061
"pretty-quick": "^2.0.1",

projects/hyperdash-angular/jest.config.debug.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
22
rootDir: '../..',
33
modulePathIgnorePatterns: ['BOGUS'], // Need to reset from app project, but empty is merged
4+
moduleNameMapper: {
5+
'^lodash-es$': 'lodash'
6+
},
47
preset: 'jest-preset-angular',
58
setupFilesAfterEnv: ['<rootDir>/node_modules/@angular-builders/jest/dist/jest-config/setup.js'],
69
testMatch: ['<rootDir>/projects/hyperdash-angular/**/+(*.)+(spec|test).+(ts|js)?(x)'],

projects/hyperdash-angular/jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = {
2222
}
2323
]
2424
],
25+
moduleNameMapper: {
26+
'^lodash-es$': 'lodash'
27+
},
2528
modulePathIgnorePatterns: ['BOGUS'], // Need to reset from app project, but empty is merged
2629
watchPathIgnorePatterns: ['test-results']
2730
};

projects/hyperdash-angular/ng-package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"entryFile": "src/public_api.ts",
66
"umdModuleIds": {
77
"@hypertrace/hyperdash": "hyperdash",
8-
"lodash": "_"
8+
"lodash-es": "_"
99
}
1010
}
1111
}

projects/hyperdash-angular/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"core-js": "^3.6.5",
2121
"rxjs": "^6.6.0",
2222
"zone.js": "^0.10.0",
23-
"@hypertrace/hyperdash": "^1.0.0",
24-
"lodash": "^4.17.15"
23+
"lodash-es": "^4.17.15",
24+
"@hypertrace/hyperdash": "^1.1.2"
2525
},
2626
"dependencies": {
2727
"tslib": "^2.0.0"

projects/hyperdash-angular/src/configuration/default-configuration.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Inject, Injectable, Injector, Type } from '@angular/core';
22
import { ModelPropertyTypeRegistrationInformation } from '@hypertrace/hyperdash';
3-
import { flatten, uniq } from 'lodash';
3+
import { flatten, uniq } from 'lodash-es';
44
import { DefaultModelApiBuilderService } from '../injectable-wrappers/default-model-api-builder.service';
55
import { ArrayDeserializerService } from '../injectable-wrappers/deserialization/array-deserializer.service';
66
import { DeserializationManagerService } from '../injectable-wrappers/deserialization/deserialization-manager.service';

src/example-dash/example-dash.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
RendererApi,
2323
RENDERER_API
2424
} from '@hypertrace/hyperdash-angular';
25-
import { remove } from 'lodash';
25+
import { remove } from 'lodash-es';
2626
import { EMPTY, interval, Observable, of } from 'rxjs';
2727
// tslint:disable-next-line:no-submodule-imports
2828
import { catchError, map, take } from 'rxjs/operators';

0 commit comments

Comments
 (0)