Code Monkey home page Code Monkey logo

react-native-community / rn-diff-purge Goto Github PK

View Code? Open in Web Editor NEW
1.2K 23.0 73.0 950.06 MB

Easier React Native upgrades by clearly exposing changes from a version to another. :rocket: And what better way than to purge, init, then diff? Spoiler: there's no better way. ๐Ÿ˜Ž

Home Page: https://react-native-community.github.io/upgrade-helper

License: MIT License

Shell 54.05% JavaScript 45.95%
react-native upgrade purge rn-diff rn-diff-purge upgrade-helper

rn-diff-purge's People

Contributors

cortinico avatar dependabot-support avatar dependabot[bot] avatar fkgozali avatar grabbou avatar haquezameer avatar joebernard avatar kelset avatar liamjones avatar lucasbento avatar lunaleaps avatar mrozilla avatar pvinis avatar titozzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rn-diff-purge's Issues

Please help

Maybe I don't understand something...
I thought the tool would show the difference between two versions, but it just shows the same amount of changes between any two versions.
I don't get it, please explain what am I doing wrong?

0.34.1 -> 0.59.8
Screen 2019-05-17 19 00 58

0.59.7 -> 0.59.8
Screen 2019-05-17 19 01 32

git apply command fails with and error

Question

I am upgrading react native from version 0.56.0 to 0.57.0. I did follow all the steps in USAGE.md.
But the last step git apply upgrade-rn.patch --exclude=package.json -p 2 --3way fails with the following error:
error: unrecognized input.
Is it an issue with my upgrade-rn.patch file ?

Support nightly releases

Hi ๐Ÿ‘‹ I'm coming from react-native-community/upgrade-helper#325, I'm planning to implement support for nightly builds in the upgrade-helper tool. After studying the codebase for some time, I saw that it uses this repo to obtain the diffs between the versions.

From what I understood here:

  1. When there is a new RN release, you run the new-release.sh script manually (passing the version as a argument) to do all the work of creating the projects to create the diffs, creating a new branch here, updating version tables, etc.
  2. upgrade-helper will use RELEASES file to list the versions on the website. Then, when selecting a version, it will fetch the corresponding diff file in the diff branch to display it.

So, first I'll have to add support for nightly releases in this repo in order to add the support in upgrade-helper tool. With that in mind, I have some questions:

  1. At the moment, are you still running the script manually? If yes, do you have plans to do this automatically? I don't have much knowledge of GH Actions capabilities, but maybe we could set up an schedule to check for new releases in react-native repo every day?
  2. The nightly versions have this version pattern on NPM e.g. 0.73.0-nightly-20230701-eca0d1231, and only the nightly versions of the next release are kept (when a new release is out, the older nightly versions are removed). So, I guess we'll need to take a similar approach here:
    1. When a new stable or RC release is out, remove the old nightly versions from RELEASES file (maybe remove from diffs branch as well?)
  3. Does it make sense to add those nightly releases to the HTML table? Personally I think that we shouldn't add, because we are going to have so many entries very quickly (as the nightly builds are generated every day) and it will clutter the list.

Overall, wdyt about this support for nightly builds? Please let me know if you have any questions or feedback!

Error when try to update [email protected] to [email protected]

Trying to update my app gives me the error below.
So I create a new fresh app with react-native init Example --version 0.59.4, try to run the upgrade and get same error error again.

$ react-native upgrade 0.59.5 --verbose
info Fetching diff between v0.59.4 and v0.59.5...
info Applying diff (excluding: package.json)...
error: git diff header lacks filename information when removing 2 leading pathname components (line 5)
error Automatically applying diff failed
error Patch failed to apply for unknown reason. Please fall back to manual way of upgrading
info You may find these resources helpful:
โ€ข Release notes: https://github.com/facebook/react-native/releases/tag/v0.59.5
โ€ข Comparison between versions: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.4..version/0.59.5
โ€ข Git diff: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.4..version/0.59.5.diff
error Upgrade failed. Please see the messages above for details
debug Error: Upgrade failed. Please see the messages above for details
    at Object.upgrade [as func] (/Users/lucianolima/projetos/oss/Example/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:292:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)

My RN info:

  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
      Memory: 4.32 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
      Yarn: 1.13.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.15.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        Build Tools: 23.0.3, 24.0.3, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.3
        API Levels: 23, 24, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5314842
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.4 => 0.59.4
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

No conflicting files after `apply` fails

After fail in applying diff to the repo, no conflicting files are dumped. I tried applying different patches, but none of them works. This situation happens only in some repositories, but I don't know what factor is causing the error. The repository is private, but I will try to make reproduction repository.

cc @thymikee @pvinis

Cannot read property 'toLowerCase' of undefined

Bug report

Summary

I'm running npx react-native upgrade --verbose and I get this error: Cannot read property 'toLowerCase' of undefined
This is the complete output:

info No version passed. Fetching latest...
info Fetching diff between v0.59.10 and v0.62.2...
error Cannot read property 'toLowerCase' of undefined
debug TypeError: Cannot read property 'toLowerCase' of undefined
    at getPatch (/home/*****/****/****/*****/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:109:121)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async Object.upgrade [as func] (/****/******/****/****/****/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:238:17)

