Skip to content
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: use camelCase for PayPalScriptProvider options #360

Merged
merged 2 commits into from Jun 12, 2023

Conversation

gregjopa
Copy link
Contributor

@gregjopa gregjopa commented Jun 9, 2023

This PR upgrades to @paypal/paypal-js@6 for the latest script loading behavior and TypeScript types. This latest release includes support for camelCase options. I've upgrade react-paypal-js to use camelCase for the <PayPalScriptProvider> options prop which should feel more common for JS devs.

This is a breaking change and will be included in the next major version bump of react-paypal-js.

Before

<PayPalScriptProvider options={{ "client-id": "test" }}>

After

<PayPalScriptProvider options={{ clientId: "test" }}>

BREAKING CHANGE: this is a breaking change for PayPalScriptProvider options.
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (d77028c) 99.71% compared to head (7972062) 99.71%.

❗ Current head 7972062 differs from pull request most recent head cb7a3ca. Consider uploading reports for the commit cb7a3ca to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   99.71%   99.71%           
=======================================
  Files          18       18           
  Lines         356      356           
  Branches      111      111           
=======================================
  Hits          355      355           
  Misses          1        1           
Impacted Files Coverage Δ
src/components/PayPalButtons.tsx 98.36% <ø> (ø)
src/constants.ts 100.00% <ø> (ø)
src/components/PayPalScriptProvider.tsx 100.00% <100.00%> (ø)
src/context/scriptProviderContext.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@dtjones404 dtjones404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥳! Just wanted to verify if EMPTY_BRAINTREE_AUTHORIZATION_ERROR_MESSAGE should be moved to camelCase as well?

export const EMPTY_BRAINTREE_AUTHORIZATION_ERROR_MESSAGE =

@gregjopa
Copy link
Contributor Author

LGTM 🥳! Just wanted to verify if EMPTY_BRAINTREE_AUTHORIZATION_ERROR_MESSAGE should be moved to camelCase as well?

Great point @dtjones404! I'll push a commit to fix that.

@gregjopa gregjopa merged commit 168764e into main Jun 12, 2023
1 check passed
@gregjopa gregjopa deleted the update-to-latest-paypaljs branch June 12, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants