-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
BREAKING CHANGE: general availability release
showcases importing types
@@ -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" |
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.
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'; |
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.
🚨
@@ -0,0 +1 @@ | |||
export * from '@square/web-payments-sdk-types'; |
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.
borrowing this types.ts pattern from snowpack where they are also exporting types
|
||
describe('SDK', () => { | ||
it('exports payments', () => { | ||
expect(sdk).toHaveProperty('payments'); |
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.
this test verifies we're exposing what (and how) we think but also that types build correctly
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Hi guys! Any updates about this 👀 ? |
@@ -0,0 +1,8 @@ | |||
export { pay } from './pay'; | |||
|
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.
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.
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.
this is an implicit integration test that the types export properly and that consuming projects can build properly which is why I included it
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.
🙏
🎉 This PR is included in version 1.0.0-beta.6 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
* 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)
🎉 This PR is included in version 2.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
BREAKING CHANGE: general availability release
should be an easy upgrade for 99.99% of folks