forked from mirrored/github-readme-stats
Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6af74da12 | ||
|
|
6c92fe9d2a | ||
|
|
de4efa9ea1 | ||
|
|
888c4cee94 | ||
|
|
ecac85edd5 | ||
|
|
720617a817 | ||
|
|
5d959bc76c | ||
|
|
0d74d5a25d | ||
|
|
c3a8086e45 | ||
|
|
40c5f41caf | ||
|
|
9f7184cc9e | ||
|
|
ee978f332b | ||
|
|
f0268559e0 | ||
|
|
0b642d4fd6 | ||
|
|
e2fa7ad423 | ||
|
|
18c9de0a18 | ||
|
|
b7eb65f819 | ||
|
|
a7998f0186 | ||
|
|
5486e2ca06 | ||
|
|
e5f1399cc2 | ||
|
|
a48d653fa4 |
+234
@@ -0,0 +1,234 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
// "eslint:recommended",
|
||||||
|
"prettier"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
// Possible Errors (overrides from recommended set)
|
||||||
|
|
||||||
|
// "no-extra-parens": "error",
|
||||||
|
// "no-unexpected-multiline": "error",
|
||||||
|
|
||||||
|
// All JSDoc comments must be valid
|
||||||
|
|
||||||
|
// "valid-jsdoc": [ "error", {
|
||||||
|
// "requireReturn": false,
|
||||||
|
// "requireReturnDescription": false,
|
||||||
|
// "requireParamDescription": true,
|
||||||
|
// "prefer": {
|
||||||
|
// "return": "returns"
|
||||||
|
// }
|
||||||
|
// }],
|
||||||
|
|
||||||
|
// Best Practices
|
||||||
|
|
||||||
|
// Allowed a getter without setter, but all setters require getters
|
||||||
|
|
||||||
|
// "accessor-pairs": [ "error", {
|
||||||
|
// "getWithoutSet": false,
|
||||||
|
// "setWithoutGet": true
|
||||||
|
// }],
|
||||||
|
// "block-scoped-var": "warn",
|
||||||
|
// "consistent-return": "error",
|
||||||
|
// "curly": "error",
|
||||||
|
// "default-case": "warn",
|
||||||
|
|
||||||
|
// the dot goes with the property when doing multiline
|
||||||
|
|
||||||
|
// "dot-location": [ "warn", "property" ],
|
||||||
|
// "dot-notation": "warn",
|
||||||
|
// "eqeqeq": [ "error", "smart" ],
|
||||||
|
// "guard-for-in": "warn",
|
||||||
|
// "no-alert": "error",
|
||||||
|
// "no-caller": "error",
|
||||||
|
// "no-case-declarations": "warn",
|
||||||
|
// "no-div-regex": "warn",
|
||||||
|
// "no-else-return": "warn",
|
||||||
|
// "no-empty-label": "warn",
|
||||||
|
// "no-empty-pattern": "warn",
|
||||||
|
// "no-eq-null": "warn",
|
||||||
|
// "no-eval": "error",
|
||||||
|
// "no-extend-native": "error",
|
||||||
|
// "no-extra-bind": "warn",
|
||||||
|
// "no-floating-decimal": "warn",
|
||||||
|
// "no-implicit-coercion": [ "warn", {
|
||||||
|
// "boolean": true,
|
||||||
|
// "number": true,
|
||||||
|
// "string": true
|
||||||
|
// }],
|
||||||
|
// "no-implied-eval": "error",
|
||||||
|
// "no-invalid-this": "error",
|
||||||
|
// "no-iterator": "error",
|
||||||
|
// "no-labels": "warn",
|
||||||
|
// "no-lone-blocks": "warn",
|
||||||
|
// "no-loop-func": "error",
|
||||||
|
// "no-magic-numbers": "warn",
|
||||||
|
// "no-multi-spaces": "error",
|
||||||
|
// "no-multi-str": "warn",
|
||||||
|
// "no-native-reassign": "error",
|
||||||
|
// "no-new-func": "error",
|
||||||
|
// "no-new-wrappers": "error",
|
||||||
|
// "no-new": "error",
|
||||||
|
// "no-octal-escape": "error",
|
||||||
|
// "no-param-reassign": "error",
|
||||||
|
// "no-process-env": "warn",
|
||||||
|
// "no-proto": "error",
|
||||||
|
// "no-redeclare": "error",
|
||||||
|
// "no-return-assign": "error",
|
||||||
|
// "no-script-url": "error",
|
||||||
|
// "no-self-compare": "error",
|
||||||
|
// "no-throw-literal": "error",
|
||||||
|
// "no-unused-expressions": "error",
|
||||||
|
// "no-useless-call": "error",
|
||||||
|
// "no-useless-concat": "error",
|
||||||
|
// "no-void": "warn",
|
||||||
|
|
||||||
|
// Produce warnings when something is commented as TODO or FIXME
|
||||||
|
|
||||||
|
// "no-warning-comments": [ "warn", {
|
||||||
|
// "terms": [ "TODO", "FIXME" ],
|
||||||
|
// "location": "start"
|
||||||
|
// }],
|
||||||
|
// "no-with": "warn",
|
||||||
|
// "radix": "warn",
|
||||||
|
// "vars-on-top": "error",
|
||||||
|
|
||||||
|
// Enforces the style of wrapped functions
|
||||||
|
// "wrap-iife": [ "error", "outside" ],
|
||||||
|
// "yoda": "error",
|
||||||
|
|
||||||
|
// Strict Mode - for ES6, never use strict.
|
||||||
|
// "strict": [ "error", "never" ],
|
||||||
|
|
||||||
|
// Variables
|
||||||
|
|
||||||
|
// "init-declarations": [ "error", "always" ],
|
||||||
|
// "no-catch-shadow": "warn",
|
||||||
|
// "no-delete-var": "error",
|
||||||
|
// "no-label-var": "error",
|
||||||
|
// "no-shadow-restricted-names": "error",
|
||||||
|
// "no-shadow": "warn",
|
||||||
|
|
||||||
|
// We require all vars to be initialized (see init-declarations)
|
||||||
|
// If we NEED a var to be initialized to undefined, it needs to be explicit
|
||||||
|
|
||||||
|
"no-undef-init": "off",
|
||||||
|
"no-undef": "error",
|
||||||
|
"no-undefined": "off",
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
|
||||||
|
// Disallow hoisting - let & const don't allow hoisting anyhow
|
||||||
|
|
||||||
|
// "no-use-before-define": "error",
|
||||||
|
|
||||||
|
// Node.js and CommonJS
|
||||||
|
|
||||||
|
// "callback-return": [ "warn", [ "callback", "next" ]],
|
||||||
|
// "global-require": "error",
|
||||||
|
// "handle-callback-err": "warn",
|
||||||
|
// "no-mixed-requires": "warn",
|
||||||
|
// "no-new-require": "error",
|
||||||
|
|
||||||
|
// Use path.concat instead
|
||||||
|
|
||||||
|
// "no-path-concat": "error",
|
||||||
|
// "no-process-exit": "error",
|
||||||
|
// "no-restricted-modules": "off",
|
||||||
|
// "no-sync": "warn",
|
||||||
|
|
||||||
|
// ECMAScript 6 support
|
||||||
|
|
||||||
|
// "arrow-body-style": [ "error", "always" ],
|
||||||
|
// "arrow-parens": [ "error", "always" ],
|
||||||
|
// "arrow-spacing": [ "error", { "before": true, "after": true }],
|
||||||
|
// "constructor-super": "error",
|
||||||
|
// "generator-star-spacing": [ "error", "before" ],
|
||||||
|
// "no-arrow-condition": "error",
|
||||||
|
// "no-class-assign": "error",
|
||||||
|
// "no-const-assign": "error",
|
||||||
|
// "no-dupe-class-members": "error",
|
||||||
|
// "no-this-before-super": "error",
|
||||||
|
// "no-var": "warn",
|
||||||
|
"object-shorthand": [ "warn" ]
|
||||||
|
// "prefer-arrow-callback": "warn",
|
||||||
|
// "prefer-spread": "warn",
|
||||||
|
// "prefer-template": "warn",
|
||||||
|
// "require-yield": "error",
|
||||||
|
|
||||||
|
// Stylistic - everything here is a warning because of style.
|
||||||
|
|
||||||
|
// "array-bracket-spacing": [ "warn", "always" ],
|
||||||
|
// "block-spacing": [ "warn", "always" ],
|
||||||
|
// "brace-style": [ "warn", "1tbs", { "allowSingleLine": false } ],
|
||||||
|
// "camelcase": "warn",
|
||||||
|
// "comma-spacing": [ "warn", { "before": false, "after": true } ],
|
||||||
|
// "comma-style": [ "warn", "last" ],
|
||||||
|
// "computed-property-spacing": [ "warn", "never" ],
|
||||||
|
// "consistent-this": [ "warn", "self" ],
|
||||||
|
// "eol-last": "warn",
|
||||||
|
// "func-names": "warn",
|
||||||
|
// "func-style": [ "warn", "declaration" ],
|
||||||
|
// "id-length": [ "warn", { "min": 2, "max": 32 } ],
|
||||||
|
// "indent": [ "warn", 4 ],
|
||||||
|
// "jsx-quotes": [ "warn", "prefer-double" ],
|
||||||
|
// "linebreak-style": [ "warn", "unix" ],
|
||||||
|
// "lines-around-comment": [ "warn", { "beforeBlockComment": true } ],
|
||||||
|
// "max-depth": [ "warn", 8 ],
|
||||||
|
// "max-len": [ "warn", 132 ],
|
||||||
|
// "max-nested-callbacks": [ "warn", 8 ],
|
||||||
|
// "max-params": [ "warn", 8 ],
|
||||||
|
// "new-cap": "warn",
|
||||||
|
// "new-parens": "warn",
|
||||||
|
// "no-array-constructor": "warn",
|
||||||
|
// "no-bitwise": "off",
|
||||||
|
// "no-continue": "off",
|
||||||
|
// "no-inline-comments": "off",
|
||||||
|
// "no-lonely-if": "warn",
|
||||||
|
// "no-mixed-spaces-and-tabs": "warn",
|
||||||
|
// "no-multiple-empty-lines": "warn",
|
||||||
|
// "no-negated-condition": "off",
|
||||||
|
// "no-nested-ternary": "warn",
|
||||||
|
// "no-new-object": "warn",
|
||||||
|
// "no-plusplus": "off",
|
||||||
|
// "no-spaced-func": "warn",
|
||||||
|
// "no-ternary": "off",
|
||||||
|
// "no-trailing-spaces": "warn",
|
||||||
|
// "no-underscore-dangle": "warn",
|
||||||
|
// "no-unneeded-ternary": "warn",
|
||||||
|
// "object-curly-spacing": [ "warn", "always" ],
|
||||||
|
// "one-var": "off",
|
||||||
|
// "operator-assignment": [ "warn", "never" ],
|
||||||
|
// "operator-linebreak": [ "warn", "after" ],
|
||||||
|
// "padded-blocks": [ "warn", "never" ],
|
||||||
|
// "quote-props": [ "warn", "consistent-as-needed" ],
|
||||||
|
// "quotes": [ "warn", "single" ],
|
||||||
|
// "require-jsdoc": [ "warn", {
|
||||||
|
// "require": {
|
||||||
|
// "FunctionDeclaration": true,
|
||||||
|
// "MethodDefinition": true,
|
||||||
|
// "ClassDeclaration": false
|
||||||
|
// }
|
||||||
|
// }],
|
||||||
|
// "semi-spacing": [ "warn", { "before": false, "after": true }],
|
||||||
|
// "semi": [ "error", "always" ],
|
||||||
|
// "sort-vars": "off",
|
||||||
|
// "space-after-keywords": [ "warn", "always" ],
|
||||||
|
// "space-before-blocks": [ "warn", "always" ],
|
||||||
|
// "space-before-function-paren": [ "warn", "never" ],
|
||||||
|
// "space-before-keywords": [ "warn", "always" ],
|
||||||
|
// "space-in-parens": [ "warn", "never" ],
|
||||||
|
// "space-infix-ops": [ "warn", { "int32Hint": true } ],
|
||||||
|
// "space-return-throw-case": "error",
|
||||||
|
// "space-unary-ops": "error",
|
||||||
|
// "spaced-comment": [ "warn", "always" ],
|
||||||
|
// "wrap-regex": "warn"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ name: Test Deployment
|
|||||||
on:
|
on:
|
||||||
deployment_status:
|
deployment_status:
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2eTests:
|
e2eTests:
|
||||||
if:
|
if:
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
- edited
|
- edited
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: write
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: read
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
closeEmptyIssuesAndTemplates:
|
closeEmptyIssuesAndTemplates:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "themes/index.js"
|
- "themes/index.js"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: write
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: read
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generateThemeDoc:
|
generateThemeDoc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -2,6 +2,20 @@ name: "Pull Request Labeler"
|
|||||||
on:
|
on:
|
||||||
- pull_request_target
|
- pull_request_target
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: write
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
name: OSSF Scorecard analysis workflow
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analysis:
|
||||||
|
name: Scorecard analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# Needed if using Code scanning alerts
|
||||||
|
security-events: write
|
||||||
|
# Needed for GitHub OIDC token if publish_results is true
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout code"
|
||||||
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: "Run analysis"
|
||||||
|
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
|
||||||
|
with:
|
||||||
|
results_file: results.sarif
|
||||||
|
results_format: sarif
|
||||||
|
publish_results: true
|
||||||
|
|
||||||
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
|
# format to the repository Actions tab.
|
||||||
|
- name: "Upload artifact"
|
||||||
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||||
|
with:
|
||||||
|
name: SARIF file
|
||||||
|
path: results.sarif
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
# required for Code scanning alerts
|
||||||
|
- name: "Upload SARIF results to code scanning"
|
||||||
|
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
|
||||||
|
with:
|
||||||
|
sarif_file: results.sarif
|
||||||
@@ -7,6 +7,20 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "themes/index.js"
|
- "themes/index.js"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: write
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
previewTheme:
|
previewTheme:
|
||||||
name: Install & Preview
|
name: Install & Preview
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ on:
|
|||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: read
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup:
|
cleanup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -3,6 +3,20 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 */7 * *"
|
- cron: "0 0 */7 * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: write
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
closeOldThemePrs:
|
closeOldThemePrs:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Perform tests
|
name: Perform tests
|
||||||
@@ -29,6 +31,10 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
|
- name: Run ESLint
|
||||||
|
run: |
|
||||||
|
npm run lints
|
||||||
|
|
||||||
- name: Run Prettier
|
- name: Run Prettier
|
||||||
run: |
|
run: |
|
||||||
npm run format:check
|
npm run format:check
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ on:
|
|||||||
- cron: "0 0 */3 * *"
|
- cron: "0 0 */3 * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: write
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: write
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
showAndLabelTopIssues:
|
showAndLabelTopIssues:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -3,6 +3,20 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 */30 * *"
|
- cron: "0 0 */30 * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: read
|
||||||
|
contents: read
|
||||||
|
deployments: read
|
||||||
|
issues: read
|
||||||
|
discussions: read
|
||||||
|
packages: read
|
||||||
|
pages: read
|
||||||
|
pull-requests: write
|
||||||
|
repository-projects: read
|
||||||
|
security-events: read
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
updateLanguages:
|
updateLanguages:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm test
|
npm test
|
||||||
|
npm run lints
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
|||||||
+5
-2
@@ -47,14 +47,17 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_
|
|||||||
|
|
||||||
GitHub Readme Stats supports custom theming, and you can also contribute new themes!
|
GitHub Readme Stats supports custom theming, and you can also contribute new themes!
|
||||||
|
|
||||||
All you need to do is edit the [themes/index.js](./themes/index.js) file and add your theme at the end of the file.
|
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead.
|
> If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). Remember that you can also support themes of other contributors that you liked to speed up their merge.
|
> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). Remember that you can also support themes of other contributors that you liked to speed up their merge.
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> Before submitting pull request, please make sure that your theme pass WCAG 2.0 level AA constrast ration test. You can use [this tool](https://webaim.org/resources/contrastchecker/) to check it.
|
||||||
|
|
||||||
|
To contribute your theme you need to edit the [themes/index.js](./themes/index.js) file and add it at the end of the file.
|
||||||
|
|
||||||
## Any contributions you make will be under the MIT Software License
|
## Any contributions you make will be under the MIT Software License
|
||||||
|
|
||||||
In short, when you submit changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
|
In short, when you submit changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -8,8 +8,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -8,8 +8,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Testes aprovados" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Testes aprovados" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
||||||
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
Generated
+1405
-220
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -29,7 +29,8 @@
|
|||||||
"generate-langs-json": "node scripts/generate-langs-json",
|
"generate-langs-json": "node scripts/generate-langs-json",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "prettier --check .",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install",
|
||||||
|
"lints": "npx eslint --max-warnings 0 \"./src/**.js\" \"./scripts/**.js\" \"./tests/**.js\" \"./api/**.js\" \"./themes/**.js\""
|
||||||
},
|
},
|
||||||
"author": "Anurag Hazra",
|
"author": "Anurag Hazra",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -41,6 +42,8 @@
|
|||||||
"@uppercod/css-to-object": "^1.1.1",
|
"@uppercod/css-to-object": "^1.1.1",
|
||||||
"axios-mock-adapter": "^1.21.2",
|
"axios-mock-adapter": "^1.21.2",
|
||||||
"color-contrast-checker": "^2.1.0",
|
"color-contrast-checker": "^2.1.0",
|
||||||
|
"eslint": "^8.43.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"hjson": "^3.2.2",
|
"hjson": "^3.2.2",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,6 +19,9 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
||||||
|
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
@@ -83,38 +86,38 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of
|
|||||||
|
|
||||||
# Features <!-- omit in toc -->
|
# Features <!-- omit in toc -->
|
||||||
|
|
||||||
- [GitHub Stats Card](#github-stats-card)
|
* [GitHub Stats Card](#github-stats-card)
|
||||||
- [Hiding individual stats](#hiding-individual-stats)
|
* [Hiding individual stats](#hiding-individual-stats)
|
||||||
- [Showing additional individual stats](#showing-additional-individual-stats)
|
* [Showing additional individual stats](#showing-additional-individual-stats)
|
||||||
- [Showing icons](#showing-icons)
|
* [Showing icons](#showing-icons)
|
||||||
- [Themes](#themes)
|
* [Themes](#themes)
|
||||||
- [Customization](#customization)
|
* [Customization](#customization)
|
||||||
- [GitHub Extra Pins](#github-extra-pins)
|
* [GitHub Extra Pins](#github-extra-pins)
|
||||||
- [Usage](#usage)
|
* [Usage](#usage)
|
||||||
- [Demo](#demo)
|
* [Demo](#demo)
|
||||||
- [Top Languages Card](#top-languages-card)
|
* [Top Languages Card](#top-languages-card)
|
||||||
- [Usage](#usage-1)
|
* [Usage](#usage-1)
|
||||||
- [Language stats algorithm](#language-stats-algorithm)
|
* [Language stats algorithm](#language-stats-algorithm)
|
||||||
- [Exclude individual repositories](#exclude-individual-repositories)
|
* [Exclude individual repositories](#exclude-individual-repositories)
|
||||||
- [Hide individual languages](#hide-individual-languages)
|
* [Hide individual languages](#hide-individual-languages)
|
||||||
- [Show more languages](#show-more-languages)
|
* [Show more languages](#show-more-languages)
|
||||||
- [Compact Language Card Layout](#compact-language-card-layout)
|
* [Compact Language Card Layout](#compact-language-card-layout)
|
||||||
- [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
* [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
||||||
- [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
* [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
||||||
- [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
* [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
||||||
- [Hide Progress Bars](#hide-progress-bars)
|
* [Hide Progress Bars](#hide-progress-bars)
|
||||||
- [Demo](#demo-1)
|
* [Demo](#demo-1)
|
||||||
- [Wakatime Stats Card](#wakatime-stats-card)
|
* [Wakatime Stats Card](#wakatime-stats-card)
|
||||||
- [Demo](#demo-2)
|
* [Demo](#demo-2)
|
||||||
- [All Demos](#all-demos)
|
* [All Demos](#all-demos)
|
||||||
- [Quick Tip (Align The Cards)](#quick-tip-align-the-cards)
|
* [Quick Tip (Align The Cards)](#quick-tip-align-the-cards)
|
||||||
- [Deploy on your own](#deploy-on-your-own)
|
* [Deploy on your own](#deploy-on-your-own)
|
||||||
- [On Vercel](#on-vercel)
|
* [On Vercel](#on-vercel)
|
||||||
- [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
* [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
||||||
- [On other platforms](#on-other-platforms)
|
* [On other platforms](#on-other-platforms)
|
||||||
- [Disable rate limit protections](#disable-rate-limit-protections)
|
* [Disable rate limit protections](#disable-rate-limit-protections)
|
||||||
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
* [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||||
- [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
* [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
||||||
|
|
||||||
# Important Notice <!-- omit in toc -->
|
# Important Notice <!-- omit in toc -->
|
||||||
|
|
||||||
@@ -181,7 +184,7 @@ GitHub readme stats comes with several built-in themes (e.g. `dark`, `radical`,
|
|||||||
|
|
||||||
<img src="https://res.cloudinary.com/anuraghazra/image/upload/v1595174536/grs-themes_l4ynja.png" alt="GitHub Readme Stats Themes" width="600px"/>
|
<img src="https://res.cloudinary.com/anuraghazra/image/upload/v1595174536/grs-themes_l4ynja.png" alt="GitHub Readme Stats Themes" width="600px"/>
|
||||||
|
|
||||||
You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js) & **you can also contribute new themes** if you like :D
|
You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js). You can also contribute new themes if you like, contributing guidelines can be found [here](./CONTRIBUTING.md#themes-contribution).
|
||||||
|
|
||||||
#### Responsive Card Theme
|
#### Responsive Card Theme
|
||||||
|
|
||||||
@@ -553,10 +556,6 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
* Shows rank progress instead of rank level
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
* Shows user rank percentile instead of rank level
|
* Shows user rank percentile instead of rank level
|
||||||
|
|
||||||

|

|
||||||
@@ -616,10 +615,10 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats">
|
<a href="https://github.com/anuraghazra/github-readme-stats">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
<img height=200 align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/convoychat">
|
<a href="https://github.com/anuraghazra/convoychat">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
<img height=200 align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
||||||
</a>
|
</a>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -636,10 +635,10 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
|||||||
***
|
***
|
||||||
|
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats">
|
<a href="https://github.com/anuraghazra/github-readme-stats">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
<img height=200 align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/convoychat">
|
<a href="https://github.com/anuraghazra/convoychat">
|
||||||
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
<img height=200 align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ export const run = async () => {
|
|||||||
debug("Theme preview body: Check if the theme colors are valid...");
|
debug("Theme preview body: Check if the theme colors are valid...");
|
||||||
let invalidColors = false;
|
let invalidColors = false;
|
||||||
if (!colors) {
|
if (!colors) {
|
||||||
warning.push("Theme colors are missing");
|
warnings.push("Theme colors are missing");
|
||||||
invalidColors = true;
|
invalidColors = true;
|
||||||
} else {
|
} else {
|
||||||
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ function calculateRank({
|
|||||||
commits,
|
commits,
|
||||||
prs,
|
prs,
|
||||||
issues,
|
issues,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
repos, // unused
|
repos, // unused
|
||||||
stars,
|
stars,
|
||||||
followers,
|
followers,
|
||||||
@@ -61,7 +62,7 @@ function calculateRank({
|
|||||||
|
|
||||||
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
||||||
|
|
||||||
return { level: level, percentile: rank * 100 };
|
return { level, percentile: rank * 100 };
|
||||||
}
|
}
|
||||||
|
|
||||||
export { calculateRank };
|
export { calculateRank };
|
||||||
|
|||||||
+39
-11
@@ -3,6 +3,7 @@ import { Card } from "../common/Card.js";
|
|||||||
import { I18n } from "../common/I18n.js";
|
import { I18n } from "../common/I18n.js";
|
||||||
import { icons, rankIcon } from "../common/icons.js";
|
import { icons, rankIcon } from "../common/icons.js";
|
||||||
import {
|
import {
|
||||||
|
CustomError,
|
||||||
clampValue,
|
clampValue,
|
||||||
flexLayout,
|
flexLayout,
|
||||||
getCardColors,
|
getCardColors,
|
||||||
@@ -16,6 +17,8 @@ const CARD_MIN_WIDTH = 287;
|
|||||||
const CARD_DEFAULT_WIDTH = 287;
|
const CARD_DEFAULT_WIDTH = 287;
|
||||||
const RANK_CARD_MIN_WIDTH = 420;
|
const RANK_CARD_MIN_WIDTH = 420;
|
||||||
const RANK_CARD_DEFAULT_WIDTH = 450;
|
const RANK_CARD_DEFAULT_WIDTH = 450;
|
||||||
|
const RANK_ONLY_CARD_MIN_WIDTH = 290;
|
||||||
|
const RANK_ONLY_CARD_DEFAULT_WIDTH = 290;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a stats card text item.
|
* Create a stats card text item.
|
||||||
@@ -234,11 +237,18 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (statItems.length === 0 && hide_rank) {
|
||||||
|
throw new CustomError(
|
||||||
|
"Could not render stats card.",
|
||||||
|
"Either stats or rank are required.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate the card height depending on how many items there are
|
// Calculate the card height depending on how many items there are
|
||||||
// but if rank circle is visible clamp the minimum height to `150`
|
// but if rank circle is visible clamp the minimum height to `150`
|
||||||
let height = Math.max(
|
let height = Math.max(
|
||||||
45 + (statItems.length + 1) * lheight,
|
45 + (statItems.length + 1) * lheight,
|
||||||
hide_rank ? 0 : 150,
|
hide_rank ? 0 : statItems.length ? 150 : 180,
|
||||||
);
|
);
|
||||||
|
|
||||||
// the lower the user's percentile the better
|
// the lower the user's percentile the better
|
||||||
@@ -253,7 +263,13 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const calculateTextWidth = () => {
|
const calculateTextWidth = () => {
|
||||||
return measureText(custom_title ? custom_title : i18n.t("statcard.title"));
|
return measureText(
|
||||||
|
custom_title
|
||||||
|
? custom_title
|
||||||
|
: statItems.length
|
||||||
|
? i18n.t("statcard.title")
|
||||||
|
: i18n.t("statcard.ranktitle"),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -261,7 +277,7 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true).
|
When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true).
|
||||||
Numbers are picked by looking at existing dimensions on production.
|
Numbers are picked by looking at existing dimensions on production.
|
||||||
*/
|
*/
|
||||||
const iconWidth = show_icons ? 16 + /* padding */ 1 : 0;
|
const iconWidth = show_icons && statItems.length ? 16 + /* padding */ 1 : 0;
|
||||||
const minCardWidth =
|
const minCardWidth =
|
||||||
(hide_rank
|
(hide_rank
|
||||||
? clampValue(
|
? clampValue(
|
||||||
@@ -269,9 +285,15 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
CARD_MIN_WIDTH,
|
CARD_MIN_WIDTH,
|
||||||
Infinity,
|
Infinity,
|
||||||
)
|
)
|
||||||
: RANK_CARD_MIN_WIDTH) + iconWidth;
|
: statItems.length
|
||||||
|
? RANK_CARD_MIN_WIDTH
|
||||||
|
: RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
|
||||||
const defaultCardWidth =
|
const defaultCardWidth =
|
||||||
(hide_rank ? CARD_DEFAULT_WIDTH : RANK_CARD_DEFAULT_WIDTH) + iconWidth;
|
(hide_rank
|
||||||
|
? CARD_DEFAULT_WIDTH
|
||||||
|
: statItems.length
|
||||||
|
? RANK_CARD_DEFAULT_WIDTH
|
||||||
|
: RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
|
||||||
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
||||||
if (width < minCardWidth) {
|
if (width < minCardWidth) {
|
||||||
width = minCardWidth;
|
width = minCardWidth;
|
||||||
@@ -279,7 +301,9 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
|
|
||||||
const card = new Card({
|
const card = new Card({
|
||||||
customTitle: custom_title,
|
customTitle: custom_title,
|
||||||
defaultTitle: i18n.t("statcard.title"),
|
defaultTitle: statItems.length
|
||||||
|
? i18n.t("statcard.title")
|
||||||
|
: i18n.t("statcard.ranktitle"),
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
border_radius,
|
border_radius,
|
||||||
@@ -309,12 +333,16 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
* @returns {number} - Rank circle translation value.
|
* @returns {number} - Rank circle translation value.
|
||||||
*/
|
*/
|
||||||
const calculateRankXTranslation = () => {
|
const calculateRankXTranslation = () => {
|
||||||
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
if (statItems.length) {
|
||||||
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
||||||
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
||||||
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
||||||
|
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
||||||
|
} else {
|
||||||
|
return minXTranslation + (width - minCardWidth) / 2;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return minXTranslation + (width - minCardWidth) / 2;
|
return width / 2 + 20 - 10;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ const DONUT_VERTICAL_LAYOUT_DEFAULT_LANGS_COUNT = 6;
|
|||||||
* Retrieves the programming language whose name is the longest.
|
* Retrieves the programming language whose name is the longest.
|
||||||
*
|
*
|
||||||
* @param {Lang[]} arr Array of programming languages.
|
* @param {Lang[]} arr Array of programming languages.
|
||||||
* @returns {Object} Longest programming language object.
|
* @returns {{ name: string, size: number, color: string }} Longest programming language object.
|
||||||
*/
|
*/
|
||||||
const getLongestLang = (arr) =>
|
const getLongestLang = (arr) =>
|
||||||
arr.reduce(
|
arr.reduce(
|
||||||
(savedLang, lang) =>
|
(savedLang, lang) =>
|
||||||
lang.name.length > savedLang.name.length ? lang : savedLang,
|
lang.name.length > savedLang.name.length ? lang : savedLang,
|
||||||
{ name: "", size: null, color: "" },
|
{ name: "", size: 0, color: "" },
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -217,6 +217,7 @@
|
|||||||
"Haxe": "#df7900",
|
"Haxe": "#df7900",
|
||||||
"HiveQL": "#dce200",
|
"HiveQL": "#dce200",
|
||||||
"HolyC": "#ffefaf",
|
"HolyC": "#ffefaf",
|
||||||
|
"Hosts File": "#308888",
|
||||||
"Hy": "#7790B2",
|
"Hy": "#7790B2",
|
||||||
"IDL": "#a3522f",
|
"IDL": "#a3522f",
|
||||||
"IGOR Pro": "#0000cc",
|
"IGOR Pro": "#0000cc",
|
||||||
@@ -517,6 +518,8 @@
|
|||||||
"Volt": "#1F1F1F",
|
"Volt": "#1F1F1F",
|
||||||
"Vue": "#41b883",
|
"Vue": "#41b883",
|
||||||
"Vyper": "#2980b9",
|
"Vyper": "#2980b9",
|
||||||
|
"WDL": "#42f1f4",
|
||||||
|
"WGSL": "#1a5e9a",
|
||||||
"Web Ontology Language": "#5b70bd",
|
"Web Ontology Language": "#5b70bd",
|
||||||
"WebAssembly": "#04133b",
|
"WebAssembly": "#04133b",
|
||||||
"WebAssembly Interface Type": "#6250e7",
|
"WebAssembly Interface Type": "#6250e7",
|
||||||
@@ -561,7 +564,6 @@
|
|||||||
"q": "#0040cd",
|
"q": "#0040cd",
|
||||||
"reStructuredText": "#141414",
|
"reStructuredText": "#141414",
|
||||||
"sed": "#64b970",
|
"sed": "#64b970",
|
||||||
"wdl": "#42f1f4",
|
|
||||||
"wisp": "#7582D1",
|
"wisp": "#7582D1",
|
||||||
"xBase": "#403a40"
|
"xBase": "#403a40"
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates progress along the boundary of the circle i.e it's circumference.
|
* Calculates progress along the boundary of the circle i.e it's circumference.
|
||||||
*
|
*
|
||||||
@@ -75,6 +76,7 @@ const getAnimations = () => {
|
|||||||
* @returns {string} Card CSS styles.
|
* @returns {string} Card CSS styles.
|
||||||
*/
|
*/
|
||||||
const getStyles = ({
|
const getStyles = ({
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
titleColor,
|
titleColor,
|
||||||
textColor,
|
textColor,
|
||||||
iconColor,
|
iconColor,
|
||||||
|
|||||||
+37
-3
@@ -1,11 +1,14 @@
|
|||||||
|
// @ts-check
|
||||||
|
|
||||||
import { encodeHTML } from "./common/utils.js";
|
import { encodeHTML } from "./common/utils.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves stat card labels in the available locales.
|
* Retrieves stat card labels in the available locales.
|
||||||
*
|
*
|
||||||
* @param {string} name The name of the locale.
|
* @param {object} props Function arguments.
|
||||||
* @param {string} apostrophe Whether to use apostrophe or not.
|
* @param {string} props.name The name of the locale.
|
||||||
* @returns {Object} The locales object.
|
* @param {string} props.apostrophe Whether to use apostrophe or not.
|
||||||
|
* @returns {object} The locales object.
|
||||||
*
|
*
|
||||||
* @see https://www.andiamo.co.uk/resources/iso-language-codes/ for language codes.
|
* @see https://www.andiamo.co.uk/resources/iso-language-codes/ for language codes.
|
||||||
*/
|
*/
|
||||||
@@ -43,6 +46,37 @@ const statCardLocales = ({ name, apostrophe }) => {
|
|||||||
vi: `Thống Kê GitHub ${encodedName}`,
|
vi: `Thống Kê GitHub ${encodedName}`,
|
||||||
se: `GitHubstatistik för ${encodedName}`,
|
se: `GitHubstatistik för ${encodedName}`,
|
||||||
},
|
},
|
||||||
|
"statcard.ranktitle": {
|
||||||
|
ar: `${encodedName} إحصائيات غيت هاب`,
|
||||||
|
cn: `${encodedName} 的 GitHub 统计数据`,
|
||||||
|
"zh-tw": `${encodedName} 的 GitHub 統計數據`,
|
||||||
|
cs: `GitHub statistiky uživatele ${encodedName}`,
|
||||||
|
de: `${encodedName + apostrophe} GitHub-Statistiken`,
|
||||||
|
en: `${encodedName}'${apostrophe} GitHub Rank`,
|
||||||
|
bn: `${encodedName} এর GitHub পরিসংখ্যান`,
|
||||||
|
es: `Estadísticas de GitHub de ${encodedName}`,
|
||||||
|
fr: `Statistiques GitHub de ${encodedName}`,
|
||||||
|
hu: `${encodedName} GitHub statisztika`,
|
||||||
|
it: `Statistiche GitHub di ${encodedName}`,
|
||||||
|
ja: `${encodedName} の GitHub ランク`,
|
||||||
|
kr: `${encodedName}의 GitHub 통계`,
|
||||||
|
nl: `${encodedName}'${apostrophe} GitHub-statistieken`,
|
||||||
|
"pt-pt": `Estatísticas do GitHub de ${encodedName}`,
|
||||||
|
"pt-br": `Estatísticas do GitHub de ${encodedName}`,
|
||||||
|
np: `${encodedName}'${apostrophe} गिटहब तथ्याङ्क`,
|
||||||
|
el: `Στατιστικά GitHub του ${encodedName}`,
|
||||||
|
ru: `Статистика GitHub пользователя ${encodedName}`,
|
||||||
|
"uk-ua": `Статистика GitHub користувача ${encodedName}`,
|
||||||
|
id: `Statistik GitHub ${encodedName}`,
|
||||||
|
ml: `${encodedName}'${apostrophe} ഗിറ്റ്ഹബ് സ്ഥിതിവിവരക്കണക്കുകൾ`,
|
||||||
|
my: `Statistik GitHub ${encodedName}`,
|
||||||
|
sk: `GitHub štatistiky používateľa ${encodedName}`,
|
||||||
|
tr: `${encodedName} Hesabının GitHub Yıldızları`,
|
||||||
|
pl: `Statystyki GitHub użytkownika ${encodedName}`,
|
||||||
|
uz: `${encodedName}ning GitHub'dagi statistikasi`,
|
||||||
|
vi: `Thống Kê GitHub ${encodedName}`,
|
||||||
|
se: `GitHubstatistik för ${encodedName}`,
|
||||||
|
},
|
||||||
"statcard.totalstars": {
|
"statcard.totalstars": {
|
||||||
ar: "مجموع النجوم",
|
ar: "مجموع النجوم",
|
||||||
cn: "获标星数(star)",
|
cn: "获标星数(star)",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import api from "../api/index.js";
|
|||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
import { renderStatsCard } from "../src/cards/stats-card.js";
|
import { renderStatsCard } from "../src/cards/stats-card.js";
|
||||||
import { CONSTANTS, renderError } from "../src/common/utils.js";
|
import { CONSTANTS, renderError } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const stats = {
|
const stats = {
|
||||||
name: "Anurag Hazra",
|
name: "Anurag Hazra",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
describe("Test calculateRank", () => {
|
describe("Test calculateRank", () => {
|
||||||
it("new user gets C rank", () => {
|
it("new user gets C rank", () => {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { cssToObject } from "@uppercod/css-to-object";
|
|||||||
import { Card } from "../src/common/Card.js";
|
import { Card } from "../src/common/Card.js";
|
||||||
import { icons } from "../src/common/icons.js";
|
import { icons } from "../src/common/icons.js";
|
||||||
import { getCardColors } from "../src/common/utils.js";
|
import { getCardColors } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
describe("Card", () => {
|
describe("Card", () => {
|
||||||
it("should hide border", () => {
|
it("should hide border", () => {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
import { describe } from "@jest/globals";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { renderRepoCard } from "../../src/cards/repo-card.js";
|
import { renderRepoCard } from "../../src/cards/repo-card.js";
|
||||||
import { renderStatsCard } from "../../src/cards/stats-card.js";
|
import { renderStatsCard } from "../../src/cards/stats-card.js";
|
||||||
import { renderTopLanguages } from "../../src/cards/top-languages-card.js";
|
import { renderTopLanguages } from "../../src/cards/top-languages-card.js";
|
||||||
import { renderWakatimeCard } from "../../src/cards/wakatime-card.js";
|
import { renderWakatimeCard } from "../../src/cards/wakatime-card.js";
|
||||||
|
import { expect, describe, beforeAll, test } from "@jest/globals";
|
||||||
|
|
||||||
const REPO = "curly-fiesta";
|
const REPO = "curly-fiesta";
|
||||||
const USER = "catelinemnemosyne";
|
const USER = "catelinemnemosyne";
|
||||||
@@ -108,7 +108,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if stats card from deployment matches the stats card from local.
|
// Check if stats card from deployment matches the stats card from local.
|
||||||
expect(serverStatsSvg.data).toEqual(localStatsCardSVG);
|
expect(serverStatsSvg.data).toEqual(localStatsCardSVG);
|
||||||
}, 7000);
|
}, 15000);
|
||||||
|
|
||||||
test("retrieve language card", async () => {
|
test("retrieve language card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -133,7 +133,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if language card from deployment matches the local language card.
|
// Check if language card from deployment matches the local language card.
|
||||||
expect(severLanguageSVG.data).toEqual(localLanguageCardSVG);
|
expect(severLanguageSVG.data).toEqual(localLanguageCardSVG);
|
||||||
});
|
}, 15000);
|
||||||
|
|
||||||
test("retrieve WakaTime card", async () => {
|
test("retrieve WakaTime card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -153,7 +153,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if WakaTime card from deployment matches the local WakaTime card.
|
// Check if WakaTime card from deployment matches the local WakaTime card.
|
||||||
expect(serverWakaTimeSvg.data).toEqual(localWakaCardSVG);
|
expect(serverWakaTimeSvg.data).toEqual(localWakaCardSVG);
|
||||||
});
|
}, 15000);
|
||||||
|
|
||||||
test("retrieve repo card", async () => {
|
test("retrieve repo card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -175,5 +175,5 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if Repo card from deployment matches the local Repo card.
|
// Check if Repo card from deployment matches the local Repo card.
|
||||||
expect(serverRepoSvg.data).toEqual(localRepoCardSVG);
|
expect(serverRepoSvg.data).toEqual(localRepoCardSVG);
|
||||||
});
|
}, 15000);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchRepo } from "../src/fetchers/repo-fetcher.js";
|
import { fetchRepo } from "../src/fetchers/repo-fetcher.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const data_repo = {
|
const data_repo = {
|
||||||
repository: {
|
repository: {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import axios from "axios";
|
|||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
import { fetchStats } from "../src/fetchers/stats-fetcher.js";
|
import { fetchStats } from "../src/fetchers/stats-fetcher.js";
|
||||||
|
import { expect, it, describe, beforeEach, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
// Test parameters.
|
// Test parameters.
|
||||||
const data_stats = {
|
const data_stats = {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js";
|
import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js";
|
import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { flexLayout } from "../src/common/utils.js";
|
import { flexLayout } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
describe("flexLayout", () => {
|
describe("flexLayout", () => {
|
||||||
it("should work with row & col layouts", () => {
|
it("should work with row & col layouts", () => {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { jest } from "@jest/globals";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js";
|
import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js";
|
||||||
|
import { expect, it, describe, afterEach, beforeAll } from "@jest/globals";
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import MockAdapter from "axios-mock-adapter";
|
|||||||
import pin from "../api/pin.js";
|
import pin from "../api/pin.js";
|
||||||
import { renderRepoCard } from "../src/cards/repo-card.js";
|
import { renderRepoCard } from "../src/cards/repo-card.js";
|
||||||
import { renderError } from "../src/common/utils.js";
|
import { renderError } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const data_repo = {
|
const data_repo = {
|
||||||
repository: {
|
repository: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { queryByTestId } from "@testing-library/dom";
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { cssToObject } from "@uppercod/css-to-object";
|
import { cssToObject } from "@uppercod/css-to-object";
|
||||||
import { renderRepoCard } from "../src/cards/repo-card.js";
|
import { renderRepoCard } from "../src/cards/repo-card.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
import { themes } from "../themes/index.js";
|
import { themes } from "../themes/index.js";
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import {
|
|||||||
} from "@testing-library/dom";
|
} from "@testing-library/dom";
|
||||||
import { cssToObject } from "@uppercod/css-to-object";
|
import { cssToObject } from "@uppercod/css-to-object";
|
||||||
import { renderStatsCard } from "../src/cards/stats-card.js";
|
import { renderStatsCard } from "../src/cards/stats-card.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
// adds special assertions like toHaveTextContent
|
// adds special assertions like toHaveTextContent
|
||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
MIN_CARD_WIDTH,
|
MIN_CARD_WIDTH,
|
||||||
getDefaultLanguagesCountByLayout,
|
getDefaultLanguagesCountByLayout,
|
||||||
} from "../src/cards/top-languages-card.js";
|
} from "../src/cards/top-languages-card.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
// adds special assertions like toHaveTextContent
|
// adds special assertions like toHaveTextContent
|
||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
@@ -46,7 +47,7 @@ const langs = {
|
|||||||
* Retrieve number array from SVG path definition string.
|
* Retrieve number array from SVG path definition string.
|
||||||
*
|
*
|
||||||
* @param {string} d SVG path definition string.
|
* @param {string} d SVG path definition string.
|
||||||
* @return {number[]} Resulting numbers array.
|
* @returns {number[]} Resulting numbers array.
|
||||||
*/
|
*/
|
||||||
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
||||||
return d
|
return d
|
||||||
@@ -78,7 +79,7 @@ const langPercentFromDonutLayoutSvg = (d, centerX, centerY) => {
|
|||||||
*
|
*
|
||||||
* @param {number} partLength Length of current chart part..
|
* @param {number} partLength Length of current chart part..
|
||||||
* @param {number} totalCircleLength Total length of circle.
|
* @param {number} totalCircleLength Total length of circle.
|
||||||
* @return {number} Chart part percentage.
|
* @returns {number} Chart part percentage.
|
||||||
*/
|
*/
|
||||||
const langPercentFromDonutVerticalLayoutSvg = (
|
const langPercentFromDonutVerticalLayoutSvg = (
|
||||||
partLength,
|
partLength,
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import "@testing-library/jest-dom";
|
|||||||
import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
|
import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
|
||||||
import { getCardColors } from "../src/common/utils.js";
|
import { getCardColors } from "../src/common/utils.js";
|
||||||
import { wakaTimeData } from "./fetchWakatime.test.js";
|
import { wakaTimeData } from "./fetchWakatime.test.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
describe("Test Render Wakatime Card", () => {
|
describe("Test Render Wakatime Card", () => {
|
||||||
it("should render correctly", () => {
|
it("should render correctly", () => {
|
||||||
const card = renderWakatimeCard(wakaTimeData.data);
|
// const card = renderWakatimeCard(wakaTimeData.data);
|
||||||
expect(getCardColors).toMatchSnapshot();
|
expect(getCardColors).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,20 +2,21 @@ import { jest } from "@jest/globals";
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { retryer } from "../src/common/retryer.js";
|
import { retryer } from "../src/common/retryer.js";
|
||||||
import { logger } from "../src/common/utils.js";
|
import { logger } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
const fetcher = jest.fn((variables, token) => {
|
const fetcher = jest.fn((variables, token) => {
|
||||||
logger.log(variables, token);
|
logger.log(variables, token);
|
||||||
return new Promise((res, rej) => res({ data: "ok" }));
|
return new Promise((res) => res({ data: "ok" }));
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetcherFail = jest.fn(() => {
|
const fetcherFail = jest.fn(() => {
|
||||||
return new Promise((res, rej) =>
|
return new Promise((res) =>
|
||||||
res({ data: { errors: [{ type: "RATE_LIMITED" }] } }),
|
res({ data: { errors: [{ type: "RATE_LIMITED" }] } }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetcherFailOnSecondTry = jest.fn((_vars, _token, retries) => {
|
const fetcherFailOnSecondTry = jest.fn((_vars, _token, retries) => {
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res) => {
|
||||||
// faking rate limit
|
// faking rate limit
|
||||||
if (retries < 1) {
|
if (retries < 1) {
|
||||||
return res({ data: { errors: [{ type: "RATE_LIMITED" }] } });
|
return res({ data: { errors: [{ type: "RATE_LIMITED" }] } });
|
||||||
@@ -40,10 +41,8 @@ describe("Test Retryer", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("retryer should throw error if maximum retries reached", async () => {
|
it("retryer should throw error if maximum retries reached", async () => {
|
||||||
let res;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
res = await retryer(fetcherFail, {});
|
await retryer(fetcherFail, {});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
expect(fetcherFail).toBeCalledTimes(8);
|
expect(fetcherFail).toBeCalledTimes(8);
|
||||||
expect(err.message).toBe("Maximum retries exceeded");
|
expect(err.message).toBe("Maximum retries exceeded");
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { jest } from "@jest/globals";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js";
|
import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import MockAdapter from "axios-mock-adapter";
|
|||||||
import topLangs from "../api/top-langs.js";
|
import topLangs from "../api/top-langs.js";
|
||||||
import { renderTopLanguages } from "../src/cards/top-languages-card.js";
|
import { renderTopLanguages } from "../src/cards/top-languages-card.js";
|
||||||
import { renderError } from "../src/common/utils.js";
|
import { renderError } from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe, afterEach } from "@jest/globals";
|
||||||
|
|
||||||
const data_langs = {
|
const data_langs = {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
renderError,
|
renderError,
|
||||||
wrapTextMultiline,
|
wrapTextMultiline,
|
||||||
} from "../src/common/utils.js";
|
} from "../src/common/utils.js";
|
||||||
|
import { expect, it, describe } from "@jest/globals";
|
||||||
|
|
||||||
describe("Test utils.js", () => {
|
describe("Test utils.js", () => {
|
||||||
it("should test kFormatter", () => {
|
it("should test kFormatter", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user