Skip to content

Commit

Permalink
build(deps): bump react-native from 0.72.17 to 0.73.9 #WIP #DONOTMERGE (
Browse files Browse the repository at this point in the history
#10739)

* build(deps-js+ios): bump react-native from 0.72.17 to 0.73.9

* build(deps): bump reanimated and webview to work with 73

* fix: 'images' alias after rn upgrade

* fix: type issues

* fix: deps to make android work

* build(deps): bump java to 17 in tool-versions

* bump(rn-upgrade-helper): apply android specific native changes

* boom ~> GOTCHA android native module link

* chore(hack): Patch Braze for java upgrade and Kotlin compatibility and add hacks.md entry

* fix: deps after rebase

* fix: some tests

* build(deps/tests): bump jsdom to fix setimmediate issue

* build(deps/tests): bump jsdom to fix setimmediate issue

* chore(hack): patch rn jest setup:

* docs(HACKS): add explanation for rn jest patch

* fix: reanimated useEvent

* chore: bump cache

* fix: some tests

* secretsbaseline

* delete stale test

* fix: detect secrets

* chore: update patches

* bump ios cache

* chore: remove hermes from build script now that it is by defaylt

* testing ios solutions

* add prjct dir to shellscript

* patch revert

* build(deps): bump braze sdk to be compatible with rn73 and move register token to JS

* chore: remove patch unused stuff

* chore: stuff

* chore: stuff

* bring back flipper

* Update yarn.lock file

* chore: rebase

* bump reanimated
  • Loading branch information
gkartalis authored Sep 19, 2024
1 parent 387b257 commit 552c9dc
Show file tree
Hide file tree
Showing 44 changed files with 2,566 additions and 1,911 deletions.
16 changes: 8 additions & 8 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: v7
cache-version: v8
run-relay-compiler:
steps:
- run:
Expand All @@ -68,27 +68,27 @@ commands:
steps:
- restore_cache:
keys:
- v8-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- v9-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- run:
name: Bundle install
command: bundle check || bundle install
environment:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
- save_cache:
key: v8-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
key: v9-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
paths:
- .vendor
install-cocoapods:
steps:
- restore_cache:
keys:
- v20-pods-{{ checksum ".manifests/cocoapods" }}
- v21-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: v20-pods-{{ checksum ".manifests/cocoapods" }}
key: v21-pods-{{ checksum ".manifests/cocoapods" }}
paths:
- ios/Pods
# this changes after pod install because we don't install dev tools on CI
Expand All @@ -98,7 +98,7 @@ commands:
steps:
- restore_cache:
keys:
- v21-app_build_ios-{{ checksum ".manifests/app_build" }}
- v18-app_build_ios-{{ checksum ".manifests/app_build" }}
- run:
name: Download fonts from s3
command: ./scripts/setup/download-fonts
Expand All @@ -109,7 +109,7 @@ commands:
name: Build App
command: ./scripts/ci/ci-ios
- save_cache:
key: v21-app_build_ios-{{ checksum ".manifests/app_build" }}
key: v18-app_build_ios-{{ checksum ".manifests/app_build" }}
paths:
- derived_data
- node_modules/react-native-config
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
at: ../workspace
- restore_cache:
keys:
- v12-test-success-{{ checksum "../workspace/.manifests/native_code" }}
- v13-test-success-{{ checksum "../workspace/.manifests/native_code" }}
# we can quit the macos build early if there were no native code changes
# and we're not on the beta branch
- run:
Expand Down
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
"filename": "src/app/Scenes/MyCollection/Screens/Insights/SelectArtist.tests.tsx",
"hashed_secret": "4d32797fc3625cc2a1608f59fdbc5b378caed77b",
"is_verified": false,
"line_number": 152
"line_number": 147
}
],
"src/app/Scenes/NewWorksFromGalleriesYouFollow/NewWorksFromGalleriesYouFollow.tests.tsx": [
Expand Down Expand Up @@ -1134,5 +1134,5 @@
}
]
},
"generated_at": "2024-08-26T13:50:18Z"
"generated_at": "2024-09-11T13:12:04Z"
}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodejs 20.9.0
ruby 3.1.4
java zulu-11.58.15
java zulu-17.50.19
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem 'fastlane', '2.220.0'
# 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.3', '< 7.1.0'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

# So we know if we need to run `pod install`
gem 'cocoapods-check'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (>= 1.13, < 1.15)
cocoapods-check
cocoapods-patch (~> 1.3.0)
Expand Down
31 changes: 21 additions & 10 deletions HACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ When we upgrade our deps to a version of react-native that includes removal of d

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:
Expand Down Expand Up @@ -304,6 +314,17 @@ patch.
This package includes a `setPageName` method on `SiftReactNative`, but no corresponding type.
I patched it to add the type.

## Patch-package for @braze/react-native-sdk

#### When can we remove this:

When we upgrade @braze/react-native-sdk to version >= 8.3.0.

#### Explanation/Context:

We had to patch Braze in order to proceed with the react native upgrade to 0.73.9. The patch was needed to support kotlin jvm target 17 and
in order to also make targetCompatibility and sourceCompatibility compatible with the JAVA 17 which is the standard for newer rn versions starting 0.73.

## Patch-package for @react-navigation/native

#### When we can remove this:
Expand Down Expand Up @@ -340,16 +361,6 @@ https://github.com/SwiftyJSON/SwiftyJSON/issues/1154
Apples has started requiring apps and certain 3rd party libraries declare in a privacy manifest why they use some apis, SwiftyJSON is one of them. The
privacy manifest has been added in 5.0.2 but the version has not been published to cocoapods.

## Patch-package for react-native-reanimated

#### When can we remove this:

When we upgrade to Reanimated 3.4.0

#### Explanation/Context:

Fixes some issues on Android when Reanimated stops. https://github.com/software-mansion/react-native-reanimated/issues/4626

## Patch-package for react-native-fast-image

#### When we can remove this:
Expand Down
5 changes: 4 additions & 1 deletion alias.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const list = ["app", "palette", "shared", "__generated__"]
const list = ["app", "palette", "shared", "__generated__", "images"]

// babel module resolver just needs `*`
const babelModuleResolverAlias = list.reduce((acc, name) => {
Expand All @@ -7,6 +7,9 @@ const babelModuleResolverAlias = list.reduce((acc, name) => {
return acc
}, {})

babelModuleResolverAlias["images"] = "./images" // Add alias for 'images' folder
babelModuleResolverAlias["images/*"] = "./images/*" // Support for nested files

// jest allows for regex
const jestModuleNameMap = list.reduce((acc, name) => {
acc[`^${name}$`] = `<rootDir>/src/${name}`
Expand Down
11 changes: 3 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.google.gms.google-services"
apply plugin: "com.facebook.react"
apply plugin: "org.jetbrains.kotlin.android"
Expand Down Expand Up @@ -82,7 +83,7 @@ android {
ndkVersion rootProject.ext.ndkVersion

buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "net.artsy.app"
defaultConfig {
Expand Down Expand Up @@ -146,13 +147,7 @@ dependencies {
implementation 'com.google.firebase:firebase-messaging:21.1.0'

implementation 'commons-io:commons-io:2.8.0'

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
implementation("com.facebook.react:flipper-integration")

// For WebP support, including animated WebP
implementation 'com.facebook.fresco:fresco:2.6.0'
Expand Down
6 changes: 1 addition & 5 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>
78 changes: 0 additions & 78 deletions android/app/src/debug/java/net/artsy/app/ReactNativeFlipper.java

This file was deleted.

Loading

0 comments on commit 552c9dc

Please sign in to comment.