Commit 793ac34
authored
Enable programmatic submission via Frames ref (submitCard); update docs, tests, and dependencies (#49)
* Update dependencies and improve integration tests
- Bump `expo` and `babel-preset-expo` versions in `package.json` and `package-lock.json`.
- Upgrade `jest-expo` to match the new `expo` version.
- Refactor integration tests for `Frames` component to mock network requests and improve validation checks.
- Remove redundant tests and ensure proper error handling for card tokenization.
- Add new tests for billing details and card validation events.
* Refactor Frames component and update TypeScript types
- Simplified state initialization in the Frames component by defining initialState separately.
- Updated TypeScript types to allow null values for card-related fields in FramesState.
- Changed autoCompleteType to autoComplete in CardNumber, Cvv, and ExpiryDate components for better compatibility.
- Ensured safe access to state properties by using nullish coalescing in input values.
- Refactored framesReducer to use a more explicit action parameter for better type safety.
* Enhance Frames component with programmatic submission and update tests
- Updated the Frames component to support programmatic card submission via a ref using `submitCard()`.
- Modified README to include new usage example for programmatic submission.
- Adjusted integration tests to validate the new submission method and ensure proper tokenization.
- Updated public key in tests and other files for consistency.
* Update version to 1.2.3 and refine GitHub Actions workflow
- Bumped package version from 1.2.2 to 1.2.3 in package.json.
- Improved formatting and structure of the GitHub Actions workflow in cd.yml for better readability and maintainability.
- Added conditional execution for the publish-npm job to ensure it only runs on pushes to the main branch.1 parent caa8a1f commit 793ac34
16 files changed
Lines changed: 4080 additions & 5484 deletions
File tree
- .github/workflows
- __tests__
- src
- components
- types
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
148 | 182 | | |
149 | 183 | | |
150 | 184 | | |
| |||
0 commit comments