Environment info

react-native info output:

 React Native Environment Info:
    System:
      OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
      CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
      Memory: 344.54 MB / 15.55 GB
      Shell: 5.4.2 - /usr/bin/zsh
    Binaries:
      Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
      Yarn: 1.21.1 - /usr/bin/yarn
      npm: 6.13.7 - ~/.nvm/versions/node/v12.4.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      Android SDK:
        API Levels: 23, 24, 26, 27, 28, 29
        Build Tools: 26.0.0, 27.0.3, 28.0.3, 29.0.0, 29.0.1, 29.0.2
        System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.10 => 0.59.10 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-rename: 2.4.1

Library version: 0.59.10

Steps to reproduce

  1. run npx react-native upgrade --verbose to upgrade from 0.59.10 to the latest version

Error upgrading react-native with "npx react-native upgrade"

$ npx react-native upgrade --verbose
info No version passed. Fetching latest...
info Fetching diff between v0.63.4 and v0.70.1...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
  - .flowconfig
  - .gitattributes
  - App.js
  - android/app/src/debug/java/com/Appgroups/ReactNativeFlipper.java
  - android/app/src/main/java/com/Appgroups/MainActivity.java
  - android/app/src/main/java/com/Appgroups/MainApplication.java
  - ios/AppGroup-tvOS/Info.plist
  - ios/AppGroup-tvOSTests/Info.plist
error Excluding files that failed to apply the diff:
  - .gitignore
  - .prettierrc.js
  - android/app/build.gradle
  - android/app/src/main/AndroidManifest.xml
  - android/gradle.properties
  - android/settings.gradle
  - ios/Podfile
  - ios/AppGroup.xcodeproj/project.pbxproj
  - ios/AppGroup/AppDelegate.m
  - ios/AppGroup/LaunchScreen.storyboard
Please make sure to check the actual changes after the upgrade command is finished.
You can find them in our Upgrade Helper web app: https://react-native-community.github.io/upgrade-helper/?from=0.63.4&to=0.70.1
debug "git apply" failed. Error output:
tmp-upgrade-rn.patch:1240: trailing whitespace.
        <!--
error: patch failed: android/app/build.gradle:1
error: repository lacks the necessary blob to fall back on 3-way merge.
error: android/app/build.gradle: patch does not apply
error: android/app/src/debug/java/com/Appgroups/ReactNativeFlipper.java: does not exist in index
error: patch failed: android/app/src/main/AndroidManifest.xml:13
error: repository lacks the necessary blob to fall back on 3-way merge.
error: android/app/src/main/AndroidManifest.xml: patch does not apply
error: android/app/src/main/java/com/Appgroups/MainActivity.java: does not exist in index
error: android/app/src/main/java/com/Appgroups/MainApplication.java: does not exist in index
error: patch failed: android/app/src/main/res/values/styles.xml:1
Falling back to three-way merge...
Applied patch to 'android/app/src/main/res/values/styles.xml' with conflicts.
error: patch failed: android/build.gradle:2
Falling back to three-way merge...
Applied patch to 'android/build.gradle' with conflicts.
error: patch failed: android/gradle.properties:25
error: repository lacks the necessary blob to fall back on 3-way merge.
error: android/gradle.properties: patch does not apply
error: patch failed: android/gradle/wrapper/gradle-wrapper.properties:1
Falling back to three-way merge...
Applied patch to 'android/gradle/wrapper/gradle-wrapper.properties' with conflicts.
error: patch failed: android/settings.gradle:1
error: repository lacks the necessary blob to fall back on 3-way merge.
error: android/settings.gradle: patch does not apply
error: patch failed: ios/Podfile:1
error: repository lacks the necessary blob to fall back on 3-way merge.
error: ios/Podfile: patch does not apply
error: ios/AppGroup-tvOS/Info.plist: does not exist in index
error: ios/AppGroup-tvOSTests/Info.plist: does not exist in index
error: patch failed: ios/AppGroup.xcodeproj/project.pbxproj:3
error: repository lacks the necessary blob to fall back on 3-way merge.
error: ios/AppGroup.xcodeproj/project.pbxproj: patch does not apply
error: patch failed: ios/AppGroup/AppDelegate.m:1
error: ios/AppGroup/AppDelegate.m: patch does not apply
error: patch failed: ios/AppGroup/Images.xcassets/AppIcon.appiconset/Contents.json:2
Falling back to three-way merge...
Applied patch to 'ios/AppGroup/Images.xcassets/AppIcon.appiconset/Contents.json' with conflicts.
error: patch failed: ios/AppGroup/LaunchScreen.storyboard:16
error: repository lacks the necessary blob to fall back on 3-way merge.
error: ios/AppGroup/LaunchScreen.storyboard: patch does not apply
error: patch failed: metro.config.js:10
Falling back to three-way merge...
Applied patch to 'metro.config.js' with conflicts.

