-
Notifications
You must be signed in to change notification settings - Fork 751
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
Build Typescript and migrate StripeResource #1539
Conversation
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.
LGTM. @dcr-stripe for quick double check?
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.
LGTM overall - great work Annie! Just left some minor comments.
Let's:
- Set up the corresponding PR to start code-generating at
src/
instead oflib/
and re-run codegen in this branch to make sure it's a no-op before merging this. - Document our testing plan in this PR ie. how do we make sure the artifact we publish to NPM after this is still valid JS and compatible with existing integrations (both for JS and Typescript)
|
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.
LGTM!
Summary
r? @kamil-stripe
This PR starts the process of migrating stripe-node to Typescript through the following steps:
lib/
tosrc/
directorytsconfig.json
, outputs intolib/
build
andprepack
script for Typescript compilationStripeResource
, add linting overrides for .ts filesTesting
Validated that build, lint, and test scripts pass locally. Compared previous
StripeResource.js
to compiledlib/StripeResource.js
to make sure that there are no unexpected changes.With this change, the published NPM package will only contain the transpiled Javascript code in
lib/
. Our tests still import from/lib/*.js
, and pass with this change.