Skip to content

Commit

Permalink
build(deps): bump react-native from 0.73.10 to 0.75.4 (#10995)
Browse files Browse the repository at this point in the history
* build(deps): bump react-native from 0.73.10 to 0.74.6

* pbxproj

* fix: mapbox fix attempt still having issues with registering map city citypicker

Co-authored-by: Brian Beckerle <[email protected]>

* podfile diff

* update bridge handling to fix city guide modules

* build(deps): bump react-native from 0.74.6 to 0.75.4

* bump react native ios cli patch

* bump other deps

* fix deps

* chore: remove react native patch

* testing changes

* fix getConstants types

* docs: remove hacks entry for react native

* fix: bottom-sheet migration

* fix moti broken animation

* reanimated test mock

* mock new func for constants

* fix mocks in migration tests

* fix failure in registration test

* fix failure in confirm bid test

* patch collapsible-tab view

* refresh caches

* android workaround 44291 issue bundle size

* bump flashlist + pager view

* get rid of patch

* revert the android workaround tryout

* bump palette canary

* rtl support

* remove proptype hack and entry from package json

* Update ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.m

Co-authored-by: Brian Beckerle <[email protected]>

* Update src/app/AppRegistry.tsx

Co-authored-by: Brian Beckerle <[email protected]>

* chore: address pr comments and type issues

* get rid of displayLicensingViews native method

* bring back licencing mapbox logo on the JS side

* fix: dependencies

Co-authored-by: Brian Beckerle <[email protected]>

* remove commented code

* minor cleanup

---------

Co-authored-by: Brian Beckerle <[email protected]>
Co-authored-by: brainbicycle <[email protected]>
  • Loading branch information
3 people authored Nov 12, 2024
1 parent 854e875 commit 58f8e9d
Show file tree
Hide file tree
Showing 58 changed files with 2,374 additions and 1,652 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ commands:
steps:
- node/install-packages:
pkg-manager: yarn
cache-version: v8
cache-version: v9
run-relay-compiler:
steps:
- run:
Expand All @@ -73,27 +73,27 @@ commands:
steps:
- restore_cache:
keys:
- v9-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- v10-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- run:
name: Bundle install
command: bundle check || bundle install
environment:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
- save_cache:
key: v9-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
key: v10-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
paths:
- .vendor
install-cocoapods:
steps:
- restore_cache:
keys:
- v21-pods-{{ checksum ".manifests/cocoapods" }}
- v22-pods-{{ checksum ".manifests/cocoapods" }}
- run:
name: Install Pods
command: cd ios; bundle exec pod check --ignore-dev-pods || bundle exec pod install; cd ..;
- save_cache:
key: v21-pods-{{ checksum ".manifests/cocoapods" }}
key: v22-pods-{{ checksum ".manifests/cocoapods" }}
paths:
- ios/Pods
# this changes after pod install because we don't install dev tools on CI
Expand All @@ -103,7 +103,7 @@ commands:
steps:
- restore_cache:
keys:
- v18-app_build_ios-{{ checksum ".manifests/app_build" }}
- v19-app_build_ios-{{ checksum ".manifests/app_build" }}
- run:
name: Download fonts from s3
command: ./scripts/setup/download-fonts
Expand All @@ -114,7 +114,7 @@ commands:
name: Build App
command: ./scripts/ci/ci-ios
- save_cache:
key: v18-app_build_ios-{{ checksum ".manifests/app_build" }}
key: v19-app_build_ios-{{ checksum ".manifests/app_build" }}
paths:
- derived_data
- node_modules/react-native-config
Expand All @@ -124,9 +124,9 @@ commands:
at: ../workspace
- restore_cache:
keys:
- v12-test-success-{{ checksum "../workspace/.manifests/android_native" }}
- v13-test-success-{{ checksum "../workspace/.manifests/android_native" }}
- android/change-java-version:
java-version: 11
java-version: 17
- run:
name: Quit early if possible
command: |
Expand All @@ -153,7 +153,7 @@ commands:
steps:
- restore_cache:
keys:
- v6-app_build_android-{{ checksum "../workspace/.manifests/app_build" }}
- v7-app_build_android-{{ checksum "../workspace/.manifests/app_build" }}
- generate-query-map
- run:
name: Download fonts from s3
Expand All @@ -165,7 +165,7 @@ commands:
name: Build App
command: ./scripts/ci/ci-android
- save_cache:
key: v6-app_build_android-{{ checksum "../workspace/.manifests/app_build" }}
key: v7-app_build_android-{{ checksum "../workspace/.manifests/app_build" }}
paths:
- android/build
- android/app/build
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ net.artsy.artsy.dev.pem
# See note in Podfile
ios/Artsy/App/Echo.json
ios/Artsy/App/EchoNew.json
ios/.xcode.env.local
**/.xcode.env.local

# Fastlane
Preview.html
Expand All @@ -46,7 +46,7 @@ Preview.html
.vendor

# Ruby / Cocoa Pods
Pods
**/Pods/
/vendor/bundle/

# build artefacts
Expand Down
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ ruby ">= 2.6.10"

gem 'fastlane', '2.223.1'

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'

# So we know if we need to run `pod install`
gem 'cocoapods-check'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (>= 1.13, < 1.15)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
cocoapods-check
cocoapods-patch (~> 1.3.0)
dotenv
Expand Down
65 changes: 0 additions & 65 deletions HACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,6 @@ When we upgrade to a version of `@segment/analytics-react-native` that includes

When updating to rn-0.69.10 we had to patch this due to kotlin version missmatch.

## react-native patch

### react-native prop-types patch

#### When can we remove this:

When we upgrade our deps to a version of react-native that includes removal of deprecated PropTypes.

#### Explanation/Context:

When updating to rn-0.69.10 we had to patch this due to deprecation of PropTypes. For this reason we also installed `deprecated-react-native-prop-types` to avoid errors and we patched the `react-native` package to use the deprecated PropTypes coming from the `deprecated-react-native-prop-types` package.

### react-native jest/setup.js patch

#### When can we remove this:

When we upgrade react-native to 75 according to this https://github.com/facebook/react-native/issues/41907#issuecomment-2293385777 & https://github.com/facebook/react-native/pull/43497/files#diff-feb65a029adc6c226f7d3bfdc5238d2c8f31c4da1fea238705b2012f35178af6

#### Explanation/Context:

When updating to rn-0.73.9 we had to patch this due to some changes on the setup jest files making our tests fail due to a missconfiguration on the image jest setup.

## deprecated-react-native-prop-types dependency

#### When can we remove this:

When we upgrade our deps to a version of react-native that includes removal of deprecated PropTypes.

#### Explanation/Context:

When updating to rn-0.69.10 we had to patch this due to deprecation of PropTypes. For this reason we also installed `deprecated-react-native-prop-types` to avoid errors and we patched the `react-native` package to use the deprecated PropTypes coming from the `deprecated-react-native-prop-types` package.

## react-native-image-crop-picker getRootVC patch

#### When can we remove this:
Expand All @@ -82,39 +50,6 @@ https://github.com/ivpusic/react-native-image-crop-picker/pull/1354

We do some swizzling in our AppDelegate that causes [[UIApplication sharedApplication] delegate] window] to return nil, this is used by image-crop-picker to find the currently presented viewController to present the picker onto. This patch looks for our custom window subclass (ARWindow) instead and uses that to find the presented viewController. Note we cannot reliably use the lastWindow rather than checking for our custom subclass because in some circumstances this is not our window but an apple window for example UIInputWindow used for managing the keyboard.

