-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: upgrade to Expo SDK 50 #2612
Merged
Merged
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
51c2c9e
feat: expo go 50 upgrade
frankcalise e015753
test(cli): update tests to reference kotlin changes in cng
frankcalise a100642
docs(README): stack version updates
frankcalise bea96d2
fix(boilerplate): update crash reporting for sentry usage
frankcalise c81292a
Merge branch 'master' into feat/expo-50
mazenchami 1f2c9a7
feat: disable flipper in ios/android
frankcalise b9007f5
fix(with-flipper-disabled): remove import statement
frankcalise 7d66ce1
chore: RN update
frankcalise 591e0b6
chore: remove unmaintained lint plugin
frankcalise 9bbc223
chore: update min node version
frankcalise 5db16bb
Merge branch 'master' into feat/expo-50
frankcalise 33e0ea9
chore(boilerplate): remove TS npx expo upgrade exclusion since TS nod…
frankcalise c1ced25
chore(boilerplate): readable jest config
frankcalise a1ebeee
Merge branch 'master' into feat/expo-50
frankcalise 3330e00
refactor(boilerplate): jest.config.js regex fun
frankcalise File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { ConfigPlugin, withAppBuildGradle, withMainApplication } from "expo/config-plugins" | ||
|
||
/** | ||
* | ||
* Expo Config Plugin to disable Flipper entirely in Android | ||
* | ||
* How it works: | ||
* 1) Remove the dependency from app/build.gradle | ||
* 2) Remove ReactNativeFlipper initialization from MainApplication.kt | ||
*/ | ||
export const withFlipperDisabled: ConfigPlugin = (config) => { | ||
config = withAppBuildGradleMod(config) | ||
config = withMainApplicationKtMod(config) | ||
return config | ||
} | ||
|
||
const FLIPPER_DEPENDENCY = 'implementation("com.facebook.react:flipper-integration")' | ||
const FLIPPER_INITIALIZATION_REGEX = | ||
/^\s+if \(BuildConfig.DEBUG\) {\s+ReactNativeFlipper\.initializeFlipper.*\s+}$/gm | ||
const FIND_FLIPPER_INITIALIZATION = 'ReactNativeFlipper.initializeFlipper' | ||
const FIND_FLIPPER_IMPORT = 'import com.facebook.react.flipper.ReactNativeFlipper' | ||
|
||
/** | ||
* Modifies the `android/app/build.gradle` file to remove the following line: | ||
* | ||
* implementation 'com.facebook.flipper:flipper:${FLIPPER_VERSION}' | ||
*/ | ||
const withAppBuildGradleMod: ConfigPlugin = (config) => | ||
withAppBuildGradle(config, (modConfig) => { | ||
if (modConfig.modResults.contents.includes(FLIPPER_DEPENDENCY)) { | ||
modConfig.modResults.contents = modConfig.modResults.contents.replace(FLIPPER_DEPENDENCY, "") | ||
} | ||
return modConfig | ||
}) | ||
|
||
/** | ||
* Modifies the `android/app/src/main/java/com/bundle/id/MainApplication.kt` file to remove the following lines: | ||
* if (BuildConfig.DEBUG) { | ||
* ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) | ||
* } | ||
*/ | ||
const withMainApplicationKtMod: ConfigPlugin = (config) => | ||
withMainApplication(config, (modConfig) => { | ||
if (modConfig.modResults.contents.includes(FIND_FLIPPER_IMPORT)) { | ||
modConfig.modResults.contents = modConfig.modResults.contents.replace( | ||
FIND_FLIPPER_IMPORT, | ||
"", | ||
) | ||
} | ||
if (modConfig.modResults.contents.includes(FIND_FLIPPER_INITIALIZATION)) { | ||
modConfig.modResults.contents = modConfig.modResults.contents.replace( | ||
FLIPPER_INITIALIZATION_REGEX, | ||
"", | ||
) | ||
} | ||
|
||
return modConfig | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make it more readable here is a little hack I use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot! So much more readable!