Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR tries to fix #98 based on my limited knowledge of the codebase. Feel free to update directly the PR or close it if this was not the right fix/thing to do :)
I managed to replicate my issue directly in the
example
directory with my login and sponsors, without changing thesponsor.config.ts
file. Here's the result when I runpnpm run build:dev
in this directory with my GH login:With the modification of this PR, the images are well generated. So it might not be as I thought in the issue that the
formats
option is mandatory, but rather than by default there'sjson
in it, and it crashes in the middle of the algorithm.After having added a lot of logs, I managed to find out that
data
is undefined because the format isjson
at this moment. Since it's notsvg
,png
, orwebp
,data
is never filled out in the algorithm. So whenever thepath
was/Users/ju/sponsorkit/example/sponsorkit/sponsors-circles.json
, thedata
wasundefined
.Hopefully, it doesn't break any other use cases folks might have 😬
Linked Issues
Closes #98
Additional context
I've also tested to change
sponsor.config.ts
to use the one in my project: https://raw.githubusercontent.com/julien-deramond/static/refs/heads/main/sponsorkit.config.ts, and it worked too.