diff --git a/README.md b/README.md index d54de760..5d536ceb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hyperdash Angular -[![CircleCI](https://circleci.com/gh/hypertrace/hyperdash-angular.svg?style=svg)](https://circleci.com/gh/hypertrace/hyperdash-angular) +[![CircleCI](https://circleci.com/gh/hypertrace/hyperdash-angular.svg?style=shield)](https://circleci.com/gh/hypertrace/hyperdash-angular) [![codecov](https://codecov.io/gh/hypertrace/hyperdash-angular/branch/master/graph/badge.svg)](https://codecov.io/gh/hypertrace/hyperdash-angular) ## Prerequisites diff --git a/jest.config.js b/jest.config.js index b12fce96..036392fb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -22,6 +22,7 @@ module.exports = { modulePathIgnorePatterns: ['/projects'], watchPathIgnorePatterns: ['test-results'], moduleNameMapper: { + '^lodash-es$': 'lodash', '^@hypertrace/hyperdash-angular$': '/projects/hyperdash-angular/src/public_api.ts' } }; diff --git a/package-lock.json b/package-lock.json index e7ca3fa6..4ec31b73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2657,11 +2657,11 @@ } }, "@hypertrace/hyperdash": { - "version": "1.0.0", - "resolved": "https://dl.bintray.com//hypertrace/npm/@hypertrace/hyperdash/-/@hypertrace/hyperdash-1.0.0.tgz", - "integrity": "sha1-J/4tFl7sbP61LE0hMya2i2jORek=", + "version": "1.1.2", + "resolved": "https://dl.bintray.com//hypertrace/npm/@hypertrace/hyperdash/-/@hypertrace/hyperdash-1.1.2.tgz", + "integrity": "sha1-yNCQeIhI1oCHWzQ9kj5Ap4wA4VY=", "requires": { - "lodash": "^4.17.15" + "lodash-es": "^4.17.15" } }, "@istanbuljs/load-nyc-config": { @@ -4067,6 +4067,15 @@ "integrity": "sha512-vEcX7S7aPhsBCivxMwAANQburHBtfN9RdyXFk84IJmu2Z4Hkg1tOFgaslRiEqqvoLtbCBi6ika1EMspE+NZ9Lg==", "dev": true }, + "@types/lodash-es": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.3.tgz", + "integrity": "sha512-iHI0i7ZAL1qepz1Y7f3EKg/zUMDwDfTzitx+AlHhJJvXwenP682ZyGbgPSc5Ej3eEAKVbNWKFuwOadCj5vBbYQ==", + "dev": true, + "requires": { + "@types/lodash": "*" + } + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -13174,7 +13183,13 @@ "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash-es": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", + "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" }, "lodash._reinterpolate": { "version": "3.0.0", diff --git a/package.json b/package.json index 9ccdbbee..c374f535 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ "@angular/platform-browser": "^10.0.4", "@angular/platform-browser-dynamic": "^10.0.4", "@angular/router": "^10.0.4", - "@hypertrace/hyperdash": "^1.0.0", + "@hypertrace/hyperdash": "^1.1.2", "core-js": "^3.6.5", - "lodash": "^4.17.15", + "lodash-es": "^4.17.15", "rxjs": "^6.6.0", "tslib": "^2.0.0", "zone.js": "~0.10.3" @@ -44,7 +44,7 @@ "@compodoc/compodoc": "^1.1.11", "@ngneat/spectator": "^5.11.0", "@types/jest": "^25.0.0", - "@types/lodash": "4.14.155", + "@types/lodash-es": "^4.17.3", "@types/node": "^14.0.13", "@types/webpack-env": "^1.15.2", "codelyzer": "^6.0.0", @@ -55,6 +55,7 @@ "jest-config": "^25.5.0", "jest-html-reporter": "^3.1.3", "jest-junit": "^10.0.0", + "lodash": "^4.17.15", "ng-packagr": "^10.0.0", "prettier": "^2.0.5", "pretty-quick": "^2.0.1", diff --git a/projects/hyperdash-angular/jest.config.debug.js b/projects/hyperdash-angular/jest.config.debug.js index ba85ba33..a59f4691 100644 --- a/projects/hyperdash-angular/jest.config.debug.js +++ b/projects/hyperdash-angular/jest.config.debug.js @@ -1,6 +1,9 @@ module.exports = { rootDir: '../..', modulePathIgnorePatterns: ['BOGUS'], // Need to reset from app project, but empty is merged + moduleNameMapper: { + '^lodash-es$': 'lodash' + }, preset: 'jest-preset-angular', setupFilesAfterEnv: ['/node_modules/@angular-builders/jest/dist/jest-config/setup.js'], testMatch: ['/projects/hyperdash-angular/**/+(*.)+(spec|test).+(ts|js)?(x)'], diff --git a/projects/hyperdash-angular/jest.config.js b/projects/hyperdash-angular/jest.config.js index ccb451f5..3aa0f191 100644 --- a/projects/hyperdash-angular/jest.config.js +++ b/projects/hyperdash-angular/jest.config.js @@ -22,6 +22,9 @@ module.exports = { } ] ], + moduleNameMapper: { + '^lodash-es$': 'lodash' + }, modulePathIgnorePatterns: ['BOGUS'], // Need to reset from app project, but empty is merged watchPathIgnorePatterns: ['test-results'] }; diff --git a/projects/hyperdash-angular/ng-package.json b/projects/hyperdash-angular/ng-package.json index ef0dd9ba..d2653aae 100644 --- a/projects/hyperdash-angular/ng-package.json +++ b/projects/hyperdash-angular/ng-package.json @@ -5,7 +5,7 @@ "entryFile": "src/public_api.ts", "umdModuleIds": { "@hypertrace/hyperdash": "hyperdash", - "lodash": "_" + "lodash-es": "_" } } } diff --git a/projects/hyperdash-angular/package.json b/projects/hyperdash-angular/package.json index 120454bf..3fac67fc 100644 --- a/projects/hyperdash-angular/package.json +++ b/projects/hyperdash-angular/package.json @@ -20,8 +20,8 @@ "core-js": "^3.6.5", "rxjs": "^6.6.0", "zone.js": "^0.10.0", - "@hypertrace/hyperdash": "^1.0.0", - "lodash": "^4.17.15" + "lodash-es": "^4.17.15", + "@hypertrace/hyperdash": "^1.1.2" }, "dependencies": { "tslib": "^2.0.0" diff --git a/projects/hyperdash-angular/src/configuration/default-configuration.service.ts b/projects/hyperdash-angular/src/configuration/default-configuration.service.ts index 478d9e55..bd0a475a 100644 --- a/projects/hyperdash-angular/src/configuration/default-configuration.service.ts +++ b/projects/hyperdash-angular/src/configuration/default-configuration.service.ts @@ -1,6 +1,6 @@ import { Inject, Injectable, Injector, Type } from '@angular/core'; import { ModelPropertyTypeRegistrationInformation } from '@hypertrace/hyperdash'; -import { flatten, uniq } from 'lodash'; +import { flatten, uniq } from 'lodash-es'; import { DefaultModelApiBuilderService } from '../injectable-wrappers/default-model-api-builder.service'; import { ArrayDeserializerService } from '../injectable-wrappers/deserialization/array-deserializer.service'; import { DeserializationManagerService } from '../injectable-wrappers/deserialization/deserialization-manager.service'; diff --git a/src/example-dash/example-dash.component.ts b/src/example-dash/example-dash.component.ts index 6274ad3d..299febca 100644 --- a/src/example-dash/example-dash.component.ts +++ b/src/example-dash/example-dash.component.ts @@ -22,7 +22,7 @@ import { RendererApi, RENDERER_API } from '@hypertrace/hyperdash-angular'; -import { remove } from 'lodash'; +import { remove } from 'lodash-es'; import { EMPTY, interval, Observable, of } from 'rxjs'; // tslint:disable-next-line:no-submodule-imports import { catchError, map, take } from 'rxjs/operators';