Skip to content

Expose ignoreFailedUpdates sync option in typings #28

@wijskinner

Description

@wijskinner

Hi! 👋

Firstly, thanks for your work on this project! 🙂

I'm in the process of moving our react-native app to 0.81 with the new architecture and was super pleased to see this package available.

Today I used patch-package to patch @revopush/react-native-code-push@1.5.0 for the project I'm working on.

This option already exists in the code and so only needs the typings modified to expose it (not sure why it wasn't ever exposed publicly to begin with). I did this with the original version as it is a useful option to help force an install that would normally be ignored due to a previous rollback. We have been using this option for some time in production to enable a notification in our app that appears when a codepush is available to force an install.

Here is the diff that solved my problem:

diff --git a/node_modules/@revopush/react-native-code-push/typings/react-native-code-push.d.ts b/node_modules/@revopush/react-native-code-push/typings/react-native-code-push.d.ts
index bd412d1..b52b9a0 100644
--- a/node_modules/@revopush/react-native-code-push/typings/react-native-code-push.d.ts
+++ b/node_modules/@revopush/react-native-code-push/typings/react-native-code-push.d.ts
@@ -144,6 +144,12 @@ export interface SyncOptions {
      * one or more of the default values.
      */
     rollbackRetryOptions?: RollbackRetryOptions;
+
+    /**
+      * Indicates whether you would like to ignore failed updates. This is useful in scenarios where you want to install an update irrespective
+      * of whether the previous update was successful or not.
+      */
+    ignoreFailedUpdates?: Boolean;
 }
 
 export interface UpdateDialog {

This issue body was partially generated by patch-package.

I haven't checked tests or anything yet. Thought I would ask if this was a valuable contribution/any issues with it before continuing with a PR. Let me know.

Again, thanks for you hard work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions