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

Hardcode library values #193

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Hardcode library values #193

merged 2 commits into from
Mar 15, 2024

Conversation

nbierdeman
Copy link
Contributor

Description

@gregjopa, @westeezy, and I had a solid chat about DTPPCPSDK-1482 where it was decided we'd remove JS_SDK_LIBRARIES from @paypal/sdk-constants and hardcode values. This was inspired by the difficulty of adding @paypal/sdk-constants as a dependency of paypal-js. Additionally, it was decided that "none" was a better value than "raw-script" for when a library isn't being used to load the JS SDK.

@nbierdeman nbierdeman requested a review from a team as a code owner March 15, 2024 16:42
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.41%. Comparing base (7f5214b) to head (ff81409).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
+ Coverage   74.28%   74.41%   +0.12%     
==========================================
  Files          23       23              
  Lines        2030     2040      +10     
  Branches      239      241       +2     
==========================================
+ Hits         1508     1518      +10     
  Misses        512      512              
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const mockElement = makeMockScriptElement(mockScriptSrc);
mockElement.setAttribute(SDK_SETTINGS.JS_SDK_LIBRARY, jsSdkLibrary);
// $FlowIgnore
getCurrentScript.mockReturnValue(mockElement);

expect(getJsSdkLibrary()).toEqual(jsSdkLibrary);
expect(getJsLibrary()).toEqual(jsSdkLibrary);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

Copy link
Contributor

@jshawl jshawl left a comment

Choose a reason for hiding this comment

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

:shipit:

@nbierdeman nbierdeman merged commit cd9f9e0 into main Mar 15, 2024
5 checks passed
@nbierdeman nbierdeman deleted the hardcode-library-values branch March 15, 2024 18:28
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.

2 participants