Skip to content

Commit 2982b72

Browse files
Jon Ristajrista
authored andcommitted
refactor: de-duplication of operators
refactor: de-duplication of utils refactor: de-duplication of actions feat: integration of casing code package: remove dependency on changeCase, bump to v0.2.2 NAE-80
1 parent aad79af commit 2982b72

File tree

17 files changed

+936
-1091
lines changed

17 files changed

+936
-1091
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
<a name="0.2.2"></a>
2+
3+
# [0.2.2](https://github.com/briebug/ngrx-auto-entity/compare/0.2.1...0.2.1) Beta (2019-08-07)
4+
5+
This release focuses on reducing the intrinsic package size and total package+dependency size of
6+
the library. Total library size is now ~10k or so smaller than before. Third party dependency on
7+
changeCase, which included a lot of casing functionality this library did not directly require, has
8+
been removed in favor of integrated case conversion code. Further size optimizations may be made
9+
possible in the future with some additional internal restructuring.
10+
11+
For the most compatibility with future internal (but otherwise non-breaking) changes, make sure
12+
you are importing from @briebug/ngrx-auto-entity and not from child paths within the library!
13+
14+
### Package
15+
16+
- **dependencies:** Remove direct dependency on changeCase, integrate functionality
17+
18+
### Features
19+
20+
- **utils:** Added a new `buildSelectorMap` utility function
21+
- **utils:** Added a new `buildFacade` utility function
22+
23+
### Cleanup
24+
25+
- **operators:** Reduce duplication of code by pulling out error handling to function
26+
- **utils:** Reduce duplication of code by pulling out selector map creation to function
27+
- **actions:** Reduce duplication of code by moving common lines to EntityAction base type
28+
- **actions:** Reduce duplication of code by moving entity action type checking into function
29+
130
<a name="0.2.1"></a>
231

332
# [0.2.1](https://github.com/briebug/ngrx-auto-entity/compare/0.2.0...0.2.1) Beta (2019-07-28)

jest.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module.exports = {
1414
testMatch: ['**/+(*.)+(spec|test).+(ts)?(x)'],
1515
testPathIgnorePatterns: [
1616
'/node_modules/',
17-
'dist'
17+
'<rootDir>/dist',
18+
'<rootDir>/src'
1819
],
1920
coverageReporters: ['html', 'text'],
2021
collectCoverageFrom: [
@@ -29,12 +30,6 @@ module.exports = {
2930
'!<rootDir>/setup-jest.ts',
3031
'!<rootDir>/jestGlobalMocks.ts'
3132
],
32-
moduleNameMapper: {
33-
'^ngrx-auto-entity/(.*)': '<rootDir>/projects/ngrx-auto-entity/$1',
34-
'^state/(.*)': '<rootDir>/src/app/state/$1',
35-
'^core/(.*)': '<rootDir>/src/app/core/$1',
36-
'^models/(.*)': '<rootDir>/src/app/models/$1'
37-
},
3833
modulePathIgnorePatterns: ['<rootDir>/dist'],
3934
transformIgnorePatterns: ['node_modules/(?!@ngrx)']
4035
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"serve": "ng serve --source-map --vendorSourceMap",
88
"serve-proxy": "ng serve --source-map --vendorSourceMap --proxy-config proxy.conf.json",
99
"build": "ng build --prod",
10+
"build:watch": "ng build --prod --watch",
1011
"build:app": "ng build ngrx-auto-entity-app --prod",
1112
"build:app:watch": "ng build ngrx-auto-entity-app --prod --watch",
1213
"build:lib": "ng build ngrx-auto-entity --prod",
@@ -41,7 +42,6 @@
4142
"@ngrx/effects": "^8.0.0",
4243
"@ngrx/router-store": "^8.0.0",
4344
"@ngrx/store": "^8.0.0",
44-
"change-case": "^3.1.0",
4545
"core-js": "^2.5.7",
4646
"reflect-metadata": "^0.1.13",
4747
"rxjs": "6.5.2",

projects/ngrx-auto-entity/ng-package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../dist/ngrx-auto-entity",
44
"deleteDestPath": false,
5-
"whitelistedNonPeerDependencies": ["change-case"],
65
"lib": {
76
"entryFile": "src/public_api.ts"
87
}

projects/ngrx-auto-entity/ng-package.prod.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../dist/ngrx-auto-entity",
4-
"whitelistedNonPeerDependencies": ["change-case"],
54
"lib": {
65
"entryFile": "src/public_api.ts"
76
}

projects/ngrx-auto-entity/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.2.1",
2+
"version": "0.2.2",
33
"name": "@briebug/ngrx-auto-entity",
44
"description": "Automatic Entity State and Facades for NgRx. Simplifying reactive state!",
55
"keywords": [
@@ -19,9 +19,6 @@
1919
"type": "git",
2020
"url": "https://github.com/briebug/ngrx-auto-entity.git"
2121
},
22-
"dependencies": {
23-
"change-case": "^3.0.2"
24-
},
2522
"peerDependencies": {
2623
"@angular/common": "^8.x",
2724
"@angular/core": "^8.x",

0 commit comments

Comments
 (0)