Migrate React Native sample to Expo prebuild#297
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fed581f to
525dc82
Compare
4e0e1bc to
e8d8056
Compare
| working-directory: platforms/react-native/sample | ||
|
|
||
| - name: Verify iOS lockfile uses published native SDK | ||
| run: scripts/check_published_podfile_lock sample/ios/Podfile.lock |
There was a problem hiding this comment.
This is now inlined into the platforms/react-native/sample/scripts/build_ios script
Assisted-By: devx/fb34cb30-8090-438b-b735-1d8f8eb128a6
Assisted-By: devx/741457bb-fda8-43d5-b35b-2e08c409a2fe
Assisted-By: devx/2d0344dc-43dd-4535-baf2-409ff9e93de5
Assisted-By: devx/c25009c8-5a1d-4cb8-aee9-2dcf64902080
Assisted-By: devx/058cd5b9-f1cc-431b-b520-15657ace50f1
1293856 to
ecf8970
Compare
| [], | ||
| ); | ||
| useEffect(() => { | ||
| customerAccountManager.buildAuthorizationURL().then(setAuthorizationURL); |
There was a problem hiding this comment.
This shouldn't have been refactored from useMemo
| const updatedColors = getColors( | ||
| appConfig.colorScheme, | ||
| Appearance.getColorScheme(), | ||
| Appearance.getColorScheme() ?? 'light', |
There was a problem hiding this comment.
we should probably extract a helper for this we have called it with the null coalsescing operation a number of times
| getRandomBytes, | ||
| } from 'expo-crypto'; | ||
|
|
||
| function base64URLEncode(buffer: ArrayBufferLike): string { |
There was a problem hiding this comment.
TODO; test customer authentication
| ).boolValue | ||
| } | ||
|
|
||
| func testConfigureAcceleratedCheckoutsSetsSharedConfigsOnIOS16() throws { |
There was a problem hiding this comment.
i dont see why all these tests have changed
| // MARK: - RenderState | ||
|
|
||
| func testRenderStateSerialization_includesErrorReason() throws { | ||
| func testRenderStateSerialization_includesErrorReason() { |
There was a problem hiding this comment.
Again not sure why all these changes came in
| window: {width: 390, height: 844, scale: 3, fontScale: 1}, | ||
| screen: {width: 390, height: 844, scale: 3, fontScale: 1}, | ||
| }, | ||
| isIPhoneX_deprecated: false, |
There was a problem hiding this comment.
I dont see any reference to this being used - im not sure whether any of these mocks are actually necessary
|
|
||
| ```tsx | ||
| import {ApolloClient, gql, ApolloProvider} from '@apollo/client'; | ||
| import {API_VERSION, STOREFRONT_DOMAIN, STOREFRONT_ACCESS_TOKEN} from '@env'; |
There was a problem hiding this comment.
this didn't need to change
There was a problem hiding this comment.
we should re-run pnpm dedupe to check whether theres anything we can trim off here
| "react-native-vector-icons": "^10.3.0", | ||
| "react-native-webview": "^13.16.0" | ||
| }, | ||
| "peerDependencies": { |
There was a problem hiding this comment.
is removal of the peerDeps a regression in how we resolve react-native / react version now?
| : []), | ||
| ], | ||
| }, | ||
| extra: { |
There was a problem hiding this comment.
i dont think we need this - we access all of the values from the expo .env rather than from Constants.expoConfig.extra
| fs.copyFileSync(from, to); | ||
| } | ||
|
|
||
| function withIosLocalSdkPodfile(config) { |
There was a problem hiding this comment.
I'm not confident we actually need any of this? the only thing I believe we need to conditionally apply via podfile is the use local sdk pods
| return mod; | ||
| }); | ||
|
|
||
| return withEntitlementsPlist(config, mod => { |
There was a problem hiding this comment.
this is confusing - we already setup the entitlements in the app.config.js - so this seems duplicated
| } | ||
|
|
||
| function withGeneratedLinks(config) { | ||
| config = withInfoPlist(config, mod => { |
There was a problem hiding this comment.
pretty sure this can be achieved with a ios.infoplist entry in the app.config.js
| debugImplementation(shopifySdkArtifact) | ||
|
|
||
| testImplementation "junit:junit:4.13.2" | ||
| testImplementation "androidx.activity:activity:1.9.3" |
There was a problem hiding this comment.
double check these were necessary to add
| - name: Verify iOS lockfile uses published native SDK | ||
| run: scripts/check_published_podfile_lock sample/ios/Podfile.lock | ||
|
|
||
| - name: Cache cocoapods |
There was a problem hiding this comment.
it'd be beneficial to bring back the caching

Stack Context
This PR is stacked on top of #322, which moves the RN iOS bridge tests into a dedicated XcodeGen/CocoaPods integration app before this PR deletes the generated Expo sample native projects.
Summary
Lockfile maintenance doing some work on the git diff here:

dev rn prebuildcommand with--localsupportexpo install --checkwhere the Shopify package proxy has the recommended version availableValidation
dev rn test iosdev rn test androiddev rn test jsdev rn lintgit diff --checkPrevious validation from this branch before restacking:
dev rn prebuild android --localdev rn prebuild ios --localpnpm exec expo install --checkfromplatforms/react-native/samplepnpm dlx expo-doctorfromplatforms/react-native/samplewas attempted; remaining failures are fromexpo-doctorshelling out tonpm explain, which is blocked by the workspace npm wrapper/minimum dependency age enforcement undershadowenvNotes
platforms/react-native/sample/iosandplatforms/react-native/sample/androidare ignored and regenerated via clean Expo prebuild.expo,expo-build-properties, andexpo-fontare pinned to the newest SDK 56 versions currently available through the Shopify package proxy, and are excluded from Expo dependency validation until the proxy catches up to Expo's latest recommendations.