## react-native-mapbox-gl/maps - postinstall script

#### When can we remove this:

When react-native-mapbox adds the events framework as dependency, tried removed in 8.4.0 and was getting a crash on startup do to missing framework.

#### Explanation/Context:

We had issues with our archive becoming invalid and failing to export when we updated mapbox and cocoapods

- mapbox released a beta version that fixed the issue for our setup
- See issues here: https://github.com/CocoaPods/CocoaPods/issues/10385, https://github.com/react-native-mapbox-gl/maps/issues/1097

## react-native-mapbox-gl/maps - generic types patch

#### When can we remove this:

When react-native-mapbox/maps fixes the type issue here.

#### Explanation/Context:

Typescript complains about some invalid type definitions for generic values. Next time we update mapbox we should try removing the patch, run yarn type-check and if it succeeds you can get rid of the patch.

## react-native-mapbox-gl/maps - MGLGlyphsRasterizationMode

#### When can we remove this:

We should try removing it next time we update our mapbox dependencies (at time of writing 8.4.0). If you remove the plist value and open a map (City guide) and don't see a warning about falling back to a local rasterization you should be good to go.

#### Explanation/Context:

There is an issue here that explains the issue and suggests setting explicity in plist: https://github.com/mapbox/mapbox-gl-native-ios/issues/589

## exporting MockResolverContext (@types/relay-test-utils patch-package)

#### When can we remove this:
Expand Down
23 changes: 12 additions & 11 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down Expand Up @@ -59,6 +59,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

/* Autolinking */
autolinkLibrariesWithApp()
}

/**
Expand Down Expand Up @@ -101,6 +104,7 @@ android {
buildConfigField "String", "GITCommitDate", '"2021-01-21T15:08:22+04:00"'
buildConfigField "String", "GITRemoteOriginURL", '"https://github.com/artsy/eigen.git"'
}

signingConfigs {
debug {
storeFile file('debug.keystore')
Expand Down Expand Up @@ -147,7 +151,6 @@ dependencies {
implementation 'com.google.firebase:firebase-messaging:21.1.0'

implementation 'commons-io:commons-io:2.8.0'
implementation("com.facebook.react:flipper-integration")

// For WebP support, including animated WebP
implementation 'com.facebook.fresco:fresco:2.6.0'
Expand All @@ -162,5 +165,3 @@ dependencies {
implementation jscFlavor
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
Expand Down
5 changes: 1 addition & 4 deletions android/app/src/main/java/net/artsy/app/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.microsoft.codepush.react.CodePush
import com.segment.analytics.Analytics
import net.artsy.app.utils.ReactNativeConfigUtils
import io.sentry.react.RNSentryPackage
import com.facebook.react.flipper.ReactNativeFlipper

class MainApplication : Application(), ReactApplication {

Expand All @@ -42,7 +41,7 @@ class MainApplication : Application(), ReactApplication {
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)


override fun onCreate() {
Expand All @@ -66,8 +65,6 @@ class MainApplication : Application(), ReactApplication {

Analytics.setSingletonInstance(analytics)

ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)

registerActivityLifecycleCallbacks(BrazeActivityLifecycleCallbackListener())
}
}
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {
targetSdkVersion = 34
firebaseIidVersion = "21.1.0" // Needed for react-native-device-info
googlePlayServicesAuthVersion = "16.0.1"
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
}
repositories {
google()
Expand Down
3 changes: 0 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
16 changes: 8 additions & 8 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +201,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Loading

0 comments on commit 58f8e9d

Please sign in to comment.