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

Updated API version in types/lib.d.ts #2218

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

prathmesh-stripe
Copy link
Contributor

  1. Updated the API version regex in the updateApiVersion,.js script to handle new format of API versions(eg. 2024-09-30.acacia). This script is run every time we run codegen-format.
  2. Cleanup of lines that tried to update API version in files(Readme and package.json) that no longer reference an API Version.

@prathmesh-stripe prathmesh-stripe requested a review from a team as a code owner October 30, 2024 21:05
@prathmesh-stripe prathmesh-stripe requested review from helenye-stripe and removed request for a team October 30, 2024 21:05
@prathmesh-stripe prathmesh-stripe enabled auto-merge (squash) October 30, 2024 21:15
@prathmesh-stripe prathmesh-stripe changed the title Fixed API version in types Fixed API version in types/lib.d.ts Oct 30, 2024
@prathmesh-stripe prathmesh-stripe changed the title Fixed API version in types/lib.d.ts Updated API version in types/lib.d.ts Oct 30, 2024
@prathmesh-stripe prathmesh-stripe merged commit 2f7a544 into master Oct 30, 2024
9 checks passed
@prathmesh-stripe prathmesh-stripe deleted the prathmesh/fix-node-types-version branch October 30, 2024 22:34
@tinotaylor
Copy link

tinotaylor commented Nov 14, 2024

I am on 17.3.1 but still getting this error. I just upgrade my dashboard to the latest version. Do you know how I can resolve this?

Type '"2024-10-28.acacia"' is not assignable to type '"2022-08-01"'.ts(2322)
lib.d.ts(72, 7): The expected type comes from property 'apiVersion' which is declared here on type 'StripeConfig'
(property) Stripe.StripeConfig.apiVersion?: "2022-08-01"
This library's types only reflect the latest API version.

We recommend upgrading your account's API Version to the latest version if you wish to use TypeScript with this library.

If you wish to remain on your account's default API version, you may pass null or another version instead of the latest version, and add a @ts-ignore comment here and anywhere the types differ between API versions.

@docs — https://stripe.com/docs/api/versioning

@docs — https://stripe.com/docs/api/versioning

@xavdid-stripe
Copy link
Member

@tinotaylor you probably need to npm install again.

Either way, please open a new issue rather than commenting on a PR and we'll be happy to take a look!

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.

3 participants