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

Conversation

disharmonized
Copy link
Contributor

@disharmonized disharmonized commented Jul 14, 2017

Added an optional callback function that can be used to notify user if there are any binary updates.

Richard Hua and others added 7 commits November 7, 2016 17:55
Fix issue #530.
Every so often you run the command react-native link an exception is thrown because the \n in regex does not lead to the line.
* Upgrade example app to react-native@0.37.0
* Fix crash on restart caused by loadBundle() being called twice
@msftclas
Copy link

@disharmonized,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.

It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

…e-code-push into add-version-mismatch

# Conflicts:
#	CodePush.js
#	README.md
CodePush.js Outdated
@@ -237,7 +240,7 @@ const sync = (() => {
let syncInProgress = false;
const setSyncCompleted = () => { syncInProgress = false; };

return (options = {}, syncStatusChangeCallback, downloadProgressCallback) => {
return (options = {}, syncStatusChangeCallback, downloadProgressCallback, handleBinaryVersionMismatch) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this 4th parameter is callback may be it make sense to add callback postfix to this to avoid confusion (on first sight looks like boolean variable for me, not a function)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

CodePush.js Outdated
@@ -76,6 +76,9 @@ async function checkForUpdate(deploymentKey = null) {
(!localPackage || localPackage._isDebugOnly) && config.packageHash === update.packageHash) {
if (update && update.updateAppVersion) {
log("An update is available but it is not targeting the binary version of your app.");
if(handleBinaryVersionMismatch && typeof handleBinaryVersionMismatch === "function") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably space is missing between if and brackets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

@msftclas
Copy link

@disharmonized, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, Microsoft Pull Request Bot

@max-mironov
Copy link
Contributor

LGTM. @sergey-akhalkov - if you could also have a look at this and don't have any concerns I'm ok with merging this.

Copy link

@akki-ng akki-ng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine. Thanks for updating README and Typings.

@sergey-akhalkov sergey-akhalkov merged commit 85e094f into microsoft:master Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants