Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Commit d4ea609

Browse files
m.ivanov4m.ivanov4
m.ivanov4
authored and
m.ivanov4
committed
release 2.0
1 parent 793f356 commit d4ea609

File tree

5 files changed

+1249
-1238
lines changed

5 files changed

+1249
-1238
lines changed

.yarnrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Deprecating registry.yarnpkg.com
2+
# Issue: https://github.com/yarnpkg/yarn/issues/5891
3+
--registry "https://registry.npmjs.org/"
4+
--scripts-prepend-node-path true
5+
--ignore-engines true
6+

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# 2.0.0 2019-12-11
22

33
- Feature: Support TypeScript 3.7
4+
- Feature: Support NGXS 3.6
45

56
### BREAKING CHANGES
67

7-
- Support only NGXS 3.6+
8+
- Compatible only with NGXS 3.6+
89
- Now `patchState, setState` return `void`
910
- No longer support options in `NgxsDataPluginModule.forRoot()`
11+
- No longer support `@query` decorator

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const COUNT_TOKEN = new StateToken<CountModel>('count');
7474
})
7575
@Injectable()
7676
export class CountState extends NgxsDataRepository<CountModel> {
77-
@query<CountModel, number>((state) => state.val)
77+
@Select((state) => state.val)
7878
public values$: Observable<number>;
7979

8080
@action()
@@ -150,6 +150,5 @@ Benefits:
150150
### TODO
151151

152152
- [x] NgxsDataRepository<T>
153-
- [x] Query decorator
154153
- [ ] NgxsEntityRepository<T>
155154
- [ ] State persistence (Local, Cookie, IndexDB)

src/lib/decorators/query/query.ts

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import { Immutable } from '../../interfaces/external.interface';
55
import { NgxsDataRepository } from '../../impl/ngxs-data.repository';
66
import { Any } from '../../interfaces/internal.interface';
77

8+
/**
9+
* deprecated since 2.0, use @Selector decorator from '@ngxs/store'
10+
* @param selector
11+
*/
812
export function query<T, R = T>(selector: (val: Immutable<T>) => Immutable<R>) {
913
return <U extends NgxsDataRepository<Any> & Record<K, Observable<R>>, K extends string>(
1014
target: U,

0 commit comments

Comments
 (0)