butlerx / gatsby-source-google-spreadsheets

A source plugin for Gatsby that allows reading data from Google Sheets.
MIT License
39 stars 10 forks source link

fix row ID collision when worksheets have same sheet ID #30

Closed shoamano83 closed 1 year ago

shoamano83 commented 1 year ago

Fixes https://github.com/butlerx/gatsby-source-google-spreadsheets/issues/29

Looking at the code, a row ID is generated using a worksheet's internal ID and row number. So when two worksheets had same internal ID, rows from those worksheets would have duplicate IDs.

The fix is to simply include spreadsheet ID when generating a row ID, so the ID is always unique.

butlerx commented 1 year ago

Can you bump the version in the package.json

shoamano83 commented 1 year ago

Sure, added 53ed467dcce7c1d2da3aeb7783876c9d3cc2de15.

shoamano83 commented 1 year ago

Thank you!

shoamano83 commented 1 year ago

Hi @butlerx , it looks like latest version on npm is still 3.0.8. Could you release v3.0.9? Thanks!

cian-ev commented 1 year ago

shoudl be released now. Got to remind myself how publish workflow works

shoamano83 commented 1 year ago

Thank you! Yes, npm install gatsby-source-google-spreadsheets now downloads v3.0.9 and it contains my fix.