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(payments): upgrade Web Payments SDK to v1 #10

Merged
merged 6 commits into from
Jun 16, 2021
Merged

Conversation

maxbeatty
Copy link
Contributor

BREAKING CHANGE: general availability release

should be an easy upgrade for 99.99% of folks

@maxbeatty maxbeatty requested a review from a team as a code owner May 20, 2021 22:20
BREAKING CHANGE: general availability release
@@ -35,7 +36,7 @@
},
"homepage": "https://github.com/square/web-sdk#readme",
"engines": {
"node": ">12.*"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got this range from this discussion. seems ">=12.20" would also work. I don't have strong opinions

applicationId: string,
locationId: string
) => Promise<Payments | null>;
const Version = 'v1';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🚨

@@ -0,0 +1 @@
export * from '@square/web-payments-sdk-types';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

borrowing this types.ts pattern from snowpack where they are also exporting types


describe('SDK', () => {
it('exports payments', () => {
expect(sdk).toHaveProperty('payments');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test verifies we're exposing what (and how) we think but also that types build correctly

@codecov-commenter
Copy link

Codecov Report

Merging #10 (e1b9c8b) into beta (37970d1) will decrease coverage by 0.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             beta      #10      +/-   ##
==========================================
- Coverage   82.75%   82.45%   -0.31%     
==========================================
  Files           2        2              
  Lines          58       57       -1     
  Branches       15       15              
==========================================
- Hits           48       47       -1     
  Misses         10       10              
Impacted Files Coverage Δ
src/load.ts 69.69% <ø> (ø)
src/payments.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37970d1...e1b9c8b. Read the comment docs.

@danestves
Copy link

Hi guys! Any updates about this 👀 ?

@@ -0,0 +1,8 @@
export { pay } from './pay';

Copy link
Contributor

Choose a reason for hiding this comment

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

This work is unrelated to Web Payments SDK V1 upgrade. Can we remove it from this PR, and do this example under a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an implicit integration test that the types export properly and that consuming projects can build properly which is why I included it

Copy link

@prettymuchbryce prettymuchbryce left a comment

Choose a reason for hiding this comment

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

🙏

@maxbeatty maxbeatty merged commit 757a72b into beta Jun 16, 2021
@maxbeatty maxbeatty deleted the payments-v1 branch June 16, 2021 18:31
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-beta.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

maxbeatty pushed a commit that referenced this pull request Jun 16, 2021
* beta:
  feat(payments): upgrade Web Payments SDK to v1 (#10)
  chore(deps): bump @babel/preset-typescript from 7.12.17 to 7.14.5 (#16)
  chore(deps): bump @types/jest from 26.0.20 to 26.0.23 (#15)
  chore(deps): bump @babel/core from 7.12.17 to 7.14.5 (#12)
  ci: add @codecov (#9)
  chore(deps): add @dependabot (#8)
  ci: add code scanning action (#7)
  feat: add typings, and ability to import typings, to package (#11)
  docs: snowpack example (#6)
  docs: release process + script to automate (#5)
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants