Skip to content

Commit

Permalink
fix: making SELECTOR_META global for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Jun 1, 2020
1 parent cd0d22e commit 0ff6ed9
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
build:
docker:
- image: satantime/puppeteer-node:12.16-buster
- image: satantime/puppeteer-node:12-buster
steps:
- checkout
- restore_cache:
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "rm -Rf tmp && rm -Rf dist && tsc",
"i:a": "npm run i:a6 && npm run i:a7 && npm run i:a8 && npm run i:a9",
"i:a6": "cd e2e/angular6 && npm install && npm run postinstall",
"i:a7": "cd e2e/angular7 && npm install && npm run postinstall",
"i:a8": "cd e2e/angular8 && npm install && npm run postinstall",
"i:a9": "cd e2e/angular9 && npm install && npm run postinstall",
"s:a": "npm run s:a6 && npm run s:a7 && npm run s:a8 && npm run s:a9",
"s:a6": "P=e2e/angular6/node_modules/ngrx-entity-relationship && rm -Rf $P && mkdir -p $P && cp -R dist $P && cp package.json $P",
"s:a7": "P=e2e/angular7/node_modules/ngrx-entity-relationship && rm -Rf $P && mkdir -p $P && cp -R dist $P && cp package.json $P",
Expand All @@ -19,21 +24,16 @@
"s:test:a7": "P=e2e/angular7/src/test && rm -Rf $P && mkdir -p $P && cp -R test $P",
"s:test:a8": "P=e2e/angular8/src/test && rm -Rf $P && mkdir -p $P && cp -R test $P",
"s:test:a9": "P=e2e/angular9/src/test && rm -Rf $P && mkdir -p $P && cp -R test $P",
"i:a6": "cd e2e/angular6 && npm install && npm run postinstall",
"i:a7": "cd e2e/angular7 && npm install && npm run postinstall",
"i:a8": "cd e2e/angular8 && npm install && npm run postinstall",
"i:a9": "cd e2e/angular9 && npm install && npm run postinstall",
"i:a": "npm run i:a6 && npm run i:a7 && npm run i:a8 && npm run i:a9",
"b:a": "npm run b:a6 && npm run b:a7 && npm run b:a8 && npm run b:a9",
"b:a6": "cd e2e/angular6 && npm run build -- --prod --progress=false && rm -Rf dist",
"b:a7": "cd e2e/angular7 && npm run build -- --prod --progress=false && rm -Rf dist",
"b:a8": "cd e2e/angular8 && npm run build -- --prod --progress=false && rm -Rf dist",
"b:a9": "cd e2e/angular9 && npm run build -- --prod --progress=false && rm -Rf dist",
"b:a": "npm run b:a6 && npm run b:a7 && npm run b:a8 && npm run b:a9",
"e2e:a": "npm run e2e:a6 && npm run e2e:a7 && npm run e2e:a8 && npm run e2e:a9",
"e2e:a6": "cd e2e/angular6 && npm run e2e",
"e2e:a7": "cd e2e/angular7 && npm run e2e",
"e2e:a8": "cd e2e/angular8 && npm run e2e",
"e2e:a9": "cd e2e/angular9 && npm run e2e",
"e2e:a": "npm run e2e:a6 && npm run e2e:a7 && npm run e2e:a8 && npm run e2e:a9",
"e2e": "npm run build && npm run i:a && npm run s:a && npm run s:test && npm run test:a && npm run e2e:a",
"lint": "tsc -p ./tsconfig.json --noEmit && tsc -p ./tsconfig.spec.json --noEmit && tslint --config ./tslint.yaml -p ./tsconfig.json",
"release": "export $(cat .env) && semantic-release",
Expand Down Expand Up @@ -64,7 +64,7 @@
"angular8",
"angular9"
],
"author": "Michael Gusev <m@sudo.eu>",
"author": "MG. <m@sudo.eu>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/satanTime/ngrx-entity-relationship/issues"
Expand Down
1 change: 0 additions & 1 deletion src/childEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ID_SELECTOR,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
UNKNOWN,
VALUES_FILTER_PROPS,
} from './types';
Expand Down
9 changes: 1 addition & 8 deletions src/childEntitySelector.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import {childEntity} from './childEntity';
import {
FEATURE_SELECTOR,
HANDLER_RELATED_ENTITY,
ID_FILTER_PROPS,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
} from './types';
import {FEATURE_SELECTOR, HANDLER_RELATED_ENTITY, ID_FILTER_PROPS, ID_TYPES, isSelectorMeta} from './types';

export function childEntitySelector<
STORE,
Expand Down
1 change: 0 additions & 1 deletion src/childrenEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ID_SELECTOR,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
UNKNOWN,
VALUES_FILTER_PROPS,
} from './types';
Expand Down
9 changes: 1 addition & 8 deletions src/childrenEntitiesSelector.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import {childrenEntities} from './childrenEntities';
import {
FEATURE_SELECTOR,
HANDLER_RELATED_ENTITY,
ID_FILTER_PROPS,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
} from './types';
import {FEATURE_SELECTOR, HANDLER_RELATED_ENTITY, ID_FILTER_PROPS, ID_TYPES, isSelectorMeta} from './types';

export function childrenEntitiesSelector<
STORE,
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export {
HANDLER_ROOT_ENTITY,
ID_SELECTOR,
ID_TYPES,
SELECTOR_META,
STORE_INSTANCE,
STORE_SELECTOR,
TRANSFORMER,
Expand Down
1 change: 0 additions & 1 deletion src/relatedEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
ID_FILTER_PROPS,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
UNKNOWN,
VALUES_FILTER_PROPS,
} from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/relatedEntitySelector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {relatedEntity} from './relatedEntity';
import {FEATURE_SELECTOR, HANDLER_RELATED_ENTITY, ID_TYPES, isSelectorMeta, SELECTOR_META} from './types';
import {FEATURE_SELECTOR, HANDLER_RELATED_ENTITY, ID_TYPES, isSelectorMeta} from './types';

export function relatedEntitySelector<
STORE,
Expand Down
1 change: 0 additions & 1 deletion src/rootEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
ID_TYPES,
isBuiltInSelector,
isSelectorMeta,
SELECTOR_META,
TRANSFORMER,
UNKNOWN,
} from './types';
Expand Down
1 change: 0 additions & 1 deletion src/rootEntitySelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
HANDLER_ROOT_ENTITY,
ID_TYPES,
isSelectorMeta,
SELECTOR_META,
TRANSFORMER,
} from './types';

Expand Down
12 changes: 7 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import {Observable} from 'rxjs';

declare global {
// tslint:disable-next-line:class-name
export interface SELECTOR_META {
flatKey?: string;
}
}

export type UNKNOWN = any;

export type STORE_SELECTOR<T, V> = (state: T) => V;
Expand All @@ -14,11 +21,6 @@ export type ACTION = {
type: string;
};

// tslint:disable-next-line:class-name
export interface SELECTOR_META {
flatKey?: string;
}

export type FILTER_PROPS<Base, Condition> = {
[Key in keyof Base]: Base[Key] extends Condition ? Key : never;
}[keyof Base];
Expand Down

0 comments on commit 0ff6ed9

Please sign in to comment.