Skip to content

build: fix wakatime json import bug #2050

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

Merged
merged 3 commits into from
Sep 24, 2022
Merged

build: fix wakatime json import bug #2050

merged 3 commits into from
Sep 24, 2022

Conversation

rickstaa
Copy link
Collaborator

@rickstaa rickstaa commented Sep 24, 2022

This PR adds a workaround for importing the languageColors JSON file. This needed to be done since Vercel uses v16.4, which does not support JSON file importing without the experimental-json-modules flag. See https://simonplend.com/import-json-in-es-modules/ for more information. The workaround can be found here.

@vercel
Copy link

vercel bot commented Sep 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
github-readme-stats ✅ Ready (Inspect) Visit Preview Sep 24, 2022 at 1:29PM (UTC)

@codecov
Copy link

codecov bot commented Sep 24, 2022

Codecov Report

Base: 97.40% // Head: 97.41% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (6ab34ff) compared to base (dbf6560).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2050   +/-   ##
=======================================
  Coverage   97.40%   97.41%           
=======================================
  Files          22       22           
  Lines        3464     3475   +11     
  Branches      316      316           
=======================================
+ Hits         3374     3385   +11     
  Misses         89       89           
  Partials        1        1           
Impacted Files Coverage Δ
src/cards/wakatime-card.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This commit adds a workaround for importing the `languageColors` JSON
file. This needed to be done since Vercel uses v16.4, which does not
support JSON file importing without the `experimental-json-modules`
flag. See https://simonplend.com/import-json-in-es-modules/
for more information. The workaround can be found [here](https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node).
@rickstaa rickstaa added the bug Something isn't working. label Sep 24, 2022
@rickstaa rickstaa changed the title build: fix vercel node version build: fix wakatime json import bug Sep 24, 2022
@rickstaa rickstaa merged commit 9a909ff into master Sep 24, 2022
@rickstaa rickstaa deleted the fix_json_import branch September 24, 2022 13:37
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 26, 2022
* build: fix vercel node version

* build: remove engine property

* fix: add json import workarround

This commit adds a workaround for importing the `languageColors` JSON
file. This needed to be done since Vercel uses v16.4, which does not
support JSON file importing without the `experimental-json-modules`
flag. See https://simonplend.com/import-json-in-es-modules/
for more information. The workaround can be found [here](https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node).
necofuryai added a commit to necofuryai/github-readme-stats that referenced this pull request May 19, 2025
* build: fix vercel node version

* build: remove engine property

* fix: add json import workarround

This commit adds a workaround for importing the `languageColors` JSON
file. This needed to be done since Vercel uses v16.4, which does not
support JSON file importing without the `experimental-json-modules`
flag. See https://simonplend.com/import-json-in-es-modules/
for more information. The workaround can be found [here](https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant