Commit Graph

111 Commits

Author SHA1 Message Date
anuraghazra
bebcb26431 chore: format 2024-10-11 23:19:31 +05:30
anuraghazra
53e40413e7 chore: update 2024-10-11 23:10:49 +05:30
anuraghazra
cdc6ad1eaf feat: cost optimize, increase cache 2024-10-11 23:07:05 +05:30
dependabot[bot]
e559268be4
build(deps-dev): bump eslint from 8.57.0 to 9.8.0 (#3878)
* build(deps-dev): bump eslint from 8.57.0 to 9.8.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.8.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate on latest eslint config

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2024-08-12 20:19:17 +03:00
Ritik Raj
b8983dd697
feat: show wakatime stats in percentage (resolves #3016) (#3326)
* added option to display wakatime in percentage

* updated exclusive options in wakatime

* added percent sign

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* made the required changes

* Update wakatime-card.js

* Update wakatime-card.js

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2023-11-23 21:13:48 +02:00
Alexandr Garbuzov
a8663a8025
feat(wakatime card): add disable animations query option (#3496)
* feat(wakatime card): add disable animations query option

* docs
2023-11-23 21:06:01 +02:00
Alexandr Garbuzov
ddcc30d641
feat(repo card): add description lines count query parameter (#3453)
* feature(repo card): add description lines count query parameter

* dev

* dev

* docs

* test
2023-11-20 20:08:48 +02:00
Alexandr Garbuzov
89fc14609e
refactor: improve blacklisted username error by adding secondary message (#3444) 2023-10-30 11:31:41 +01:00
Pritam Sharma
9c6eb22862
feature: render error card in same theme as requested card (resolves #3259) (#3298)
* Error theme Based on Design

* Update src/common/utils.js

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Update src/common/utils.js

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

---------

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
2023-10-28 22:31:24 +03:00
Alexandr Garbuzov
1c07f4142c
feature: fetch only requested data from GitHub GraphQL API to reduce load (#3208)
* feature: fetch only requested data from GitHub GraphQL API to reduce load

* dev

* dev
2023-10-13 22:14:06 +03:00
Alexandr Garbuzov
2ee803fc16
feature: extend default card cache time to 6 hours (#3242)
* feature: extend default card cache time to 8 hours

* reduce to six hours
2023-09-19 11:54:27 +02:00
Rick Staa
bc8eaecaf4
feat: rate limit error chaching (#2448)
* feat: rate limit error chaching

Rate limit error caching to alleviate PATs.

* refactor: improve code comments
2023-09-17 15:45:17 +02:00
Alexandr Garbuzov
da82999f06
Feature: Gist card: Add hide_border option support (#3080) 2023-08-15 09:25:04 +02:00
Alexandr Garbuzov
fe901dd337
Feature: Add gist card (#3064)
* Feature: Add gist card

* dev

* dev

* dev

* dev

* dev

* dev

* e2e

* e2e test timeout
2023-08-14 11:28:01 +02:00
Alexandr Garbuzov
ed84840b97
Refactor: Status PAT info endpoint: Resolve jsdoc eslint errors (#3045) 2023-08-06 23:09:21 +02:00
Alexandr Garbuzov
8780cc24ae
Refactor: Status up endpoint: Resolve jsdoc eslint errors (#3046) 2023-08-06 23:08:47 +02:00
Alexandr Garbuzov
b70b089b8e
Stats card: migrate from show_total_reviews to show option (resolves #2836) (#2844)
* Stats card: migrate from show_total_reviews to show option (resolves #2836)

* dev

* docs: improve documentation

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-17 23:10:13 +03:00
Markus Tyrkkö
1bb65ddc29
Added pr reviews to stats (#1404)
* Added pr reviews to stats

* Add 'show' query parameter

* Fix show test

* refactoring

* cleanup

* refactor: restructure stats-card code

---------

Co-authored-by: Markus <markus.tyrkko@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-15 09:35:09 +02:00
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
Rick Staa
b9200c6cf6
feat: remove 'include_private' (#2736)
* feat: remove 'include_private'

As explained in #2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
2023-06-07 11:21:28 +03:00
Alexandr Garbuzov
98b047751e
Fixed layout toLowerCase bug (#2770) 2023-06-05 12:10:22 +02:00
Rick Staa
c301289f7d
fix: Make WakaTime card compatible with new API (#2707)
* fix: Make WakaTime card compatible with new API

This commit makes sure that the WakaTime card works with the new
WakaTime API. See https://github.com/anuraghazra/github-readme-stats/issues/2698
for more information.

* fix: fix chinese simplified translations

* fix: improve WakaTime range order

* test: fix WakaTime tests

* refactor: remove WakaTime range loop

* refactor: remove redundant WakaTime call

* test: fix e2e tests

Co-authored-by: Hakula Chen <i@hakula.xyz>

---------

Co-authored-by: Hakula Chen <i@hakula.xyz>
2023-06-02 14:37:59 +05:30
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
Fabiano Couto
879937c11d
feat(RankIcon): add rank_icon option (#2628)
* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank icon option

* feat(RankIcon): extract rankIcon to icons file

* feat(RankIcon): update readme

* feat(RankIcon): test coverage

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-24 13:56:14 +00:00
Caeden Perelli-Harris
d8244a7fe5
Add format stats option (#2155)
* feat: added `format_stats` option (#2128)

* refactor: change `format_stats` to `short_values` (#2128)

* test: create shorten values test (#2128)

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: rename ``short_values`` to ``number_format``

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update src/cards/stats-card.js

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: format codebase

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-01 10:17:56 +05:30
Rick Staa
9ec2c8367a
refactor: fix code comments and change 'up' rate limit (#2560) 2023-03-02 07:44:43 +05:30
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
Anurag Hazra
7aa502d453
chore: minor changes in pat info (#2481) 2023-01-28 20:32:40 +05:30
Rick Staa
077d40561a
feat: add PAT monitoring functions (#2178)
* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* test: fix pat-info tests

* Update api/status/pat-info.js

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

* test: fix broken tests

* chore: fix suspended account

* chore: simplify and refactor

* chore: fix test

* chore: add resetIn field

---------

Co-authored-by: Anurag <hazru.anurag@gmail.com>
2023-01-28 19:52:02 +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
Pranav Joglekar
9aa39dfe81
feat: allow users to pass ring_color param (#2075)
* fix: prevent crash if undefined color is passed to func fallbackColor

* feat: allow users to pass ring_color param

Before this commit, the ring color was always equal to the title color.
This commit allows the user to pass a ring_color property to allow him
to style the ring color the way he pleases to. If no ring_color is
passed we default to the title color.

* docs: improves ring color documentation

* fix: improve code style

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-11-19 20:18:42 +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
Rick Staa
f9b9015ec2
feat(stats): add 'not_bold' option to stats card (#1468) 2022-09-17 13:32:40 +02:00
Rick Staa
c1324b31bf
feat: add 'exclude_repo' option to stats card (#1450)
This commit allows users to exclude repositories for the stats card
using the `exclude_repo` option.
2022-09-16 13:09:19 +02:00
Artem Kostiuk
b0bb994ad3
Fix #1170: Allow customizable width for GitHub Stats Card (#1334)
* Change default stats card width with hide rank

* Add tests for stats card with card_width

* Add card_width Stats Card description to readme

* fix: add icon width to stats-card min width calculation

* fix: fixes rank circle padding problem

This commit fixes a padding problem that was introduced in
f9c0e0bff6. In the new code, the padding
around the rank circle will be 50 when the stats card is bigger than
450. When it is smaller than 450 the left and right padding will shrink
equally.

* style: run prettier

* tests: add extra stats 'card_width' tests

This commit makes sure we also test the stats card width for the case that the 'show_icons'
option is enabled.

* style: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-16 12:50:30 +02:00
Anurag Hazra
9d2bfd9d8f
fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Anurag Hazra
d57251cdf1
refactor(cards): added typings for cards and fetchers (#1596)
* refactor(cards): added typings for cards and fetchers

* chore: move types to separate file
2022-02-23 20:15:01 +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
Julián Sanmartino
d0ab2ff030
fix: wakatime card translations (#1363) 2021-10-06 23:09:43 +05:30
Anurag Hazra
62d65ab483
refactor: refactor repo card (#1325)
* refactor: refactored repo-card

* test: fix tests

* test: fixed tests

* fix: unprovided description error
2021-09-26 21:02:27 +05:30
Julian Holfeld
1a3edcaae0
feat: hide wakatime languages (#1212)
* feat: added option to hide languages

* feat: recalculate percentages for hidden languages

* refactor: reverted langs_count and did some formatting

* doc: added hide to readme

* feat: make languages var mutable and improve filter logic

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>

* refactor: improve code and added tests

Co-authored-by: Adrian Kunz <clashsoft@hotmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2021-08-28 00:35:10 +05:30