fix: export Buffer from react-native-quick-crypto#899
Merged
Conversation
Resolves #896 The example app was importing Buffer directly from @craftzdog/react-native-buffer, which caused instanceof Buffer checks to fail across module boundaries in React Native since bun installs separate instances of the Buffer package. Changes: - Export Buffer from react-native-quick-crypto's index.ts - Update all 23 example app test files to import Buffer from react-native-quick-crypto - Merge Buffer imports into existing rnqc imports where applicable - Remove @craftzdog/react-native-buffer from example app dependencies
- /review: Add check for fresh context/session to avoid self-review bias - /pr: Add step to check for related issues and include Fixes/Closes references
Update documentation to recommend using 'react-native-quick-crypto' as the buffer alias instead of '@craftzdog/react-native-buffer' directly. This ensures a single Buffer instance across the app, avoiding instanceof check failures across module boundaries. The library re-exports Buffer from @craftzdog/react-native-buffer, so both options work, but using the library directly is now preferred.
Contributor
🤖 End-to-End Test Results - AndroidStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
Contributor
🤖 End-to-End Test Results - iOSStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
Cache should restore the last CI build state so incremental builds can apply changes. Using hashFiles() in cache keys causes misses when files change, defeating the purpose of incremental builds. - iOS: Remove hashFiles from Pods and DerivedData cache keys - Android: Remove hashFiles from Gradle cache key - Use separate restore/save for Pods cache (was using combined action)
2afd75f to
a87de82
Compare
The Pods cache references paths in ios/libsodium-stable and deps (OpenSSL.xcframework) that are downloaded during pod install. Without caching these, restored Pods have broken references.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
Allows users to import
Bufferdirectly fromreact-native-quick-cryptoinstead of requiring a separate import from@craftzdog/react-native-buffer. This ensures a single Buffer instance across the app, avoidinginstanceof Bufferissues across module boundaries.Changes
Bufferfrom@craftzdog/react-native-bufferin the main entry pointBufferfromreact-native-quick-crypto@craftzdog/react-native-bufferdependency (now provided transitively)react-native-quick-cryptoas the buffer alias/reviewand/prslash commands for Claude CodeTesting
bun tscpasses for both library and example appFixes #896