njosefbeck / gatsby-source-stripe

Gatsby source plugin for building websites using Stripe as a data source
74 stars 16 forks source link

Out of date Stripe SDK API version #75

Open brianfeister opened 1 year ago

brianfeister commented 1 year ago

Prerequisites

[x] Put an X between the brackets on this line if you have done all of the following:

Describe the bug

The stripe version for this library is now about 3 years old. https://github.com/njosefbeck/gatsby-source-stripe/blob/main/package.json#L51 (stripe@8.191.0) and I'm needing some newer functionality from the sdk for my netlify worker functions. Any chance of updating this to the current version of Stripe API (apiVersion: 2022-11-15 at the time of this writing)?

Fwiw, I've used this project a ton for helping small businesses depend on stripe as a source for gatsby builds. I'm also willing to attempt the upgrade myself but want to check that such a PR would be well received before I attempt

To Reproduce Attempt to access newer stripe sdk methods

Expected behavior They work

Versions (please complete the following information):

os: [macos] node: [16] npm: [9] gatsby: [4] gatsby-source-stripe: [4]

Gatsby config:

Copy the portion of your Gatsby config for this plugin here. Do not include your secretKey.

{
  resolve: `gatsby-source-stripe`,
  options: {
    objects: ['Sku', 'Product', 'Customer'],
    secretKey: '...',
    downloadFiles: true,
  }
}

Additional context Add any other context about the problem here.

njosefbeck commented 1 year ago

Hi @brianfeister! I'd be totally happy for you to take over maintenance of this project! Let me look into how I can get you permissions to push up new versions to npm.

njosefbeck commented 1 year ago

I've added you as a collaborator to the repo as a first step!

brianfeister commented 1 year ago

Thanks @njosefbeck! I'll take a closer look at this and follow up. Quick question, what is your typical workflow (broad strokes) for local development with this as a package to validate it prior to publishing?

brianfeister commented 1 year ago

Also, where's the source for the README on the Gatsby site here? https://www.gatsbyjs.com/plugins/gatsby-source-stripe/

njosefbeck commented 1 year ago

So in the past I would have this repo as a directory nested under a plugins directory in a sample Gatsby project, so that the local version of the plugin would be used in the Gatsby site. Using npm run build will run the tests and build the JS files. After that you just set up the plugin as you would any other Gatsby plugin (using test credentials from Stripe, etc).

Also the Gatsby site just picks up the README in this repo and uses it on the site, so nothing special needs to be done there. I don't know what the lag is like though between pushing up the README in this repo / publishing it to npm to when it updates on the Gatsby site.

Hopefully the above is helpful! Let me know if you have other questions!