-
Notifications
You must be signed in to change notification settings - Fork 7
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: Expo 52 Upgrade #1452
Merged
Merged
feat: Expo 52 Upgrade #1452
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
025c6e4
feat: Expo 52 Upgrade
alexrisch 8e39f3d
fix tsc
alexrisch d1f2407
Fix iOS build
alexrisch bbb747d
Bump versions
alexrisch 2f6e129
Working iOS
alexrisch e8982cb
Android working
alexrisch 42045e9
Fix ts tests
alexrisch a0e2809
fix Performance tests
alexrisch d81987f
podlock updates
alexrisch 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
node_modules/ | ||
.expo/ | ||
dist/ | ||
expo-env.d.ts | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
|
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,38 @@ | ||
// Jest mock for expo-haptics | ||
|
||
/* | ||
During Expo 52 upgrade haptics were failing in tests, so mocked it for now | ||
*/ | ||
|
||
enum ImpactFeedbackStyle { | ||
Light = "light", | ||
Medium = "medium", | ||
Heavy = "heavy", | ||
Soft = "soft", | ||
Rigid = "rigid", | ||
} | ||
|
||
enum NotificationFeedbackType { | ||
Success = "success", | ||
Warning = "warning", | ||
Error = "error", | ||
} | ||
|
||
const impactAsync = jest.fn(async (style: ImpactFeedbackStyle) => {}); | ||
const notificationAsync = jest.fn(async (type: NotificationFeedbackType) => {}); | ||
|
||
const MockedExpoHaptics = { | ||
impactAsync, | ||
notificationAsync, | ||
ImpactFeedbackStyle, | ||
NotificationFeedbackType, | ||
}; | ||
|
||
export { | ||
impactAsync, | ||
notificationAsync, | ||
ImpactFeedbackStyle, | ||
NotificationFeedbackType, | ||
}; | ||
|
||
export default MockedExpoHaptics; | ||
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,6 @@ | ||
/* | ||
During Expo 52 upgrade expo-image was failing in tests, so mocked it for now | ||
*/ | ||
import { Image } from "react-native"; | ||
|
||
export { Image }; |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"expo": { | ||
"newArchEnabled": false, | ||
"version": "2.1.0", | ||
"ios": { | ||
"buildNumber": "57" | ||
|
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
File renamed without changes.
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
Oops, something went wrong.
Oops, something went wrong.
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.
💡 Codebase verification
Remove named exports to match the original module's pattern
The codebase consistently uses namespace imports (
import * as
) with expo-haptics, indicating the mock should only have a default export to match the original module's pattern. Remove the named exports and keep only the default export.MockedExpoHaptics
🔗 Analysis chain
Verify export pattern matches the original module.
While the static analysis suggests preferring named exports, the mock should maintain the same export pattern as the original
expo-haptics
module for consistency.Run this script to check the original module's export pattern:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 546
Script:
Length of output: 87
🧰 Tools
🪛 GitHub Check: lint
[warning] 38-38:
Prefer named exports