-
-
Notifications
You must be signed in to change notification settings - Fork 110
BREAKING CHANGE: : V5 #210
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
Conversation
- ✅ Simple `checkout()` or `newTransaction()` calls - ✅ Global callbacks with `onGlobalSuccess` or `onGlobalCancel` - ✅ Debug logging with `debug` prop - ✅ Fully typed params for transactions - ✅ Works seamlessly with Expo & bare React Native - ✅ Full test coverage
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.
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
- nitpick fix
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.
Pull Request Overview
This PR introduces breaking changes for v5, overhauling the library structure and API. Key changes include consolidating utility functions into a unified module, migrating and updating type definitions and styles, and replacing the legacy Paystack component with a new Provider-based architecture that utilizes hooks.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
development/utils/index.ts | Removed as utility functions have been centralized in development/utils.ts |
development/utils/helper.ts | Removed; its functionality has been merged into the new utils module |
development/utils/constants.ts | Removed; constants are refactored/redundant in v5 |
development/utils.ts | New unified utility module with updated functions and improved parameter generation |
development/usePaystack.tsx | Introduces a new hook to access the Paystack context |
development/types/index.ts | Removed in favor of a consolidated types file |
development/types.ts | New types file with updated and consolidated type definitions |
development/styles.ts | New style definitions supporting the Provider's UI |
development/style.ts | Removed outdated style file |
development/paystack.tsx | Removed legacy Paystack component, replaced by the new Provider approach |
development/index.tsx | New entry point exporting the Provider, context, and hook |
development/index.ts | Removed legacy module export |
development/PaystackProvider.tsx | New Provider component that encapsulates the WebView logic and manages modal visibility |
tests/utils.test.ts | Removed outdated tests |
tests/index.test.tsx | New test file covering the updated utils and Provider functionality |
README.md | Updated documentation to reflect v5 changes and new usage patterns |
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.
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/utils.test.ts:1
- Legacy tests for utility functions were removed. Ensure that the new tests in tests/index.test.ts cover all necessary scenarios to maintain comprehensive test coverage.
Entire file removed
more typing
Nice one! |
Yes i don't get that error in this fix. |
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR introduces breaking changes for v5, overhauling the library structure and API. Key changes include consolidating utility functions into a unified module, migrating and updating type definitions and styles, and replacing the legacy Paystack component with a new Provider-based architecture that utilizes hooks.
checkout()
ornewTransaction()
callsonGlobalSuccess
oronGlobalCancel
debug
propIssue URL
#209 #204 #194 #208 #123 #194
Before and After
Add Image/video/gifs of changes