-
-
Notifications
You must be signed in to change notification settings - Fork 598
Live Queries Support. #225
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
Conversation
src/CoreManager.js
Outdated
throw new Error('LiveQueryController must implement open()'); | ||
} | ||
if (typeof controller.close !== 'function') { | ||
throw new Error('LiveQueryController must implement disconnect()'); |
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.
Nit: change to LiveQueryController must implement close()
63b8ea3
to
7a49ca7
Compare
Updated per comments. |
This all looks good to me. I'll do one last pass, then merge into the 1.8 release branch, followed by merging that into master. If the rye tests I just landed all pass, I'll cut a second RC on |
src/ParseLiveQuery.js
Outdated
|
||
// If we can not find Parse.liveQueryServerURL, we try to extract it from Parse.serverURL | ||
if (!liveQueryServerURL) { | ||
let host = url.parse(CoreManager.get('SERVER_URL')).host; |
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 should really be a regex. There's no need to import the entire url
browserify module, it's too much overhead (I know we've discussed this at least once before :).
It seems like what we really want is something like:
let host = CoreManager.get('SERVER_URL').replace(/^https?:\/\//, '');
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.
Yeah I remember. I didn't write this part but I did miss it in the review so good catch. The url package wasn't even in package.json so this part was a miss overall.
Made the changes, everything is merged. You can fetch the latest version of 1.8.0 with |
cc: @wangmengyan95