Commit Graph

40 Commits

Author SHA1 Message Date
Rick Staa
3e66189c44
feat: add CACHE_SECONDS environment variable (#2266)
* feat: add CACHE_SECONDS environment variable

This commit adds the CACHE_SECONDS environment variable. This variable
can be used to circumvent our cache clamping values for self hosted
Vercel instances.

* refactor: apply formatter
2023-06-09 04:44:42 +03:00
Alexandr Garbuzov
98b047751e
Fixed layout toLowerCase bug (#2770) 2023-06-05 12:10:22 +02:00
kitswas
5577bbf07f
New top language algorithm implementation (#1732)
* Reduced vercel maxDuration

* Implemented new algorithm for Top Langs

* Revert "Reduced vercel maxDuration"

This reverts commit b0bc626efe12c738cf5005e7f11c7d2a07b6387a.

* Added documentation

* Fixed broken implementation

* Update fetchTopLanguages.test.js

Changed tests

* Now uses the general formula

The parameters p and q can be set by the user.

* Updated tests and added new test

* Added new test

New test for order by repo count.

* Updated documentation

Added explanation and examples for new options.

* Updated documentation

This was overwritten in the merge commit.

* docs: improve docs and fix tests

* Renamed parameters

Renamed `p` and `q` to `size_weight` and `count_weight`, respectively.

* Updated the documentation

Changes introduced in f2516d60a4

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-04-25 08:19:05 +02:00
Amir
ba7c2f8b55
Support hide_progress for top-langs feature (#2514)
* Add support for hide_progress in top languages feature

* Fix mistake

* Add documents for all languages

* Remove unnecessary value check

* Update top-languages-card.js

* Revert document for all languages except English

* Update documentation

* Update documentation

---------

Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
2023-02-16 06:53:11 +05:30
Rick Staa
06a2a78cfc
Revert "Revert "Add loading Animation to Most used Language card (#2197)" (#2396)" (#2419)
This reverts commit 4b8198fa21.
2023-01-16 12:30:39 +01:00
Rick Staa
4b8198fa21
Revert "Add loading Animation to Most used Language card (#2197)" (#2396)
This reverts commit 77dcdab42c.
2023-01-12 22:52:34 +01:00
Huzaifa Khilawala
77dcdab42c
Add loading Animation to Most used Language card (#2197)
* add: text animation

* compact progress done

* cleaned code

* non compact animation done

* tests fixed + prettier

* revert: vercel.json

* remove: unnecessary import

* added parameter in docs

* style: improve syntax

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-01-10 12:21:35 +00:00
Rick Staa
3cb205c65b
feat: improve card loading speed (#2124)
* feat: improve card loading times

This commit adds the `stale-while-revalidate` option to speed up the
card loading times.

* mend
2022-11-21 10:21:46 +01:00
Rick Staa
42a4b6f60a
refactor: remove unused dotenv calls (#2059)
As explained in the Vercel documentation vercel ignores dot files (see
https://github.com/vercel/vercel/discussions/3962#discussioncomment-4277). It
instead loads the env variables defined in the vercel instance. As a
result we can therefore remove dotenv.
2022-11-21 10:13:14 +01:00
Rick Staa
98f9045f98
fix: improve error caching behavoir (#2211)
This commit ensures that the GraphQL Pat error is not cached in any
browser. See
https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282630614.
2022-10-18 18:07:38 +02:00
Rick Staa
4df8094e52
fix: prevent errors from being cached (#2160) 2022-10-09 20:23:31 +02:00
rickstaa
8886b93a7e
refactor: clean up imports 2022-09-24 14:10:06 +02:00
rickstaa
41d6760abd
fix: fix es6 import file extension 2022-09-24 13:20:52 +02:00
rsk2
107f7ca52c
Feature/grs 1955 change commonjs imports (#1995)
* GRS-1955: Using ES6 import/export in src files

* GRS-1955: Using ES6 import/export in test files

* GRS-1955: Using ES6 import/export in themes index.js

* GRS-1955: Readding blank line at end of top-languages-card.js

* feat: fix test es6 import errors

This commit makes sure jest is set-up to support es6. It also fixes
several test errors and sorts the imports.

* test: update test node version

This commit makes sure node 16 is used in the github actions.

* refactor: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-24 10:20:54 +02:00
Anurag Hazra
9d2bfd9d8f
fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Rick Staa
fbde5aced2
fix: remove hide argument from 'fetchTopLanguages' call (#1451)
This commit removes the `hide` argument from the `fetchTopLanguages` call
found in the `top-lang.js` file. This was done since this was leftover
from 465faa7c32.
2021-12-13 20:27:50 +05:30
Anurag Hazra
02ebd3243b
refactor: jsdoc in utils & minor changes (#1377)
* refactor: jsdoc in utils & minor changes

* chore: jsdoc Card class

* chore: jsdoc for getStyles
2021-10-10 20:41:40 +05:30
Anurag Hazra
112efb4b92
refactor: language card renderer refactor (#1184)
* refactor: language card render refactor

* chore: change error msg
2021-07-11 19:28:06 +05:30
Florian Bussmann
f8b0c8767e
fix: langs_count overflow when hide is set (#989) 2021-05-07 00:31:04 +05:30
Rishi Suresh
7a096acf66
feat: added border_color option (#1000)
* feat: Allow customization of border color

* docs: Update readme
2021-04-28 00:28:44 +05:30
Mohammed Mushahid Qureshi
465faa7c32
fix: hide in top_languages interfering with number of languages displayed (#959)
* added a dark theme like the github dark theme

* fixed hide in top_languages interfering with number of languages displayed

* fixed hide in top_languages interfering with number of languages displayed

* fixed hide in top_languages interfering with number of languages displayed

* fixed misplaced function argument

* style(themes): Add GitHub dark theme (#758)

This styling falls in line with the recently released GitHub dark mode

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>

* docs: add covid fund link (#1019)

* docs: add `npm install` step to CONTRIBUTING.md (#1015)

* fix: apply parseBoolean to hide_border in pin.js (#1014)

* feat: limit langs shown on wakatime card (#988)

* fix: fixed javascript oof moment

Co-authored-by: Issy <48881813+issy@users.noreply.github.com>
Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
Co-authored-by: Mike Beaton <mjsbeaton@gmail.com>
Co-authored-by: Florian Bussmann <hallo@florian-bussmann.de>
2021-04-27 01:12:24 +05:30
Teddy Heinen
c8a5e835a5
feat: add corner rounding parameter so we can make square cards (#845)
* add corner rounding parameter so i can make square cards

* rename rx to border_radius
2021-03-07 22:23:32 +05:30
Anurag Hazra
10d8ca6a38
fix: fixed available locale list (#603) 2020-10-31 14:50:46 +05:30
Nathan Chu
f1df178643
feat: card locale translations (#509)
* Add Card Translations

* Add tests and documentation for `?lang` option

* Card Translations: update Italian

* Run Prettier

* Correct German Translations.

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* refactor: added i18n class to manage translation logic & improved code

* Make the new src/translations.js more concise

* Update translations.js

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* Revert 4175484d69

* fix: overlap because of language length

Co-authored-by: lrusso96 <russo.1699981@studenti.uniroma1.it>
Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-10-04 13:35:15 +05:30
Nathan Chu
057ff69ac2
feat: custom card title (#293)
* Custom stats title (anuraghazra#229)

* Add custom title test

* remove unused code

* Update readme.md to include the `custom_title` option

* Update readme_es.md to include `custom_title` option

Co-Authored-By: José Javier Rodríguez Zas <jjavierdguezas@gmail.com>

* Merge branch 'master' of https://github.com/anuraghazra/github-readme-stats.git into custom-title

* feat: added customTitle option in Card

Co-authored-by: José Javier Rodríguez Zas <jjavierdguezas@gmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-09-27 13:10:39 +05:30
Bas950
d4e2a1b395
feat: added "exclude_repo" option to Top Langs (#493)
* 🚀 Added "exclude_repo" option to Top Langs

* chore: code style update

Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-09-27 12:39:44 +05:30
Bas950
8aea1e3c35
feat: added repo card hide border option (#488)
* 🚀 Prettier config

* 🚀 hide_border for Repo Card

* fix: wrong total commits (#490)

* chore: run prettier on all files

* chore: lol lets add the trailing commas

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
2020-09-24 21:38:14 +05:30
Benjamin Ashbaugh
e9019c1453
feat: added number of languages param for top langs card (#445)
* feat: num_langs param for top langs

* fix: top-langs card bottom padding with num_langs param

* fix: clamp toplangs num_langs rather than throwing error

* feat: changed param name & fixed minor issues, added tests

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-09-12 18:46:18 +05:30
Anurag Hazra
6fa8c26754
fix: added temporary blacklist (#399) 2020-08-17 14:18:17 +05:30
Anurag Hazra
056aaaf189
fix: catched all errors (#384) 2020-08-13 21:18:26 +05:30
Anurag Hazra
ec246d27ab
fix: increase cache 2020-08-13 19:26:42 +05:30
Anurag Hazra
ee513240ef
feat: adde CustomError class for better secondary errors (#355) 2020-08-10 19:36:56 +05:30
Anurag Hazra
67b434dc79
chore(*): reorganized all files and folders (#283) 2020-08-02 13:07:26 +05:30
Anurag Hazra
3b0f1b11a0
refactor: added reusable Card class to reduce code & test duplication (#260)
* refactor: added reusable Card class to reduce code & test duplication

* fix: top-langs card width & documented card_width option
2020-07-30 19:19:03 +05:30
Sagar
b8330a88e1
feat: Added compact layout for top languages card (#179)
* compact layout for top langs card

* 🐞 FIX: most used lang should be first, apply correct colors, removed nested svgs and height set

* 🐞 FIX: conditionally rendering layout compact

* 🐞 FIX: border radius on lang progressbar

* refactor: refactored code & fixed bugs

* fix: toFixed

* chore: change string interpolation

* docs: updated readme

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-26 21:45:23 +05:30
Anurag Hazra
aa44bd7615
fix: hide parameter array implementation (#162)
* fix: hide paramter array implementation

* chore: parseArray str check

* docs: updated readme

* chore: add codecov threshold

* docs: update docs
2020-07-23 21:01:23 +05:30
Arjun Mahishi
c2adcfd6fe
feat: hide specific languages in "Top languages" card (#150)
* add new query param to hide specific languages in top languages card

* [top-langs] add function to clean out the provided lang name

* [top-langs] rename 'hide_lang' => 'hide', refactor logic for parsing the list of provided languages to hide

* [top-langs] take list of languages to hide, as a json array

* chore: minor changes

* docs: added docs for hide lang

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-23 19:47:04 +05:30
anuraghazra
4a8fd03d8d feat: added hide_langs_below option 2020-07-21 18:37:16 +05:30
anuraghazra
7c104cf8c5 tests: added tests for renderTopLanguages & top-langs 2020-07-21 18:04:58 +05:30
anuraghazra
411d8f1ffa feat: added Top languages card 2020-07-21 17:03:05 +05:30