Skip to content
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

Upgrade React Native 0.71.11 #5874

Merged
merged 64 commits into from
Jul 27, 2023
Merged

Upgrade React Native 0.71.11 #5874

merged 64 commits into from
Jul 27, 2023

Commits on Jun 5, 2023

  1. Update Gutenberg ref

    fluiddot committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    a1e8cde View commit details
    Browse the repository at this point in the history
  2. Upgrade @babel dependencies

    fluiddot committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    994512c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54a5af6 View commit details
    Browse the repository at this point in the history
  4. Update Gutenberg ref

    fluiddot committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    cdde67a View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2023

  1. Update Gutenberg ref

    fluiddot committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    d626813 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Upgrade metro-react-native-babel-preset and metro-resolver depend…

    …encies
    
    This upgrade is needed to support React Native version `0.71.11`.
    fluiddot committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    e0a6a41 View commit details
    Browse the repository at this point in the history
  2. Update Gutenberg ref

    fluiddot committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    e1ee3ff View commit details
    Browse the repository at this point in the history
  3. Update Gutenberg ref

    fluiddot committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    55f3720 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'trunk' into upgrade/react-native-0.71.8

    # Conflicts:
    #	gutenberg
    fluiddot committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    b7b7ca7 View commit details
    Browse the repository at this point in the history
  5. Fix issue with UUID library in Jest

    This fixes an issue related to the UUID library when running tests. Without this change, we get the following error:
    ```
    /gutenberg-mobile/gutenberg/node_modules/uuid/dist/esm-browser/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export { default as v1 } from './v1.js';
                                                                                          ^^^^^^
    
        SyntaxError: Unexpected token 'export'
    
          3 |  */
          4 | import fastDeepEqual from 'fast-deep-equal/es6';
        > 5 | import { v4 as uuid } from 'uuid';
            | ^
          6 |
          7 | /**
          8 |  * WordPress dependencies
    ```
    fluiddot committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    f79971e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b123334 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2f89a3b View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Configuration menu
    Copy the full SHA
    884ef76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0cdf825 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Update Gutenberg ref

    fluiddot committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    a94ab25 View commit details
    Browse the repository at this point in the history
  2. build: Catpure iOS XCFramework Podfile changes

    Capture result of `bundle exec pod install` within the `ios-xcframework`
    directory. while the XCFramework is not currently used for WordPress iOS
    integration, this is required to resolve CI failures.
    dcalhoun committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    edae1d3 View commit details
    Browse the repository at this point in the history
  3. Fix VideoPress block test cases (#5916)

    * Add util to generate VideoPress privacy settings for tests
    
    * Mock VideoPress check ownership API request
    
    * Update VideoPress edit test cases
    
    Instead of using a constant for the block HTML, now we generate the HTML via the `generateBlockHTML` util.
    
    * Use different fetch mocks in VideoPress edit test cases
    
    This is needed to keep the same block attributes set via the block HTML generation.
    
    Extract fetch mock metadata to a constant
    
    * Update VideoPress description setting placeholder query
    
    * Update VideoPress test snapshots
    
    The only change is that the video is now public when setting a caption. This has no impact in the testing logic.
    
    * Update src/test/videopress/local-helpers/utils.js
    
    Fixes the JSDoc type of `isVideoPrivate` and `isSitePrivate` params.
    
    Co-authored-by: David Calhoun <github@davidcalhoun.me>
    
    * Fix value used to generate privacy setting in `generatePrivacySettings`
    
    * Remove unneeded metadata on fetch mocks
    
    ---------
    
    Co-authored-by: David Calhoun <github@davidcalhoun.me>
    fluiddot and dcalhoun authored Jun 29, 2023
    Configuration menu
    Copy the full SHA
    4662b08 View commit details
    Browse the repository at this point in the history
  4. Revert "build: Upgrade eslint to ^8.19.0"

    This reverts commit 0cdf825.
    fluiddot committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    50e6344 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4349216 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5305372 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Upgrade React Native 0.71.11 - Android changes (#5872)

    * build: Update Gutenberg ref
    
    * build: Capture package-lock.json changes
    
    The result of running:
    
    ```
    rm -rf ./node_modules && npm install
    ```
    
    * Update Gutenberg ref
    
    * Update a11y id queries for Android E2E tests
    
    ---------
    
    Co-authored-by: David Calhoun <github@davidcalhoun.me>
    fluiddot and dcalhoun authored Jul 3, 2023
    Configuration menu
    Copy the full SHA
    0713af5 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. Upgrade React Native 0.71.11 - iOS changes (#5881)

    * Update Gutenberg reference
    
    * Update script for generating React-Codegen
    
    The method we used to generate React-Codegen (get_react_codegen_spec) was moved to a different file in newer versions of React Native. We need to update the script for generating it accordingly.
    
    * Update third-party podspecs to target 0.71.11
    
    * Update FBReactNativeSpec.podspec.json with hash
    
    * Apply bundle changes
    
    * Manually add React-bridging.podspec.json
    
    The file was automatically deleted via the generate-podspecs.sh script. It has been manually added as a temporary measure, to enable further testing.
    
    * Revert "Manually add React-bridging.podspec.json"
    
    This reverts commit 9707305.
    
    * Update list of dependencies in Podfile for iOS
    
    * Add tag to Hermes podspec to workaround error
    
    This is intended as a temporary workaround, we should implement a more robust fix before merging.
    
    * Update dependency versions in Podfile.lock
    
    * [Temporary] Add React Native as a dependency
    
    * Revert "[Temporary] Add React Native as a dependency"
    
    This reverts commit 21a4fbe.
    
    * Update Gutenberg ref
    
    * Update Gutenberg ref
    
    * Update Gutenberg ref
    
    * Disable hermes when generating codegen podspec
    
    * Generate third-party podspecs
    
    * Update FBReactNativeSpec podspec
    
    ---------
    
    Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
    Siobhan Bamber and fluiddot authored Jul 4, 2023
    Configuration menu
    Copy the full SHA
    0b280a7 View commit details
    Browse the repository at this point in the history
  2. Update Gutenberg ref

    fluiddot committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    864b3c7 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'trunk' into upgrade/react-native-0.71.8

    # Conflicts:
    #	bundle/ios/App.js
    #	bundle/ios/App.js.map
    #	gutenberg
    fluiddot committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    5fa1197 View commit details
    Browse the repository at this point in the history
  4. Update bundle

    fluiddot committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    ceaef0d View commit details
    Browse the repository at this point in the history
  5. Update localization strings

    fluiddot committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    43c8d54 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    77c45ed View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b65314d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f4d2319 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    628f596 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. Update XCFramework setup to work with React Native 0.71.11 (#5924)

    * Update Gutenberg reference
    
    * Update script for generating React-Codegen
    
    The method we used to generate React-Codegen (get_react_codegen_spec) was moved to a different file in newer versions of React Native. We need to update the script for generating it accordingly.
    
    * Update third-party podspecs to target 0.71.11
    
    * Update FBReactNativeSpec.podspec.json with hash
    
    * Apply bundle changes
    
    * Manually add React-bridging.podspec.json
    
    The file was automatically deleted via the generate-podspecs.sh script. It has been manually added as a temporary measure, to enable further testing.
    
    * Revert "Manually add React-bridging.podspec.json"
    
    This reverts commit 9707305.
    
    * Update list of dependencies in Podfile for iOS
    
    * Add tag to Hermes podspec to workaround error
    
    This is intended as a temporary workaround, we should implement a more robust fix before merging.
    
    * Update dependency versions in Podfile.lock
    
    * [Temporary] Add React Native as a dependency
    
    * Revert "[Temporary] Add React Native as a dependency"
    
    This reverts commit 21a4fbe.
    
    * Update Gutenberg ref
    
    * Update Gutenberg ref
    
    * Point RNReanimated to a custom branch to work around 2.17.0 issue
    
    The issue is due to RNReanimated looking for react-native in the
    node_modules relative to its location, which is how most projects would
    be setup. Unfortunately, our projects is not standard.
    
    When running `pod install` or `pod update`, we'd get:
    
    ```
    Installing RNReanimated 2.17.0 (was 2.9.1-wp-4)
    internal/modules/cjs/loader.js:934
      throw err;
      ^
    
    Error: Cannot find module 'react-native/package.json'
    Require stack:
    - /Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/[eval]
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
        at Function.resolve (internal/modules/cjs/helpers.js:113:19)
        at [eval]:1:9
        at Script.runInThisContext (vm.js:134:12)
        at Object.runInThisContext (vm.js:310:38)
        at internal/process/execution.js:81:19
        at [eval]-wrapper:6:22
        at evalScript (internal/process/execution.js:80:60)
        at internal/main/eval_string.js:27:3 {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/[eval]'
      ]
    }
    
    [!] Invalid `RNReanimated.podspec` file: no implicit conversion of nil into String.
    
     #  from /var/folders/dq/cdqxvx3s5ps75564rpmb_dc00000gn/T/d20230627-89428-abwplk/RNReanimated.podspec:5
     #  -------------------------------------------
     #  reanimated_package_json = JSON.parse(File.read(File.join(__dir__, "package.json")))
     >  config = find_config()
     #  assert_no_multiple_instances(config)
     #  -------------------------------------------
    ```
    
    * Print message during `pod install` about `REACT_NATIVE_NODE_MODULES_DIR`
    
    * Setup NVM and node modules for RNReanimated in XCFramework CI step
    
    * Apply bundle changes
    
    * Switch to using `use_react_native!` in XCFramework `Podfile`
    
    Using only our custom specs, the build failed with
    
    ```
    Multiple commands produce '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/DerivedData/XCFrameworkScaffold/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/CallbackWrapper.h'
    
    - Target 'ReactCommon' (project 'Pods') has copy command from '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/Pods/ReactCommon/react/bridging/CallbackWrapper.h' to '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/DerivedData/XCFrameworkScaffold/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/CallbackWrapper.h'
    - Target 'ReactCommon' (project 'Pods') has copy command from '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/Pods/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h' to '/Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/DerivedData/XCFrameworkScaffold/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/CallbackWrapper.h'
    ```
    
    However, with this setup the build fails with:
    
    ```
    /Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/Pods/../../gutenberg/node_modules/react-native/React/FBReactNativeSpec/../../scripts/xcode/with-environment.sh: line 35: .xcode.env: command not found
    /Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/Pods/../../gutenberg/node_modules/react-native/React/FBReactNativeSpec/../../scripts/xcode/with-environment.sh: line 35: node: command not found
    [Warning] You need to configure your node path in the  environment.  You can set it up quickly by running:  echo 'export NODE_BINARY=' > .xcode.env  in the ios folder. This is needed by React Native to work correctly.  We fallback to the DEPRECATED behavior of finding . This will be REMOVED in a future version.  You can read more about this here: https://reactnative.dev/docs/environment-setup#optional-configuring-your-environment
    /Users/gio/Developer/a8c/gutenberg-mobile/ios-xcframework/Pods/../../gutenberg/node_modules/react-native/React/FBReactNativeSpec/../../scripts/xcode/with-environment.sh: line 41: /scripts/find-node-for-xcode.sh: No such file or directory
    [Error] Could not find node. It looks like that the .xcode.env or .xcode.env.local
    ```
    
    * Add React Native `post_install` hook
    
    * Use `.xcode.env` instead of `.xcode.env.local`
    
    This way, users can override what CocoaPods does without modifying the
    codebase via the `.local` file.
    
    * Bump XCFramework deployment target to iOS 15.0
    
    * Use Xcode 14.3.1 in CI, like WordPress iOS does
    
    Otherwise, we're getting a compilation failure.
    See
    wordpress-mobile/WordPress-iOS@eadad98#commitcomment-119894859
    
    * Disable Hermes when building XCFramework
    
    * Refine messaging when setting `REACT_NATIVE_NODE_MODULES_DIR` env var
    
    * Set `SKIP_INSTALL = NO` at the `xcconfig` level, too
    
    * Switch an `unless !=` to `if ==`
    
    * Add workaround to setup Hermes correctly in XCFramework
    
    They will take place if the process runs with `HERMES_ENABLED` true.
    
    * Enable building XCFramework with Hermes
    
    * Embed Hermes XCFramework in Gutenberg XCFramework
    
    This is so that, at runtime, apps can find it. Otherwise, the build will
    run but the app will fail at runtime with:
    
    ```
    dyld[99988]: Library not loaded: @rpath/hermes.framework/hermes
      Referenced from: <931F58EC-3AC7-39DE-BEB7-1D44D8A5CF15> /Users/gio/Library/Developer/CoreSimulator/Devices/90F54127-B854-4ED8-93FA-D58167331941/data/Containers/Bundle/Application/3DA26EC7-B308-4029-9974-426839535542/WordPress.app/Frameworks/Gutenberg.framework/Gutenberg
    ```
    
    * Prevent XCFramework build script from deleting RN-code-generated files
    
    * Update Gutenberg ref
    
    * Set `REACT_NATIVE_NODE_MODULES_DIR` env var before fetching Reanimated pod
    
    * Update `Podfile.lock` file
    
    * Add `.xcode.env` file with dynamic node binary path
    
    ---------
    
    Co-authored-by: Siobhan <siobhan@automattic.com>
    Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
    3 people authored Jul 6, 2023
    Configuration menu
    Copy the full SHA
    30a4548 View commit details
    Browse the repository at this point in the history
  2. Update Gutenberg ref

    fluiddot committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    e13bcbf View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. Configuration menu
    Copy the full SHA
    3c89bdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d04ce17 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Update Gutenberg ref

    fluiddot authored and mokagio committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    7d8b4f9 View commit details
    Browse the repository at this point in the history
  2. WIP – Link against Hermes, but do not embed it

    The idea being to avoid nested frameworks because of embedding and
    instead adding Hermes as a another vendored framework in the podspec.
    mokagio committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    b6df921 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a5f1d5f View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    9fb9062 View commit details
    Browse the repository at this point in the history
  2. Update Gutenberg ref

    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    500bf6b View commit details
    Browse the repository at this point in the history
  3. Update release notes

    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    30bc7d7 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'upgrade/react-native-0.71.8' into mokagio/use-hermes-fr…

    …om-cocoapods
    
    # Conflicts:
    #	gutenberg
    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    1f1f103 View commit details
    Browse the repository at this point in the history
  5. Update Gutenberg ref

    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c089c2e View commit details
    Browse the repository at this point in the history
  6. Merge branch 'trunk' into upgrade/react-native-0.71.8

    # Conflicts:
    #	__device-tests__/gutenberg-editor-sanity-test-1-visual.test.js
    #	bundle/ios/App.js
    #	bundle/ios/App.js.map
    #	gutenberg
    #	ios-xcframework/Podfile.lock
    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    826a616 View commit details
    Browse the repository at this point in the history
  7. Fix entry in release notes

    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    6d46310 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d2eab79 View commit details
    Browse the repository at this point in the history
  9. Update Gutenberg ref

    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    4c49d6c View commit details
    Browse the repository at this point in the history
  10. Merge branch 'trunk' into upgrade/react-native-0.71.8

    # Conflicts:
    #	gutenberg
    fluiddot committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c6fb2a5 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. Configuration menu
    Copy the full SHA
    378e233 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    136c90e View commit details
    Browse the repository at this point in the history
  3. Update Gutenberg reference

    Siobhan committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    f54468c View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. Update Gutenberg ref

    fluiddot committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9ec350b View commit details
    Browse the repository at this point in the history
  2. Merge branch 'trunk' into upgrade/react-native-0.71.8

    # Conflicts:
    #	gutenberg
    fluiddot committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    77f2c68 View commit details
    Browse the repository at this point in the history
  3. Update Gutenberg reference

    Siobhan committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    366724e View commit details
    Browse the repository at this point in the history
  4. Update appender button's XPATH for Android

    With this change, the most up-to-date details for the XPATH are now in place.
    Siobhan committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    7f5e9c1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    275bd36 View commit details
    Browse the repository at this point in the history
  6. Simplify XPATH for appender button selection

    This commit significantly simplifies the XPath used to identify the column block's appender button in the Android application. Previous long and potentially unstable XPath has been replaced with a more concise and reliable one, reducing the dependence on the complete UI hierarchy and improving the maintainability and stability of the automation script.
    Siobhan committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c9aa893 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2023

  1. Merge pull request #5986 from wordpress-mobile/fix/sanity-test-1-errors

    RN upgrade: Fix test suite 1 errors
    Siobhan Bamber authored Jul 24, 2023
    Configuration menu
    Copy the full SHA
    ee7d4c3 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Merge branch 'trunk' of github.com:wordpress-mobile/gutenberg-mobile …

    …into upgrade/react-native-0.71.8
    dcalhoun committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    8f244f9 View commit details
    Browse the repository at this point in the history
  2. build: Update Gutenberg ref

    dcalhoun committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    be8917c View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Configuration menu
    Copy the full SHA
    4bad28c View commit details
    Browse the repository at this point in the history
  2. Update release notes

    fluiddot committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    e3d14fa View commit details
    Browse the repository at this point in the history
  3. Remove deprecated inline comment

    We decided to go with Hermes, so we no longer need to mention that we are still deciding.
    fluiddot committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    23d9fbd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f16c6d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b837251 View commit details
    Browse the repository at this point in the history