From 89fc14609e8c19698e9b43b57357b329e36cc5e3 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 30 Oct 2023 12:31:41 +0200
Subject: [PATCH 01/48] refactor: improve blacklisted username error by adding
secondary message (#3444)
---
api/index.js | 2 +-
api/pin.js | 2 +-
api/top-langs.js | 2 +-
tests/api.test.js | 4 +++-
tests/pin.test.js | 4 +++-
tests/top-langs.test.js | 4 +++-
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/api/index.js b/api/index.js
index e1e1c27b..2029367c 100644
--- a/api/index.js
+++ b/api/index.js
@@ -43,7 +43,7 @@ export default async (req, res) => {
if (blacklist.includes(username)) {
return res.send(
- renderError("Something went wrong", "", {
+ renderError("Something went wrong", "This username is blacklisted", {
title_color,
text_color,
bg_color,
diff --git a/api/pin.js b/api/pin.js
index bdad925a..c67df29a 100644
--- a/api/pin.js
+++ b/api/pin.js
@@ -30,7 +30,7 @@ export default async (req, res) => {
if (blacklist.includes(username)) {
return res.send(
- renderError("Something went wrong", "", {
+ renderError("Something went wrong", "This username is blacklisted", {
title_color,
text_color,
bg_color,
diff --git a/api/top-langs.js b/api/top-langs.js
index 0ca96fe3..382ee420 100644
--- a/api/top-langs.js
+++ b/api/top-langs.js
@@ -38,7 +38,7 @@ export default async (req, res) => {
if (blacklist.includes(username)) {
return res.send(
- renderError("Something went wrong", "", {
+ renderError("Something went wrong", "This username is blacklisted", {
title_color,
text_color,
bg_color,
diff --git a/tests/api.test.js b/tests/api.test.js
index a6ed04b5..0c0da381 100644
--- a/tests/api.test.js
+++ b/tests/api.test.js
@@ -291,7 +291,9 @@ describe("Test /api/", () => {
await api(req, res);
expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
- expect(res.send).toBeCalledWith(renderError("Something went wrong"));
+ expect(res.send).toBeCalledWith(
+ renderError("Something went wrong", "This username is blacklisted"),
+ );
});
it("should render error card when wrong locale is provided", async () => {
diff --git a/tests/pin.test.js b/tests/pin.test.js
index 0dcb5aa9..105e4450 100644
--- a/tests/pin.test.js
+++ b/tests/pin.test.js
@@ -155,7 +155,9 @@ describe("Test /api/pin", () => {
await pin(req, res);
expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
- expect(res.send).toBeCalledWith(renderError("Something went wrong"));
+ expect(res.send).toBeCalledWith(
+ renderError("Something went wrong", "This username is blacklisted"),
+ );
});
it("should render error card if wrong locale provided", async () => {
diff --git a/tests/top-langs.test.js b/tests/top-langs.test.js
index 272ee7ea..692681b2 100644
--- a/tests/top-langs.test.js
+++ b/tests/top-langs.test.js
@@ -183,7 +183,9 @@ describe("Test /api/top-langs", () => {
await topLangs(req, res);
expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
- expect(res.send).toBeCalledWith(renderError("Something went wrong"));
+ expect(res.send).toBeCalledWith(
+ renderError("Something went wrong", "This username is blacklisted"),
+ );
});
it("should render error card if wrong locale provided", async () => {
From 5b72dfbc32b0958bf4225400c1489f7703402faf Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 30 Oct 2023 12:34:42 +0200
Subject: [PATCH 02/48] tests(stats card): cover with test changes in #3298
(#3443)
---
tests/api.test.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/api.test.js b/tests/api.test.js
index 0c0da381..eee9a1a0 100644
--- a/tests/api.test.js
+++ b/tests/api.test.js
@@ -120,6 +120,21 @@ describe("Test /api/", () => {
);
});
+ it("should render error card in same theme as requested card", async () => {
+ const { req, res } = faker({ theme: "merko" }, error);
+
+ await api(req, res);
+
+ expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
+ expect(res.send).toBeCalledWith(
+ renderError(
+ error.errors[0].message,
+ "Make sure the provided username is not an organization",
+ { theme: "merko" },
+ ),
+ );
+ });
+
it("should get the query options", async () => {
const { req, res } = faker(
{
From 2feebd011de78899522212829b70f10e6e05abd4 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 30 Oct 2023 12:58:07 +0200
Subject: [PATCH 03/48] infra(dependabot): set myself as pull requests reviewer
(#3435)
---
.github/dependabot.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 1691b12b..8bf1cdb1 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -6,6 +6,8 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
+ reviewers:
+ - "qwerty541"
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
@@ -13,3 +15,5 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
+ reviewers:
+ - "qwerty541"
From 91a3ac2705efb1f7deff58b47706ca032c787c9f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 14:30:52 +0300
Subject: [PATCH 04/48] Build(deps): Bump rickstaa/empty-issues-closer-action
(#3446)
Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.35 to 1.1.39.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](https://github.com/rickstaa/empty-issues-closer-action/compare/af151e679df0e3b59cda0e10c43010556d6c5bff...2ee9f86f16acb1d888a480f2080407d84248f475)
---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/empty-issues-closer.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml
index e7d3738b..087fd66e 100644
--- a/.github/workflows/empty-issues-closer.yaml
+++ b/.github/workflows/empty-issues-closer.yaml
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run empty issues closer action
- uses: rickstaa/empty-issues-closer-action@af151e679df0e3b59cda0e10c43010556d6c5bff # v1.1.35
+ uses: rickstaa/empty-issues-closer-action@2ee9f86f16acb1d888a480f2080407d84248f475 # v1.1.39
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 10236d8cd3a14ebfd0dd310a91dc8ea6dc45bdb5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 14:32:17 +0300
Subject: [PATCH 05/48] Build(deps): Bump ossf/scorecard-action from 2.3.0 to
2.3.1 (#3447)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/483ef80eb98fb506c348f7d62e28055e49fe2398...0864cf19026789058feabb7e87baa5f140aac736)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/ossf-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ossf-analysis.yml b/.github/workflows/ossf-analysis.yml
index fb66b494..7b1b63a9 100644
--- a/.github/workflows/ossf-analysis.yml
+++ b/.github/workflows/ossf-analysis.yml
@@ -26,7 +26,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
+ uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
From 6cf9bb84484463060f5672cf5490befd780cf0e9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 14:33:07 +0300
Subject: [PATCH 06/48] Build(deps): Bump axios from 1.5.1 to 1.6.0 (#3448)
Bumps [axios](https://github.com/axios/axios) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.5.1...v1.6.0)
---
updated-dependencies:
- dependency-name: axios
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 14 +++++++-------
package.json | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ca82673e..0bcd90f6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
- "axios": "^1.5.1",
+ "axios": "^1.6.0",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
@@ -1908,9 +1908,9 @@
}
},
"node_modules/axios": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz",
- "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
+ "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
@@ -8728,9 +8728,9 @@
"dev": true
},
"axios": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz",
- "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
+ "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
diff --git a/package.json b/package.json
index 999ea063..c95a059e 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"prettier": "^3.0.3"
},
"dependencies": {
- "axios": "^1.5.1",
+ "axios": "^1.6.0",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
From 2b90336430eeadb37e9fc5b5f783d2e39ffb7271 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 14:33:41 +0300
Subject: [PATCH 07/48] Build(deps): Bump rickstaa/top-issues-action from
1.3.61 to 1.3.64 (#3449)
Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.61 to 1.3.64.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](https://github.com/rickstaa/top-issues-action/compare/36df2af30c15ddf48558931420138890ed1b1708...f72e408e2ca430a9d79620f27183d7fd85c7494a)
---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/top-issues-dashboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml
index e07c269a..14055098 100644
--- a/.github/workflows/top-issues-dashboard.yml
+++ b/.github/workflows/top-issues-dashboard.yml
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
- uses: rickstaa/top-issues-action@36df2af30c15ddf48558931420138890ed1b1708 # v1.3.61
+ uses: rickstaa/top-issues-action@f72e408e2ca430a9d79620f27183d7fd85c7494a # v1.3.64
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 1886fe0379cbd74b5ab430961aaedb5bcde3db8a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 31 Oct 2023 07:24:10 +0300
Subject: [PATCH 08/48] refactor: update languages JSON (#3450)
Co-authored-by: Alexandr
---
src/common/languageColors.json | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/common/languageColors.json b/src/common/languageColors.json
index 8c1c23d4..4501dc8f 100644
--- a/src/common/languageColors.json
+++ b/src/common/languageColors.json
@@ -53,6 +53,7 @@
"BlitzBasic": "#00FFAE",
"BlitzMax": "#cd6400",
"Bluespec": "#12223c",
+ "Bluespec BH": "#12223c",
"Boo": "#d4bec1",
"Boogie": "#c80fa0",
"Brainfuck": "#2F2530",
@@ -192,6 +193,7 @@
"Gosu": "#82937f",
"Grace": "#615f8b",
"Gradle": "#02303a",
+ "Gradle Kotlin DSL": "#02303a",
"Grammatical Framework": "#ff0000",
"GraphQL": "#e10098",
"Graphviz (DOT)": "#2596be",
@@ -422,6 +424,7 @@
"Red": "#f50000",
"Regular Expression": "#009a00",
"Ren'Py": "#ff7f7f",
+ "Rez": "#FFDAB3",
"Ring": "#2D54CB",
"Riot": "#A71E49",
"RobotFramework": "#00c0b5",
@@ -476,6 +479,7 @@
"SuperCollider": "#46390b",
"Svelte": "#ff3e00",
"Sway": "#dea584",
+ "Sweave": "#198ce7",
"Swift": "#F05138",
"SystemVerilog": "#DAE1C2",
"TI Program": "#A0AA87",
@@ -496,6 +500,7 @@
"Turing": "#cf142b",
"Twig": "#c1d026",
"TypeScript": "#3178c6",
+ "Typst": "#239dad",
"Unified Parallel C": "#4e3617",
"Unity3D Asset": "#222c37",
"Uno": "#9933cc",
From 2ddcd9c2bdeaecf9011044145f0f3096cb41a9e6 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 31 Oct 2023 17:30:22 +0200
Subject: [PATCH 09/48] infra(dependabot): configure commits message to match
conventional commits rules (#3434)
---
.github/dependabot.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 8bf1cdb1..ec984a55 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -6,6 +6,9 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
+ commit-message:
+ prefix: "build(deps)"
+ prefix-development: "build(deps-dev)"
reviewers:
- "qwerty541"
@@ -15,5 +18,8 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
+ commit-message:
+ prefix: "build(deps)"
+ prefix-development: "build(deps-dev)"
reviewers:
- "qwerty541"
From ff169849880e3c2b0d89cc8d95b6542e71fc1906 Mon Sep 17 00:00:00 2001
From: Wertzui123 <46199283+Wertzui123@users.noreply.github.com>
Date: Wed, 1 Nov 2023 15:47:03 +0100
Subject: [PATCH 10/48] refactor: fix typos in a comment (#3437)
* Fix typos in a comment
* Add a comma
---
src/cards/stats-card.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js
index 5f572056..b7bc54ba 100644
--- a/src/cards/stats-card.js
+++ b/src/cards/stats-card.js
@@ -76,7 +76,7 @@ const createTextNode = ({
};
/**
- * Calculates progress along the boundary of the circle i.e it's circumference.
+ * Calculates progress along the boundary of the circle, i.e. its circumference.
*
* @param {number} value The rank value to calculate progress for.
* @returns {number} Progress value.
From 236577f70a5485a2a5e61857b44417191f1cfd44 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Wed, 1 Nov 2023 21:31:31 +0200
Subject: [PATCH 11/48] infra: enable no-class-assign eslint rule (#3451)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 9ec7f296..0d13a0ea 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -153,7 +153,7 @@
// "constructor-super": "error",
// "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error",
- // "no-class-assign": "error",
+ "no-class-assign": "error",
// "no-const-assign": "error",
// "no-dupe-class-members": "error",
"no-this-before-super": "error",
From 5b3b920ed277147b3236d978152df4796a95c128 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Wed, 1 Nov 2023 21:34:08 +0200
Subject: [PATCH 12/48] infra: enable no-const-assign eslint rule (#3452)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 0d13a0ea..7801486d 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -154,7 +154,7 @@
// "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error",
"no-class-assign": "error",
- // "no-const-assign": "error",
+ "no-const-assign": "error",
// "no-dupe-class-members": "error",
"no-this-before-super": "error",
// "no-var": "warn",
From 90c30f2bd271a831c742f33367460f10c343a32d Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 6 Nov 2023 16:18:43 +0200
Subject: [PATCH 13/48] infra: enable no-dupe-class-members eslint rule (#3456)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 7801486d..79b214b1 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -155,7 +155,7 @@
// "no-arrow-condition": "error",
"no-class-assign": "error",
"no-const-assign": "error",
- // "no-dupe-class-members": "error",
+ "no-dupe-class-members": "error",
"no-this-before-super": "error",
// "no-var": "warn",
"object-shorthand": [ "warn" ],
From 6d8169fd2c38b15c6f5a6ca85eaafa951e9bedef Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 6 Nov 2023 16:21:14 +0200
Subject: [PATCH 14/48] tests(wakatime-fetcher): fix brand casing (#3455)
---
tests/fetchWakatime.test.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/fetchWakatime.test.js b/tests/fetchWakatime.test.js
index ebad3a29..8e24893d 100644
--- a/tests/fetchWakatime.test.js
+++ b/tests/fetchWakatime.test.js
@@ -103,7 +103,7 @@ const wakaTimeData = {
};
describe("WakaTime fetcher", () => {
- it("should fetch correct wakatime data", async () => {
+ it("should fetch correct WakaTime data", async () => {
const username = "anuraghazra";
mock
.onGet(
From e5b5da86e500afbb89e1e4ed2dd0177a6f587e56 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 6 Nov 2023 20:40:30 +0200
Subject: [PATCH 15/48] tests: add basic wakatime endpoint test (#3454)
---
tests/wakatime.test.js | 123 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 123 insertions(+)
create mode 100644 tests/wakatime.test.js
diff --git a/tests/wakatime.test.js b/tests/wakatime.test.js
new file mode 100644
index 00000000..944c3e02
--- /dev/null
+++ b/tests/wakatime.test.js
@@ -0,0 +1,123 @@
+import { jest } from "@jest/globals";
+import "@testing-library/jest-dom";
+import axios from "axios";
+import MockAdapter from "axios-mock-adapter";
+import wakatime from "../api/wakatime.js";
+import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
+import { expect, it, describe, afterEach } from "@jest/globals";
+
+const wakaTimeData = {
+ data: {
+ categories: [
+ {
+ digital: "22:40",
+ hours: 22,
+ minutes: 40,
+ name: "Coding",
+ percent: 100,
+ text: "22 hrs 40 mins",
+ total_seconds: 81643.570077,
+ },
+ ],
+ daily_average: 16095,
+ daily_average_including_other_language: 16329,
+ days_including_holidays: 7,
+ days_minus_holidays: 5,
+ editors: [
+ {
+ digital: "22:40",
+ hours: 22,
+ minutes: 40,
+ name: "VS Code",
+ percent: 100,
+ text: "22 hrs 40 mins",
+ total_seconds: 81643.570077,
+ },
+ ],
+ holidays: 2,
+ human_readable_daily_average: "4 hrs 28 mins",
+ human_readable_daily_average_including_other_language: "4 hrs 32 mins",
+ human_readable_total: "22 hrs 21 mins",
+ human_readable_total_including_other_language: "22 hrs 40 mins",
+ id: "random hash",
+ is_already_updating: false,
+ is_coding_activity_visible: true,
+ is_including_today: false,
+ is_other_usage_visible: true,
+ is_stuck: false,
+ is_up_to_date: true,
+ languages: [
+ {
+ digital: "0:19",
+ hours: 0,
+ minutes: 19,
+ name: "Other",
+ percent: 1.43,
+ text: "19 mins",
+ total_seconds: 1170.434361,
+ },
+ {
+ digital: "0:01",
+ hours: 0,
+ minutes: 1,
+ name: "TypeScript",
+ percent: 0.1,
+ text: "1 min",
+ total_seconds: 83.293809,
+ },
+ {
+ digital: "0:00",
+ hours: 0,
+ minutes: 0,
+ name: "YAML",
+ percent: 0.07,
+ text: "0 secs",
+ total_seconds: 54.975151,
+ },
+ ],
+ operating_systems: [
+ {
+ digital: "22:40",
+ hours: 22,
+ minutes: 40,
+ name: "Mac",
+ percent: 100,
+ text: "22 hrs 40 mins",
+ total_seconds: 81643.570077,
+ },
+ ],
+ percent_calculated: 100,
+ range: "last_7_days",
+ status: "ok",
+ timeout: 15,
+ total_seconds: 80473.135716,
+ total_seconds_including_other_language: 81643.570077,
+ user_id: "random hash",
+ username: "anuraghazra",
+ writes_only: false,
+ },
+};
+
+const mock = new MockAdapter(axios);
+
+afterEach(() => {
+ mock.reset();
+});
+
+describe("Test /api/wakatime", () => {
+ it("should test the request", async () => {
+ const username = "anuraghazra";
+ const req = { query: { username } };
+ const res = { setHeader: jest.fn(), send: jest.fn() };
+ mock
+ .onGet(
+ `https://wakatime.com/api/v1/users/${username}/stats?is_including_today=true`,
+ )
+ .reply(200, wakaTimeData);
+
+ await wakatime(req, res);
+
+ expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
+ expect(res.send).toBeCalledWith(renderWakatimeCard(wakaTimeData.data, {}));
+ });
+});
From 79cee30ac316361532e4183457495023e0b1181f Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 7 Nov 2023 02:36:17 +0200
Subject: [PATCH 16/48] infra: enable constructor-super eslint rule (#3457)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 79b214b1..a98bf6b6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -150,7 +150,7 @@
// "arrow-body-style": [ "error", "always" ],
// "arrow-parens": [ "error", "always" ],
// "arrow-spacing": [ "error", { "before": true, "after": true }],
- // "constructor-super": "error",
+ "constructor-super": "error",
// "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error",
"no-class-assign": "error",
From bc7ea33782bd947e5ad2b3f38a372c4bd90bf7e4 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 7 Nov 2023 03:38:13 +0300
Subject: [PATCH 17/48] build(deps): Bump rickstaa/empty-issues-closer-action
(#3460)
Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.39 to 1.1.40.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](https://github.com/rickstaa/empty-issues-closer-action/compare/2ee9f86f16acb1d888a480f2080407d84248f475...37f2cd30a4fb97504bbb570dc73264cfa522dee3)
---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/empty-issues-closer.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml
index 087fd66e..29b1dd56 100644
--- a/.github/workflows/empty-issues-closer.yaml
+++ b/.github/workflows/empty-issues-closer.yaml
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run empty issues closer action
- uses: rickstaa/empty-issues-closer-action@2ee9f86f16acb1d888a480f2080407d84248f475 # v1.1.39
+ uses: rickstaa/empty-issues-closer-action@37f2cd30a4fb97504bbb570dc73264cfa522dee3 # v1.1.40
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From a99abe8c24d0af4cd0d1bce328c98e02bcc3a8d6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 7 Nov 2023 03:38:40 +0300
Subject: [PATCH 18/48] build(deps): Bump rickstaa/top-issues-action from
1.3.64 to 1.3.65 (#3461)
Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.64 to 1.3.65.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](https://github.com/rickstaa/top-issues-action/compare/f72e408e2ca430a9d79620f27183d7fd85c7494a...da2fb7f2bd61828135e0971f8d33efb1a079e9a9)
---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/top-issues-dashboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml
index 14055098..ee0dd56c 100644
--- a/.github/workflows/top-issues-dashboard.yml
+++ b/.github/workflows/top-issues-dashboard.yml
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
- uses: rickstaa/top-issues-action@f72e408e2ca430a9d79620f27183d7fd85c7494a # v1.3.64
+ uses: rickstaa/top-issues-action@da2fb7f2bd61828135e0971f8d33efb1a079e9a9 # v1.3.65
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 843b15ed36049043427b5851a0b26141de43a379 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 7 Nov 2023 03:39:34 +0300
Subject: [PATCH 19/48] build(deps-dev): Bump eslint from 8.52.0 to 8.53.0
(#3459)
Bumps [eslint](https://github.com/eslint/eslint) from 8.52.0 to 8.53.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.52.0...v8.53.0)
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 58 +++++++++++++++++++++++------------------------
package.json | 2 +-
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0bcd90f6..05d2de96 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,7 @@
"@uppercod/css-to-object": "^1.1.1",
"axios-mock-adapter": "^1.22.0",
"color-contrast-checker": "^2.1.0",
- "eslint": "^8.52.0",
+ "eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"hjson": "^3.2.2",
"husky": "^8.0.3",
@@ -769,9 +769,9 @@
}
},
"node_modules/@eslint/eslintrc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
- "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz",
+ "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
@@ -792,9 +792,9 @@
}
},
"node_modules/@eslint/eslintrc/node_modules/globals": {
- "version": "13.21.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz",
- "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==",
+ "version": "13.23.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz",
+ "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
"dev": true,
"dependencies": {
"type-fest": "^0.20.2"
@@ -819,9 +819,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
- "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==",
+ "version": "8.53.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz",
+ "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2758,15 +2758,15 @@
}
},
"node_modules/eslint": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz",
- "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==",
+ "version": "8.53.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz",
+ "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.2",
- "@eslint/js": "8.52.0",
+ "@eslint/eslintrc": "^2.1.3",
+ "@eslint/js": "8.53.0",
"@humanwhocodes/config-array": "^0.11.13",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -7826,9 +7826,9 @@
"dev": true
},
"@eslint/eslintrc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
- "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz",
+ "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
@@ -7843,9 +7843,9 @@
},
"dependencies": {
"globals": {
- "version": "13.21.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz",
- "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==",
+ "version": "13.23.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz",
+ "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
"dev": true,
"requires": {
"type-fest": "^0.20.2"
@@ -7860,9 +7860,9 @@
}
},
"@eslint/js": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
- "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==",
+ "version": "8.53.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz",
+ "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==",
"dev": true
},
"@fastify/busboy": {
@@ -9355,15 +9355,15 @@
}
},
"eslint": {
- "version": "8.52.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz",
- "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==",
+ "version": "8.53.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz",
+ "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.2",
- "@eslint/js": "8.52.0",
+ "@eslint/eslintrc": "^2.1.3",
+ "@eslint/js": "8.53.0",
"@humanwhocodes/config-array": "^0.11.13",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
diff --git a/package.json b/package.json
index c95a059e..b588391a 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"@uppercod/css-to-object": "^1.1.1",
"axios-mock-adapter": "^1.22.0",
"color-contrast-checker": "^2.1.0",
- "eslint": "^8.52.0",
+ "eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"hjson": "^3.2.2",
"husky": "^8.0.3",
From 8d7e9df697987deaaad2eb0142b567e41f140d18 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 7 Nov 2023 05:55:39 +0200
Subject: [PATCH 20/48] themes: add ambient_gradient theme for test (#3399)
---
themes/index.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/themes/index.js b/themes/index.js
index 043ccf19..f5d8d916 100644
--- a/themes/index.js
+++ b/themes/index.js
@@ -456,6 +456,12 @@ export const themes = {
border_color: "e1bc29",
bg_color: "2b2d40",
},
+ ambient_gradient: {
+ title_color: "ffffff",
+ text_color: "ffffff",
+ icon_color: "ffffff",
+ bg_color: "35,4158d0,c850c0,ffcc70",
+ },
};
export default themes;
From dda9647c4937fb87dda9ab02851f745427120d7f Mon Sep 17 00:00:00 2001
From: wolfcomp <4028289+wolfcomp@users.noreply.github.com>
Date: Tue, 7 Nov 2023 05:54:07 +0100
Subject: [PATCH 21/48] fix(express deploy): fix situations when env variables
doesn't load before request processing (#3231)
---
express.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/express.js b/express.js
index 99cc42db..ddc69ba7 100644
--- a/express.js
+++ b/express.js
@@ -1,12 +1,11 @@
+import "dotenv/config";
import statsCard from "./api/index.js";
import repoCard from "./api/pin.js";
import langCard from "./api/top-langs.js";
import wakatimeCard from "./api/wakatime.js";
import gistCard from "./api/gist.js";
import express from "express";
-import dotenv from "dotenv";
-dotenv.config();
const app = express();
app.listen(process.env.port || 9000);
From aa90efcae52023e36d3d1a37d61d07788362c985 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 7 Nov 2023 09:50:57 +0200
Subject: [PATCH 22/48] docs(theme): auto update theme readme (#3462)
Co-authored-by: GitHub Readme Stats Bot
---
themes/README.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/themes/README.md b/themes/README.md
index 5d92a667..5e50b5bb 100644
--- a/themes/README.md
+++ b/themes/README.md
@@ -12,7 +12,7 @@ Use `?theme=THEME_NAME` parameter like so:
## Stats
-> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and Wakatime Card.
+> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card.
| | | |
| :--: | :--: | :--: |
@@ -40,11 +40,11 @@ Use `?theme=THEME_NAME` parameter like so:
| `rose_pine` ![rose_pine][rose_pine] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha] |
| `date_night` ![date_night][date_night] | `one_dark_pro` ![one_dark_pro][one_dark_pro] | `rose` ![rose][rose] |
| `holi` ![holi][holi] | `neon` ![neon][neon] | `blue_navy` ![blue_navy][blue_navy] |
-| `calm_pink` ![calm_pink][calm_pink] | | [Add your theme][add-theme] |
+| `calm_pink` ![calm_pink][calm_pink] | `ambient_gradient` ![ambient_gradient][ambient_gradient] | [Add your theme][add-theme] |
## Repo Card
-> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and Wakatime Card.
+> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card.
| | | |
| :--: | :--: | :--: |
@@ -72,7 +72,7 @@ Use `?theme=THEME_NAME` parameter like so:
| `rose_pine` ![rose_pine][rose_pine_repo] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte_repo] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha_repo] |
| `date_night` ![date_night][date_night_repo] | `one_dark_pro` ![one_dark_pro][one_dark_pro_repo] | `rose` ![rose][rose_repo] |
| `holi` ![holi][holi_repo] | `neon` ![neon][neon_repo] | `blue_navy` ![blue_navy][blue_navy_repo] |
-| `calm_pink` ![calm_pink][calm_pink_repo] | | [Add your theme][add-theme] |
+| `calm_pink` ![calm_pink][calm_pink_repo] | `ambient_gradient` ![ambient_gradient][ambient_gradient_repo] | [Add your theme][add-theme] |
[default]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=default
@@ -149,6 +149,7 @@ Use `?theme=THEME_NAME` parameter like so:
[neon]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=neon
[blue_navy]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=blue_navy
[calm_pink]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=calm_pink
+[ambient_gradient]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ambient_gradient
[default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default
@@ -225,6 +226,7 @@ Use `?theme=THEME_NAME` parameter like so:
[neon_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=neon
[blue_navy_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=blue_navy
[calm_pink_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=calm_pink
+[ambient_gradient_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ambient_gradient
[add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js
From edf9f7413b2631fea4e4c889a0763911796497ac Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Sat, 11 Nov 2023 01:46:44 +0200
Subject: [PATCH 23/48] infra: enable keyword-spacing eslint rule and remove
decrecated space-*-keyword rules (#3464)
---
.eslintrc.json | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index a98bf6b6..12867b6b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -217,14 +217,13 @@
"MethodDefinition": true,
"ClassDeclaration": false
}
- }]
+ }],
// "semi-spacing": [ "warn", { "before": false, "after": true }],
// "semi": [ "error", "always" ],
// "sort-vars": "off",
- // "space-after-keywords": [ "warn", "always" ],
+ "keyword-spacing": ["error", { "before": true, "after": true }]
// "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",
From 5ea659579ed1e1306284c7bf9c9fdb56a49172a2 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Sat, 11 Nov 2023 01:47:29 +0200
Subject: [PATCH 24/48] infra: enable no-delete-var eslint rule (#3465)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 12867b6b..01db70ff 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -113,7 +113,7 @@
// "init-declarations": [ "error", "always" ],
// "no-catch-shadow": "warn",
- // "no-delete-var": "error",
+ "no-delete-var": "error",
// "no-label-var": "error",
// "no-shadow-restricted-names": "error",
// "no-shadow": "warn",
From 51eefa2dca3fb327293eed0342891f79f845cf01 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 13 Nov 2023 21:05:38 +0200
Subject: [PATCH 25/48] infra: enable no-caller eslint rule (#3473)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 01db70ff..b3a871a8 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -49,7 +49,7 @@
// "eqeqeq": [ "error", "smart" ],
// "guard-for-in": "warn",
// "no-alert": "error",
- // "no-caller": "error",
+ "no-caller": "error",
// "no-case-declarations": "warn",
// "no-div-regex": "warn",
// "no-else-return": "warn",
From d654fe5715d2aa0bc899ea52f9946584f436b276 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 13 Nov 2023 21:09:29 +0200
Subject: [PATCH 26/48] infra: enable no-alert eslint rule (#3472)
---
.eslintrc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index b3a871a8..cb584b9b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -48,7 +48,7 @@
// "dot-notation": "warn",
// "eqeqeq": [ "error", "smart" ],
// "guard-for-in": "warn",
- // "no-alert": "error",
+ "no-alert": "error",
"no-caller": "error",
// "no-case-declarations": "warn",
// "no-div-regex": "warn",
From 034ee0666ebadf06d82b7da4b32eada092affb50 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:10:36 +0300
Subject: [PATCH 27/48] build(deps-dev): Bump lint-staged from 15.0.2 to 15.1.0
(#3477)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.0.2 to 15.1.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/okonet/lint-staged/compare/v15.0.2...v15.1.0)
---
updated-dependencies:
- dependency-name: lint-staged
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 30 +++++++++++++++---------------
package.json | 2 +-
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 05d2de96..8f0be14c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -32,7 +32,7 @@
"jest-bench": "^29.4.1",
"jest-environment-jsdom": "^29.7.0",
"js-yaml": "^4.1.0",
- "lint-staged": "^15.0.2",
+ "lint-staged": "^15.1.0",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.11.1",
"prettier": "^3.0.3"
@@ -5177,9 +5177,9 @@
"dev": true
},
"node_modules/lint-staged": {
- "version": "15.0.2",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz",
- "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==",
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.1.0.tgz",
+ "integrity": "sha512-ZPKXWHVlL7uwVpy8OZ7YQjYDAuO5X4kMh0XgZvPNxLcCCngd0PO5jKQyy3+s4TL2EnHoIXIzP1422f/l3nZKMw==",
"dev": true,
"dependencies": {
"chalk": "5.3.0",
@@ -5191,7 +5191,7 @@
"micromatch": "4.0.5",
"pidtree": "0.6.0",
"string-argv": "0.3.2",
- "yaml": "2.3.3"
+ "yaml": "2.3.4"
},
"bin": {
"lint-staged": "bin/lint-staged.js"
@@ -7221,9 +7221,9 @@
"dev": true
},
"node_modules/yaml": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
- "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
+ "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
"dev": true,
"engines": {
"node": ">= 14"
@@ -11116,9 +11116,9 @@
"dev": true
},
"lint-staged": {
- "version": "15.0.2",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz",
- "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==",
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.1.0.tgz",
+ "integrity": "sha512-ZPKXWHVlL7uwVpy8OZ7YQjYDAuO5X4kMh0XgZvPNxLcCCngd0PO5jKQyy3+s4TL2EnHoIXIzP1422f/l3nZKMw==",
"dev": true,
"requires": {
"chalk": "5.3.0",
@@ -11130,7 +11130,7 @@
"micromatch": "4.0.5",
"pidtree": "0.6.0",
"string-argv": "0.3.2",
- "yaml": "2.3.3"
+ "yaml": "2.3.4"
},
"dependencies": {
"chalk": {
@@ -12552,9 +12552,9 @@
"dev": true
},
"yaml": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
- "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
+ "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
"dev": true
},
"yargs": {
diff --git a/package.json b/package.json
index b588391a..cb40fc9b 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"jest-bench": "^29.4.1",
"jest-environment-jsdom": "^29.7.0",
"js-yaml": "^4.1.0",
- "lint-staged": "^15.0.2",
+ "lint-staged": "^15.1.0",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.11.1",
"prettier": "^3.0.3"
From 36bbea2aabecc94cd9f8dc522d8879ce1fa412a2 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:11:26 +0300
Subject: [PATCH 28/48] build(deps): Bump axios from 1.6.0 to 1.6.1 (#3478)
Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.0...v1.6.1)
---
updated-dependencies:
- dependency-name: axios
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 14 +++++++-------
package.json | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8f0be14c..05f4a125 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
- "axios": "^1.6.0",
+ "axios": "^1.6.1",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
@@ -1908,9 +1908,9 @@
}
},
"node_modules/axios": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
- "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
+ "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
@@ -8728,9 +8728,9 @@
"dev": true
},
"axios": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
- "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
+ "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
diff --git a/package.json b/package.json
index cb40fc9b..9de0c3b5 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"prettier": "^3.0.3"
},
"dependencies": {
- "axios": "^1.6.0",
+ "axios": "^1.6.1",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
From e04e1397c53c072de21ec49ef27deabcaf87ac50 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:22:39 +0300
Subject: [PATCH 29/48] build(deps-dev): Bump prettier from 3.0.3 to 3.1.0
(#3476)
* build(deps-dev): Bump prettier from 3.0.3 to 3.1.0
Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.1.0)
---
updated-dependencies:
- dependency-name: prettier
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* dev
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 14 +++++++-------
package.json | 2 +-
src/cards/repo-card.js | 6 +++---
src/cards/stats-card.js | 12 ++++++------
src/cards/top-languages-card.js | 4 ++--
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 05f4a125..d47bfa52 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -35,7 +35,7 @@
"lint-staged": "^15.1.0",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.11.1",
- "prettier": "^3.0.3"
+ "prettier": "^3.1.0"
},
"engines": {
"node": ">=18.0.0"
@@ -6122,9 +6122,9 @@
}
},
"node_modules/prettier": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
- "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
+ "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
@@ -11777,9 +11777,9 @@
"dev": true
},
"prettier": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
- "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
+ "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
"dev": true
},
"pretty-format": {
diff --git a/package.json b/package.json
index 9de0c3b5..415a8630 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"lint-staged": "^15.1.0",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.11.1",
- "prettier": "^3.0.3"
+ "prettier": "^3.1.0"
},
"dependencies": {
"axios": "^1.6.1",
diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js
index 09b58418..0d32475f 100644
--- a/src/cards/repo-card.js
+++ b/src/cards/repo-card.js
@@ -160,9 +160,9 @@ const renderRepoCard = (repo, options = {}) => {
? // @ts-ignore
getBadgeSVG(i18n.t("repocard.template"), colors.textColor)
: isArchived
- ? // @ts-ignore
- getBadgeSVG(i18n.t("repocard.archived"), colors.textColor)
- : ""
+ ? // @ts-ignore
+ getBadgeSVG(i18n.t("repocard.archived"), colors.textColor)
+ : ""
}
diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js
index b7bc54ba..d3b05642 100644
--- a/src/cards/stats-card.js
+++ b/src/cards/stats-card.js
@@ -412,8 +412,8 @@ const renderStatsCard = (stats, options = {}) => {
custom_title
? custom_title
: statItems.length
- ? i18n.t("statcard.title")
- : i18n.t("statcard.ranktitle"),
+ ? i18n.t("statcard.title")
+ : i18n.t("statcard.ranktitle"),
);
};
@@ -431,14 +431,14 @@ const renderStatsCard = (stats, options = {}) => {
Infinity,
)
: statItems.length
- ? RANK_CARD_MIN_WIDTH
- : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
+ ? RANK_CARD_MIN_WIDTH
+ : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
const defaultCardWidth =
(hide_rank
? CARD_DEFAULT_WIDTH
: statItems.length
- ? RANK_CARD_DEFAULT_WIDTH
- : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
+ ? RANK_CARD_DEFAULT_WIDTH
+ : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
let width = card_width
? isNaN(card_width)
? defaultCardWidth
diff --git a/src/cards/top-languages-card.js b/src/cards/top-languages-card.js
index 758bd34b..9385f4a7 100644
--- a/src/cards/top-languages-card.js
+++ b/src/cards/top-languages-card.js
@@ -755,8 +755,8 @@ const renderTopLanguages = (topLangs, options = {}) => {
? isNaN(card_width)
? DEFAULT_CARD_WIDTH
: card_width < MIN_CARD_WIDTH
- ? MIN_CARD_WIDTH
- : card_width
+ ? MIN_CARD_WIDTH
+ : card_width
: DEFAULT_CARD_WIDTH;
let height = calculateNormalLayoutHeight(langs.length);
From e50a9b435c50dcbd4e8b1b03a523d2c02cefccb0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:23:14 +0300
Subject: [PATCH 30/48] build(deps): Bump rickstaa/top-issues-action from
1.3.65 to 1.3.69 (#3479)
Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.65 to 1.3.69.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](https://github.com/rickstaa/top-issues-action/compare/da2fb7f2bd61828135e0971f8d33efb1a079e9a9...9ab0c00b87dbcfb3a34ebdaab6151e058a0bf352)
---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/top-issues-dashboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml
index ee0dd56c..c6c31989 100644
--- a/.github/workflows/top-issues-dashboard.yml
+++ b/.github/workflows/top-issues-dashboard.yml
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
- uses: rickstaa/top-issues-action@da2fb7f2bd61828135e0971f8d33efb1a079e9a9 # v1.3.65
+ uses: rickstaa/top-issues-action@9ab0c00b87dbcfb3a34ebdaab6151e058a0bf352 # v1.3.69
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 49973083b1173231249131d60557df34cd906854 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:24:06 +0300
Subject: [PATCH 31/48] build(deps): Bump rickstaa/empty-issues-closer-action
(#3480)
Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.40 to 1.1.44.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](https://github.com/rickstaa/empty-issues-closer-action/compare/37f2cd30a4fb97504bbb570dc73264cfa522dee3...1e7541f3bb442b6df5fe07e8cc2f5184076f2246)
---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/empty-issues-closer.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml
index 29b1dd56..eb94acf4 100644
--- a/.github/workflows/empty-issues-closer.yaml
+++ b/.github/workflows/empty-issues-closer.yaml
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run empty issues closer action
- uses: rickstaa/empty-issues-closer-action@37f2cd30a4fb97504bbb570dc73264cfa522dee3 # v1.1.40
+ uses: rickstaa/empty-issues-closer-action@1e7541f3bb442b6df5fe07e8cc2f5184076f2246 # v1.1.44
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 3a15963a3de257c3150cfec415ffb9fb63ef42b6 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Wed, 15 Nov 2023 10:35:01 +0200
Subject: [PATCH 32/48] ci: add wakatime endpoint test file into pull requests
labeler (#3482)
---
.github/labeler.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/labeler.yml b/.github/labeler.yml
index aa276c6e..7b12e033 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -38,6 +38,7 @@ wakatime-card:
- src/fetchers/wakatime-fetcher.js
- tests/fetchWakatime.test.js
- tests/renderWakatimeCard.test.js
+ - tests/wakatime.test.js
gist-card:
- api/gist.js
- src/cards/gist-card.js
From f26b83d6cd7b7f3808fa6fc5c407df7c38df22d7 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 20 Nov 2023 10:57:29 +0200
Subject: [PATCH 33/48] tests: fix typo inside card class proper height/width
test (#3489)
---
tests/card.test.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/card.test.js b/tests/card.test.js
index 049b9e26..61e7ec0e 100644
--- a/tests/card.test.js
+++ b/tests/card.test.js
@@ -89,7 +89,7 @@ describe("Card", () => {
"200",
);
expect(document.getElementsByTagName("svg")[0]).toHaveAttribute(
- "height",
+ "width",
"200",
);
});
From d4f1a5d061719daec38119ac6d33f6005cc92056 Mon Sep 17 00:00:00 2001
From: kurple <84683430+krple@users.noreply.github.com>
Date: Mon, 20 Nov 2023 03:01:42 -0600
Subject: [PATCH 34/48] docs: grammar/Clarity Fixes. (#3463)
* Fixed Grammar
* Grammar Fixes
* Grammar Fixes
---
readme.md | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/readme.md b/readme.md
index a010eca3..a1766159 100644
--- a/readme.md
+++ b/readme.md
@@ -65,7 +65,7 @@
-Please note that documentation translations may be outdated, try to use english documentation if possible.
+Please note that documentation translations may be outdated; try to use English documentation if possible.
Love the project? Please consider donating to help it improve!
@@ -73,11 +73,11 @@
-Are you considering supporting the project by donating to me? Please DO NOT!!
+Are you considering supporting the project by donating to me? Please DO NOT!!!
-India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were affected by this tragedy.
+India has recently suffered one of the most devastating train accidents, and your help will be immensely valuable for the people who were affected by this tragedy.
Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart:
@@ -129,11 +129,11 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of
> [!IMPORTANT]\
-> We're a small team, and to prioritize, we rely on upvotes :+1:. We use Top issues dashboard for tracking community demand (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935)). Do not hesitate to upvote the issues and pull requests you are interested in. We will work on the most upvoted first.
+> We're a small team, and to prioritize, we rely on upvotes :+1:. We use the Top Issues dashboard for tracking community demand (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935)). Do not hesitate to upvote the issues and pull requests you are interested in. We will work on the most upvoted first.
# GitHub Stats Card
-Copy-paste this into your markdown content, and that is it. Simple!
+Copy and paste this into your markdown, and that's it. Simple!
Change the `?username=` value to your GitHub username.
@@ -142,10 +142,10 @@ Change the `?username=` value to your GitHub username.
```
> [!WARNING]\
-> By default, the stats card only shows statistics like stars, commits and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
+> By default, the stats card only shows statistics like stars, commits, and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
> [!NOTE]\
-> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile.
+> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars, and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile.
### Hiding individual stats
@@ -191,7 +191,7 @@ GitHub Readme Stats comes with several built-in themes (e.g. `dark`, `radical`,
-You can look at a preview for [all available themes](themes/README.md) or checkout the [theme config file](themes/index.js). Please note that we paused addition of new themes to decrease maintenance efforts, all pull requests related to new themes will be closed.
+You can look at a preview for [all available themes](themes/README.md) or checkout the [theme config file](themes/index.js). Please note that we paused the addition of new themes to decrease maintenance efforts; all pull requests related to new themes will be closed.
#### Responsive Card Theme
@@ -291,10 +291,10 @@ You can customize the appearance of all your cards however you wish with URL par
* `title_color` - Card's title color *(hex color)*. Default: `2f80ed`.
* `text_color` - Body text color *(hex color)*. Default: `434d58`.
* `icon_color` - Icons color if available *(hex color)*. Default: `4c71f2`.
-* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (Does not apply when `hide_border` is enabled).
+* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (does not apply when `hide_border` is enabled).
* `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe`
* `hide_border` - Hides the card's border *(boolean)*. Default: `false`
-* `theme` - Name of the theme, choose from [all available themes](themes/README.md). Default: `default` theme.
+* `theme` - Name of the theme; choose from [all available themes](themes/README.md). Default: `default` theme.
* `cache_seconds` - Sets the cache header manually *(min: 21600, max: 86400)*. Default: `21600 seconds (6 hours)`.
* `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`.
* `border_radius` - Corner rounding on the card. Default: `4.5`.
@@ -364,7 +364,7 @@ If we don't support your language, please consider contributing! You can find mo
#### Stats Card Exclusive Options
-* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`.
+* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(comma-separated values)*. Default: `[] (blank array)`.
* `hide_title` - *(boolean)*. Default: `false`.
* `card_width` - Sets the card's width manually *(number)*. Default: `500px (approx.)`.
* `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`.
@@ -480,10 +480,10 @@ The top languages card shows a GitHub user's most frequently used languages.
> Top Languages does not indicate the user's skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats.
> [!WARNING]\
-> This card shows languages usage only inside your own non-forked repositories, not depending from who is the author of the commits. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community.
+> This card shows language usage only inside your own non-forked repositories, not depending on who the author of the commits is. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community.
> [!WARNING]\
-> Currently this card shows data only about first 100 repositories. This is because GitHub API limitations which cause downtimes of public instance (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). In future this behavior will be improved by releasing GitHub action or providing environment variable for user's own instances.
+> Currently this card shows data only about first 100 repositories. This is because GitHub API limitations which cause downtimes of public instances (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). In future this behavior will be improved by releasing GitHub action or providing environment variables for user's own instances.
### Usage
@@ -800,7 +800,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
Github Readme Stats contains several Vercel environment variables that can be used to remove the rate limit protections:
-* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self Hosted Vercel instances.
+* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self-hosted Vercel instances.
See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance.
@@ -815,9 +815,9 @@ this takes time. You can use this service for free.
However, if you are using this project and are happy with it or just want to encourage me to continue creating stuff, there are a few ways you can do it:
-* Giving proper credit when you use github-readme-stats on your readme, linking back to it :D
-* Starring and sharing the project :rocket:
-* [](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
+* Giving proper credit when you use github-readme-stats on your readme, linking back to it. :D
+* Starring and sharing the project. :rocket:
+* [](https://www.paypal.me/anuraghazra) - You can make a one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
Thanks! :heart:
From ddcc30d641d44512099e81eb7aa41881366cdbc3 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Mon, 20 Nov 2023 20:08:48 +0200
Subject: [PATCH 35/48] feat(repo card): add description lines count query
parameter (#3453)
* feature(repo card): add description lines count query parameter
* dev
* dev
* docs
* test
---
api/pin.js | 2 ++
readme.md | 1 +
src/cards/repo-card.js | 21 ++++++++++++++++++---
src/cards/types.d.ts | 1 +
tests/renderRepoCard.test.js | 30 ++++++++++++++++++++++++++++++
5 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/api/pin.js b/api/pin.js
index c67df29a..0bc029d7 100644
--- a/api/pin.js
+++ b/api/pin.js
@@ -24,6 +24,7 @@ export default async (req, res) => {
locale,
border_radius,
border_color,
+ description_lines_count,
} = req.query;
res.setHeader("Content-Type", "image/svg+xml");
@@ -96,6 +97,7 @@ export default async (req, res) => {
border_color,
show_owner: parseBoolean(show_owner),
locale: locale ? locale.toLowerCase() : null,
+ description_lines_count,
}),
);
} catch (err) {
diff --git a/readme.md b/readme.md
index a1766159..0f106716 100644
--- a/readme.md
+++ b/readme.md
@@ -386,6 +386,7 @@ If we don't support your language, please consider contributing! You can find mo
#### Repo Card Exclusive Options
* `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`.
+* `description_lines_count` - Manually set the number of lines for the description *(number)*. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. Default: `undefined`.
#### Gist Card Exclusive Options
diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js
index 0d32475f..bbfda52d 100644
--- a/src/cards/repo-card.js
+++ b/src/cards/repo-card.js
@@ -12,10 +12,13 @@ import {
wrapTextMultiline,
iconWithLabel,
createLanguageNode,
+ clampValue,
} from "../common/utils.js";
import { repoCardLocales } from "../translations.js";
const ICON_SIZE = 16;
+const DESCRIPTION_LINE_WIDTH = 59;
+const DESCRIPTION_MAX_LINES = 3;
/**
* Retrieves the repository description and wraps it to fit the card width.
@@ -73,22 +76,34 @@ const renderRepoCard = (repo, options = {}) => {
border_radius,
border_color,
locale,
+ description_lines_count,
} = options;
const lineHeight = 10;
const header = show_owner ? nameWithOwner : name;
const langName = (primaryLanguage && primaryLanguage.name) || "Unspecified";
const langColor = (primaryLanguage && primaryLanguage.color) || "#333";
+ const descriptionMaxLines = description_lines_count
+ ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES)
+ : DESCRIPTION_MAX_LINES;
const desc = parseEmojis(description || "No description provided");
- const multiLineDescription = wrapTextMultiline(desc);
- const descriptionLines = multiLineDescription.length;
+ const multiLineDescription = wrapTextMultiline(
+ desc,
+ DESCRIPTION_LINE_WIDTH,
+ descriptionMaxLines,
+ );
+ const descriptionLinesCount = description_lines_count
+ ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES)
+ : multiLineDescription.length;
+
const descriptionSvg = multiLineDescription
.map((line) => `${encodeHTML(line)}`)
.join("");
const height =
- (descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight;
+ (descriptionLinesCount > 1 ? 120 : 110) +
+ descriptionLinesCount * lineHeight;
const i18n = new I18n({
locale,
diff --git a/src/cards/types.d.ts b/src/cards/types.d.ts
index dce964d2..d55d1c6e 100644
--- a/src/cards/types.d.ts
+++ b/src/cards/types.d.ts
@@ -32,6 +32,7 @@ export type StatCardOptions = CommonOptions & {
export type RepoCardOptions = CommonOptions & {
show_owner: boolean;
+ description_lines_count: number;
};
export type TopLangOptions = CommonOptions & {
diff --git a/tests/renderRepoCard.test.js b/tests/renderRepoCard.test.js
index 050e7109..abbad4db 100644
--- a/tests/renderRepoCard.test.js
+++ b/tests/renderRepoCard.test.js
@@ -339,4 +339,34 @@ describe("Test renderRepoCard", () => {
"No description provided",
);
});
+
+ it("should have correct height with specified `description_lines_count` parameter", () => {
+ // Testing short description
+ document.body.innerHTML = renderRepoCard(data_repo.repository, {
+ description_lines_count: 1,
+ });
+ expect(document.querySelector("svg")).toHaveAttribute("height", "120");
+ document.body.innerHTML = renderRepoCard(data_repo.repository, {
+ description_lines_count: 3,
+ });
+ expect(document.querySelector("svg")).toHaveAttribute("height", "150");
+
+ // Testing long description
+ const longDescription =
+ "A tool that will make a lot of iPhone/iPad developers' life easier. It shares your app over-the-air in a WiFi network. Bonjour is used and no configuration is needed.";
+ document.body.innerHTML = renderRepoCard(
+ { ...data_repo.repository, description: longDescription },
+ {
+ description_lines_count: 3,
+ },
+ );
+ expect(document.querySelector("svg")).toHaveAttribute("height", "150");
+ document.body.innerHTML = renderRepoCard(
+ { ...data_repo.repository, description: longDescription },
+ {
+ description_lines_count: 1,
+ },
+ );
+ expect(document.querySelector("svg")).toHaveAttribute("height", "120");
+ });
});
From 68c49dd8242393d8b2089a551ab554ed70042221 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 20 Nov 2023 20:43:09 +0200
Subject: [PATCH 36/48] build(deps): Bump rickstaa/empty-issues-closer-action
(#3490)
Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.44 to 1.1.47.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](https://github.com/rickstaa/empty-issues-closer-action/compare/1e7541f3bb442b6df5fe07e8cc2f5184076f2246...096c761b38032baf0e9e6bb65c17abf0615a6e41)
---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/empty-issues-closer.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml
index eb94acf4..6fdf59a0 100644
--- a/.github/workflows/empty-issues-closer.yaml
+++ b/.github/workflows/empty-issues-closer.yaml
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run empty issues closer action
- uses: rickstaa/empty-issues-closer-action@1e7541f3bb442b6df5fe07e8cc2f5184076f2246 # v1.1.44
+ uses: rickstaa/empty-issues-closer-action@096c761b38032baf0e9e6bb65c17abf0615a6e41 # v1.1.47
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 723cdd74d4248537cf42de3e84ee71c3225ed8d4 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 20 Nov 2023 20:43:44 +0200
Subject: [PATCH 37/48] build(deps): Bump rickstaa/top-issues-action from
1.3.69 to 1.3.71 (#3491)
Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.69 to 1.3.71.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](https://github.com/rickstaa/top-issues-action/compare/9ab0c00b87dbcfb3a34ebdaab6151e058a0bf352...ba0b5f329a1a85074e84b1944a7154202248b630)
---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/top-issues-dashboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml
index c6c31989..471238dc 100644
--- a/.github/workflows/top-issues-dashboard.yml
+++ b/.github/workflows/top-issues-dashboard.yml
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
- uses: rickstaa/top-issues-action@9ab0c00b87dbcfb3a34ebdaab6151e058a0bf352 # v1.3.69
+ uses: rickstaa/top-issues-action@ba0b5f329a1a85074e84b1944a7154202248b630 # v1.3.71
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From ffe28620ba8c394c3766d8fc92ee780287279b16 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 20 Nov 2023 20:44:51 +0200
Subject: [PATCH 38/48] build(deps): Bump axios from 1.6.1 to 1.6.2 (#3492)
Bumps [axios](https://github.com/axios/axios) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.1...v1.6.2)
---
updated-dependencies:
- dependency-name: axios
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 14 +++++++-------
package.json | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index d47bfa52..b8bd6060 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
- "axios": "^1.6.1",
+ "axios": "^1.6.2",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
@@ -1908,9 +1908,9 @@
}
},
"node_modules/axios": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
- "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
+ "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
@@ -8728,9 +8728,9 @@
"dev": true
},
"axios": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
- "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
+ "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
diff --git a/package.json b/package.json
index 415a8630..fcd2bdb4 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"prettier": "^3.1.0"
},
"dependencies": {
- "axios": "^1.6.1",
+ "axios": "^1.6.2",
"dotenv": "^16.3.1",
"emoji-name-map": "^1.2.8",
"github-username-regex": "^1.0.0",
From afcb773b1103584dbec2593fe52b7760f8596b38 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 20 Nov 2023 20:45:42 +0200
Subject: [PATCH 39/48] build(deps-dev): Bump eslint from 8.53.0 to 8.54.0
(#3493)
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.54.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.53.0...v8.54.0)
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 30 +++++++++++++++---------------
package.json | 2 +-
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b8bd6060..2f9db0e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,7 @@
"@uppercod/css-to-object": "^1.1.1",
"axios-mock-adapter": "^1.22.0",
"color-contrast-checker": "^2.1.0",
- "eslint": "^8.53.0",
+ "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"hjson": "^3.2.2",
"husky": "^8.0.3",
@@ -819,9 +819,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.53.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz",
- "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==",
+ "version": "8.54.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz",
+ "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2758,15 +2758,15 @@
}
},
"node_modules/eslint": {
- "version": "8.53.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz",
- "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==",
+ "version": "8.54.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz",
+ "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.3",
- "@eslint/js": "8.53.0",
+ "@eslint/js": "8.54.0",
"@humanwhocodes/config-array": "^0.11.13",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -7860,9 +7860,9 @@
}
},
"@eslint/js": {
- "version": "8.53.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz",
- "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==",
+ "version": "8.54.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz",
+ "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==",
"dev": true
},
"@fastify/busboy": {
@@ -9355,15 +9355,15 @@
}
},
"eslint": {
- "version": "8.53.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz",
- "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==",
+ "version": "8.54.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz",
+ "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.3",
- "@eslint/js": "8.53.0",
+ "@eslint/js": "8.54.0",
"@humanwhocodes/config-array": "^0.11.13",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
diff --git a/package.json b/package.json
index fcd2bdb4..cdd20aad 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"@uppercod/css-to-object": "^1.1.1",
"axios-mock-adapter": "^1.22.0",
"color-contrast-checker": "^2.1.0",
- "eslint": "^8.53.0",
+ "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"hjson": "^3.2.2",
"husky": "^8.0.3",
From a8663a80253c0f2a3a08486f6795ee3bae066cf2 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Thu, 23 Nov 2023 21:06:01 +0200
Subject: [PATCH 40/48] feat(wakatime card): add disable animations query
option (#3496)
* feat(wakatime card): add disable animations query option
* docs
---
api/wakatime.js | 2 ++
readme.md | 1 +
src/cards/types.d.ts | 1 +
src/cards/wakatime-card.js | 5 +++++
4 files changed, 9 insertions(+)
diff --git a/api/wakatime.js b/api/wakatime.js
index 732b05a5..d00e773f 100644
--- a/api/wakatime.js
+++ b/api/wakatime.js
@@ -30,6 +30,7 @@ export default async (req, res) => {
api_domain,
border_radius,
border_color,
+ disable_animations,
} = req.query;
res.setHeader("Content-Type", "image/svg+xml");
@@ -83,6 +84,7 @@ export default async (req, res) => {
locale: locale ? locale.toLowerCase() : null,
layout,
langs_count,
+ disable_animations: parseBoolean(disable_animations),
}),
);
} catch (err) {
diff --git a/readme.md b/readme.md
index 0f106716..bec204dc 100644
--- a/readme.md
+++ b/readme.md
@@ -421,6 +421,7 @@ If we don't support your language, please consider contributing! You can find mo
* `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
* `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`.
+* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
***
diff --git a/src/cards/types.d.ts b/src/cards/types.d.ts
index d55d1c6e..a1230231 100644
--- a/src/cards/types.d.ts
+++ b/src/cards/types.d.ts
@@ -54,6 +54,7 @@ type WakaTimeOptions = CommonOptions & {
custom_title: string;
layout: "compact" | "normal";
langs_count: number;
+ disable_animations: boolean;
};
export type GistCardOptions = CommonOptions & {
diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js
index a6a203da..22b93aa5 100644
--- a/src/cards/wakatime-card.js
+++ b/src/cards/wakatime-card.js
@@ -218,6 +218,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
langs_count = languages.length,
border_radius,
border_color,
+ disable_animations,
} = options;
const shouldHideLangs = Array.isArray(hide) && hide.length > 0;
@@ -382,6 +383,10 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
},
});
+ if (disable_animations) {
+ card.disableAnimations();
+ }
+
card.setHideBorder(hide_border);
card.setHideTitle(hide_title);
card.setCSS(
From b8983dd6978ce9443b5548fcb7c7a64bd72627a9 Mon Sep 17 00:00:00 2001
From: Ritik Raj <84488726+ritik48@users.noreply.github.com>
Date: Fri, 24 Nov 2023 00:43:48 +0530
Subject: [PATCH 41/48] 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
* made the required changes
* Update wakatime-card.js
* Update wakatime-card.js
---------
Co-authored-by: Rick Staa
Co-authored-by: Alexandr
---
api/wakatime.js | 2 ++
readme.md | 1 +
src/cards/types.d.ts | 1 +
src/cards/wakatime-card.js | 6 +++++-
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/api/wakatime.js b/api/wakatime.js
index d00e773f..de263e06 100644
--- a/api/wakatime.js
+++ b/api/wakatime.js
@@ -30,6 +30,7 @@ export default async (req, res) => {
api_domain,
border_radius,
border_color,
+ display_format,
disable_animations,
} = req.query;
@@ -84,6 +85,7 @@ export default async (req, res) => {
locale: locale ? locale.toLowerCase() : null,
layout,
langs_count,
+ display_format,
disable_animations: parseBoolean(disable_animations),
}),
);
diff --git a/readme.md b/readme.md
index bec204dc..06bbdfc3 100644
--- a/readme.md
+++ b/readme.md
@@ -421,6 +421,7 @@ If we don't support your language, please consider contributing! You can find mo
* `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
* `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`.
+* `display_format` - Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. Default: `time`.
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
***
diff --git a/src/cards/types.d.ts b/src/cards/types.d.ts
index a1230231..a51fd2d7 100644
--- a/src/cards/types.d.ts
+++ b/src/cards/types.d.ts
@@ -54,6 +54,7 @@ type WakaTimeOptions = CommonOptions & {
custom_title: string;
layout: "compact" | "normal";
langs_count: number;
+ display_format: "time" | "percent";
disable_animations: boolean;
};
diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js
index 22b93aa5..2d451ef0 100644
--- a/src/cards/wakatime-card.js
+++ b/src/cards/wakatime-card.js
@@ -218,6 +218,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
langs_count = languages.length,
border_radius,
border_color,
+ display_format = "time",
disable_animations,
} = options;
@@ -331,7 +332,10 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
return createTextNode({
id: language.name,
label: language.name,
- value: language.text,
+ value:
+ display_format === "percent"
+ ? `${language.percent.toFixed(2).toString()} %`
+ : language.text,
index,
percent: language.percent,
// @ts-ignore
From 1262002624b3812241c20f47a5112bfa49145869 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Sat, 25 Nov 2023 10:00:22 +0200
Subject: [PATCH 42/48] fix(wakatime card): add percent display format for
compact layout (resolves #3503) (#3504)
---
src/cards/wakatime-card.js | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js
index 2d451ef0..fd55b365 100644
--- a/src/cards/wakatime-card.js
+++ b/src/cards/wakatime-card.js
@@ -46,16 +46,21 @@ const noCodingActivityNode = ({ color, text }) => {
* @param {WakaTimeLang} args.lang The languages array.
* @param {number} args.x The x position of the language node.
* @param {number} args.y The y position of the language node.
+ * @param {"time" | "percent"} args.display_format The display format of the language node.
* @returns {string} The compact layout language SVG node.
*/
-const createCompactLangNode = ({ lang, x, y }) => {
+const createCompactLangNode = ({ lang, x, y, display_format }) => {
const color = languageColors[lang.name] || "#858585";
+ const value =
+ display_format === "percent"
+ ? `${lang.percent.toFixed(2).toString()} %`
+ : lang.text;
return `
- ${lang.name} - ${lang.text}
+ ${lang.name} - ${value}
`;
@@ -67,21 +72,24 @@ const createCompactLangNode = ({ lang, x, y }) => {
* @param {Object} args The function arguments.
* @param {WakaTimeLang[]} args.langs The language objects.
* @param {number} args.y The y position of the language node.
+ * @param {"time" | "percent"} args.display_format The display format of the language node.
* @returns {string[]} The language text node items.
*/
-const createLanguageTextNode = ({ langs, y }) => {
+const createLanguageTextNode = ({ langs, y, display_format }) => {
return langs.map((lang, index) => {
if (index % 2 === 0) {
return createCompactLangNode({
lang,
x: 25,
y: 12.5 * index + y,
+ display_format,
});
}
return createCompactLangNode({
lang,
x: 230,
y: 12.5 + 12.5 * index,
+ display_format,
});
});
};
@@ -313,6 +321,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
? createLanguageTextNode({
y: 25,
langs: filteredLanguages,
+ display_format,
}).join("")
: noCodingActivityNode({
// @ts-ignore
From c6c4a88d6d66b1e1295244f84a1b11a83c34d3ce Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Sat, 25 Nov 2023 20:23:21 +0200
Subject: [PATCH 43/48] docs: improve query options appereance using tables
(#3484)
---
readme.md | 110 ++++++++++++++++++++++++++++++------------------------
1 file changed, 61 insertions(+), 49 deletions(-)
diff --git a/readme.md b/readme.md
index 06bbdfc3..fd3dfc0b 100644
--- a/readme.md
+++ b/readme.md
@@ -288,16 +288,18 @@ You can customize the appearance of all your cards however you wish with URL par
#### Common Options
-* `title_color` - Card's title color *(hex color)*. Default: `2f80ed`.
-* `text_color` - Body text color *(hex color)*. Default: `434d58`.
-* `icon_color` - Icons color if available *(hex color)*. Default: `4c71f2`.
-* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (does not apply when `hide_border` is enabled).
-* `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe`
-* `hide_border` - Hides the card's border *(boolean)*. Default: `false`
-* `theme` - Name of the theme; choose from [all available themes](themes/README.md). Default: `default` theme.
-* `cache_seconds` - Sets the cache header manually *(min: 21600, max: 86400)*. Default: `21600 seconds (6 hours)`.
-* `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`.
-* `border_radius` - Corner rounding on the card. Default: `4.5`.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `title_color` | Card's title color. | string (hex color) | `2f80ed` |
+| `text_color` | Body text color. | string (hex color) | `434d58` |
+| `icon_color` | Icons color if available. | string (hex color) | `4c71f2` |
+| `border_color` | Card's border color. Does not apply when `hide_border` is enabled. | string (hex color) | `e4e2e2` |
+| `bg_color` | Card's background color. | string (hex color or a gradient in the form of *angle,start,end*) | `fffefe` |
+| `hide_border` | Hides the card's border. | boolean | `false` |
+| `theme` | Name of the theme, choose from [all available themes](themes/README.md). | enum | `default` |
+| `cache_seconds` | Sets the cache header manually (min: 21600, max: 86400). | integer | `1800` |
+| `locale` | Sets the language in the card, you can check full list of available locales [here](#available-locales). | enum | `en` |
+| `border_radius` | Corner rounding on the card. | number | `4.5` |
> [!WARNING]\
> We use caching to decrease the load on our servers (see ). Our cards have a default cache of 6 hours (21600 seconds). Also, note that the cache is clamped to a minimum of 6 hours and a maximum of 24 hours. If you want the data on your statistics card to be updated more often you can [deploy your own instance](#deploy-on-your-own) and set [environment variable](#disable-rate-limit-protections) `CACHE_SECONDS` to a value of your choosing.
@@ -364,47 +366,55 @@ If we don't support your language, please consider contributing! You can find mo
#### Stats Card Exclusive Options
-* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(comma-separated values)*. Default: `[] (blank array)`.
-* `hide_title` - *(boolean)*. Default: `false`.
-* `card_width` - Sets the card's width manually *(number)*. Default: `500px (approx.)`.
-* `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`.
-* `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile` or `default`). Default: `default`.
-* `show_icons` - *(boolean)*. Default: `false`.
-* `include_all_commits` - Counts total commits instead of just the current year commits *(boolean)*. Default: `false`.
-* `line_height` - Sets the line height between text *(number)*. Default: `25`.
-* `exclude_repo` - Excludes stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
-* `custom_title` - Sets a custom title for the card. Default: ` GitHub Stats`.
-* `text_bold` - Uses bold text *(boolean)*. Default: `true`.
-* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
-* `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
-* `number_format` - Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
-* `show` - Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`) *(Comma-separated values)*. Default: `[] (blank array)`.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `hide` | Hides the [specified items](#hiding-individual-stats) from stats. | string (comma-separated values) | `null` |
+| `hide_title` | Hides the title of your stats card. | boolean | `false` |
+| `card_width` | Sets the card's width manually. | number | `500px (approx.)` |
+| `hide_rank` | Hides the rank and automatically resizes the card width. | boolean | `false` |
+| `rank_icon` | Shows alternative rank icon (i.e. `github`, `percentile` or `default`). | enum | `default` |
+| `show_icons` | Shows icons near all stats. | boolean | `false` |
+| `include_all_commits` | Count total commits instead of just the current year commits. | boolean | `false` |
+| `line_height` | Sets the line height between text. | integer | `25` |
+| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` |
+| `custom_title` | Sets a custom title for the card. | string | ` GitHub Stats` |
+| `text_bold` | Uses bold text. | boolean | `true` |
+| `disable_animations` | Disables all animations in the card. | boolean | `false` |
+| `ring_color` | Color of the rank circle. | string (hex color) | `2f80ed` |
+| `number_format` | Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). | enum | `short` |
+| `show` | Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`). | string (comma-separated values) | `null` |
> [!NOTE]\
> When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding.
#### Repo Card Exclusive Options
-* `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`.
-* `description_lines_count` - Manually set the number of lines for the description *(number)*. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. Default: `undefined`.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `show_owner` | Shows the repo's owner name. | boolean | `false` |
+| `description_lines_count` | Manually set the number of lines for the description. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. | number | `null` |
#### Gist Card Exclusive Options
-* `show_owner` - Shows the gist's owner name *(boolean)*. Default: `false`.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `show_owner` | Shows the gist's owner name. | boolean | `false` |
#### Language Card Exclusive Options
-* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
-* `hide_title` - *(boolean)*. Default: `false`.
-* `layout` - Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
-* `card_width` - Sets the card's width manually *(number)*. Default `300`.
-* `langs_count` - Shows more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
-* `exclude_repo` - Excludes specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
-* `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`.
-* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
-* `hide_progress` - Uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
-* `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
-* `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `hide` | Hides the [specified languages](#hide-individual-languages) from card. | string (comma-separated values) | `null` |
+| `hide_title` | Hides the title of your card. | boolean | `false` |
+| `layout` | Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. | enum | `normal` |
+| `card_width` | Sets the card's width manually. | number | `300` |
+| `langs_count` | Shows more languages on the card, between 1-20. | integer | `5` for `normal` and `donut`, `6` for other layouts |
+| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` |
+| `custom_title` | Sets a custom title for the card. | string | `Most Used Languages` |
+| `disable_animations` | Disables all animations in the card. | boolean | `false` |
+| `hide_progress` | Uses the compact layout option, hides percentages, and removes the bars. | boolean | `false` |
+| `size_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `1` |
+| `count_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `0` |
> [!WARNING]\
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
@@ -413,16 +423,18 @@ If we don't support your language, please consider contributing! You can find mo
#### WakaTime Card Exclusive Options
-* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
-* `hide_title` - *(boolean)*. Default `false`.
-* `line_height` - Sets the line height between text *(number)*. Default `25`.
-* `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`.
-* `custom_title` - Sets a custom title for the card *(string)*. Default `WakaTime Stats`.
-* `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
-* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
-* `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`.
-* `display_format` - Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. Default: `time`.
-* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
+| Name | Description | Type | Default value |
+| --- | --- | --- | --- |
+| `hide` | Hides the languages specified from the card. | string (comma-separated values) | `null` |
+| `hide_title` | Hides the title of your card. | boolean | `false` |
+| `line_height` | Sets the line height between text. | integer | `25` |
+| `hide_progress` | Hides the progress bar and percentage. | boolean | `false` |
+| `custom_title` | Sets a custom title for the card. | string | `WakaTime Stats` |
+| `layout` | Switches between two available layouts `default` & `compact`. | enum | `default` |
+| `langs_count` | Limits the number of languages on the card, defaults to all reported languages. | integer | `null` |
+| `api_domain` | Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) | string | `Waka API` |
+| `display_format` | Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. | enum | `time` |
+| `disable_animations` | Disables all animations in the card. | boolean | `false` |
***
From 4793de4a6ec700dfb9ac292faf3be36a5c110c79 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Nov 2023 22:02:17 +0300
Subject: [PATCH 44/48] build(deps): Bump rickstaa/top-issues-action from
1.3.71 to 1.3.75 (#3508)
Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.71 to 1.3.75.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](https://github.com/rickstaa/top-issues-action/compare/ba0b5f329a1a85074e84b1944a7154202248b630...04028f4fc0f1c217e571be72102b6ea4827b8468)
---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/top-issues-dashboard.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml
index 471238dc..6d1c462f 100644
--- a/.github/workflows/top-issues-dashboard.yml
+++ b/.github/workflows/top-issues-dashboard.yml
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
- uses: rickstaa/top-issues-action@ba0b5f329a1a85074e84b1944a7154202248b630 # v1.3.71
+ uses: rickstaa/top-issues-action@04028f4fc0f1c217e571be72102b6ea4827b8468 # v1.3.75
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 75954566771f33b3de690676833b9e9d9f71ff22 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Nov 2023 22:03:17 +0300
Subject: [PATCH 45/48] build(deps): Bump rickstaa/empty-issues-closer-action
(#3507)
Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.47 to 1.1.50.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](https://github.com/rickstaa/empty-issues-closer-action/compare/096c761b38032baf0e9e6bb65c17abf0615a6e41...e0fb1033c83cf13e0c98c2c9d0419d3040a6a1d0)
---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
.github/workflows/empty-issues-closer.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml
index 6fdf59a0..7526bcaf 100644
--- a/.github/workflows/empty-issues-closer.yaml
+++ b/.github/workflows/empty-issues-closer.yaml
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run empty issues closer action
- uses: rickstaa/empty-issues-closer-action@096c761b38032baf0e9e6bb65c17abf0615a6e41 # v1.1.47
+ uses: rickstaa/empty-issues-closer-action@e0fb1033c83cf13e0c98c2c9d0419d3040a6a1d0 # v1.1.50
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
From 0616df3746313f10906b5957bf8a737d70cc5ef9 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 28 Nov 2023 19:39:15 +0200
Subject: [PATCH 46/48] tests: add gist card performance test (#3372)
---
tests/bench/gist.bench.js | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 tests/bench/gist.bench.js
diff --git a/tests/bench/gist.bench.js b/tests/bench/gist.bench.js
new file mode 100644
index 00000000..69f38137
--- /dev/null
+++ b/tests/bench/gist.bench.js
@@ -0,0 +1,51 @@
+import { benchmarkSuite } from "jest-bench";
+import gist from "../../api/gist.js";
+import axios from "axios";
+import MockAdapter from "axios-mock-adapter";
+import { jest } from "@jest/globals";
+
+const gist_data = {
+ data: {
+ viewer: {
+ gist: {
+ description:
+ "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023",
+ owner: {
+ login: "Yizack",
+ },
+ stargazerCount: 33,
+ forks: {
+ totalCount: 11,
+ },
+ files: [
+ {
+ name: "countries.json",
+ language: {
+ name: "JSON",
+ },
+ size: 85858,
+ },
+ ],
+ },
+ },
+ },
+};
+
+const mock = new MockAdapter(axios);
+mock.onPost("https://api.github.com/graphql").reply(200, gist_data);
+
+benchmarkSuite("test /api/gist", {
+ ["simple request"]: async () => {
+ const req = {
+ query: {
+ id: "bbfce31e0217a3689c8d961a356cb10d",
+ },
+ };
+ const res = {
+ setHeader: jest.fn(),
+ send: jest.fn(),
+ };
+
+ await gist(req, res);
+ },
+});
From 1656ec6d3c7418f94232ccd5b90aafc826cb28b8 Mon Sep 17 00:00:00 2001
From: Alexandr Garbuzov
Date: Tue, 28 Nov 2023 19:44:21 +0200
Subject: [PATCH 47/48] tests: add pin card performance test (#3374)
---
tests/bench/pin.bench.js | 50 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 tests/bench/pin.bench.js
diff --git a/tests/bench/pin.bench.js b/tests/bench/pin.bench.js
new file mode 100644
index 00000000..636e0d58
--- /dev/null
+++ b/tests/bench/pin.bench.js
@@ -0,0 +1,50 @@
+import { benchmarkSuite } from "jest-bench";
+import pin from "../../api/pin.js";
+import axios from "axios";
+import MockAdapter from "axios-mock-adapter";
+import { jest } from "@jest/globals";
+
+const data_repo = {
+ repository: {
+ username: "anuraghazra",
+ name: "convoychat",
+ stargazers: {
+ totalCount: 38000,
+ },
+ description: "Help us take over the world! React + TS + GraphQL Chat App",
+ primaryLanguage: {
+ color: "#2b7489",
+ id: "MDg6TGFuZ3VhZ2UyODc=",
+ name: "TypeScript",
+ },
+ forkCount: 100,
+ isTemplate: false,
+ },
+};
+
+const data_user = {
+ data: {
+ user: { repository: data_repo.repository },
+ organization: null,
+ },
+};
+
+const mock = new MockAdapter(axios);
+mock.onPost("https://api.github.com/graphql").reply(200, data_user);
+
+benchmarkSuite("test /api/pin", {
+ ["simple request"]: async () => {
+ const req = {
+ query: {
+ username: "anuraghazra",
+ repo: "convoychat",
+ },
+ };
+ const res = {
+ setHeader: jest.fn(),
+ send: jest.fn(),
+ };
+
+ await pin(req, res);
+ },
+});
From 80b2d23242b1320dd6ab742125068995532ac08f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 1 Dec 2023 08:38:38 +0300
Subject: [PATCH 48/48] build(deps-dev): Bump @adobe/css-tools from 4.3.1 to
4.3.2 (#3516)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)
---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr
---
package-lock.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2f9db0e1..4bd145c7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -83,9 +83,9 @@
}
},
"node_modules/@adobe/css-tools": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz",
- "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz",
+ "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==",
"dev": true
},
"node_modules/@ampproject/remapping": {
@@ -7309,9 +7309,9 @@
}
},
"@adobe/css-tools": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz",
- "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz",
+ "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==",
"dev": true
},
"@ampproject/remapping": {