error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
error Patch failed to apply for unknown reason. Please fall back to manual way of upgrading
info You may find these resources helpful:
โ€ข Release notes: https://github.com/facebook/react-native/releases/tag/v0.70.1
โ€ข Manual Upgrade Helper: https://react-native-community.github.io/upgrade-helper/?from=0.63.4&to=0.70.1
โ€ข Git diff: https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.63.4..0.70.1.diff
error Upgrade failed. Please see the messages above for details

[0.73] Improve diffing for Kotlin Migration

Hey all,
In 0.73 we updated the Android template to be in Kotlin rather than Java.
This results in the upgrade helper having 2 files removed (MainActivity.java and MainApplication.java) and 2 files added (MainActivity.kt and MainApplication.kt).

The diff looks as follows:

diff --git a/android/app/src/main/java/com/rntestapp/MainActivity.java b/android/app/src/main/java/com/rntestapp/MainActivity.java
deleted file mode 100644
index 2e7d5bf..0000000
--- a/android/app/src/main/java/com/rntestapp/MainActivity.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.rntestapp;
-
-import com.facebook.react.ReactActivity;
-import com.facebook.react.ReactActivityDelegate;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactActivityDelegate;
-
-public class MainActivity extends ReactActivity {
-
-  /**
-   * Returns the name of the main component registered from JavaScript. This is used to schedule
-   * rendering of the component.
-   */
-  @Override
-  protected String getMainComponentName() {
-    return "RNTestApp";
-  }
-
-  /**
-   * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
-   * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
-   * (aka React 18) with two boolean flags.
-   */
-  @Override
-  protected ReactActivityDelegate createReactActivityDelegate() {
-    return new DefaultReactActivityDelegate(
-        this,
-        getMainComponentName(),
-        // If you opted-in for the New Architecture, we enable the Fabric Renderer.
-        DefaultNewArchitectureEntryPoint.getFabricEnabled());
-  }
-}
diff --git a/android/app/src/main/java/com/rntestapp/MainActivity.kt b/android/app/src/main/java/com/rntestapp/MainActivity.kt
new file mode 100644
index 0000000..5e5f577
--- /dev/null
+++ b/android/app/src/main/java/com/rntestapp/MainActivity.kt
@@ -0,0 +1,22 @@
+package com.rntestapp
+
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
+
+class MainActivity : ReactActivity() {
+
+  /**
+   * Returns the name of the main component registered from JavaScript. This is used to schedule
+   * rendering of the component.
+   */
+  override fun getMainComponentName(): String = "RNTestApp"
+
+  /**
+   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
+   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
+   */
+  override fun createReactActivityDelegate(): ReactActivityDelegate =
+      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
+}
diff --git a/android/app/src/main/java/com/rntestapp/MainApplication.java b/android/app/src/main/java/com/rntestapp/MainApplication.java
deleted file mode 100644
index a601b36..0000000
--- a/android/app/src/main/java/com/rntestapp/MainApplication.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.rntestapp;
-
-import android.app.Application;
-import com.facebook.react.PackageList;
-import com.facebook.react.ReactApplication;
-import com.facebook.react.ReactNativeHost;
-import com.facebook.react.ReactPackage;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactNativeHost;
-import com.facebook.soloader.SoLoader;
-import java.util.List;
-
-public class MainApplication extends Application implements ReactApplication {
-
-  private final ReactNativeHost mReactNativeHost =
-      new DefaultReactNativeHost(this) {
-        @Override
-        public boolean getUseDeveloperSupport() {
-          return BuildConfig.DEBUG;
-        }
-
-        @Override
-        protected List<ReactPackage> getPackages() {
-          @SuppressWarnings("UnnecessaryLocalVariable")
-          List<ReactPackage> packages = new PackageList(this).getPackages();
-          // Packages that cannot be autolinked yet can be added manually here, for example:
-          // packages.add(new MyReactNativePackage());
-          return packages;
-        }
-
-        @Override
-        protected String getJSMainModuleName() {
-          return "index";
-        }
-
-        @Override
-        protected boolean isNewArchEnabled() {
-          return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
-        }
-
-        @Override
-        protected Boolean isHermesEnabled() {
-          return BuildConfig.IS_HERMES_ENABLED;
-        }
-      };
-
-  @Override
-  public ReactNativeHost getReactNativeHost() {
-    return mReactNativeHost;
-  }
-
-  @Override
-  public void onCreate() {
-    super.onCreate();
-    SoLoader.init(this, /* native exopackage */ false);
-    if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
-      // If you opted-in for the New Architecture, we load the native entry point for this app.
-      DefaultNewArchitectureEntryPoint.load();
-    }
-    ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
-  }
-}
diff --git a/android/app/src/main/java/com/rntestapp/MainApplication.kt b/android/app/src/main/java/com/rntestapp/MainApplication.kt
new file mode 100644
index 0000000..6e185a3
--- /dev/null
+++ b/android/app/src/main/java/com/rntestapp/MainApplication.kt
@@ -0,0 +1,52 @@
+package com.rntestapp
+
+import android.app.Application
+import com.facebook.react.PackageList
+import com.facebook.react.ReactApplication
+import com.facebook.react.ReactNativeHost
+import com.facebook.react.ReactPackage
+import com.facebook.react.common.annotations.UnstableReactNativeAPI
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
+import com.facebook.react.defaults.DefaultReactHost
+import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.react.flipper.ReactNativeFlipper
+import com.facebook.react.interfaces.ReactHost
+import com.facebook.soloader.SoLoader
+
+@UnstableReactNativeAPI
+class MainApplication : Application(), ReactApplication {
+
+  override val reactNativeHost: ReactNativeHost =
+      object : DefaultReactNativeHost(this) {
+        override fun getPackages(): List<ReactPackage> {
+          // Packages that cannot be autolinked yet can be added manually here, for example:
+          // packages.add(new MyReactNativePackage());
+          return PackageList(this).packages
+        }
+
+        override fun getJSMainModuleName(): String = "index"
+
+        override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
+
+        override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
+        override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
+      }
+
+  override val reactHost: ReactHost
+    get() =
+        DefaultReactHost.getDefaultReactHost(
+            context = this,
+            packageList = PackageList(this).packages,
+            jsMainModulePath = "index",
+            isHermesEnabled = BuildConfig.IS_HERMES_ENABLED)
+
+  override fun onCreate() {
+    super.onCreate()
+    SoLoader.init(this, false)
+    if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
+      // If you opted-in for the New Architecture, we load the native entry point for this app.
+      load()
+    }
+    ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
+  }
+}

