-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use typeorm for accounts fetching #164
Conversation
Now this PR also addresses #157 |
8e7ef33
to
70b7934
Compare
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
+ Coverage 47.8% 48.32% +0.52%
==========================================
Files 121 120 -1
Lines 1910 1916 +6
Branches 231 230 -1
==========================================
+ Hits 913 926 +13
+ Misses 997 990 -7
Continue to review full report at Codecov.
|
3c4def2
to
bc4b513
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 35 of 35 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @charlie-wasp)
tsconfig.json, line 21 at r1 (raw file):
"strictNullChecks": true, "strictFunctionTypes": true, "strictPropertyInitialization": false,
I think you can selectively opt-out from property initialization check:
"strict": true,
"strictPropertyInitialization": false
Btw, why do we want to skip this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nebolsin)
tsconfig.json, line 21 at r1 (raw file):
Previously, nebolsin (Sergey Nebolsin) wrote…
I think you can selectively opt-out from property initialization check:
"strict": true, "strictPropertyInitialization": false
Btw, why do we want to skip this check?
We want it because typeorm entities declaration uses properties without initialization, so project can't be compiled with this option enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
tsconfig.json, line 21 at r1 (raw file):
Previously, charlie-wasp (Timur Ramazanov) wrote…
We want it because typeorm entities declaration uses properties without initialization, so project can't be compiled with this option enabled
Ok, although I think it could also be mitigated by defining TypeORM properties as <type> | undefined
, which might be a better option. I’m fine with disabling the check for now, so it’s up to you.
68decc0
to
a33f247
Compare
a33f247
to
e3b7769
Compare
Big time! This PR makes use of the typeorm to simplify database related stuff. As a POC I used it only for accounts for now.
So far it seems that it can help us to reduce number of types (we won't need separate interface for table rows) and to retire
fromDb
method from factories. Also we won't needsqueal
package for building queriesThis change is