-
Notifications
You must be signed in to change notification settings - Fork 932
WIP: RxFire #933
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
WIP: RxFire #933
Conversation
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.
Build Feedback
.gitignore
could use some more comments explaining some of the rationale behind the.d.ts
ignores- Delete
.npmignore
in favor of apkg.files
in thepackage.json
- Why does
packages/rxfire/index.ts
exist? - Why does
packages/rxfire/test/index.ts
exist? - Set
pkg.private
in thepackage.json
totrue
for now
Code Feedback
- As a matter of convention should we prepending all of our streams w/
$
? - We are using
indexOf
asArray.prototype.includes
can we not do that (we have varying comparisons throughout the codebase for this)?
packages/rxfire/auth/package.json
Outdated
@@ -0,0 +1,5 @@ | |||
{ | |||
"name": "rxfire-auth", |
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.
Call this rxfire/auth
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.
fixed
packages/rxfire/package.json
Outdated
@@ -0,0 +1,69 @@ | |||
{ | |||
"name": "rxfire", | |||
"version": "0.0.2", |
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.
Just call this 0.0.0
for now
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.
fixed
packages/rxfire/rollup.config.js
Outdated
/** | ||
* Complete Package Builds | ||
*/ | ||
const completeBuilds = [ |
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.
Delete this, it's not needed.
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.
fixed
packages/rxfire/rollup.config.js
Outdated
*/ | ||
const GLOBAL_NAME = 'rxfire'; | ||
|
||
const coreBuild = [ |
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.
Delete this, not relevant.
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.
fixed
packages/rxfire/rollup.config.js
Outdated
import storagePkg from './storage/package.json'; | ||
import functionsPkg from './functions/package.json'; | ||
|
||
const pkgsByName = { |
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.
Looks like you aren't compiling everything here.
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.
fixed
* @param change | ||
*/ | ||
function combineChange<T>( | ||
combined: firestore.DocumentChange[], |
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.
Let's be more descriptive of what this actually is in this name (i.e. the full array of changes and a single change to process)
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.
fixed.
* @param combined | ||
* @param change | ||
*/ | ||
function combineChange<T>( |
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.
This function name isn't indicative of what is actually being done here, let's think of a new name?
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.
fixed.
} | ||
|
||
/** | ||
* Return a stream of document changes on a query. These results are in sort order. |
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.
This comment is inaccurate, we return a stream of DocumentSnapshots
not changes.
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.
fixed.
|
||
/** | ||
* Create a stream of changes as they occur it time. This method is similar | ||
* to stateChanges() but it collects each event in an array over time. |
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.
stateChanges
doesn't exist?
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.
it's now docChanges()
export function putString( | ||
ref: storage.Reference, | ||
data: string, | ||
format?: storage.StringFormat, |
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.
This isn't used in the body? Perhaps you meant ref.putString
?
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.
fixed
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
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.
Couple more comments on the root package.json
.
Rest is looking good.
packages/rxfire/package.json
Outdated
"./firestore", | ||
"./functions", | ||
"./storage", | ||
"./package.json", |
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.
Not needed, the root package.json is included by default.
packages/rxfire/package.json
Outdated
@@ -67,6 +68,18 @@ | |||
}, | |||
"typings": "dist/index.d.ts", | |||
"files": [ | |||
|
|||
"./auth", |
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.
Looks like for all of these dirs you need two things:
- The
package.json
- The
dist
dir.
Can we not include source here and instead just do that?
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.
Guess I wasn't fully clear, including the entire directory for auth, firestore, functions, and storage, is not necessary. Let's only include the package.json
and the dist
dir, inside each of those directories.
Discussion
RxJS + Firebase = 🔥🔥🔥
WIP. Will provide a deep description soon.