We should be able to instead use the -M flag of git diff to tweak the similarity factor between two files.

I've done some testing and 15% looks like a good value.
Specifically if I run:

git diff HEAD~1 HEAD -M15%

the diff is as follows:

diff --git a/android/app/src/main/java/com/rntestapp/MainActivity.java b/android/app/src/main/java/com/rntestapp/MainActivity.kt
similarity index 20%
rename from android/app/src/main/java/com/rntestapp/MainActivity.java
rename to android/app/src/main/java/com/rntestapp/MainActivity.kt
index 2e7d5bf..5e5f577 100644
--- a/android/app/src/main/java/com/rntestapp/MainActivity.java
+++ b/android/app/src/main/java/com/rntestapp/MainActivity.kt
@@ -1,32 +1,22 @@
-package com.rntestapp;
+package com.rntestapp
 
-import com.facebook.react.ReactActivity;
-import com.facebook.react.ReactActivityDelegate;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactActivityDelegate;
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
 
-public class MainActivity extends ReactActivity {
+class MainActivity : ReactActivity() {
 
   /**
    * Returns the name of the main component registered from JavaScript. This is used to schedule
    * rendering of the component.
    */
-  @Override
-  protected String getMainComponentName() {
-    return "RNTestApp";
-  }
+  override fun getMainComponentName(): String = "RNTestApp"
 
   /**
-   * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
-   * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
-   * (aka React 18) with two boolean flags.
+   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
+   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
    */
-  @Override
-  protected ReactActivityDelegate createReactActivityDelegate() {
-    return new DefaultReactActivityDelegate(
-        this,
-        getMainComponentName(),
-        // If you opted-in for the New Architecture, we enable the Fabric Renderer.
-        DefaultNewArchitectureEntryPoint.getFabricEnabled());
-  }
+  override fun createReactActivityDelegate(): ReactActivityDelegate =
+      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
 }
diff --git a/android/app/src/main/java/com/rntestapp/MainApplication.java b/android/app/src/main/java/com/rntestapp/MainApplication.kt
similarity index 19%
rename from android/app/src/main/java/com/rntestapp/MainApplication.java
rename to android/app/src/main/java/com/rntestapp/MainApplication.kt
index a601b36..6e185a3 100644
--- a/android/app/src/main/java/com/rntestapp/MainApplication.java
+++ b/android/app/src/main/java/com/rntestapp/MainApplication.kt
@@ -1,62 +1,52 @@
-package com.rntestapp;
-
-import android.app.Application;
-import com.facebook.react.PackageList;
-import com.facebook.react.ReactApplication;
-import com.facebook.react.ReactNativeHost;
-import com.facebook.react.ReactPackage;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactNativeHost;
-import com.facebook.soloader.SoLoader;
-import java.util.List;
-
-public class MainApplication extends Application implements ReactApplication {
-
-  private final ReactNativeHost mReactNativeHost =
-      new DefaultReactNativeHost(this) {
-        @Override
-        public boolean getUseDeveloperSupport() {
-          return BuildConfig.DEBUG;
-        }
-
-        @Override
-        protected List<ReactPackage> getPackages() {
-          @SuppressWarnings("UnnecessaryLocalVariable")
-          List<ReactPackage> packages = new PackageList(this).getPackages();
+package com.rntestapp
+
+import android.app.Application
+import com.facebook.react.PackageList
+import com.facebook.react.ReactApplication
+import com.facebook.react.ReactNativeHost
+import com.facebook.react.ReactPackage
+import com.facebook.react.common.annotations.UnstableReactNativeAPI
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
+import com.facebook.react.defaults.DefaultReactHost
+import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.react.flipper.ReactNativeFlipper
+import com.facebook.react.interfaces.ReactHost
+import com.facebook.soloader.SoLoader
+
+@UnstableReactNativeAPI
+class MainApplication : Application(), ReactApplication {
+
+  override val reactNativeHost: ReactNativeHost =
+      object : DefaultReactNativeHost(this) {
+        override fun getPackages(): List<ReactPackage> {
           // Packages that cannot be autolinked yet can be added manually here, for example:
           // packages.add(new MyReactNativePackage());
-          return packages;
+          return PackageList(this).packages
         }
 
-        @Override
-        protected String getJSMainModuleName() {
-          return "index";
-        }
+        override fun getJSMainModuleName(): String = "index"
 
-        @Override
-        protected boolean isNewArchEnabled() {
-          return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
-        }
+        override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
 
-        @Override
-        protected Boolean isHermesEnabled() {
-          return BuildConfig.IS_HERMES_ENABLED;
-        }
-      };
+        override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
+        override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
+      }
 
-  @Override
-  public ReactNativeHost getReactNativeHost() {
-    return mReactNativeHost;
-  }
+  override val reactHost: ReactHost
+    get() =
+        DefaultReactHost.getDefaultReactHost(
+            context = this,
+            packageList = PackageList(this).packages,
+            jsMainModulePath = "index",
+            isHermesEnabled = BuildConfig.IS_HERMES_ENABLED)
 
-  @Override
-  public void onCreate() {
-    super.onCreate();
-    SoLoader.init(this, /* native exopackage */ false);
+  override fun onCreate() {
+    super.onCreate()
+    SoLoader.init(this, false)
     if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
       // If you opted-in for the New Architecture, we load the native entry point for this app.
-      DefaultNewArchitectureEntryPoint.load();
+      load()
     }
-    ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
+    ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
   }
 }

Table CSS

Hello, cheers for a wonderful package!

I'd be happy to make some CSS-fu updates to the /docs/index.html file, wanted to check whether it's still available and whether there's anything specific to know before starting :)

Proposal: automate workflow with GitHub Actions

Introduction

This is a proposal to automate the workflow of generating diffs (for rn-diff-purge and upgrade-helper) when creating new releases, work that's currently relying solely on @pvinis.

The Core of It

This proposal is to automate all the manual process with GitHub Actions, here's how we can do it:

In react-native main repository

  1. Add a small GitHub Action to the main react-native repo to trigger a dispatch_event on new tags to @react-native-community/rn-diff-purge, this should also carry over the tag version, example of this can be seen here.

In rn-diff-purge

  1. Get the version param from the dispatch event in a GitHub Action;
  2. Create a branch (e.g. 0.62.0-rc.5) and push it (should be done on top of the last release branch);
  3. Create and checkout to a staging branch (e.g. 0.62.0-rc.5-staging);
  4. Do a react-native init/@react-native-community/cli init (pls halp);
  5. Commit all the changes to staging branch and push it;
  6. Create PR from staging branch (0.62.0-rc.5-staging) to tag branch (0.62.0-rc.5);
  7. This PR needs to be reviewed, approved and merged by a maintainer;
  8. After the PR is merged the diff is automatically shown on upgrade-helper and used in the CLI.

If any of the automatically-handled steps fail, create an issue on rn-diff-purge mentioning that the process failed and tag maintainers.

Pros

  • We can double-check the diff before it hits upgrade-helper;
  • Will run as soon as there's a new tag in react-native repository.

Discussion points

  • How to handle the RELEASES file in this scenario? updating it will require two PRs, perhaps having another GitHub action to see that a PR was a merged then update the file automatically? ๐Ÿค”

Missing some versions

Due to problem with android build react-native released lots of patch versions yesterday but only 2 out of 8 have been added in this repo:

  • 0.70.5: โŒ
  • 0.69.7: โœ…
  • 0.68.5: โœ…
  • 0.67.5: โŒ
  • 0.66.5: โŒ
  • 0.65.3: โŒ
  • 0.64.4: โŒ
  • 0.63.5: โŒ

0.59.6 upgrade error

Bug

Environment info

React native info output:
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 2.36 GB / 7.94 GB
Binaries:
Yarn: 1.13.0 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - D:\Program Files\nodejs\npm.CMD

Library version: 0.59.6

Steps To Reproduce

Describe what you expected to happen:

git init
git add .
git commit -m "upgrade RN"
react-native upgrade 0.59.8

Reproducible sample code

react-native upgrade 0.59.8
info Fetching diff between v0.59.6 and v0.59.8...
error Failed to fetch diff for [email protected]. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes

0.74.0 diff was generated as empty

Yesterday, during the release of 0.74.0, we faced an incident where the diffs for such version where generated as empty.

The upgrade helper looked as follows:
Screenshot 2024-04-22 at 17 31 34

Root Cause Investigation

Apparently the reason was that the RnDiffApp was empty.

Specifically the release/0.74.0 branch was generated, but the RnDiffApp was a git submodule (why?). Here the commit where the RnDiffApp for 0.74.0 was generated:

2ce7e79

I'm unsure why this happened, but we'll need to investigate further, as this could affect future releases.

Remediation

I've force pushed release/0.74.0 to the HEAD of release/0.74.0-rc.9 + I've applied manually the changes to patch the template.
See https://github.com/react-native-community/rn-diff-purge/commits/release/0.74.0/

I've also had to regenerate the diffs for all the react-native version, which was really painful as we have 180K diffs (I believe they should be pruned, as generating the diff from 0.20.0 to 0.74.0 is pointless at this stage).

I had to manually force the diff re-creation in this way:
4ff103a

I've reverted my commit on main to force diff recreation.

Can we fix this for good?

Exclude Podfile.lock

Feature Request

Podfile.lock was include in the diff which should be exclude same as yarn.lock or package-lock.json

Why it is needed

Lock file shouldn't be include in diff since it generate different each time project generate given that some library update dependencies or release new version.
image

Possible implementation

Add Podfile.lock in .gitignore in app-base branch

Code sample

Upgrade from 0.61.5 -> 0.62.0 causes git issues on new check out

Bug report

The upgrade step from 0.61.5 to 0.62.0 contains an invalid change to .gitattributes and I don't know how it ended up there in the first place.

Adding those changes to an existing git repository will cause a fresh checkout of it to result in a dirty repo with a modified file android/gradlew.bat.

Summary

If I set up a vanilla 0.62.0 project it won't have those changes: npx react-native init test --version 0.62.0:

~ cat test/.gitattributes
*.pbxproj -text

Environment info

  • macOS Catalina 10.15.4 (19E287)
  • git --version: git version 2.24.1 (Apple Git-126)
  • npx --version: 6.13.4
  • npx react-native --version: 4.8.0

Steps to reproduce

  1. Create a new RN project with npx react-native init test --version 0.62.0
  2. Apply the .gitattributes changes from https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.62.0/.gitattributes
  3. Push the repo to GitHub
  4. Clone the repo into a new place
  5. Check the git status and observe invalid changes
~ git status --short
 M android/gradlew.bat

Describe what you expected to happen:

In step 5: No output, indicating a clean and freshly checked out repo.

Reproducible sample code

You can also just check out my test repo here: [email protected]:stigi/rn-diff-0.62.0-gitattributes.git

404 error on DOCS

When we click at the text links for the full table we go to a 404 page:

Diff table (full table HERE)

Clicking on the HERE results to a 404 page.

Trying to upgrade from newer version "0.59.9" to older "0.59.10"

Bug

when I run react-native upgrade I get the following error:

info No version passed. Fetching latest...
Trying to upgrade from newer version "0.59.9" to older "0.59.10"

Environment info

React native info output:

info 
  React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
      Memory: 1.97 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
      Yarn: 1.16.0 - ~/.yarn/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 22, 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 25.0.0, 25.0.1, 25.0.2, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3, 28.0.3
        System Images: android-26 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5199772
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.9 => 0.59.9

Library version: x.x.x

react-native-cli: 2.0.1
react-native: 0.59.9

Steps To Reproduce

  1. react-native upgrade

Describe what you expected to happen:

  1. upgrade to newest version

confusing alpha version changes with stable version.

I've been trying to upgrade my react native projects before I knew about this package and it was a horrible experience. I was never able to upgrade my projects successfully, but this library solved it and now I'm able to upgrade from any version to the latest version.

Although I recently faced a problem where react native release alpha versions of 0.59 and then there was also the stable release of 0.58.5.

Before that, I used to manually check the file changes and apply them to the project but now since there was no direct way knowing the changed files from 0.58.4 to 0.58.5 as there were alpha versions in between them.

This created a lot of confusion while tracking the file changes between the stable releases.

Is there any way we can skip the alpha versions between the stable versions? or maybe I'm doing this all wrong.

Thanks.

How do PBXBuildFile ref's (referenc, isa, fileRef) work

Hey, great project @pvinis, @ncuillery, and @react-native-community !

I have two (potentially related) questions that I'm hoping folks may have some insight on.

1. Is there any meaning behind the PBXBuildFile file references? Does changing/not changing them have any meaningful effect during an upgrade?

There is an example in the 0.56.0...0.57.0 diff that makes some changes around the libRCTAnimation.a library:

Screen Shot 2019-03-12 at 8 19 44 PM

Here, some file references are changed, namely the PBXBuildFile reference and fileRef, but I am curious if these changes have any meaningful impact. I did some googling, and wasn't able to come up with too much, but this article seemed to be somewhat helpful: http://www.monobjc.net/xcode-project-file-format.html

In the document, the author(s) state:

The algorithm used by Xcode to generate the unique identifier [96 bit, represented using a 24 hexadecimal value] seems to be based both on date, sequence and pre-defined values, but as there is no evidence that these identifiers must follow a generation convention, one can think that arbitrary identifier can be used, as long as they are unique across the document.

2. How are manually linked modules affected when their versions in package.json / node_modules are updated?

As a preface, this question is potentially an entirely separate discussion, or should belong on a separate forum (SO), but I think it may be relevant as React Native seems to have a mix of manual linked & CocoaPods based dependencies.

This question is more so geared towards updating third-party libraries that only support linking (no CocoaPods option). One such example is react-native-community/react-native-image-picker. It would seem that updating the npm dependency alone will work, as the linked library references an .xcodeproj file in the project's node_modules folder, but I am not entirely certain. I guess would've expected to see some PBXBuildFile ref's to change in the diff, but I guess this would only happen if the library author generated a completely new .xcodeproj between updates.

error Failed to fetch diff for [email protected]. Maybe it's not released yet?

Bug

c:\Users\Gilb\WifiLight>react-native upgrade
info No version passed. Fetching latest...
info Fetching diff between v0.59.9 and v0.60.5...
error Failed to fetch diff for [email protected]. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes

c:\Users\Gilbert\WifiLightDimmer>react-native upgrade 0.59.10
error Trying to upgrade from newer version "0.59.9" to older "0.59.10"

Environment info

React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz
Memory: 3.77 GB / 7.80 GB
Binaries:
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312

"dependencies": {
"@react-native-community/slider": "^1.1.3",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-elements": "^1.1.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-image-picker": "^1.0.2",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^3.11.0"

Steps To Reproduce

  1. c:\Users\Gilb\WifiLight>react-native upgrade
  2. c:\Users\Gilb\WifiLight>react-native upgrade 0.60.5
    ...

USAGE.md should consist of more detailed steps how to do an upgrade RN

1 Check the diff
Check the diff of your current version and the version you want to upgrade to.

2 Manually do the changes
Do the changes from the diff in your project.

These steps not explain much for people unfamiliar with diffs on github.

Steps should be more explanatory eg.:

1. Check which React Native version is used in your project
go to package.json in root of your project and find version on line e.g.: "react-native": "0.58.0" in dependencies

2. Open diff of your version and version you want upgrade to
Url of diff is in format: https://github.com/react-native-community/rn-diff-purge/compare/version/[rn-version-in-your-project]...version/[rn-version-you-want-upgrade-to].
For example https://github.com/react-native-community/rn-diff-purge/compare/version/0.58.0...version/0.59.1

3. Manually apply changes from diff to your project source code.
In your source code editor manually remove lines and files or add new lines and files as diff suggest...

4. Run npm install or yarn install

There should be also stated more clearly in README.MD, what is rn-diff-purge for and how it works. After reading https://facebook.github.io/react-native/blog/ I thought it is some new command which should replace react-native-git-upgrade. Readme should be also more structured with titles like:

==What is rn-diff-purge is for==

==How use rn-diff-purge to upgrade RN in your project==
Look at USAGE.md

Error when run upgrade without version

I'm testing from a 0.59.4 version.

$ react-native upgrade
info No version passed. Fetching latest...
error Trying to upgrade from newer version "0.59.6" to older "0.59.5"

Is it planed to add patch to version 0.59.6?
On react-native repo it has been released 8 days ago.

upgrade failed from 0.59.8 to 0.59.9

Bug

$ react-native upgrade
info No version passed. Fetching latest...
info Fetching diff between v0.59.8 and v0.59.9...
info Applying diff (excluding: package.json)...
tmp-upgrade-rn.patch:68: trailing whitespace.
@rem
tmp-upgrade-rn.patch:69: trailing whitespace.
@rem Copyright 2015 the original author or authors.
tmp-upgrade-rn.patch:70: trailing whitespace.
@rem
tmp-upgrade-rn.patch:71: trailing whitespace.
@rem Licensed under the Apache License, Version 2.0 (the "License");
tmp-upgrade-rn.patch:72: trailing whitespace.
@rem you may not use this file except in compliance with the License.
error: cannot apply binary patch to 'android/gradle/wrapper/gradle-wrapper.jar' without full index line
Falling back to three-way merge...
error: cannot apply binary patch to 'android/gradle/wrapper/gradle-wrapper.jar' without full index line
error: android/gradle/wrapper/gradle-wrapper.jar: patch does not apply
error Automatically applying diff failed
error Patch failed to apply for unknown reason. Please fall back to manual way of upgrading
info You may find these resources helpful:
โ€ข Release notes: https://github.com/facebook/react-native/releases/tag/v0.59.9
โ€ข Comparison between versions: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.8..version/0.59.9
โ€ข Git diff: https://github.com/react-native-community/rn-diff-purge/compare/version/0.59.8..version/0.59.9.diff
error Upgrade failed. Please see the messages above for details. Run CLI with --verbose flag for more details.

Environment info

React native info output:

React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
      Memory: 139.79 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 12.3.1 - /usr/local/bin/node
      Yarn: 1.16.0 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 28
        Build Tools: 28.0.3
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.8 => 0.59.8
    npmGlobalPackages:
      react-native-cli: 2.0.1

Library version: x.x.x

Steps To Reproduce

run react-native upgrade

Describe what you expected to happen:

  1. successful upgrade from 0.59.8 to 0.59.9

Reproducible sample code

Typo in 0.61.5 > 0.62.2 diff?

Bug

Screen Shot 2020-04-22 at 20 43 45

[diff](https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.61.5..0.62.2.diff)

That part should be

diff --git a/**RnDiffApp**/.gitattributes b/**RnDiffApp**/.gitattributes
new file mode 100644
index 000000000..23ac65ee5
--- /dev/null
+++ b/**RnDiffApp**/.gitattributes
@@ -0,0 +1,2 @@
+# specific for windows script files
+*.bat text eol=crlf
diff --git a/RnDiffApp/.flowconfig b/RnDiffApp/.flowconfig

or else it will fail immediately without making any changes

Screen Shot 2020-04-22 at 20 44 05

Missing release tags in this repo cause @react-native-community/cli to not prompt for RN upgrades

Output from react-native start --verbose:

debug Checking for a newer version of React Native
debug Current version: 0.63.4
debug Cached release version: 0.60.0
debug Checking for newer releases on GitHub
                 Welcome to React Native!
                Learn once, write anywhere



To reload the app press "r"
To open developer menu press "d"

debug Latest release: 0.60.0

This happens because the RN CLI checks this repo's tags to discover new RN versions (see https://github.com/react-native-community/cli/blob/5ec3fcf3a623b5a9faef050b72eab3778f241761/packages/cli/src/tools/releaseChecker/getLatestRelease.ts#L74) and no release since v0.60.0 has been tagged in this repo.

Can we add the missing tags? Doesn't look like that's something that I can do via a PR but I believe the below commands should tag the right commits. Where there was a repeat 'Add release x' commit I've tagged the later one since I've assumed it was a correction. I haven't bothered tagging RCs since the CLI filters out prerelease version tags anyway:

git tag version/0.60.1 47267c404884522f6b7210da5019823cb5c5ea40
git tag version/0.60.2 7f1730841ba6771d1c7da457a2996c787d850aed
git tag version/0.60.3 ec6b246ffcf46c68634051772d311ed17d06fbe9
git tag version/0.60.4 cd95fafe95c9358c8a52d626d34b61f5dc2c8baf
git tag version/0.60.5 41f6f9f0e584cfc323c6e20a0b62d212d23d12ea
git tag version/0.60.6 4e0240d631efe6fd8ef33c3b3a1e867c22c4f33b
git tag version/0.61.0 e778eddaa005b56ba24d295e7202a21259ffdb30
git tag version/0.61.1 cd399a6199ba387abe4cc4767f8312ae66544b90
git tag version/0.61.2 ade9d26e271a8a34e9fd9e3c42860ccb500b4262
git tag version/0.61.3 e1929723d356981ad4e33a743adca730ff789cbf
git tag version/0.61.4 36df34061f44060af8ed2bf384d76b579109dc2d
git tag version/0.61.5 4a84e90ca5e2dd8547c328046ebc40b77147dab1
git tag version/0.62.0 ee5ebeb0ba7d4cd42f56b679c8990b536769b686
git tag version/0.62.1 53e28efe18fa1dfbdc6a127d572dc14af201c0bc
git tag version/0.62.2 bf5e7f678bbec4acde46567678cbb703c4135eec
git tag version/0.63.0 e56092a4dd0c264c19bacf821511021629ff927b
git tag version/0.63.1 5843b2fcd282e9052769b8273b6f8b82eca1dba1
git tag version/0.63.2 2ea07482529c6afa5d8c8f698d212cb31c6d6a58
git tag version/0.63.3 77f9715f6c18d57747802c2d082f699f702802f8
git tag version/0.63.4 8aa6c6ae55d1d4ab335cf25fcd6010c47c1e2670
git tag version/0.64.0 96df4a7e0cd59dad97d961a17fe25d252ecf56ef

I've also raised a PR (#45) to add tagging to the newRelease.sh script so it doesn't get missed again.

RN v0.73.3 is missing from the upgrade helper - Publish job failed

Hi,

It looks like the RN v0.73.3 is missing from https://react-native-community.github.io/upgrade-helper/

I am assuming this job should have done the publication: https://github.com/react-native-community/rn-diff-purge/actions/runs/7701204274

But it failed:

Already up to date.
+ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.15s.
+ generateNewReleaseBranch
+ git worktree add wt-app app-base
Preparing worktree (new branch 'app-base')
branch 'app-base' set up to track 'origin/app-base'.
HEAD is now at 3a00d76d74 Update .gitignore
+ cd wt-app
+ rm -rf RnDiffApp
+ git pull
Already up to date.
+ branchName=release/0.73.3
+ git branch -D release/0.73.3
error: branch 'release/0.73.3' not found
+ true
+ git checkout -b release/0.73.3
Switched to a new branch 'release/0.73.3'
+ npx react-native init RnDiffApp --version 0.73.3 --skip-install
npm WARN exec The following package was not found and will be installed: [email protected]
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @react-native/[email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /Users/runner/.npm/_logs/2024-01-29T19_17_48_814Z-debug-0.log
Error: Process completed with exit code 1.

Is anyone able to re-run or fix it?

Cheers!
Fabien

0.64.3 is missing from the matrix.

Trying to use the upgrade tool on a project using react-native version 0.64.3 results in a 404:

info No version passed. Fetching latest...
(node:292856) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
info Fetching diff between v0.64.3 and v0.67.2...
error Fetch request failed with status 404: 404: Not Found.
error Failed to fetch diff for [email protected]. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#diff-table-full-table-here

RN 0.64.3 appears to have been released sometime between 0.66.2 and 0.67 (security update?), so perhaps it was missed somehow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.