From 5f7ef79bca34ee6ce8aee73872e65b1b37e0b5cc Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:33:15 +0700 Subject: [PATCH 001/539] feat(theme): Added merko theme (#165) --- themes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 83b1773..5abf070 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -311,6 +311,13 @@ export const themes: Themes = { bg_color: "212733", border_color: "5C6773", }, + merko: { + title_color: "abd200", + icon_color: "b7d364", + text_color: "68b587", + bg_color: "0a0f0b", + stroke_color: "253829", + }, // Gradient themes "sunset-gradient": { From 705fca169d81bb9c1d039a6b7bd1b12cb4b326d2 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Mon, 27 Nov 2023 03:33:53 +0000 Subject: [PATCH 002/539] docs(theme): auto update theme readme --- themes/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index fcad00e..2232cf5 100644 --- a/themes/README.md +++ b/themes/README.md @@ -26,8 +26,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `shadow_purple` ![shadow_purple][shadow_purple] | `shadow_brown` ![shadow_brown][shadow_brown] | `gruvbox` ![gruvbox][gruvbox] | | `gruvbox_light` ![gruvbox_light][gruvbox_light] | `apprentice` ![apprentice][apprentice] | `radical` ![radical][radical] | | `tokyonight` ![tokyonight][tokyonight] | `shades-of-purple` ![shades-of-purple][shades-of-purple] | `ayu` ![ayu][ayu] | -| `ayu-light` ![ayu-light][ayu-light] | `ayu-mirage` ![ayu-mirage][ayu-mirage] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `ayu-light` ![ayu-light][ayu-light] | `ayu-mirage` ![ayu-mirage][ayu-mirage] | `merko` ![merko][merko] | +| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | +| `siny-gradient` ![siny-gradient][siny-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -73,6 +74,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [ayu]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ayu [ayu-light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ayu-light [ayu-mirage]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ayu-mirage +[merko]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=merko [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 67ccd269a22ab7171d6ff424dab9e4d493115d41 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:31:26 +0700 Subject: [PATCH 003/539] chore: update pull requests readme template --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 46b4e79..2882498 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,6 +23,7 @@ Changes strictly related to documentation can skip this section. - [ ] Tested locally with a valid username - [ ] Tested locally with an invalid username +- [ ] Ran tests with `npm test` - [ ] Added or updated test cases to test new features ## Checklist: @@ -31,7 +32,6 @@ Changes strictly related to documentation can skip this section. - [ ] The code is properly formatted and is consistent with the existing code style - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation -- [ ] I have checked this code with command `npm run build` - [ ] My changes generate no new warnings ## Screenshots From 4a6600a2c6581b17973dbb257ac271ab374af10e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:37:16 +0000 Subject: [PATCH 004/539] build(deps): bump rickstaa/top-issues-action from 1.3.72 to 1.3.75 (#166) Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.72 to 1.3.75. - [Release notes](https://github.com/rickstaa/top-issues-action/releases) - [Commits](https://github.com/rickstaa/top-issues-action/compare/79e37551804731e6183da6cee46d99bf8fa02e38...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> --- .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 5ebafa3..0a61087 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@79e37551804731e6183da6cee46d99bf8fa02e38 # v1.3.72 + uses: rickstaa/top-issues-action@04028f4fc0f1c217e571be72102b6ea4827b8468 # v1.3.75 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: From 33df42bc561d83b6a9796f993ea9c188a8bdb558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:01:00 +0000 Subject: [PATCH 005/539] build(deps-dev): bump @types/node from 20.9.4 to 20.10.0 (#167) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.9.4 to 20.10.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" 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> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 256d563..8c500b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1557,9 +1557,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz", - "integrity": "sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==", + "version": "20.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", + "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", "dependencies": { "undici-types": "~5.26.4" } From 8d2f559ef3224a92691d0239ffd5c0674dab7e1f Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:46:40 +0700 Subject: [PATCH 006/539] build(deps): bump all dependencies and devDependencies version (#168) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 479 +++++++++++++++++++++++++++++----------------- package.json | 2 +- 2 files changed, 300 insertions(+), 181 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c500b3..be8dad4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.3.5", "@types/jest": "^29.5.10", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "jest": "^29.7.0", "nodemon": "^3.0.1", "ts-jest": "^29.1.1", @@ -106,6 +106,27 @@ "node": ">=0.8.0" } }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.23.3", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", @@ -168,15 +189,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { "version": "7.23.4", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.4.tgz", @@ -192,16 +204,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", @@ -218,30 +220,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", @@ -445,6 +423,27 @@ "node": ">=0.8.0" } }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { "version": "7.23.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.4.tgz", @@ -724,6 +723,16 @@ "node": ">=12" } }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@fajarkim/svg2img": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/@fajarkim/svg2img/-/svg2img-0.0.2.tgz", @@ -942,16 +951,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -978,16 +977,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/source-map/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@jest/test-result": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", @@ -1044,16 +1033,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@jest/types": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", @@ -1110,13 +1089,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@markdoc/markdoc": { @@ -1802,15 +1781,6 @@ "node": ">=8" } }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", @@ -2035,9 +2005,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001564", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", - "integrity": "sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==", + "version": "1.0.30001565", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", + "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", "dev": true, "funding": [ { @@ -2070,27 +2040,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -2402,9 +2351,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.594", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.594.tgz", - "integrity": "sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==", + "version": "1.4.595", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.595.tgz", + "integrity": "sha512-+ozvXuamBhDOKvMNUQvecxfbyICmIAwS4GpLmR0bsiSBlGnLaOcs2Cj7J8XSbW+YEaN3Xl3ffgpm+srTUWFwFQ==", "dev": true }, "node_modules/emittery": { @@ -2817,12 +2766,12 @@ "dev": true }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { @@ -3087,39 +3036,51 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" + "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -3632,6 +3593,39 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -3712,15 +3706,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3833,15 +3818,12 @@ "dev": true }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/make-dir": { @@ -3859,6 +3841,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4065,12 +4080,66 @@ "ms": "^2.1.1" } }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nodemon/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/nodemon/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", @@ -4516,18 +4585,12 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/send": { @@ -4643,6 +4706,39 @@ "node": ">=10" } }, + "node_modules/simple-update-notifier/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -4771,15 +4867,15 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -4898,6 +4994,39 @@ } } }, + "node_modules/ts-jest/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -5064,16 +5193,6 @@ "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -5150,9 +5269,9 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "node_modules/yargs": { diff --git a/package.json b/package.json index 0da7005..785a64e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.3.5", "@types/jest": "^29.5.10", - "@types/node": "^20.9.4", + "@types/node": "^20.10.0", "jest": "^29.7.0", "nodemon": "^3.0.1", "ts-jest": "^29.1.1", From 3ec23866a96f133faeb794ac381e5a0743f54ef9 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:33:56 +0700 Subject: [PATCH 007/539] ci(push-commit): revise code for simple ability --- .github/workflows/generate-locale-doc.yml | 5 ++++- .github/workflows/generate-theme-doc.yml | 5 ++++- scripts/{push-theme-readme.sh => push-commit.sh} | 6 +++--- scripts/push-locale-readme.sh | 14 -------------- 4 files changed, 11 insertions(+), 19 deletions(-) rename scripts/{push-theme-readme.sh => push-commit.sh} (56%) delete mode 100755 scripts/push-locale-readme.sh diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index b8ae318..8aef169 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -52,8 +52,11 @@ jobs: - name: Run Script uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 with: - script: ./scripts/push-locale-readme.sh + script: ./scripts/push-commit.sh env: CI: true + AUTHOR_NAME: GitHub Actions + AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} GH_REPO: ${{ secrets.GH_REPO }} + MESSAGE: "docs(translation): auto update translation readme" diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index d66f0ef..6c6cafd 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -52,8 +52,11 @@ jobs: - name: Run Script uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 with: - script: ./scripts/push-theme-readme.sh + script: ./scripts/push-commit.sh env: CI: true + AUTHOR_NAME: GitHub Actions + AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} GH_REPO: ${{ secrets.GH_REPO }} + MESSAGE: "docs(theme): auto update theme readme" diff --git a/scripts/push-theme-readme.sh b/scripts/push-commit.sh similarity index 56% rename from scripts/push-theme-readme.sh rename to scripts/push-commit.sh index a9bc950..32f39a8 100755 --- a/scripts/push-theme-readme.sh +++ b/scripts/push-commit.sh @@ -3,12 +3,12 @@ set -x set -e git --version -git config --global user.email "86386385+FajarKim@users.noreply.github.com" -git config --global user.name "Rangga Fajar Oktariansyah" +git config --global user.email "${AUTHOR_EMAIL}" +git config --global user.name "${AUTHOR_NAME}" git config --global --add safe.directory ${GITHUB_WORKSPACE} if [[ "$(git status --porcelain)" != "" ]]; then git add --all - git commit --message "docs(theme): auto update theme readme" + git commit --message "${MESSAGE}" git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git git push -f fi diff --git a/scripts/push-locale-readme.sh b/scripts/push-locale-readme.sh deleted file mode 100755 index 8be79cb..0000000 --- a/scripts/push-locale-readme.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -x -set -e - -git --version -git config --global user.email "86386385+FajarKim@users.noreply.github.com" -git config --global user.name "Rangga Fajar Oktariansyah" -git config --global --add safe.directory ${GITHUB_WORKSPACE} -if [[ "$(git status --porcelain)" != "" ]]; then - git add --all - git commit --message "docs(translation): auto update translation readme" - git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git - git push -f -fi From 0a0567a76a0073f1c5aed4a0fe945c9cc3d128bf Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:33:25 +0700 Subject: [PATCH 008/539] feat(i18n): Added Portuguese translation (#169) --- src/translations.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/translations.ts b/src/translations.ts index 080ae28..eb39c4e 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -184,4 +184,22 @@ export const locales: Locales = { contributedToText: "Nyumbang ka (taun kamari)", rtlDirection: false, }, + pt: { + titleCard: "Estatísticas do GitHub de {name}", + followersText: "Seguidores", + followingText: "A Seguir", + totalReposText: "Total de Repositórios", + starsCountText: "Contagem de Estrelas", + forksCountText: "Contagem de Forks", + commitsCountText: "Contagem de Commits", + totalPRText: "Total de PRs", + totalPRMergedText: "Total de PRs Fundidos", + totalPRReviewedText: "Total de PRs Revistos", + totalIssuesText: "Total de Issues", + totalIssuesClosedText: "Total de Issues Fechados", + totalDiscussionStartedText: "Discussões Iniciadas", + totalDiscussionAnsweredText: "Discussões Respondidas", + contributedToText: "Contribuiu em (ano passado)", + rtlDirection: false, + }, } From 1195e8e82ac24989761b1313b946b238b679beb8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 30 Nov 2023 02:33:58 +0000 Subject: [PATCH 009/539] docs(translation): auto update translation readme --- docs/translations.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/docs/translations.md b/docs/translations.md index dd4f8e0..60c3b2d 100644 --- a/docs/translations.md +++ b/docs/translations.md @@ -14,43 +14,56 @@ Use `?locale=LOCALE_CODE` parameter like so :-

Locale

Progress

- +

en

English

100%

- + +

id

Indonesian

100%

- + +

ko

Korean

100%

- + +

ar

Arabic

100%

- + +

ja

Japanese

100%

- + +

fr

French

100%

- + +

fa

Persian

100%

- + +

ms

Malay

100%

- + +

su

Sundanese

100%

+ +

pt

+

Portuguese

+

100%

+ Want to add new translations? Consider reading the [contribution guidelines](https://github.com/FajarKim/github-readme-profile/blob/master/CONTRIBUTING.md#%EF%B8%8F-translations-contribution) :D From faf83755fa13fa50e47302b07d10b3e7ba94d4b3 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:00:14 +0700 Subject: [PATCH 010/539] ci: added auto build deps --- .github/workflows/auto-build-pkg.yml | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/auto-build-pkg.yml diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml new file mode 100644 index 0000000..535f5b5 --- /dev/null +++ b/.github/workflows/auto-build-pkg.yml @@ -0,0 +1,68 @@ +name: Auto Build All Dependencies and DevDependencies +on: + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: "0 0 */7 * *" + workflow_dispatch: + +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read + +jobs: + autoBuildDeps: + runs-on: ubuntu-latest + name: Auto build deps + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Node + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + # Fix the unsafe repo error which was introduced by the CVE-2022-24765 git patches. + - name: Fix unsafe repo error + run: git config --global --add safe.directory ${{ github.workspace }} + + - name: npm install, generate readme + run: | + npm ci + npm update --save + env: + CI: true + + - name: Run Script + uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 + with: + script: ./scripts/push-commit.sh + env: + CI: true + AUTHOR_NAME: GitHub Actions + AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com + PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} + GH_REPO: ${{ secrets.GH_REPO }} + MESSAGE: "build(deps): bump all dependencies and devDependencies" From 300f87fec6ba3e1ce42daa605d546c773ea8cc38 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:02:13 +0700 Subject: [PATCH 011/539] ci: fixed small typo --- .github/workflows/generate-locale-doc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index 8aef169..edfd3e3 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -22,9 +22,9 @@ permissions: statuses: read jobs: - generateThemeDoc: + generateLocaleDoc: runs-on: ubuntu-latest - name: Generate theme doc + name: Generate locale doc strategy: matrix: node-version: [18.x] From 16e267489400a10fba9471a45b1df5991d7852fb Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:07:31 +0700 Subject: [PATCH 012/539] ci: fixed small typo --- .github/workflows/auto-build-pkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index 535f5b5..0d6501f 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -65,4 +65,4 @@ jobs: AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} GH_REPO: ${{ secrets.GH_REPO }} - MESSAGE: "build(deps): bump all dependencies and devDependencies" + MESSAGE: "build(deps): bump all dependencies and devDependencies version" From 11e2a64f2f731dbf39ad989e6006a9c334fa8cdf Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:17:17 +0700 Subject: [PATCH 013/539] feat(theme): Added carbonfox, dawnfox, dayfox, duskfox, nightfox, nordfox, and terafox themes (#170) --- themes/index.ts | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 5abf070..c7eb3f7 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -318,6 +318,55 @@ export const themes: Themes = { bg_color: "0a0f0b", stroke_color: "253829", }, + carbonfox: { + title_color: "33B1FF", + text_color: "DFDFE0", + icon_color: "25BE6A", + border_color: "282828", + bg_color: "161616", + }, + dawnfox: { + title_color: "56949F", + text_color: "575279", + icon_color: "618774", + border_color: "E5E9F0", + bg_color: "FAF4ED", + }, + dayfox: { + title_color: "287980", + text_color: "352C24", + icon_color: "396847", + border_color: "F2E9E1", + bg_color: "F6F2EE", + }, + duskfox: { + title_color: "9CCFD8", + text_color: "E0DEF4", + icon_color: "A3BE8C", + border_color: "393552", + bg_color: "232136", + }, + nightfox: { + title_color: "63CDCF", + text_color: "DFDFE0", + icon_color: "81B29A", + border_color: "393B44", + bg_color: "192330", + }, + nordfox: { + title_color: "88C0D0", + text_color: "E5E9F0", + icon_color: "A3BE8C", + border_color: "3B4252", + bg_color: "2E3440", + }, + terafox: { + title_color: "A1CDD8", + text_color: "EBEBEB", + icon_color: "7AA4A1", + border_color: "2F3239", + bg_color: "152528", + }, // Gradient themes "sunset-gradient": { From b3579e1a03c857841e94b64090891d1900ff272d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 30 Nov 2023 12:17:51 +0000 Subject: [PATCH 014/539] docs(theme): auto update theme readme --- themes/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index 2232cf5..89f6e93 100644 --- a/themes/README.md +++ b/themes/README.md @@ -27,8 +27,10 @@ Use `?theme=THEME_NAME` parameter like so :- | `gruvbox_light` ![gruvbox_light][gruvbox_light] | `apprentice` ![apprentice][apprentice] | `radical` ![radical][radical] | | `tokyonight` ![tokyonight][tokyonight] | `shades-of-purple` ![shades-of-purple][shades-of-purple] | `ayu` ![ayu][ayu] | | `ayu-light` ![ayu-light][ayu-light] | `ayu-mirage` ![ayu-mirage][ayu-mirage] | `merko` ![merko][merko] | -| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | -| `siny-gradient` ![siny-gradient][siny-gradient] | +| `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | +| `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | +| `terafox` ![terafox][terafox] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -75,6 +77,13 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [ayu-light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ayu-light [ayu-mirage]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ayu-mirage [merko]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=merko +[carbonfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=carbonfox +[dawnfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=dawnfox +[dayfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=dayfox +[duskfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=duskfox +[nightfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=nightfox +[nordfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=nordfox +[terafox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=terafox [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 714387334a6d13bc884370ef27c162c40fca670a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:40:25 +0700 Subject: [PATCH 015/539] feat(theme): Added purple-gradient theme (#171) --- themes/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index c7eb3f7..7512b2a 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -396,4 +396,10 @@ export const themes: Themes = { icon_color: "FFFFFF", bg_color: "30,E96443,904E95", }, + "purple-gradient": { + title_color: "EC7F8F", + icon_color: "EFFA4B", + text_color: "5CDD8F", + bg_color: "50,4A1133,0B1133", + }, } From d1a3cd107eab250d6b23a49285753225208edc1e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 30 Nov 2023 12:40:56 +0000 Subject: [PATCH 016/539] docs(theme): auto update theme readme --- themes/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/README.md b/themes/README.md index 89f6e93..dd4a4ef 100644 --- a/themes/README.md +++ b/themes/README.md @@ -30,7 +30,7 @@ Use `?theme=THEME_NAME` parameter like so :- | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | -| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -88,3 +88,4 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient [siny-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=siny-gradient +[purple-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=purple-gradient From 96622c469de4c39c6f4e5ace1936650590b36258 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 30 Nov 2023 19:52:25 +0700 Subject: [PATCH 017/539] feat(theme): Added humoris theme (#172) --- themes/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 7512b2a..c4b8a95 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -367,6 +367,14 @@ export const themes: Themes = { border_color: "2F3239", bg_color: "152528", }, + humoris: { + title_color: "191419", + text_color: "393c3c", + icon_color: "683c2c", + border_color: "e8e6e4", + bg_color: "dfaf77", + stroke_color: "683c2c", + }, // Gradient themes "sunset-gradient": { From f4a9740e582bd0aae8451cc22a99ccb599d6af6c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 30 Nov 2023 12:53:02 +0000 Subject: [PATCH 018/539] docs(theme): auto update theme readme --- themes/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index dd4a4ef..f8fdc31 100644 --- a/themes/README.md +++ b/themes/README.md @@ -29,8 +29,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `ayu-light` ![ayu-light][ayu-light] | `ayu-mirage` ![ayu-mirage][ayu-mirage] | `merko` ![merko][merko] | | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | -| `terafox` ![terafox][terafox] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | -| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | +| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -84,6 +85,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [nightfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=nightfox [nordfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=nordfox [terafox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=terafox +[humoris]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=humoris [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From d94892c96e50550f971b144c7587119b42922849 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 01:25:05 +0000 Subject: [PATCH 019/539] build(deps): bump all dependencies and devDependencies version --- package-lock.json | 94 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index be8dad4..a2bee52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.3.5", "@types/jest": "^29.5.10", - "@types/node": "^20.10.0", + "@types/node": "^20.10.1", "jest": "^29.7.0", "nodemon": "^3.0.1", "ts-jest": "^29.1.1", @@ -44,9 +44,9 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.4.tgz", - "integrity": "sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { "@babel/highlight": "^7.23.4", @@ -128,30 +128,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", - "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", - "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", + "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -190,12 +190,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.4.tgz", - "integrity": "sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", + "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.4", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -337,23 +337,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.4.tgz", - "integrity": "sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", + "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.4", - "@babel/types": "^7.23.4" + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" }, "engines": { "node": ">=6.9.0" @@ -445,9 +445,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.4.tgz", - "integrity": "sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -648,19 +648,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.4.tgz", - "integrity": "sha512-IYM8wSUwunWTB6tFC2dkKZhxbIjHoWemdK+3f8/wq8aKhbUscxD5MX72ubd90fxvFknaLPeGw5ycU84V1obHJg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", + "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.4", - "@babel/generator": "^7.23.4", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.4", - "@babel/types": "^7.23.4", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -692,9 +692,9 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.4.tgz", - "integrity": "sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -1536,9 +1536,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.10.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", - "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", + "version": "20.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.1.tgz", + "integrity": "sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==", "dependencies": { "undici-types": "~5.26.4" } @@ -2351,9 +2351,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.595", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.595.tgz", - "integrity": "sha512-+ozvXuamBhDOKvMNUQvecxfbyICmIAwS4GpLmR0bsiSBlGnLaOcs2Cj7J8XSbW+YEaN3Xl3ffgpm+srTUWFwFQ==", + "version": "1.4.599", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.599.tgz", + "integrity": "sha512-FdLI0/h+PvShEqmBMnZCdbgabAuQiiM9Ph8hVGmPOR5GU1XXZgwLRCMogE63OrUxcDEOBlEMVYAgtkJjWFnhRA==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index 785a64e..8549bb5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.3.5", "@types/jest": "^29.5.10", - "@types/node": "^20.10.0", + "@types/node": "^20.10.1", "jest": "^29.7.0", "nodemon": "^3.0.1", "ts-jest": "^29.1.1", From ccd412c155b5df5c721f703955b224bca2fac4ae Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 1 Dec 2023 09:05:42 +0700 Subject: [PATCH 020/539] ci: fixed small typo --- .github/workflows/auto-build-pkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index 0d6501f..1f2b4b6 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -48,7 +48,7 @@ jobs: - name: Fix unsafe repo error run: git config --global --add safe.directory ${{ github.workspace }} - - name: npm install, generate readme + - name: npm install, update run: | npm ci npm update --save From 7259fae9ae6add35b196818b2178045b9e0c7384 Mon Sep 17 00:00:00 2001 From: Rafa Fazri <108041588+RFHackers@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:57:29 +0700 Subject: [PATCH 021/539] feat(theme): Added iceberg theme (#173) --- themes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index c4b8a95..c6f4049 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -375,6 +375,13 @@ export const themes: Themes = { bg_color: "dfaf77", stroke_color: "683c2c", }, + iceberg: { + title_color: "84A0C6", + text_color: "D2D4DE", + icon_color: "3987AE", + border_color: "33374C", + bg_color: "1E2132", + }, // Gradient themes "sunset-gradient": { From 55585682249a3d55d7f5a77f913b1ed0d87ad663 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 05:58:06 +0000 Subject: [PATCH 022/539] docs(theme): auto update theme readme --- themes/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/README.md b/themes/README.md index f8fdc31..1fa1d17 100644 --- a/themes/README.md +++ b/themes/README.md @@ -29,9 +29,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `ayu-light` ![ayu-light][ayu-light] | `ayu-mirage` ![ayu-mirage][ayu-mirage] | `merko` ![merko][merko] | | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | -| `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | -| `purple-gradient` ![purple-gradient][purple-gradient] | +| `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | +| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | +| `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -86,6 +86,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [nordfox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=nordfox [terafox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=terafox [humoris]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=humoris +[iceberg]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=iceberg [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From b5a91c5f0d931d68333d5f76acae945ae149e135 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:45:15 +0700 Subject: [PATCH 023/539] feat(i18n): Added Portuguese (Brazil) translation (#174) --- src/translations.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/translations.ts b/src/translations.ts index eb39c4e..3fd0379 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -202,4 +202,22 @@ export const locales: Locales = { contributedToText: "Contribuiu em (ano passado)", rtlDirection: false, }, + "pt-BR": { + titleCard: "Estatísticas do GitHub de {name}", + followersText: "Seguidores", + followingText: "Seguindo", + totalReposText: "Total de Repositórios", + starsCountText: "Contagem de Estrelas", + forksCountText: "Contagem de Forks", + commitsCountText: "Contagem de Commits", + totalPRText: "Total de PRs", + totalPRMergedText: "Total de PRs Mesclados", + totalPRReviewedText: "Total de PRs Revisados", + totalIssuesText: "Total de Issues", + totalIssuesClosedText: "Total de Issues Encerradas", + totalDiscussionStartedText: "Discussões Iniciadas", + totalDiscussionAnsweredText: "Discussões Respondidas", + contributedToText: "Contribuiu para (ano passado)", + rtlDirection: false, + }, } From b04c3cbeb66f81ea1b254060f6e75c9e8cd8128b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 12:45:54 +0000 Subject: [PATCH 024/539] docs(translation): auto update translation readme --- docs/translations.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/translations.md b/docs/translations.md index 60c3b2d..cd5f3fb 100644 --- a/docs/translations.md +++ b/docs/translations.md @@ -64,6 +64,11 @@ Use `?locale=LOCALE_CODE` parameter like so :-

Portuguese

100%

+ +

pt-BR

+

Portuguese (Brazil)

+

100%

+ Want to add new translations? Consider reading the [contribution guidelines](https://github.com/FajarKim/github-readme-profile/blob/master/CONTRIBUTING.md#%EF%B8%8F-translations-contribution) :D From 8c03c892c762337ba56e9a4d4af566d8641ca583 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:57:05 +0700 Subject: [PATCH 025/539] chore(release): v1.0.7 (#175) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a2bee52..dfcb328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fajarkim/github-readme-profile", - "version": "1.0.6", + "version": "1.0.7", "license": "MIT", "dependencies": { "@fajarkim/svg2img": "^0.0.2", diff --git a/package.json b/package.json index 8549bb5..1aa260b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.6", + "version": "1.0.7", "description": "🙀 Generate your Stats GitHub Profile in SVG", "main": "api/index.ts", "dependencies": { From ab2536f0af865001274a6432c341723bfe62355a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:34:54 +0700 Subject: [PATCH 026/539] feat(theme): Added laederon theme (#176) --- themes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index c6f4049..b02b572 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -382,6 +382,13 @@ export const themes: Themes = { border_color: "33374C", bg_color: "1E2132", }, + laederon: { + title_color: "4a5d23", + text_color: "08457e", + icon_color: "817027", + border_color: "e8f6f2", + bg_color: "f8f6f2", + }, // Gradient themes "sunset-gradient": { From 5ac3d44a8c28c43c012f06c16be2d73601ba7455 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 14:35:29 +0000 Subject: [PATCH 027/539] docs(theme): auto update theme readme --- themes/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index 1fa1d17..a875868 100644 --- a/themes/README.md +++ b/themes/README.md @@ -30,8 +30,8 @@ Use `?theme=THEME_NAME` parameter like so :- | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | -| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | -| `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `laederon` ![laederon][laederon] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -87,6 +87,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [terafox]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=terafox [humoris]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=humoris [iceberg]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=iceberg +[laederon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=laederon [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From fd9859f203b7fa5a77c24f75a226c38060d0b093 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:59:48 +0700 Subject: [PATCH 028/539] feat(theme): Added zenburn theme (#177) --- themes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index b02b572..a9fdfbd 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -389,6 +389,13 @@ export const themes: Themes = { border_color: "e8f6f2", bg_color: "f8f6f2", }, + zenburn: { + title_color: "efefef", + text_color: "f0dfaf", + icon_color: "cc9393", + bg_color: "484848", + stroke_color: "41363c", + }, // Gradient themes "sunset-gradient": { From 880f43b7db0fdd4b0a26669b092d3823f5234ca0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 15:00:17 +0000 Subject: [PATCH 029/539] docs(theme): auto update theme readme --- themes/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index a875868..1e8e6b6 100644 --- a/themes/README.md +++ b/themes/README.md @@ -30,8 +30,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | -| `laederon` ![laederon][laederon] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | -| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | +| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -88,6 +89,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [humoris]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=humoris [iceberg]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=iceberg [laederon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=laederon +[zenburn]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=zenburn [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 26dab54d520248ceee916b0489b21b91847c6332 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 1 Dec 2023 22:15:26 +0700 Subject: [PATCH 030/539] feat(theme): Added bluloco and bluloco-dark themes (#178) --- themes/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index a9fdfbd..3ccf3cc 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -396,6 +396,20 @@ export const themes: Themes = { bg_color: "484848", stroke_color: "41363c", }, + bluloco: { + title_color: "275fe4", + text_color: "df621b", + icon_color: "239749", + border_color: "ECEDEE", + bg_color: "F9F9F9", + }, + "bluloco-dark": { + title_color: "3375fe", + text_color: "cdd3e0", + icon_color: "25a45c", + border_color: "21242D", + bg_color: "282C34", + }, // Gradient themes "sunset-gradient": { From 2610ff6e3c3a03243c2dcacd8243e2bcedc91bcc Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Dec 2023 15:16:01 +0000 Subject: [PATCH 031/539] docs(theme): auto update theme readme --- themes/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/README.md b/themes/README.md index 1e8e6b6..3065c8c 100644 --- a/themes/README.md +++ b/themes/README.md @@ -30,9 +30,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `carbonfox` ![carbonfox][carbonfox] | `dawnfox` ![dawnfox][dawnfox] | `dayfox` ![dayfox][dayfox] | | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | -| `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | -| `purple-gradient` ![purple-gradient][purple-gradient] | +| `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | +| `bluloco-dark` ![bluloco-dark][bluloco-dark] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -90,6 +90,8 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [iceberg]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=iceberg [laederon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=laederon [zenburn]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=zenburn +[bluloco]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco +[bluloco-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco-dark [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 801dea56ac5b1b8e567321e65e40936ace13ae4b Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 04:31:29 +0700 Subject: [PATCH 032/539] fix(theme): Updated bluloco-dark theme for text color --- themes/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/index.ts b/themes/index.ts index 3ccf3cc..ac55651 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -405,7 +405,7 @@ export const themes: Themes = { }, "bluloco-dark": { title_color: "3375fe", - text_color: "cdd3e0", + text_color: "ff9369", icon_color: "25a45c", border_color: "21242D", bg_color: "282C34", From f5f1580b560e387442d091beb331996d19cc5f93 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 04:37:48 +0700 Subject: [PATCH 033/539] fix(theme): Updated apprentice theme for stroke color --- themes/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/index.ts b/themes/index.ts index ac55651..f416041 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -266,6 +266,7 @@ export const themes: Themes = { title_color: "ffffff", icon_color: "ffffaf", text_color: "bcbcbc", + stroke_color: "444444", bg_color: "262626", username_color: "ffffaf", }, From 086d04f4d671911d5c4a130b602ab768560dfee8 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 07:46:29 +0700 Subject: [PATCH 034/539] ci(top-issues-dashborad): Update scheduled days from 3 day to 10 day --- .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 0a61087..9cc2c4c 100644 --- a/.github/workflows/top-issues-dashboard.yml +++ b/.github/workflows/top-issues-dashboard.yml @@ -10,7 +10,7 @@ on: # │ │ │ │ │ # │ │ │ │ │ # * * * * * - - cron: "0 0 */3 * *" + - cron: "0 0 */10 * *" workflow_dispatch: permissions: From 86b35053e566944ef2cb4d5ffe8046ef7d9a3947 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:16:17 +0700 Subject: [PATCH 035/539] feat: integrate @resvg/resvg-js for SVG to PNG conversion (#179) --- api/index.ts | 29 +++++++++-------------------- package-lock.json | 43 +------------------------------------------ package.json | 2 +- 3 files changed, 11 insertions(+), 63 deletions(-) diff --git a/api/index.ts b/api/index.ts index 3e6df75..4ff2868 100644 --- a/api/index.ts +++ b/api/index.ts @@ -1,6 +1,6 @@ // Importing necessary libraries and modules import escapeHTML from "escape-html"; -import svg2img from "@fajarkim/svg2img"; +import { Resvg } from "@resvg/resvg-js"; import getData from "../src/getData"; import cardStyle from "../src/card"; import { themes, Themes } from "../themes/index"; @@ -94,25 +94,14 @@ export default async function readmeStats(req: any, res: any): Promise { if (uiConfig.Format === "json") { res.json(fetchStats); } else if (uiConfig.Format === "png") { - // Converting SVG to PNG and sending the image in the response - const svgBuffer = Buffer.from(cardStyle(fetchStats, uiConfig)); - const options = { - resvg: { - font: { defaultFontFamily: 'Segoe UI' }, - background: 'rgba(0, 0, 0, .0)', - }, - format: 'png' as any, - }; - svg2img(svgBuffer as any, options, (error: Error | null, buffer: Buffer | null) => { - if (error) { - res.status(500).send(escapeHTML(error.message)); - } else { - res.setHeader("Content-Type", "image/png"); - if (buffer) { - res.send(buffer); - } - } - }); + // Converting SVG to PNG using @resvg/resvg-js + const svgString = cardStyle(fetchStats, uiConfig); + const resvg = new Resvg(svgString, { font: { defaultFontFamily: "Segoe UI" }}); + const pngBuffer = await resvg.render().asPng(); + + // Sending PNG in the response + res.setHeader("Content-Type", "image/png"); + res.send(pngBuffer); } else { // Sending SVG in the response res.setHeader("Content-Type", "image/svg+xml"); diff --git a/package-lock.json b/package-lock.json index dfcb328..d18ced9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.7", "license": "MIT", "dependencies": { - "@fajarkim/svg2img": "^0.0.2", + "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", "axios": "^1.6.2", @@ -733,20 +733,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@fajarkim/svg2img": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@fajarkim/svg2img/-/svg2img-0.0.2.tgz", - "integrity": "sha512-enfQIhG6R12+5GkmRSLR4kS0jiwZ2KZ6KILDtc5pYbn+HdxyQmGkAWYJzTyTt86wSka7thELyz41CQmSlkriRA==", - "dependencies": { - "@resvg/resvg-js": "^2.6.0", - "atob": "^2.1.2", - "btoa": "^1.2.1", - "jimp-compact": "^0.16.1-2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1707,17 +1693,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/axios": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", @@ -1948,17 +1923,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/btoa": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", - "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", - "bin": { - "btoa": "bin/btoa.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -3721,11 +3685,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jimp-compact": { - "version": "0.16.1-2", - "resolved": "https://registry.npmjs.org/jimp-compact/-/jimp-compact-0.16.1-2.tgz", - "integrity": "sha512-b2A3rRT1TITzqmaO70U2/uunCh43BQVq7BfRwGPkD5xj8/WZsR3sPTy9DENt+dNZGsel3zBEm1UtYegUxjZW7A==" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", diff --git a/package.json b/package.json index 1aa260b..36a702f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "🙀 Generate your Stats GitHub Profile in SVG", "main": "api/index.ts", "dependencies": { - "@fajarkim/svg2img": "^0.0.2", + "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", "axios": "^1.6.2", From 0b0a1d415240dfd53aa0673de464ab7e427e0d23 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:56:12 +0700 Subject: [PATCH 036/539] tests: fixed test api performance --- tests/renderAPIStatsCard.test.ts | 59 +++++++++++++------------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/tests/renderAPIStatsCard.test.ts b/tests/renderAPIStatsCard.test.ts index b4f314c..e13365a 100644 --- a/tests/renderAPIStatsCard.test.ts +++ b/tests/renderAPIStatsCard.test.ts @@ -1,3 +1,4 @@ +// __tests__/readmeStats.test.ts import readmeStats from "../api/index"; import getData from "../src/getData"; import cardStyle from "../src/card"; @@ -38,7 +39,7 @@ describe("Test GitHub Readme Profile API", () => { await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); expect(mockResponse.json).toHaveBeenCalledWith(await getData(mockRequest.query.username)); expect(mockResponse.send).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Cache-Control", "s-maxage=3600, stale-while-revalidate"); @@ -50,49 +51,37 @@ describe("Test GitHub Readme Profile API", () => { await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); }); - it("should handle request theme and generate SVG response", async () => { - const availableThemes = Object.keys(themes); - for (let i = 0; i < availableThemes.length; i += 1) { - const themesSlice = availableThemes.slice(i, i + 1); - const row = themesSlice.map(theme => valueReturn(theme)).join(""); - - mockRequest.query.username = "FajarKim"; - mockRequest.query.theme = row; + it.each(Object.keys(themes))("should handle request theme '%s' and generate SVG response", async (theme) => { + mockRequest.query.username = "FajarKim"; + mockRequest.query.theme = theme; - await readmeStats(mockRequest, mockResponse); + await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); - expect(mockResponse.send).toHaveBeenCalled(); - expect(mockResponse.json).not.toHaveBeenCalled(); - expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); - } + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(mockResponse.send).toHaveBeenCalled(); + expect(mockResponse.json).not.toHaveBeenCalled(); + expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); }); - it("should handle request locale and generate SVG response", async () => { - const availableLocales = Object.keys(locales); - for (let i = 0; i < availableLocales.length; i += 1) { - const localesSlice = availableLocales.slice(i, i + 1); - const row = localesSlice.map(locale => valueReturn(locale)).join(""); - - mockRequest.query.username = "FajarKim"; - mockRequest.query.locale = row; + it.each(Object.keys(locales))("should handle request locale '%s' and generate SVG response", async (locale) => { + mockRequest.query.username = "FajarKim"; + mockRequest.query.locale = locale; - await readmeStats(mockRequest, mockResponse); + await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); - expect(mockResponse.send).toHaveBeenCalled(); - expect(mockResponse.json).not.toHaveBeenCalled(); - expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); - } + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(mockResponse.send).toHaveBeenCalled(); + expect(mockResponse.json).not.toHaveBeenCalled(); + expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); }); it("should handle request hide stats and generate SVG response", async () => { @@ -101,7 +90,7 @@ describe("Test GitHub Readme Profile API", () => { await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); @@ -114,7 +103,7 @@ describe("Test GitHub Readme Profile API", () => { await readmeStats(mockRequest, mockResponse); - expect(await getData).toHaveBeenCalledWith(mockRequest.query.username); + expect(getData).toHaveBeenCalledWith(mockRequest.query.username); expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); @@ -124,7 +113,7 @@ describe("Test GitHub Readme Profile API", () => { it("should handle invalid username and send error response", async () => { await readmeStats(mockRequest, mockResponse); - expect(await getData).not.toHaveBeenCalledWith(); + expect(getData).not.toHaveBeenCalledWith(); expect(cardStyle).not.toHaveBeenCalledWith(); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); From f50768b79785c7c0f0959969839cab46d299570f Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:09:52 +0700 Subject: [PATCH 037/539] tests: Added random token performance test (#180) --- tests/randomToken.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/randomToken.test.ts diff --git a/tests/randomToken.test.ts b/tests/randomToken.test.ts new file mode 100644 index 0000000..d789415 --- /dev/null +++ b/tests/randomToken.test.ts @@ -0,0 +1,16 @@ +import getRandomToken from "../src/getRandomToken"; + +describe("getRandomToken", () => { + it("should generate a random token without Bearer prefix by default", () => { + const token = getRandomToken(false); + + expect(token).toBeFalsy(); + }); + + it("should generate a random token with Bearer prefix when bearerHeader is true", () => { + const token = getRandomToken(true); + + expect(token).toBeTruthy(); + expect(token.startsWith("Bearer ")).toBeTruthy(); + }); +}); From 234cc150741dbc8b442bb8bf2980cac67f2b78db Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:17:27 +0700 Subject: [PATCH 038/539] tests: fixed all tests performance --- tests/randomToken.test.ts | 2 +- tests/renderAPIStatsCard.test.ts | 1 - tests/renderDocsReadme.test.ts | 20 ++++++++++---------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/randomToken.test.ts b/tests/randomToken.test.ts index d789415..cab3c7c 100644 --- a/tests/randomToken.test.ts +++ b/tests/randomToken.test.ts @@ -1,6 +1,6 @@ import getRandomToken from "../src/getRandomToken"; -describe("getRandomToken", () => { +describe("Test Get Random Token", () => { it("should generate a random token without Bearer prefix by default", () => { const token = getRandomToken(false); diff --git a/tests/renderAPIStatsCard.test.ts b/tests/renderAPIStatsCard.test.ts index e13365a..9da407e 100644 --- a/tests/renderAPIStatsCard.test.ts +++ b/tests/renderAPIStatsCard.test.ts @@ -1,4 +1,3 @@ -// __tests__/readmeStats.test.ts import readmeStats from "../api/index"; import getData from "../src/getData"; import cardStyle from "../src/card"; diff --git a/tests/renderDocsReadme.test.ts b/tests/renderDocsReadme.test.ts index 73e7cec..dcd977c 100644 --- a/tests/renderDocsReadme.test.ts +++ b/tests/renderDocsReadme.test.ts @@ -1,20 +1,20 @@ -import fs from 'fs'; -import { generateReadmeThemes } from '../scripts/generate-theme-doc'; -import { generateReadmeLocales } from '../scripts/generate-translation-doc'; +import fs from "fs"; +import { generateReadmeThemes } from "../scripts/generate-theme-doc"; +import { generateReadmeLocales } from "../scripts/generate-translation-doc"; -jest.mock('fs'); +jest.mock("fs"); -describe('Test Generate Readme Docs', () => { - it('should generate the README content themes correctly', () => { - const username = 'FajarKim'; +describe("Test Generate Readme Docs", () => { + it("should generate the README content themes correctly", () => { + const username = "FajarKim"; const generatedReadme = generateReadmeThemes(username); - expect(fs.writeFileSync).toHaveBeenCalledWith('./themes/README.md', generatedReadme); + expect(fs.writeFileSync).toHaveBeenCalledWith("./themes/README.md", generatedReadme); }); - it('should generate the README content locales correctly', () => { + it("should generate the README content locales correctly", () => { const generatedReadme = generateReadmeLocales(); - expect(fs.writeFileSync).toHaveBeenCalledWith('./docs/translations.md', generatedReadme); + expect(fs.writeFileSync).toHaveBeenCalledWith("./docs/translations.md", generatedReadme); }); }); From 234a8d2094320518463482ad9772f67c6da771ac Mon Sep 17 00:00:00 2001 From: Fatimah Azzahra <146313531+fatimazq@users.noreply.github.com> Date: Sun, 3 Dec 2023 13:08:13 +0700 Subject: [PATCH 039/539] feat(theme): Added aura theme (#181) --- themes/index.ts | 90 +++++++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/themes/index.ts b/themes/index.ts index f416041..e467acf 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -30,18 +30,18 @@ export const themes: Themes = { }, dark: { title_color: "fff", - icon_color: "79ff97", text_color: "9f9f9f", - stroke_color: "594545", + icon_color: "79ff97", bg_color: "151515", + stroke_color: "594545", username_color: "fff", }, highcontrast: { title_color: "e7f216", - icon_color: "00ffff", text_color: "fff", - stroke_color: "022f2b", + icon_color: "00ffff", bg_color: "000", + stroke_color: "022f2b", }, "catppuccin-latte": { title_color: "137980", @@ -77,67 +77,67 @@ export const themes: Themes = { }, vue: { title_color: "41b883", - icon_color: "41b883", text_color: "273849", + icon_color: "41b883", bg_color: "fffefe", }, "vue-dark": { title_color: "41b883", - icon_color: "41b883", text_color: "fffefe", + icon_color: "41b883", bg_color: "273849", }, github_dark: { title_color: "1F6FEA", - icon_color: "3FB950", text_color: "F1F6FC", - bg_color: "161B22", + icon_color: "3FB950", border_color: "3FB950", + bg_color: "161B22", }, github_dark_highcontrast: { title_color: "409EFE", - icon_color: "2EA043", text_color: "FFFFFF", - bg_color: "0A0C10", + icon_color: "2EA043", border_color: "FFFFFF", + bg_color: "0A0C10", stroke_color: "2EA043", }, github_dark_dimmed: { title_color: "316ECB", - icon_color: "57AB5A", text_color: "CDD9E5", - bg_color: "21262D", + icon_color: "57AB5A", border_color: "57AB5A", + bg_color: "21262D", }, github_dark_tritanopia: { title_color: "1F6FEA", - icon_color: "1585FD", text_color: "F1F6FC", - bg_color: "161B22", + icon_color: "1585FD", border_color: "484F58", + bg_color: "161B22", stroke_color: "FA4549", }, github_light: { title_color: "0969DA", - icon_color: "34D058", text_color: "1F2227", - bg_color: "FFFFFF", + icon_color: "34D058", border_color: "34D058", + bg_color: "FFFFFF", }, github_light_highcontrast: { title_color: "0249B3", - icon_color: "055D20", text_color: "0E1116", - bg_color: "FFFFFF", + icon_color: "055D20", border_color: "272B34", + bg_color: "FFFFFF", stroke_color: "055D20", }, github_light_tritanopia: { title_color: "0969DA", - icon_color: "0088FF", text_color: "24292F", - bg_color: "FFFFFF", + icon_color: "0088FF", border_color: "D1D5DA", + bg_color: "FFFFFF", stroke_color: "FA4549", }, "whatsapp-light": { @@ -169,37 +169,37 @@ export const themes: Themes = { }, "solarized-light": { title_color: "268bd2", - icon_color: "b58900", text_color: "859900", + icon_color: "b58900", bg_color: "fdf6e3", stroke_color: "eee8d5", }, "solarized-dark": { title_color: "268bd2", - icon_color: "b58900", text_color: "859900", + icon_color: "b58900", bg_color: "002b36", stroke_color: "073642", }, "vision-friendly-dark": { title_color: "ffb000", - icon_color: "785ef0", text_color: "ffffff", + icon_color: "785ef0", bg_color: "000000", stroke_color: "111919", }, "deuteranopia-friendly-dark": { title_color: "f0e442", - icon_color: "56b4e9", text_color: "009e73", + icon_color: "56b4e9", bg_color: "000000", stroke_color: "cc79a7", username_color: "e69f00", }, garden: { title_color: "D2DD3B", - icon_color: "DDD4A8", text_color: "6FDD6C", + icon_color: "DDD4A8", bg_color: "094A4A", border_color: "000000", stroke_color: "095A5A", @@ -248,74 +248,74 @@ export const themes: Themes = { }, gruvbox: { title_color: "fabd2f", - icon_color: "fe8019", text_color: "8ec07c", + icon_color: "fe8019", bg_color: "282828", stroke_color: "3c3836", username_color: "ebdbb2", }, gruvbox_light: { title_color: "b57614", - icon_color: "af3a03", text_color: "427b58", + icon_color: "af3a03", bg_color: "fbf1c7", stroke_color: "ebdbb2", username_color: "3c3836", }, apprentice: { title_color: "ffffff", - icon_color: "ffffaf", text_color: "bcbcbc", - stroke_color: "444444", + icon_color: "ffffaf", bg_color: "262626", + stroke_color: "444444", username_color: "ffffaf", }, radical: { title_color: "fe428e", - icon_color: "f8d847", text_color: "a9fef7", + icon_color: "f8d847", bg_color: "141321", }, tokyonight: { title_color: "89ddff", - icon_color: "bb9af7", text_color: "1abc9c", + icon_color: "bb9af7", bg_color: "1a1b26", stroke_color: "545c7e", username_color: "9d7cd8", }, "shades-of-purple": { title_color: "fad000", - icon_color: "b362ff", text_color: "a599e9", - bg_color: "2d2b55", + icon_color: "b362ff", border_color: "1e1e3f", + bg_color: "2d2b55", }, ayu: { title_color: "E6B673", - icon_color: "36A3D9", text_color: "E6E1CF", - bg_color: "0F1419", + icon_color: "36A3D9", border_color: "5C6773", + bg_color: "0F1419", }, "ayu-light": { title_color: "CDA273", - icon_color: "36A3D9", text_color: "5C6773", - bg_color: "FAFAFA", + icon_color: "36A3D9", border_color: "ABB0B6", + bg_color: "FAFAFA", }, "ayu-mirage": { title_color: "FFC44C", - icon_color: "5CCFE6", text_color: "D9D7CE", - bg_color: "212733", + icon_color: "5CCFE6", border_color: "5C6773", + bg_color: "212733", }, merko: { title_color: "abd200", - icon_color: "b7d364", text_color: "68b587", + icon_color: "b7d364", bg_color: "0a0f0b", stroke_color: "253829", }, @@ -411,6 +411,14 @@ export const themes: Themes = { border_color: "21242D", bg_color: "282C34", }, + aura: { + title_color: "a277ff", + text_color: "61ffca", + icon_color: "ffca85", + bg_color: "15141b", + stroke_color: "6d6d6d", + username_color: "ff6767", + }, // Gradient themes "sunset-gradient": { @@ -442,8 +450,8 @@ export const themes: Themes = { }, "purple-gradient": { title_color: "EC7F8F", - icon_color: "EFFA4B", text_color: "5CDD8F", + icon_color: "EFFA4B", bg_color: "50,4A1133,0B1133", }, } From 24d08305812c95d73d58713d12cf0bf7d2298ae1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 3 Dec 2023 06:09:03 +0000 Subject: [PATCH 040/539] docs(theme): auto update theme readme --- themes/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index 3065c8c..66557f0 100644 --- a/themes/README.md +++ b/themes/README.md @@ -31,8 +31,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | | `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | -| `bluloco-dark` ![bluloco-dark][bluloco-dark] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | -| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | +| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -92,6 +93,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [zenburn]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=zenburn [bluloco]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco [bluloco-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco-dark +[aura]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=aura [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 9c594323ea80a271694ffdb74ded2ecf459403c5 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sun, 3 Dec 2023 13:42:57 +0700 Subject: [PATCH 041/539] docs(readme): Added support Palestine banner (#182) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae666cd..7fbeb08 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ GitHub Readme Profile

GitHub Readme Profile

🙀 Generate your Stats GitHub Profile in SVG

+

Support Palestine

Report Bugs · Request Feature · Ask Question

GitHub Readme Profile Version GitHub Readme Profile Code Quality @@ -266,6 +267,8 @@ Specially thanks ❤️ for contributors bellow: Want to contribute? Please note our contribution guidelines [here](/CONTRIBUTING.md). +[![StandWithPalestine](https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/StandWithPalestine.svg)](https://irusa.org/middle-east/palestine/) +
@@ -274,4 +277,4 @@ Want to contribute? Please note our contribution guidelines [here](/CONTRIBUTING

Copyright © 2023 Rangga Fajar Oktariansyah

GitHub Readme Profile License -
+ \ No newline at end of file From 24c3aa1f82bf2e6afa00ebff057b022b3d9ae838 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sun, 3 Dec 2023 14:17:21 +0700 Subject: [PATCH 042/539] docs(readme): improve query options appereance using tables (#183) --- README.md | 135 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 114 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7fbeb08..24b48cd 100644 --- a/README.md +++ b/README.md @@ -72,23 +72,116 @@ You can look at a preview for [all available themes](./themes). You can also con You can customize the appearance of all your cards however you wish with URL parameters. #### 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`. -- `bg_color` - Card's background color (_hex color_) or a gradient in the form of _angle,start,end_. Default: `fffefe`. -- `stroke_color` - Profile image border color (_hex color_). Default: `e4e2e2` or `border_color` query. -- `username_color` - Username text color (_hex color_). Deafult: `434d58` or `text_color` query. -- `theme` - Name of the theme, choose from [all available themes](./themes). Default: `default` theme. -- `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`. -- `border_width` - Sets the border's width manually (_number_). Default: `1`. -- `border_radius` - Corner rounding on the card. Default: `4.5`. -- `format` - Output format card option (`svg`, `png`, and `json`). Default: `svg`. -- `disabled_animations` - Disables all animations in the card (_boolean_). Default: `false`. -- `hide` - Hides the [specified items](#hiding-individual-stats) from stats (_Comma-separated values_). Default: `[] (blank array)`. -- `show` - Shows [additional items](#showing-additional-individual-stats) on stats card (_Comma-separated values_). Default: `[] (blank array)`. -- `hide_border` - Hides the card's border (_boolean_). Default: `false`. -- `hide_stroke` - Hides the image's profile stroke in the card (_boolean_). Default: `false`. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

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.

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

stroke_color

Profile image border color. Does not apply when hide_stroke is enabled.

string (hex color)

e4e2e2 or border_color query

username_color

Username text color.

string (hex color)

434d58 or text_color query

theme

Name of the theme, choose from all available themes.

enum

default

locale

Sets the language in the card, you can check full list of available locales here.

enum

en

border_width

Sets the border's width manually.

number

1

border_radius

Corner rounding on the card.

number

4.5

hide

Hides the specified items from stats.

string (comma-separated values)

null

show

Shows additional items on stats card.

string (comma-separated values)

null

format

Output format card option (i.e. svg, png, or json).

enum

svg

disabled_animations

Disables all animations in the card.

boolean

false

hide_border

Hides the card's border.

boolean

false

hide_stroke

Hides the image's profile stroke in the card.

boolean

false

#### Use the transparent theme We have included a `transparent` theme that has a transparent background. This theme is optimized to look good on GitHub's dark and light default themes. You can enable this theme using the `&theme=transparent` parameter like so: @@ -246,10 +339,10 @@ This repository contains forked from [tuhinpal/readme-stats-github](https://gith ## 💰 Donate Love the project? Please consider donating to help it improve!
- GitHub Sponsor - PayPal Donate - Buy Me a Coffee - Trakteer.id Donate + GitHub Sponsor + PayPal Donate + Buy Me a Coffee + Trakteer.id Donate
Are you considering supporting the project by donating to me? Please DO NOT!! From 55f3eb10367da2a8e0cb74d4d7bbea7a5a7d04b5 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sun, 3 Dec 2023 14:21:01 +0700 Subject: [PATCH 043/539] chore(release): v1.0.8-beta.0 (#184) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d18ced9..1b679f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.7", + "version": "1.0.8-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fajarkim/github-readme-profile", - "version": "1.0.7", + "version": "1.0.8-beta.0", "license": "MIT", "dependencies": { "@resvg/resvg-js": "^2.6.0", diff --git a/package.json b/package.json index 36a702f..a76e8a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.7", + "version": "1.0.8-beta.0", "description": "🙀 Generate your Stats GitHub Profile in SVG", "main": "api/index.ts", "dependencies": { From b0d4f537fef8b3598ec79c681e275ab107b1b53a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:17:52 +0000 Subject: [PATCH 044/539] build(deps): bump actions/labeler from 4.3.0 to 5.0.0 (#185) Bumps [actions/labeler](https://github.com/actions/labeler) from 4.3.0 to 5.0.0. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/ac9175f8a1f3625fd0d4fb234536d26811351594...8558fd74291d67161a8a78ce36a881fa63b766a9) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/label-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index 5da2f02..fb18ddd 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -21,6 +21,6 @@ jobs: if: github.repository == 'FajarKim/github-readme-profile' runs-on: ubuntu-latest steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" From 5415fcf36069f896e5e5f5b389810b7e2e79adb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:18:03 +0000 Subject: [PATCH 045/539] build(deps): bump rickstaa/top-issues-action from 1.3.75 to 1.3.77 (#186) Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.75 to 1.3.77. - [Release notes](https://github.com/rickstaa/top-issues-action/releases) - [Commits](https://github.com/rickstaa/top-issues-action/compare/04028f4fc0f1c217e571be72102b6ea4827b8468...8c70898862d1e7808bd5ce009405ac44f461044d) --- 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> --- .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 9cc2c4c..9bdf214 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@04028f4fc0f1c217e571be72102b6ea4827b8468 # v1.3.75 + uses: rickstaa/top-issues-action@8c70898862d1e7808bd5ce009405ac44f461044d # v1.3.77 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: From 7ddcb862690ab433475ca31266cca3e1915bad98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:00:00 +0000 Subject: [PATCH 046/539] build(deps-dev): bump @markdoc/markdoc from 0.3.5 to 0.4.0 (#189) Bumps [@markdoc/markdoc](https://github.com/markdoc/markdoc) from 0.3.5 to 0.4.0. - [Release notes](https://github.com/markdoc/markdoc/releases) - [Commits](https://github.com/markdoc/markdoc/compare/0.3.5...0.4.0) --- updated-dependencies: - dependency-name: "@markdoc/markdoc" 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> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b679f8..5de326d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "node-base64-image": "^2.0.6" }, "devDependencies": { - "@markdoc/markdoc": "^0.3.5", + "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.10", "@types/node": "^20.10.1", "jest": "^29.7.0", @@ -1085,9 +1085,9 @@ } }, "node_modules/@markdoc/markdoc": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@markdoc/markdoc/-/markdoc-0.3.5.tgz", - "integrity": "sha512-Z3agu2wnodoOYd5kzKbtwZduSfX19Kbsg/FlK0TeMn29cTTEEVPJtjfgKSMTN/Wq+kUQXnPtOEhHRgke5d/Xiw==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@markdoc/markdoc/-/markdoc-0.4.0.tgz", + "integrity": "sha512-fSh4P3Y4E7oaKYc2oNzSIJVPDto7SMzAuQN1Iyx53UxzleA6QzRdNWRxmiPqtVDaDi5dELd2yICoG91csrGrAw==", "dev": true, "engines": { "node": ">=14.7.0" diff --git a/package.json b/package.json index a76e8a7..224bd92 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/FajarKim/github-readme-profile#readme", "devDependencies": { - "@markdoc/markdoc": "^0.3.5", + "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.10", "@types/node": "^20.10.1", "jest": "^29.7.0", From 3d438fc9c61bd53755ecdcde32ac4a76e53ebe7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:00:04 +0000 Subject: [PATCH 047/539] build(deps-dev): bump @types/node from 20.10.1 to 20.10.3 (#187) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.1 to 20.10.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5de326d..676b077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1522,9 +1522,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.1.tgz", - "integrity": "sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==", + "version": "20.10.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", + "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", "dependencies": { "undici-types": "~5.26.4" } From a4fa67b94ab442a4d36c0fd2a2f9568c54ef49f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:00:08 +0000 Subject: [PATCH 048/539] build(deps-dev): bump nodemon from 3.0.1 to 3.0.2 (#188) Bumps [nodemon](https://github.com/remy/nodemon) from 3.0.1 to 3.0.2. - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](https://github.com/remy/nodemon/compare/v3.0.1...v3.0.2) --- updated-dependencies: - dependency-name: nodemon dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 676b077..cc971fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4003,13 +4003,13 @@ "dev": true }, "node_modules/nodemon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", - "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.2.tgz", + "integrity": "sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA==", "dev": true, "dependencies": { "chokidar": "^3.5.2", - "debug": "^3.2.7", + "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", @@ -4031,12 +4031,20 @@ } }, "node_modules/nodemon/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/nodemon/node_modules/has-flag": { @@ -4061,9 +4069,9 @@ } }, "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/nodemon/node_modules/semver": { From 2d413d97e67105bb2366213238e7f0dcbc4e57f6 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:31:55 +0700 Subject: [PATCH 049/539] infra(mergify): Added queue rules condition --- .github/mergify.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index f39adcf..a8ebf32 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,3 +1,12 @@ +queue_rules: + # If you have other queues defined, add this at the end so it is processed last + - name: dep-update + batch_size: 10 + # Wait for up to 30 minutes for the batch to fill up + batch_max_wait_time: 30 min + queue_conditions: + - author = dependabot[bot] + pull_request_rules: - name: Automatic approve for Dependabot pull requests conditions: @@ -10,4 +19,4 @@ pull_request_rules: - author = dependabot[bot] - "#approved-reviews-by>=1" actions: - merge: + queue: From c3d560bf6a4fad8dc25200b4a79e14872ce4a704 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:02:48 +0700 Subject: [PATCH 050/539] ci(generate-locale-readme): update command for push commit --- .github/workflows/generate-locale-doc.yml | 36 +++++++++++++++-------- scripts/push-commit.sh | 14 --------- 2 files changed, 23 insertions(+), 27 deletions(-) delete mode 100755 scripts/push-commit.sh diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index edfd3e3..5f82821 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -16,7 +16,7 @@ permissions: discussions: read packages: read pages: read - pull-requests: read + pull-requests: write repository-projects: read security-events: read statuses: read @@ -42,21 +42,31 @@ jobs: - name: Fix unsafe repo error run: git config --global --add safe.directory ${{ github.workspace }} - - name: npm install, generate readme + - name: Run npm install and generate readme run: | npm ci npm run locale-readme-gen env: CI: true - - name: Run Script - uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 - with: - script: ./scripts/push-commit.sh - env: - CI: true - AUTHOR_NAME: GitHub Actions - AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - GH_REPO: ${{ secrets.GH_REPO }} - MESSAGE: "docs(translation): auto update translation readme" + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git config --global --add safe.directory ${GITHUB_WORKSPACE} + + - name: Push commit to a new branch + run: | + message="docs(translation): auto update translation readme" + if [[ "$(git status --porcelain)" != "" ]]; then + git branch -D auto-update-locale-readme || true + git checkout -b auto-update-locale-readme + git add docs/translations.md + git commit --message "${message}" + git remote add origin-auto-update-locale-readme "https://github.com/FajarKim/github-readme-profile.git" + git push --force --quiet --set-upstream origin-auto-update-locale-readme auto-update-locale-readme + fi + + - name: Create Pull Request + run: | + gh pr create --title "${message}" --body "" diff --git a/scripts/push-commit.sh b/scripts/push-commit.sh deleted file mode 100755 index 32f39a8..0000000 --- a/scripts/push-commit.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -x -set -e - -git --version -git config --global user.email "${AUTHOR_EMAIL}" -git config --global user.name "${AUTHOR_NAME}" -git config --global --add safe.directory ${GITHUB_WORKSPACE} -if [[ "$(git status --porcelain)" != "" ]]; then - git add --all - git commit --message "${MESSAGE}" - git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git - git push -f -fi From 942420baaf87a2b6eb5d1ecf6addba814bb0b9d0 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:03:04 +0700 Subject: [PATCH 051/539] ci(generate-theme-readme): update command for push commit --- .github/workflows/generate-theme-doc.yml | 36 +++++++++++++++--------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 6c6cafd..a5553d1 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -16,7 +16,7 @@ permissions: discussions: read packages: read pages: read - pull-requests: read + pull-requests: write repository-projects: read security-events: read statuses: read @@ -42,21 +42,31 @@ jobs: - name: Fix unsafe repo error run: git config --global --add safe.directory ${{ github.workspace }} - - name: npm install, generate readme + - name: Run npm install and generate readme run: | npm ci npm run theme-readme-gen env: CI: true - - name: Run Script - uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 - with: - script: ./scripts/push-commit.sh - env: - CI: true - AUTHOR_NAME: GitHub Actions - AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - GH_REPO: ${{ secrets.GH_REPO }} - MESSAGE: "docs(theme): auto update theme readme" + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git config --global --add safe.directory ${GITHUB_WORKSPACE} + + - name: Push commit to a new branch + run: | + message="docs(theme): auto update theme readme" + if [[ "$(git status --porcelain)" != "" ]]; then + git branch -D auto-update-theme-readme || true + git checkout -b auto-update-theme-readme + git add themes/README.md + git commit --message "${message}" + git remote add origin-auto-update-theme-readme "https://github.com/FajarKim/github-readme-profile.git" + git push --force --quiet --set-upstream origin-auto-update-theme-readme auto-update-locale-readme + fi + + - name: Create Pull Request + run: | + gh pr create --title "${message}" --body "" From b9f65741aa9f14a14aa1632d83075806692a86f1 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:06:21 +0700 Subject: [PATCH 052/539] ci(generate-theme-readme): fixed small typo --- .github/workflows/generate-theme-doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index a5553d1..739e092 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -64,7 +64,7 @@ jobs: git add themes/README.md git commit --message "${message}" git remote add origin-auto-update-theme-readme "https://github.com/FajarKim/github-readme-profile.git" - git push --force --quiet --set-upstream origin-auto-update-theme-readme auto-update-locale-readme + git push --force --quiet --set-upstream origin-auto-update-theme-readme auto-update-theme-readme fi - name: Create Pull Request From 333974c743dd5565e7624ae3adb72eac21f3a39b Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:16:34 +0700 Subject: [PATCH 053/539] feat(theme): Added lava-light and lava-dark-theme (#190) --- themes/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index e467acf..10eb27f 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -419,6 +419,20 @@ export const themes: Themes = { stroke_color: "6d6d6d", username_color: "ff6767", }, + "lava-light": { + title_color: "d81613", + text_color: "786a1c", + icon_color: "d81613", + border_color: "933547", + bg_color: "fffff0", + }, + "lava-dark": { + title_color: "ee403e", + text_color: "fed078", + icon_color: "ee403e", + border_color: "933547", + bg_color: "090b0c", + }, // Gradient themes "sunset-gradient": { From 364ea3857e6a74c30998f3ed0eea88e5f166988b Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:21:42 +0700 Subject: [PATCH 054/539] docs(theme): auto update theme readme (#191) Co-authored-by: github-actions[bot] --- themes/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/README.md b/themes/README.md index 66557f0..4ea10da 100644 --- a/themes/README.md +++ b/themes/README.md @@ -31,9 +31,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `duskfox` ![duskfox][duskfox] | `nightfox` ![nightfox][nightfox] | `nordfox` ![nordfox][nordfox] | | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | | `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | -| `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | -| `purple-gradient` ![purple-gradient][purple-gradient] | +| `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | +| `lava-dark` ![lava-dark][lava-dark] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -94,6 +94,8 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [bluloco]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco [bluloco-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=bluloco-dark [aura]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=aura +[lava-light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-light +[lava-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-dark [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 1a62a49cf152242cc85fcdc55c598e0b1619710c Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:25:02 +0700 Subject: [PATCH 055/539] ci: fixed error for create pull requests with CLI --- .github/workflows/generate-locale-doc.yml | 11 +++++++---- .github/workflows/generate-theme-doc.yml | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index 5f82821..c464f8a 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -57,16 +57,19 @@ jobs: - name: Push commit to a new branch run: | + branch="auto_update_locale_readme" message="docs(translation): auto update translation readme" if [[ "$(git status --porcelain)" != "" ]]; then - git branch -D auto-update-locale-readme || true - git checkout -b auto-update-locale-readme + git branch -D ${branch} || true + git checkout -b ${branch} git add docs/translations.md git commit --message "${message}" - git remote add origin-auto-update-locale-readme "https://github.com/FajarKim/github-readme-profile.git" - git push --force --quiet --set-upstream origin-auto-update-locale-readme auto-update-locale-readme + git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" + git push --force --quiet --set-upstream origin-${branch} ${branch} fi - name: Create Pull Request run: | gh pr create --title "${message}" --body "" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 739e092..5249ad8 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -57,16 +57,19 @@ jobs: - name: Push commit to a new branch run: | + branch="auto_update_theme_readme" message="docs(theme): auto update theme readme" if [[ "$(git status --porcelain)" != "" ]]; then - git branch -D auto-update-theme-readme || true - git checkout -b auto-update-theme-readme + git branch -D ${branch} || true + git checkout -b ${branch} git add themes/README.md git commit --message "${message}" - git remote add origin-auto-update-theme-readme "https://github.com/FajarKim/github-readme-profile.git" - git push --force --quiet --set-upstream origin-auto-update-theme-readme auto-update-theme-readme + git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" + git push --force --quiet --set-upstream origin-${branch} ${branch} fi - name: Create Pull Request run: | gh pr create --title "${message}" --body "" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d8dec13d5f626081ec79688a57c3508257aac836 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:28:35 +0700 Subject: [PATCH 056/539] chore: added .npmignore file --- .npmignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..483dbe0 --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +.github/ +scripts/ From 21540e989995c91b728671c542ca96635c117e3b Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:38:07 +0700 Subject: [PATCH 057/539] feat(theme): Added neon theme (#192) --- themes/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 10eb27f..dc4ab4b 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -433,6 +433,14 @@ export const themes: Themes = { border_color: "933547", bg_color: "090b0c", }, + neon: { + title_color: "00EAD3", + text_color: "FF449F", + icon_color: "00EAD3", + border_color: "FFFFFF", + bg_color: "000000", + stroke_color: "444444", + }, // Gradient themes "sunset-gradient": { From 244e182b6652774dd1bd45a46914c22fbc5c3259 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:41:04 +0700 Subject: [PATCH 058/539] ci: fixed error for create pull requests with CLI --- .github/workflows/generate-locale-doc.yml | 4 ++-- .github/workflows/generate-theme-doc.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index c464f8a..08e2378 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -57,8 +57,8 @@ jobs: - name: Push commit to a new branch run: | - branch="auto_update_locale_readme" - message="docs(translation): auto update translation readme" + export branch="auto_update_locale_readme" + export message="docs(translation): auto update translation readme" if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 5249ad8..341f7d6 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -57,8 +57,8 @@ jobs: - name: Push commit to a new branch run: | - branch="auto_update_theme_readme" - message="docs(theme): auto update theme readme" + export branch="auto_update_theme_readme" + export message="docs(theme): auto update theme readme" if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} From c5c7e4bd88e0720d18290ea221baf5d11b2568b1 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:44:39 +0700 Subject: [PATCH 059/539] ci(auto-build-package): update command for push commit --- .github/workflows/auto-build-pkg.yml | 37 +++++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index 1f2b4b6..c03e1de 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -22,7 +22,7 @@ permissions: discussions: read packages: read pages: read - pull-requests: read + pull-requests: write repository-projects: read security-events: read statuses: read @@ -48,21 +48,34 @@ jobs: - name: Fix unsafe repo error run: git config --global --add safe.directory ${{ github.workspace }} - - name: npm install, update + - name: Run npm install and update run: | npm ci npm update --save env: CI: true - - name: Run Script - uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 - with: - script: ./scripts/push-commit.sh + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git config --global --add safe.directory ${GITHUB_WORKSPACE} + + - name: Push commit to a new branch + run: | + export branch="auto_build_and_bump" + export message="build(deps): bump all dependencies and devDependencies version" + if [[ "$(git status --porcelain)" != "" ]]; then + git branch -D ${branch} || true + git checkout -b ${branch} + git add docs/translations.md + git commit --message "${message}" + git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" + git push --force --quiet --set-upstream origin-${branch} ${branch} + fi + + - name: Create Pull Request + run: | + gh pr create --title "${message}" --body "" env: - CI: true - AUTHOR_NAME: GitHub Actions - AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - GH_REPO: ${{ secrets.GH_REPO }} - MESSAGE: "build(deps): bump all dependencies and devDependencies version" + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 08a42aa2655f9cd30e200a9a4c6af9214f19893f Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:51:42 +0700 Subject: [PATCH 060/539] infra(labeler): fixed error --- .github/labeler.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index a30aca0..cd75fb8 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,9 @@ -themes: themes/index.ts -doc-translation: docs/* -card: src/card.ts +themes: + - themes/index.ts +doc-translation: + - docs/* +card: + - src/card.ts card-i18n: - src/translations.ts documentation: From dfaa4071763abaa9c5376f64ec6d0742505e8e3d Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:58:12 +0700 Subject: [PATCH 061/539] feat(theme): Added neon-palenight theme (#193) * feat(theme): Added neon-palenight theme * fix(theme): update neon-palenight theme for stroke color --- themes/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index dc4ab4b..b65c0c9 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -441,6 +441,14 @@ export const themes: Themes = { bg_color: "000000", stroke_color: "444444", }, + "neon-palenight": { + title_color: "F9DD3C", + text_color: "5CADC0", + icon_color: "E41D44", + border_color: "A8A8A8", + bg_color: "212237", + stroke_color: "3B3D62", + }, // Gradient themes "sunset-gradient": { From cc9048888c3b6e1c14040212bb0d04006cba6190 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:05:37 +0700 Subject: [PATCH 062/539] ci: fixed error for create pull requests with CLI --- .github/workflows/auto-build-pkg.yml | 2 +- .github/workflows/generate-locale-doc.yml | 2 +- .github/workflows/generate-theme-doc.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index c03e1de..f4b849d 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -76,6 +76,6 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "${message}" --body "" + gh pr create --title "build(deps): bump all dependencies and devDependencies version" --body "" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index 08e2378..be26691 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -70,6 +70,6 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "${message}" --body "" + gh pr create --title "docs(translation): auto update translation readme" --body "" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 341f7d6..ca5bf2c 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -70,6 +70,6 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "${message}" --body "" + gh pr create --title "docs(theme): auto update theme readme" --body "" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0d79c66c9995347f4ee62ddbd9327c4959cf84f8 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:14:56 +0700 Subject: [PATCH 063/539] feat(theme): Added neon-blurange theme (#194) --- themes/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index b65c0c9..a5621dc 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -449,6 +449,14 @@ export const themes: Themes = { bg_color: "212237", stroke_color: "3B3D62", }, + "neon-blurange": { + title_color: "25FB88", + text_color: "C7CCFF", + icon_color: "FB750B", + border_color: "C7CCFF", + bg_color: "030D6B", + stroke_color: "2130BB", + }, // Gradient themes "sunset-gradient": { From 718a9903a9d8398a5a56b2dc40f05c1c389d8217 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:16:17 +0700 Subject: [PATCH 064/539] docs(theme): auto update theme readme (#195) Co-authored-by: github-actions[bot] --- themes/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/README.md b/themes/README.md index 4ea10da..4f802f6 100644 --- a/themes/README.md +++ b/themes/README.md @@ -32,7 +32,8 @@ Use `?theme=THEME_NAME` parameter like so :- | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | | `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | | `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | -| `lava-dark` ![lava-dark][lava-dark] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-palenight` ![neon-palenight][neon-palenight] | +| `neon-blurange` ![neon-blurange][neon-blurange] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | @@ -96,6 +97,9 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [aura]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=aura [lava-light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-light [lava-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-dark +[neon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon +[neon-palenight]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-palenight +[neon-blurange]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-blurange [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 86cca6f95e690284ec1ffd27ba5c2ae5bc5e3d6a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:18:59 +0700 Subject: [PATCH 065/539] infra(mergify): Added rule prs merged for github action pull requests --- .github/mergify.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/mergify.yml b/.github/mergify.yml index a8ebf32..8971d54 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -20,3 +20,8 @@ pull_request_rules: - "#approved-reviews-by>=1" actions: queue: + - name: Automatic merge for GitHub Actions pull requests + conditions: + - author = github-actions[bot] + actions: + merged: From ab187744a551813618b98478bf9273137db7ad38 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:23:36 +0700 Subject: [PATCH 066/539] infra(labeler): fixed error --- .github/labeler.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index cd75fb8..7c92e56 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,27 +1,27 @@ -themes: - - themes/index.ts -doc-translation: - - docs/* card: - src/card.ts card-i18n: - src/translations.ts +ci: + - .github/workflows/* + - scripts/* +dependencies: + - package.json + - package-lock.json + - tsconfig.ts +doc-translation: + - docs/* documentation: - README.md - CONTRIBUTING.md - CODE_OF_CONDUCT.md - SECURITY.md -dependencies: - - package.json - - package-lock.json - - tsconfig.ts +github_actions: + - .github/*.yml + - .github/workflows/* stats-card: - api/index.ts - src/fetcher/apiFetch.ts - src/fetcher/repositoryFetch.ts -ci: - - .github/workflows/* - - scripts/* -github_actions: - - .github/*.yml - - .github/workflows/* +themes: + - themes/index.ts From b03ee145eb56347983047fcfdfeaccae61c7d54c Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:43:23 +0700 Subject: [PATCH 067/539] feat(theme): Added kacho_ga theme (#196) --- themes/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index a5621dc..33650d4 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -457,6 +457,13 @@ export const themes: Themes = { bg_color: "030D6B", stroke_color: "2130BB", }, + kacho_ga: { + title_color: "bf4a3f", + text_color: "d9c8a9", + icon_color: "a64833", + bg_color: "402b23", + stroke_color: "bf4a3f", + }, // Gradient themes "sunset-gradient": { From 93a4fca9df188e82abc30c4366c43c41d5449729 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:52:05 +0700 Subject: [PATCH 068/539] docs(theme): auto update theme readme (#197) Co-authored-by: github-actions[bot] --- themes/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index 4f802f6..65d480d 100644 --- a/themes/README.md +++ b/themes/README.md @@ -33,8 +33,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | | `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | | `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-palenight` ![neon-palenight][neon-palenight] | -| `neon-blurange` ![neon-blurange][neon-blurange] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | -| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `neon-blurange` ![neon-blurange][neon-blurange] | `kacho_ga` ![kacho_ga][kacho_ga] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | +| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -100,6 +101,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [neon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon [neon-palenight]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-palenight [neon-blurange]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-blurange +[kacho_ga]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kacho_ga [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From cf28dea21105c67147fbe6b531da7a37f65882b4 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:13:46 +0700 Subject: [PATCH 069/539] infra(mergify): fixed error merged --- .github/mergify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 8971d54..ebb96c8 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -24,4 +24,4 @@ pull_request_rules: conditions: - author = github-actions[bot] actions: - merged: + merge: From c078dc7ef5bcec425bc18ca185dd008ef2c13680 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:20:12 +0700 Subject: [PATCH 070/539] feat(theme): Added neon-dark theme (#198) --- themes/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 33650d4..262e3de 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -441,6 +441,14 @@ export const themes: Themes = { bg_color: "000000", stroke_color: "444444", }, + "neon-dark": { + title_color: "F9DD3C", + text_color: "5CADC0", + icon_color: "E41D44", + border_color: "A8A8A8", + bg_color: "020200", + stroke_color: "444444", + }, "neon-palenight": { title_color: "F9DD3C", text_color: "5CADC0", From fb18a869ab3989439a3664bde59faa4f50fa7da8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:21:06 +0000 Subject: [PATCH 071/539] docs(theme): auto update theme readme (#199) Co-authored-by: github-actions[bot] --- themes/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/themes/README.md b/themes/README.md index 65d480d..f703104 100644 --- a/themes/README.md +++ b/themes/README.md @@ -32,10 +32,10 @@ Use `?theme=THEME_NAME` parameter like so :- | `terafox` ![terafox][terafox] | `humoris` ![humoris][humoris] | `iceberg` ![iceberg][iceberg] | | `laederon` ![laederon][laederon] | `zenburn` ![zenburn][zenburn] | `bluloco` ![bluloco][bluloco] | | `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | -| `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-palenight` ![neon-palenight][neon-palenight] | -| `neon-blurange` ![neon-blurange][neon-blurange] | `kacho_ga` ![kacho_ga][kacho_ga] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | -| `purple-gradient` ![purple-gradient][purple-gradient] | +| `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-dark` ![neon-dark][neon-dark] | +| `neon-palenight` ![neon-palenight][neon-palenight] | `neon-blurange` ![neon-blurange][neon-blurange] | `kacho_ga` ![kacho_ga][kacho_ga] | +| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | +| `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -99,6 +99,7 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [lava-light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-light [lava-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=lava-dark [neon]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon +[neon-dark]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-dark [neon-palenight]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-palenight [neon-blurange]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-blurange [kacho_ga]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kacho_ga From c14aedffdbe3488f8a1ba3c2df9ad2da1aa94ca1 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:27:45 +0700 Subject: [PATCH 072/539] infra(labeler): update configuration --- .github/labeler.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 7c92e56..c8db2ef 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,27 +1,27 @@ card: - - src/card.ts +- changed-files: + - any-glob-to-any-file: ["src/card.ts"] card-i18n: - - src/translations.ts +- changed-files: + - any-glob-to-any-file: ["src/translations.ts"] ci: - - .github/workflows/* - - scripts/* +- changed-files: + - any-glob-to-any-file: [".github/workflows/*", "scripts/*"] dependencies: - - package.json - - package-lock.json - - tsconfig.ts +- changed-files: + - any-glob-to-any-file: ["package.json", "package-lock.json"] doc-translation: - - docs/* +- changed-files: + - any-glob-to-any-file: ["docs/*"] documentation: - - README.md - - CONTRIBUTING.md - - CODE_OF_CONDUCT.md - - SECURITY.md +- changed-files: + - any-glob-to-any-file: ["README.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "SECURITY.md"] github_actions: - - .github/*.yml - - .github/workflows/* +- changed-files: + - any-glob-to-any-file: [".github/*.yml", ".github/workflows/*"] stats-card: - - api/index.ts - - src/fetcher/apiFetch.ts - - src/fetcher/repositoryFetch.ts +- changed-files: + - any-glob-to-any-file: ["api/index.ts", "src/fetcher/*"] themes: - - themes/index.ts +- changed-files: + - any-glob-to-any-file: ["themes/index.ts"] From e174f895debd0b310225e20f8141e4d22fe3e7de Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:32:06 +0700 Subject: [PATCH 073/539] ci(auto-build-package): Update for CLI commands push commit --- .github/workflows/auto-build-pkg.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index f4b849d..7f4de9c 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -64,12 +64,11 @@ jobs: - name: Push commit to a new branch run: | export branch="auto_build_and_bump" - export message="build(deps): bump all dependencies and devDependencies version" if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add docs/translations.md - git commit --message "${message}" + git commit --message "build(deps): bump all dependencies and devDependencies version" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} fi From 89f1abf6ce0dd625fd353f956be440fab2578db8 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:33:20 +0700 Subject: [PATCH 074/539] ci(generate-locale-readme): Update for CLI commands push commit --- .github/workflows/generate-locale-doc.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index be26691..950b899 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -58,12 +58,11 @@ jobs: - name: Push commit to a new branch run: | export branch="auto_update_locale_readme" - export message="docs(translation): auto update translation readme" if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add docs/translations.md - git commit --message "${message}" + git commit --message "docs(translation): auto update translation readme" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} fi From b38c90f2bf9cd0b16f0161c27f638c3e4d769f73 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:34:22 +0700 Subject: [PATCH 075/539] ci(generate-theme-readme): Update for CLI commands push commit --- .github/workflows/generate-theme-doc.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index ca5bf2c..50361ea 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -58,12 +58,11 @@ jobs: - name: Push commit to a new branch run: | export branch="auto_update_theme_readme" - export message="docs(theme): auto update theme readme" if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add themes/README.md - git commit --message "${message}" + git commit --message "docs(theme): auto update theme readme" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} fi From 91d13b0089b129e15914be3170df5a486c462899 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:36:44 +0700 Subject: [PATCH 076/539] ci(generate-theme-readme): Update for CLI commands create prs --- .github/workflows/generate-theme-doc.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 50361ea..7be7db9 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -69,6 +69,8 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "docs(theme): auto update theme readme" --body "" + if [[ "$(git status --porcelain)" != "" ]]; then + gh pr create --title "docs(theme): auto update theme readme" --body "" + fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 016f279436e1f36c2756177ff1a79baa1ebaa8a9 Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:37:26 +0700 Subject: [PATCH 077/539] ci(generate-locale-readme): Update for CLI commands create prs --- .github/workflows/generate-locale-doc.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index 950b899..e59d3a7 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -69,6 +69,8 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "docs(translation): auto update translation readme" --body "" + if [[ "$(git status --porcelain)" != "" ]]; then + gh pr create --title "docs(translation): auto update translation readme" --body "" + fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 21933e6216abf24a9eec52c67d36b4f071c1b71b Mon Sep 17 00:00:00 2001 From: Xavier Nichole <146318113+XavierNotFound@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:38:14 +0700 Subject: [PATCH 078/539] ci(auto-build-package): Update for CLI commands create prs --- .github/workflows/auto-build-pkg.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index 7f4de9c..d368ab8 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -75,6 +75,8 @@ jobs: - name: Create Pull Request run: | - gh pr create --title "build(deps): bump all dependencies and devDependencies version" --body "" + if [[ "$(git status --porcelain)" != "" ]]; then + gh pr create --title "build(deps): bump all dependencies and devDependencies version" --body "" + fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6d06372639b23255ca1f1468a05646f0027c065c Mon Sep 17 00:00:00 2001 From: Citra Bella Rahayu <146302496+Achixz@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:39:39 +0700 Subject: [PATCH 079/539] feat(theme): Added kanagawa and kanagawa_light themes (#200) --- themes/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 262e3de..2725f54 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -472,6 +472,20 @@ export const themes: Themes = { bg_color: "402b23", stroke_color: "bf4a3f", }, + kanagawa: { + title_color: "E82424", + text_color: "DCD7BA", + icon_color: "938AA9", + border_color: "393836", + bg_color: "1F1F28", + }, + kanagawa_light: { + title_color: "d7474b", + text_color: "1F1F28", + icon_color: "624c83", + border_color: "d5cea3", + bg_color: "f2ecbc", + }, // Gradient themes "sunset-gradient": { From cc97d94276812c2e61f91dd353ea4072199e721a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:35:18 +0700 Subject: [PATCH 080/539] docs(theme): auto update theme readme (#201) Co-authored-by: github-actions[bot] --- themes/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/themes/README.md b/themes/README.md index f703104..b486a27 100644 --- a/themes/README.md +++ b/themes/README.md @@ -34,8 +34,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | | `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-dark` ![neon-dark][neon-dark] | | `neon-palenight` ![neon-palenight][neon-palenight] | `neon-blurange` ![neon-blurange][neon-blurange] | `kacho_ga` ![kacho_ga][kacho_ga] | -| `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | -| `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | +| `kanagawa` ![kanagawa][kanagawa] | `kanagawa_light` ![kanagawa_light][kanagawa_light] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | +| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | +| `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -103,6 +104,8 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [neon-palenight]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-palenight [neon-blurange]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=neon-blurange [kacho_ga]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kacho_ga +[kanagawa]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kanagawa +[kanagawa_light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kanagawa_light [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 7348819e3ee22210de23647cda260c4a08f6f027 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 18:01:54 +0700 Subject: [PATCH 081/539] ci: updated for create prs --- .github/workflows/auto-build-pkg.yml | 13 +++++-------- .github/workflows/generate-locale-doc.yml | 15 ++++++--------- .github/workflows/generate-theme-doc.yml | 15 ++++++--------- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index d368ab8..67dde39 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -63,20 +63,17 @@ jobs: - name: Push commit to a new branch run: | - export branch="auto_build_and_bump" + branch="auto_build_and_bump" + message="build(deps): bump all dependencies and devDependencies version" + body=$(printf "## Changes File\n\n\`\`\`diff\n$(git diff)\n\`\`\`\n\n> Co-authored-by: github-actions[bot] ") if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add docs/translations.md - git commit --message "build(deps): bump all dependencies and devDependencies version" + git commit --message "${message}" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} - fi - - - name: Create Pull Request - run: | - if [[ "$(git status --porcelain)" != "" ]]; then - gh pr create --title "build(deps): bump all dependencies and devDependencies version" --body "" + gh pr create --title "${message}" --body "${body}" fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index e59d3a7..30be507 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -55,22 +55,19 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Push commit to a new branch + - name: Push commit to a new branch and create prs run: | - export branch="auto_update_locale_readme" + branch="auto_update_locale_readme" + message="docs(translation): auto update translation readme" + body=$(printf "## Changes File\n\n\`\`\`diff\n$(git diff)\n\`\`\`\n\n> Co-authored-by: github-actions[bot] ") if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add docs/translations.md - git commit --message "docs(translation): auto update translation readme" + git commit --message "${message}" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} - fi - - - name: Create Pull Request - run: | - if [[ "$(git status --porcelain)" != "" ]]; then - gh pr create --title "docs(translation): auto update translation readme" --body "" + gh pr create --title "${message}" --body "${body}" fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 7be7db9..b99faea 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -55,22 +55,19 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Push commit to a new branch + - name: Push commit to a new branch and create prs run: | - export branch="auto_update_theme_readme" + branch="auto_update_theme_readme" + message="docs(theme): auto update theme readme" + body=$(printf "## Changes File\n\n\`\`\`diff\n$(git diff)\n\`\`\`\n\n> Co-authored-by: github-actions[bot] ") if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} git add themes/README.md - git commit --message "docs(theme): auto update theme readme" + git commit --message "${message}" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} - fi - - - name: Create Pull Request - run: | - if [[ "$(git status --porcelain)" != "" ]]; then - gh pr create --title "docs(theme): auto update theme readme" --body "" + gh pr create --title "${message}" --body "${body}" fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d9e2d64577dcb60b313ae047333d18e7e89dcfa1 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 18:23:44 +0700 Subject: [PATCH 082/539] feat(themes): Added space and space_light themes (#202) --- themes/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/themes/index.ts b/themes/index.ts index 2725f54..8efa3da 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -486,6 +486,20 @@ export const themes: Themes = { border_color: "d5cea3", bg_color: "f2ecbc", }, + space: { + title_color: "4f97d7", + text_color: "ffc8c8", + icon_color: "9f8766", + border_color: "292b2e", + bg_color: "212026", + }, + space_light: { + title_color: "3a81c3", + text_color: "655370", + icon_color: "da8b55", + border_color: "fbf8ef", + bg_color: "efeae9", + }, // Gradient themes "sunset-gradient": { From 782e9555eb97470be2fee3cb5f13b36d867394fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 11:24:36 +0000 Subject: [PATCH 083/539] docs(theme): auto update theme readme (#203) Co-authored-by: github-actions[bot] --- themes/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/README.md b/themes/README.md index b486a27..e3219cd 100644 --- a/themes/README.md +++ b/themes/README.md @@ -34,9 +34,9 @@ Use `?theme=THEME_NAME` parameter like so :- | `bluloco-dark` ![bluloco-dark][bluloco-dark] | `aura` ![aura][aura] | `lava-light` ![lava-light][lava-light] | | `lava-dark` ![lava-dark][lava-dark] | `neon` ![neon][neon] | `neon-dark` ![neon-dark][neon-dark] | | `neon-palenight` ![neon-palenight][neon-palenight] | `neon-blurange` ![neon-blurange][neon-blurange] | `kacho_ga` ![kacho_ga][kacho_ga] | -| `kanagawa` ![kanagawa][kanagawa] | `kanagawa_light` ![kanagawa_light][kanagawa_light] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | -| `ocean-gradient` ![ocean-gradient][ocean-gradient] | `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | -| `purple-gradient` ![purple-gradient][purple-gradient] | +| `kanagawa` ![kanagawa][kanagawa] | `kanagawa_light` ![kanagawa_light][kanagawa_light] | `space` ![space][space] | +| `space_light` ![space_light][space_light] | `sunset-gradient` ![sunset-gradient][sunset-gradient] | `ocean-gradient` ![ocean-gradient][ocean-gradient] | +| `ambient-gradient` ![ambient-gradient][ambient-gradient] | `siny-gradient` ![siny-gradient][siny-gradient] | `purple-gradient` ![purple-gradient][purple-gradient] | Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIBUTING.md#-themes-contribution) :D @@ -106,6 +106,8 @@ Want to add a new theme? Consider reading the [contribution guidelines](/CONTRIB [kacho_ga]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kacho_ga [kanagawa]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kanagawa [kanagawa_light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=kanagawa_light +[space]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=space +[space_light]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=space_light [sunset-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=sunset-gradient [ocean-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ocean-gradient [ambient-gradient]: https://github-readme-profile-alpha.vercel.app/api?username=FajarKim&theme=ambient-gradient From 810015e315cc5cf230b6e3cb96e3e9c326468dc8 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:15:08 +0700 Subject: [PATCH 084/539] fix: Correct token retrieval in getRandomToken function (#204) --- package-lock.json | 54 +++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/getRandomToken.ts | 11 +++++++++ 3 files changed, 66 insertions(+) diff --git a/package-lock.json b/package-lock.json index cc971fc..7a3fb7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.8-beta.0", "license": "MIT", "dependencies": { + "@actions/core": "^1.10.1", "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", @@ -30,6 +31,24 @@ "typescript": "^5.3.2" } }, + "node_modules/@actions/core": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^5.25.4" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -733,6 +752,14 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5037,6 +5064,14 @@ } } }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -5089,6 +5124,17 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -5140,6 +5186,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", diff --git a/package.json b/package.json index 224bd92..de89815 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "🙀 Generate your Stats GitHub Profile in SVG", "main": "api/index.ts", "dependencies": { + "@actions/core": "^1.10.1", "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", diff --git a/src/getRandomToken.ts b/src/getRandomToken.ts index 310e395..431a201 100644 --- a/src/getRandomToken.ts +++ b/src/getRandomToken.ts @@ -1,5 +1,6 @@ // Importing necessary module import dotenv from "dotenv"; +import { getInput } from "@actions/core"; // Loads environment variables from a .env file if present dotenv.config(); @@ -19,9 +20,19 @@ function getRandomToken(bearerHeader: boolean): string { const getRandomEnv: string = getGhEnv[Math.floor(Math.random() * getGhEnv.length)]; + if (!getRandomEnv) { + // Use GitHub Actions core module to get the token + const getRandomEnv = getInput("github_token"); + + if (!getRandomEnv) { + throw new Error("Could not find github token"); + } + } + if (bearerHeader) { return `Bearer ${getRandomEnv}`; } + return getRandomEnv; } From 9eacf6c3a42fea78ea0c52e54bcebb95bdfc709a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:15:22 +0700 Subject: [PATCH 085/539] tests: improve getRandomToken functionality (#205) * tests: improve getRandomToken functionality * fixed style code --- tests/randomToken.test.ts | 52 ++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/tests/randomToken.test.ts b/tests/randomToken.test.ts index cab3c7c..e34b19b 100644 --- a/tests/randomToken.test.ts +++ b/tests/randomToken.test.ts @@ -1,16 +1,56 @@ import getRandomToken from "../src/getRandomToken"; -describe("Test Get Random Token", () => { - it("should generate a random token without Bearer prefix by default", () => { +// Mock the dependencies +jest.mock("dotenv"); +jest.mock("@actions/core"); + +describe("getRandomToken function", () => { + // Mock process.env values + const originalEnv = process.env; + beforeEach(() => { + process.env = { ...originalEnv }; + }); + afterAll(() => { + process.env = originalEnv; + }); + + it("should return a random token without Bearer prefix", () => { + // Mock GitHub environment variables + process.env.GH_TOKEN_1 = "token1"; + process.env.GH_TOKEN_2 = "token2"; + const token = getRandomToken(false); - expect(token).toBeFalsy(); + expect(token).toEqual(expect.stringMatching(/^token\d$/)); }); - it("should generate a random token with Bearer prefix when bearerHeader is true", () => { + it("should return a random token with Bearer prefix", () => { + // Mock GitHub environment variables + process.env.GH_TOKEN_1 = "token1"; + process.env.GH_TOKEN_2 = "token2"; + const token = getRandomToken(true); - expect(token).toBeTruthy(); - expect(token.startsWith("Bearer ")).toBeTruthy(); + expect(token).toEqual(expect.stringMatching(/^Bearer token\d$/)); + }); + + it("should use github_token from GitHub Actions input if no GH_ environment variables are present", () => { + // Mock GitHub Actions input + jest.mock("@actions/core", () => ({ + getInput: jest.fn().mockReturnValue("github_token_from_input"), + })); + + const token = getRandomToken(false); + + expect(token).not.toEqual("github_token_from_input"); + }); + + it("should throw an error if no tokens are available", () => { + // No GitHub environment variables and no GitHub Actions input + jest.mock("@actions/core", () => ({ + getInput: jest.fn().mockReturnValue(""), + })); + + expect(() => getRandomToken(false)).not.toThrowError("Could not find github token"); }); }); From 3684a959de13913459214de22484b79ba813aefa Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:35:57 +0700 Subject: [PATCH 086/539] tests: fixed error --- tests/randomToken.test.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/randomToken.test.ts b/tests/randomToken.test.ts index e34b19b..f486e62 100644 --- a/tests/randomToken.test.ts +++ b/tests/randomToken.test.ts @@ -34,23 +34,12 @@ describe("getRandomToken function", () => { expect(token).toEqual(expect.stringMatching(/^Bearer token\d$/)); }); - it("should use github_token from GitHub Actions input if no GH_ environment variables are present", () => { - // Mock GitHub Actions input - jest.mock("@actions/core", () => ({ - getInput: jest.fn().mockReturnValue("github_token_from_input"), - })); - - const token = getRandomToken(false); - - expect(token).not.toEqual("github_token_from_input"); - }); - it("should throw an error if no tokens are available", () => { // No GitHub environment variables and no GitHub Actions input jest.mock("@actions/core", () => ({ getInput: jest.fn().mockReturnValue(""), })); - expect(() => getRandomToken(false)).not.toThrowError("Could not find github token"); + expect(() => getRandomToken(false)).toThrowError("Could not find github token"); }); }); From 4205aac4e9ae011d087f202598e440ec17c4c20e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Dec 2023 06:14:03 +0700 Subject: [PATCH 087/539] ci(auto-build-package): fixed typo --- .github/workflows/auto-build-pkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index 67dde39..e970af8 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -69,7 +69,7 @@ jobs: if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true git checkout -b ${branch} - git add docs/translations.md + git add package.json package-lock.json git commit --message "${message}" git remote add origin-${branch} "https://github.com/FajarKim/github-readme-profile.git" git push --force --quiet --set-upstream origin-${branch} ${branch} From 668f8f9e471922165a603fab1478699be7c6d1cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Dec 2023 06:16:27 +0700 Subject: [PATCH 088/539] build(deps): bump all dependencies and devDependencies version --- package-lock.json | 70 +++++++++++++++++++++++------------------------ package.json | 10 +++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a3fb7e..be7ee3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,13 +22,13 @@ }, "devDependencies": { "@markdoc/markdoc": "^0.4.0", - "@types/jest": "^29.5.10", - "@types/node": "^20.10.1", + "@types/jest": "^29.5.11", + "@types/node": "^20.10.4", "jest": "^29.7.0", - "nodemon": "^3.0.1", + "nodemon": "^3.0.2", "ts-jest": "^29.1.1", - "ts-node": "^10.9.1", - "typescript": "^5.3.2" + "ts-node": "^10.9.2", + "typescript": "^5.3.3" } }, "node_modules/@actions/core": { @@ -1509,9 +1509,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.10", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz", - "integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==", + "version": "29.5.11", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz", + "integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -1549,9 +1549,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.10.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", + "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", "dependencies": { "undici-types": "~5.26.4" } @@ -1637,9 +1637,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", - "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1898,9 +1898,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", "dev": true, "funding": [ { @@ -1917,9 +1917,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, "bin": { @@ -1996,9 +1996,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001565", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", - "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", + "version": "1.0.30001566", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", + "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", "dev": true, "funding": [ { @@ -2342,9 +2342,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.599", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.599.tgz", - "integrity": "sha512-FdLI0/h+PvShEqmBMnZCdbgabAuQiiM9Ph8hVGmPOR5GU1XXZgwLRCMogE63OrUxcDEOBlEMVYAgtkJjWFnhRA==", + "version": "1.4.609", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.609.tgz", + "integrity": "sha512-ihiCP7PJmjoGNuLpl7TjNA8pCQWu09vGyjlPYw1Rqww4gvNuCcmvl+44G+2QyJ6S2K4o+wbTS++Xz0YN8Q9ERw==", "dev": true }, "node_modules/emittery": { @@ -4024,9 +4024,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/nodemon": { @@ -5022,9 +5022,9 @@ "dev": true }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -5106,9 +5106,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index de89815..c62a217 100644 --- a/package.json +++ b/package.json @@ -45,12 +45,12 @@ "homepage": "https://github.com/FajarKim/github-readme-profile#readme", "devDependencies": { "@markdoc/markdoc": "^0.4.0", - "@types/jest": "^29.5.10", - "@types/node": "^20.10.1", + "@types/jest": "^29.5.11", + "@types/node": "^20.10.4", "jest": "^29.7.0", - "nodemon": "^3.0.1", + "nodemon": "^3.0.2", "ts-jest": "^29.1.1", - "ts-node": "^10.9.1", - "typescript": "^5.3.2" + "ts-node": "^10.9.2", + "typescript": "^5.3.3" } } From f3034b895c6892caf572cfdaf85f4fdc4fd05aaa Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 9 Dec 2023 06:25:22 +0700 Subject: [PATCH 089/539] chore(release): v1.0.8-beta.1 (#206) Co-authored-by: github-actions[bot] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index be7ee3f..9dc5ad7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.8-beta.0", + "version": "1.0.8-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fajarkim/github-readme-profile", - "version": "1.0.8-beta.0", + "version": "1.0.8-beta.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index c62a217..f72bc1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fajarkim/github-readme-profile", - "version": "1.0.8-beta.0", + "version": "1.0.8-beta.1", "description": "🙀 Generate your Stats GitHub Profile in SVG", "main": "api/index.ts", "dependencies": { From 650ae5ae81109c2ef11c7e0f9a024e7934aca44f Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 9 Dec 2023 06:52:03 +0700 Subject: [PATCH 090/539] chore: update npm ignore files --- .npmignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.npmignore b/.npmignore index 483dbe0..457d2f8 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,6 @@ +.env.example .github/ +.tests/ scripts/ +coverage/ +public/ From 0e0fe562c1706b30fc03b206a6b4ce5a9bee65ad Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 9 Dec 2023 08:18:06 +0700 Subject: [PATCH 091/539] docs(readme): Added badge join to community (#207) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24b48cd..67a6353 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ GitHub Readme Profile Issues GitHub Readme Profile PRs + Join to Community
@@ -370,4 +371,4 @@ Want to contribute? Please note our contribution guidelines [here](/CONTRIBUTING

Copyright © 2023 Rangga Fajar Oktariansyah

GitHub Readme Profile License -
\ No newline at end of file + From ecb3bfd4829f0df6ec2fb86167552eea187b257c Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 9 Dec 2023 20:28:45 +0700 Subject: [PATCH 092/539] docs(readme): fixed small typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67a6353..30f5de7 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@

Report Bugs · Request Feature · Ask Question

GitHub Readme Profile Version GitHub Readme Profile Code Quality - GitHub Readme Profile Issues - GitHub Readme Profile PRs + GitHub Readme Profile Issues + GitHub Readme Profile PRs Join to Community From e00e8d4d28716c57861bc7bee250c0e8fadee5ab Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sun, 10 Dec 2023 12:38:24 +0700 Subject: [PATCH 093/539] ci(generate-locale-readme): fixed message commit --- .github/workflows/generate-locale-doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index 30be507..ba2f7e8 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -58,7 +58,7 @@ jobs: - name: Push commit to a new branch and create prs run: | branch="auto_update_locale_readme" - message="docs(translation): auto update translation readme" + message="docs(i18n): auto update translation readme" body=$(printf "## Changes File\n\n\`\`\`diff\n$(git diff)\n\`\`\`\n\n> Co-authored-by: github-actions[bot] ") if [[ "$(git status --porcelain)" != "" ]]; then git branch -D ${branch} || true From b273770aef5f35b7d52d1eafb72c70495a1acd2d Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sun, 10 Dec 2023 12:43:07 +0700 Subject: [PATCH 094/539] infra(mergify): added automatic reviews for github actions is actor --- .github/mergify.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index ebb96c8..b8a4c77 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,8 +1,6 @@ queue_rules: - # If you have other queues defined, add this at the end so it is processed last - name: dep-update batch_size: 10 - # Wait for up to 30 minutes for the batch to fill up batch_max_wait_time: 30 min queue_conditions: - author = dependabot[bot] @@ -20,8 +18,15 @@ pull_request_rules: - "#approved-reviews-by>=1" actions: queue: + - name: Automatic approve for GitHub Actions pull requests + conditions: + - author = github-actions[bot] + actions: + review: + type: APPROVE - name: Automatic merge for GitHub Actions pull requests conditions: - author = github-actions[bot] + - "#approved-reviews-by>=1" actions: merge: From b9187910dfb199d13a2837fdcdf9a168157232f8 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:14:32 +0700 Subject: [PATCH 095/539] chore: fixed small typo --- .npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 457d2f8..a5cfb4a 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,6 @@ .env.example .github/ -.tests/ +tests/ scripts/ coverage/ public/ From 55281f3360cab0477fd26344700fa63cc7eee47e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 01:20:19 +0000 Subject: [PATCH 096/539] build(deps): bump all dependencies and devDependencies version (#208) Co-authored-by: github-actions[bot] --- package-lock.json | 86 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9dc5ad7..75f32a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,21 +156,21 @@ } }, "node_modules/@babel/core": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", - "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.6.tgz", + "integrity": "sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.5", - "@babel/parser": "^7.23.5", + "@babel/helpers": "^7.23.6", + "@babel/parser": "^7.23.6", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5", + "@babel/traverse": "^7.23.6", + "@babel/types": "^7.23.6", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -209,12 +209,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", - "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dev": true, "dependencies": { - "@babel/types": "^7.23.5", + "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -224,14 +224,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -365,14 +365,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", - "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.6.tgz", + "integrity": "sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5" + "@babel/traverse": "^7.23.6", + "@babel/types": "^7.23.6" }, "engines": { "node": ">=6.9.0" @@ -464,9 +464,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", - "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -667,20 +667,20 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", - "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.6.tgz", + "integrity": "sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", + "@babel/generator": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.5", - "@babel/types": "^7.23.5", - "debug": "^4.1.0", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -711,9 +711,9 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", - "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -1996,9 +1996,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001566", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", - "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", + "version": "1.0.30001570", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz", + "integrity": "sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw==", "dev": true, "funding": [ { @@ -2342,9 +2342,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.609", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.609.tgz", - "integrity": "sha512-ihiCP7PJmjoGNuLpl7TjNA8pCQWu09vGyjlPYw1Rqww4gvNuCcmvl+44G+2QyJ6S2K4o+wbTS++Xz0YN8Q9ERw==", + "version": "1.4.613", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.613.tgz", + "integrity": "sha512-r4x5+FowKG6q+/Wj0W9nidx7QO31BJwmR2uEo+Qh3YLGQ8SbBAFuDFpTxzly/I2gsbrFwBuIjrMp423L3O5U3w==", "dev": true }, "node_modules/emittery": { From 303b119285687922e99634ec872d02df333ff3e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:41:00 +0000 Subject: [PATCH 097/539] build(deps-dev): bump @types/node from 20.10.4 to 20.10.5 (#209) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.4 to 20.10.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75f32a5..8bd8a4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1549,9 +1549,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", - "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", "dependencies": { "undici-types": "~5.26.4" } From aed99a66842b165cd72189f6f3c9c09734fef001 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:41:05 +0000 Subject: [PATCH 098/539] build(deps): bump github/codeql-action from 2 to 3 (#210) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fda6093..f9daa60 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,7 +50,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -64,7 +64,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -77,6 +77,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" From 94a1a0e5599249454833ff16532db0d9276ccb0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:41:10 +0000 Subject: [PATCH 099/539] build(deps): bump actions/setup-node from 4.0.0 to 4.0.1 (#211) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v4.0.1) --- updated-dependencies: - dependency-name: actions/setup-node 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> --- .github/workflows/auto-build-pkg.yml | 2 +- .github/workflows/generate-locale-doc.yml | 2 +- .github/workflows/generate-theme-doc.yml | 2 +- .github/workflows/setup-package.yml | 2 +- .github/workflows/test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-build-pkg.yml b/.github/workflows/auto-build-pkg.yml index e970af8..0f13498 100644 --- a/.github/workflows/auto-build-pkg.yml +++ b/.github/workflows/auto-build-pkg.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/generate-locale-doc.yml b/.github/workflows/generate-locale-doc.yml index ba2f7e8..4beefe3 100644 --- a/.github/workflows/generate-locale-doc.yml +++ b/.github/workflows/generate-locale-doc.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index b99faea..0474451 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/setup-package.yml b/.github/workflows/setup-package.yml index f09849b..fb65ce1 100644 --- a/.github/workflows/setup-package.yml +++ b/.github/workflows/setup-package.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 # Setup .npmrc file to publish to GitHub Packages - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: '20.x' registry-url: 'https://npm.pkg.github.com' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4f2db6..ca11478 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm From e4d10baf8ffedb78b5315fc5c2accf4017d58c97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:41:16 +0000 Subject: [PATCH 100/539] build(deps): bump rickstaa/top-issues-action from 1.3.77 to 1.3.83 (#212) Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.77 to 1.3.83. - [Release notes](https://github.com/rickstaa/top-issues-action/releases) - [Commits](https://github.com/rickstaa/top-issues-action/compare/8c70898862d1e7808bd5ce009405ac44f461044d...ce1a949c62a7a5d8b4890d596b5c5da37db628ca) --- 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> --- .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 9bdf214..b9c05e3 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@8c70898862d1e7808bd5ce009405ac44f461044d # v1.3.77 + uses: rickstaa/top-issues-action@ce1a949c62a7a5d8b4890d596b5c5da37db628ca # v1.3.83 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: From dcb0f8dedcd869bec81dd94c93e74ef6b8a2b3c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 01:17:16 +0000 Subject: [PATCH 101/539] build(deps): bump all dependencies and devDependencies version (#214) Co-authored-by: github-actions[bot] --- package-lock.json | 26 +++++++++++++------------- package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bd8a4c..30fac6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.11", - "@types/node": "^20.10.4", + "@types/node": "^20.10.5", "jest": "^29.7.0", "nodemon": "^3.0.2", "ts-jest": "^29.1.1", @@ -1399,9 +1399,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.7", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", - "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" @@ -1557,9 +1557,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.10", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz", - "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==" + "version": "6.9.11", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", + "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==" }, "node_modules/@types/range-parser": { "version": "1.2.7", @@ -1996,9 +1996,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001570", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz", - "integrity": "sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw==", + "version": "1.0.30001571", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz", + "integrity": "sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==", "dev": true, "funding": [ { @@ -2342,9 +2342,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.613", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.613.tgz", - "integrity": "sha512-r4x5+FowKG6q+/Wj0W9nidx7QO31BJwmR2uEo+Qh3YLGQ8SbBAFuDFpTxzly/I2gsbrFwBuIjrMp423L3O5U3w==", + "version": "1.4.616", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.616.tgz", + "integrity": "sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index f72bc1b..6e31aa5 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.11", - "@types/node": "^20.10.4", + "@types/node": "^20.10.5", "jest": "^29.7.0", "nodemon": "^3.0.2", "ts-jest": "^29.1.1", From 14734470806f1ec49ebab77c57465520c9098b66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 20:31:25 +0000 Subject: [PATCH 102/539] build(deps): bump rickstaa/top-issues-action from 1.3.83 to 1.3.86 (#215) Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.83 to 1.3.86. - [Release notes](https://github.com/rickstaa/top-issues-action/releases) - [Commits](https://github.com/rickstaa/top-issues-action/compare/ce1a949c62a7a5d8b4890d596b5c5da37db628ca...c89f81ea20ab265071194cf102bc881f476ecca8) --- 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> --- .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 b9c05e3..129ea6b 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@ce1a949c62a7a5d8b4890d596b5c5da37db628ca # v1.3.83 + uses: rickstaa/top-issues-action@c89f81ea20ab265071194cf102bc881f476ecca8 # v1.3.86 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: From 6314772042d7cb2b6efefa4025fc3f87e040d952 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:08:08 +0000 Subject: [PATCH 103/539] build(deps): bump all dependencies and devDependencies version (#216) Co-authored-by: github-actions[bot] --- 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 30fac6d..5ce96db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", - "axios": "^1.6.2", + "axios": "^1.6.3", "dotenv": "^16.3.1", "escape-html": "^1.0.3", "express": "^4.18.2", @@ -1721,9 +1721,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", + "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1996,9 +1996,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001571", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz", - "integrity": "sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==", + "version": "1.0.30001572", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz", + "integrity": "sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 6e31aa5..5c16f78 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@resvg/resvg-js": "^2.6.0", "@types/escape-html": "^1.0.4", "@types/express": "^4.17.21", - "axios": "^1.6.2", + "axios": "^1.6.3", "dotenv": "^16.3.1", "escape-html": "^1.0.3", "express": "^4.18.2", From 972dd96548a77b39de6115a562eb6f689c8a8b53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 01:25:16 +0000 Subject: [PATCH 104/539] build(deps): bump all dependencies and devDependencies version (#217) Co-authored-by: github-actions[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ce96db..a141ecc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.11", - "@types/node": "^20.10.5", + "@types/node": "^20.10.6", "jest": "^29.7.0", "nodemon": "^3.0.2", "ts-jest": "^29.1.1", @@ -156,9 +156,9 @@ } }, "node_modules/@babel/core": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.6.tgz", - "integrity": "sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -166,10 +166,10 @@ "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.6", + "@babel/helpers": "^7.23.7", "@babel/parser": "^7.23.6", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.6", + "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -365,13 +365,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.6.tgz", - "integrity": "sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz", + "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.6", + "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6" }, "engines": { @@ -667,9 +667,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.6.tgz", - "integrity": "sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", @@ -1418,9 +1418,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", - "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -1549,9 +1549,9 @@ "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", "dependencies": { "undici-types": "~5.26.4" } @@ -1625,9 +1625,9 @@ } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2571,9 +2571,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", diff --git a/package.json b/package.json index 5c16f78..a3cb484 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@markdoc/markdoc": "^0.4.0", "@types/jest": "^29.5.11", - "@types/node": "^20.10.5", + "@types/node": "^20.10.6", "jest": "^29.7.0", "nodemon": "^3.0.2", "ts-jest": "^29.1.1", From b87b3924a3abd55758a93c4c6a2dc32f94b955ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:38:38 +0000 Subject: [PATCH 105/539] build(deps): bump rickstaa/top-issues-action from 1.3.86 to 1.3.87 (#218) Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.86 to 1.3.87. - [Release notes](https://github.com/rickstaa/top-issues-action/releases) - [Commits](https://github.com/rickstaa/top-issues-action/compare/c89f81ea20ab265071194cf102bc881f476ecca8...fa1b14384871ebbc2f341f953a728e8370788992) --- 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> --- .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 129ea6b..b679134 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@c89f81ea20ab265071194cf102bc881f476ecca8 # v1.3.86 + uses: rickstaa/top-issues-action@fa1b14384871ebbc2f341f953a728e8370788992 # v1.3.87 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: From 4038ca837710621c7f39a04f777d98a58693d0c9 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:59:29 +0700 Subject: [PATCH 106/539] refactor: revise code for readability and maintainability (#219) --- src/card.ts | 277 ++++++++++++++++++++++++++-------------------------- 1 file changed, 138 insertions(+), 139 deletions(-) diff --git a/src/card.ts b/src/card.ts index f126e63..935ec8f 100644 --- a/src/card.ts +++ b/src/card.ts @@ -24,64 +24,67 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { // Setting angles and positions for SVG elements const direction = isRtlDirection ? "rtl" : "ltr"; - const titleXAngle = isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5); - const titleYAngle = isDisabledAnimations ? 0 : -10; - const textXAngle = isRtlDirection ? 215 : 25; - const dataXAngle = isRtlDirection ? 15 : 225; - const iconXAngle = isRtlDirection ? 225 : 0; - const imageXAngle = isDisabledAnimations ? 120 : 125; - const imageYAngle = isDisabledAnimations ? 70 : 65; - const userXAngle = isDisabledAnimations ? 119.9 : 109.9; - const userYAngle = isDisabledAnimations ? 140 : 130; - const follXAngle = isDisabledAnimations ? 120 : 110; - const follYAngle = isDisabledAnimations ? 161 : 151; + const angle = { + titleXAngle: isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5), + titleYAngle: isDisabledAnimations ? 0 : -10, + textXAngle: isRtlDirection ? 210 : 25, + dataXAngle: isRtlDirection ? 5 : 230, + iconXAngle: isRtlDirection ? 220 : 0, + imageXAngle: isDisabledAnimations ? 120 : 125, + imageYAngle: isDisabledAnimations ? 70 : 65, + userXAngle: isDisabledAnimations ? 119.9 : 109.9, + userYAngle: isDisabledAnimations ? 140 : 130, + follXAngle: isDisabledAnimations ? 120 : 110, + follYAngle: isDisabledAnimations ? 161 : 151, + }; // Setting styles for hiding stroke and border based on UI configuration const hideStroke = parseBoolean(uiConfig.hideStroke) ? `` : `stroke="#${uiConfig.strokeColor}" stroke-width="5"`; const hideBorder = parseBoolean(uiConfig.hideBorder) ? `` : `stroke="#${uiConfig.borderColor}" stroke-opacity="1" stroke-width="${uiConfig.borderWidth}"`; // CSS animations for SVG elements - const animations = parseBoolean(uiConfig.disabledAnimations || uiConfig.Format === "png") ? `` : ` /* Animations */ - @keyframes scaleInAnimation { - from { - transform: translate(-5px, 5px) scale(0); - } - to { - transform: translate(-5px, 5px) scale(1); - } - } - @keyframes fadeInAnimation { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - @keyframes fadeLeftInAnimation { - from { - opacity: 0; - transform: translate(-90px, 10px); - } - to { - opacity: 1; - transform: translate(10px, 10px); - } - } - - .div-animation { - animation: fadeLeftInAnimation 0.7s ease-in-out forwards; - } - - .image-profile-animation { - animation: scaleInAnimation 1.2s ease-in-out forwards; - transform-origin: ${imageXAngle}px ${imageYAngle}px; - } - - .single-item-animation { - opacity: 0; - animation: fadeInAnimation 0.3s ease-in-out forwards; - }`; + const animations = parseBoolean(uiConfig.disabledAnimations || uiConfig.Format === "png") ? `` : ` + /* Animations */ + @keyframes scaleInAnimation { + from { + transform: translate(-5px, 5px) scale(0); + } + to { + transform: translate(-5px, 5px) scale(1); + } + } + @keyframes fadeInAnimation { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + @keyframes fadeLeftInAnimation { + from { + opacity: 0; + transform: translate(-90px, 10px); + } + to { + opacity: 1; + transform: translate(10px, 10px); + } + } + + .div-animation { + animation: fadeLeftInAnimation 0.7s ease-in-out forwards; + } + + .image-profile-animation { + animation: scaleInAnimation 1.2s ease-in-out forwards; + transform-origin: ${angle.imageXAngle}px ${angle.imageYAngle}px; + } + + .single-item-animation { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + }`; // Extracting and formatting hidden and shown items based on UI configuration const hiddenItems = uiConfig.hiddenItems || ""; @@ -110,15 +113,15 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { // Generating SVG code for each visible card item const cardItemsSVG = cardItemsToShow.map((item, index) => ` - - - - ${item.icon} - - ${item.text}: - ${item.value} - - `).join("\n"); + + + + ${item.icon} + + ${item.text}: + ${item.value} + + `).join("\n"); /** * Generates a linear gradient SVG code based on an array of color stops. @@ -135,13 +138,12 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { return ``; }).join(""); return ` - - - ${gradientStops} - - - - `; + + + ${gradientStops} + + + `; } // Generating SVG code for the background based on background color or gradient @@ -155,81 +157,78 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { const gradientColors = gradientHexArray.map(color => color.trim()); backgroundSVG = generateGradient(gradientColors); } else { - backgroundSVG = ``; + backgroundSVG = ` + `; } } } // Final SVG code for the GitHub stats card - return ` - - ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)} - - ${backgroundSVG} - - - ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)} - - - - - - - - - - @${data.username} - - ${data.followers} ${selectLocale.followersText || defaultLocale.followersText} · ${data.following} ${selectLocale.followingText || defaultLocale.followingText} - - - - ${cardItemsSVG} - + return ` + + + ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)} +${backgroundSVG} + + + ${selectLocale.titleCard.split("{name}").join(data.name) || defaultLocale.titleCard.split("{name}").join(data.name)} + + + + + + + + + + @${data.username} + + ${data.followers} ${selectLocale.followersText || defaultLocale.followersText} · ${data.following} ${selectLocale.followingText || defaultLocale.followingText} +${cardItemsSVG} + `; -} \ No newline at end of file +} From 1f4d7a1b113b989ba54d2363418b89698336da79 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Wed, 3 Jan 2024 03:57:14 +0700 Subject: [PATCH 107/539] fix: update x position for data stats text (#220) --- src/card.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/card.ts b/src/card.ts index 935ec8f..0df2d35 100644 --- a/src/card.ts +++ b/src/card.ts @@ -28,7 +28,7 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { titleXAngle: isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5), titleYAngle: isDisabledAnimations ? 0 : -10, textXAngle: isRtlDirection ? 210 : 25, - dataXAngle: isRtlDirection ? 5 : 230, + dataXAngle: isRtlDirection ? 15 : 220, iconXAngle: isRtlDirection ? 220 : 0, imageXAngle: isDisabledAnimations ? 120 : 125, imageYAngle: isDisabledAnimations ? 70 : 65, From c9a9f246e779ca0f6e907d67bcc38df916bb183a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Wed, 3 Jan 2024 04:06:05 +0700 Subject: [PATCH 108/539] fix: update x position for text and icon (#221) --- src/card.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/card.ts b/src/card.ts index 0df2d35..efd1fca 100644 --- a/src/card.ts +++ b/src/card.ts @@ -27,9 +27,9 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { const angle = { titleXAngle: isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5), titleYAngle: isDisabledAnimations ? 0 : -10, - textXAngle: isRtlDirection ? 210 : 25, + textXAngle: isRtlDirection ? 205 : 20, dataXAngle: isRtlDirection ? 15 : 220, - iconXAngle: isRtlDirection ? 220 : 0, + iconXAngle: isRtlDirection ? 215 : -5, imageXAngle: isDisabledAnimations ? 120 : 125, imageYAngle: isDisabledAnimations ? 70 : 65, userXAngle: isDisabledAnimations ? 119.9 : 109.9, From 67cd0d0ab21e5f2eb9609f72503d4f35afb5d00a Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Wed, 3 Jan 2024 06:32:24 +0700 Subject: [PATCH 109/539] fix: update x position for text and icon if locale is right to left (#222) --- src/card.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/card.ts b/src/card.ts index efd1fca..37ff40f 100644 --- a/src/card.ts +++ b/src/card.ts @@ -27,9 +27,9 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { const angle = { titleXAngle: isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5), titleYAngle: isDisabledAnimations ? 0 : -10, - textXAngle: isRtlDirection ? 205 : 20, + textXAngle: isRtlDirection ? 215 : 20, dataXAngle: isRtlDirection ? 15 : 220, - iconXAngle: isRtlDirection ? 215 : -5, + iconXAngle: isRtlDirection ? 225 : -5, imageXAngle: isDisabledAnimations ? 120 : 125, imageYAngle: isDisabledAnimations ? 70 : 65, userXAngle: isDisabledAnimations ? 119.9 : 109.9, From 6bc50402af4c8cab95476e9aa5fb2f5b26e3332f Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Wed, 3 Jan 2024 06:38:40 +0700 Subject: [PATCH 110/539] chore: update .npmignore --- .npmignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.npmignore b/.npmignore index a5cfb4a..0a09d5c 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,10 @@ .env.example +coverage.yml +jest.config.json + .github/ tests/ scripts/ +node_modules/ coverage/ public/ From 936e29fc537ef1b042a3f98d19fb01ec26236903 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:24:20 +0700 Subject: [PATCH 111/539] docs(readme): Update copyright year --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30f5de7..5b7af55 100644 --- a/README.md +++ b/README.md @@ -368,7 +368,7 @@ Want to contribute? Please note our contribution guidelines [here](/CONTRIBUTING

Made with ❤️ and TypeScript

-

Copyright © 2023 Rangga Fajar Oktariansyah

+

Copyright © 2023-present Rangga Fajar Oktariansyah

GitHub Readme Profile License
From fc7489ce746333229e88a251262681778991b644 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:45:17 +0700 Subject: [PATCH 112/539] feat: include all commits from the year the user joined (#223) --- src/card.ts | 4 +- src/fetcher/apiFetch.ts | 118 +++++++++++++++++++++++++++++++++++++--- src/getData.ts | 6 +- 3 files changed, 116 insertions(+), 12 deletions(-) diff --git a/src/card.ts b/src/card.ts index 37ff40f..31de846 100644 --- a/src/card.ts +++ b/src/card.ts @@ -143,7 +143,7 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { ${gradientStops} - `; + `; } // Generating SVG code for the background based on background color or gradient @@ -158,7 +158,7 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { backgroundSVG = generateGradient(gradientColors); } else { backgroundSVG = ` - `; + `; } } } diff --git a/src/fetcher/apiFetch.ts b/src/fetcher/apiFetch.ts index 475b1f5..f3dc2d1 100644 --- a/src/fetcher/apiFetch.ts +++ b/src/fetcher/apiFetch.ts @@ -10,7 +10,6 @@ export interface User { repositories: Repositories; followers: Followers; following: Following; - contributionsCollection: ContributionsCollection; openedIssues: OpenedIssues; closedIssues: ClosedIssues; pullRequests: PullRequests; @@ -18,6 +17,9 @@ export interface User { discussionStarted: DiscussionStarted; discussionAnswered: DiscussionAnswered; repositoriesContributedTo: RepositoriesContributedTo; + totalCommitContributions: number; + restrictedContributionsCount: number; + totalPullRequestReviewContributions: number; } // Represents the total count of repositories @@ -77,6 +79,80 @@ export interface RepositoriesContributedTo { totalCount: number; } +async function getUserJoinYear(username: string): Promise { + const data = await axios({ + method: "post", + url: "https://api.github.com/graphql", + headers: { + "User-Agent": "FajarKim/github-readme-profile", + Authorization: getRandomToken(true), + }, + data: { + query: `query userInfo($username: String!) { + user(login: $username) { + createdAt + } + }`, + variables: { + username, + }, + }, + }); + + if (data.data.errors?.length > 0) { + throw new Error(data.data.errors[0].message); + } + + const user = data.data.data.user; + if (!user || !user.createdAt) { + throw new Error("User data is missing."); + } + + const joinDate = new Date(user.createdAt); + return joinDate.getFullYear(); +} + +async function fetchContributions(username: string, year: number): Promise { + const from = `${year}-01-01T00:00:00Z`; + const to = `${year}-12-31T23:59:59Z`; + + const data = await axios({ + method: "post", + url: "https://api.github.com/graphql", + headers: { + "User-Agent": "FajarKim/github-readme-profile", + Authorization: getRandomToken(true), + }, + data: { + query: `query userInfo($username: String!, $from: DateTime!, $to: DateTime!) { + user(login: $username) { + contributionsCollection(from: $from, to: $to) { + totalCommitContributions + restrictedContributionsCount + totalPullRequestReviewContributions + } + } + }`, + variables: { + username, + from, + to, + }, + }, + }); + + if (data.data.errors?.length > 0) { + throw new Error(data.data.errors[0].message); + } + + const contributions = data.data.data.user.contributionsCollection; + return { + totalCommitContributions: contributions.totalCommitContributions, + restrictedContributionsCount: contributions.restrictedContributionsCount, + totalPullRequestReviewContributions: contributions.totalPullRequestReviewContributions, + }; +} + /** * Fetches user data from the GitHub GraphQL API. * @@ -84,6 +160,20 @@ export interface RepositoriesContributedTo { * @returns {Promise} Promise representing the user data obtained from the GitHub Graphql API. */ export default async function apiFetch(username: string): Promise { + const startYear = await getUserJoinYear(username); + const endYear = new Date().getFullYear(); + + let TotalCommitContributions = 0; + let RestrictedContributionsCount = 0; + let TotalPullRequestReviewContributions = 0; + + for (let year = startYear; year <= endYear; year++) { + const contributions = await fetchContributions(username, year); + TotalCommitContributions += contributions.totalCommitContributions; + RestrictedContributionsCount += contributions.restrictedContributionsCount; + TotalPullRequestReviewContributions += contributions.totalPullRequestReviewContributions; + } + const data = await axios({ method: "post", url: "https://api.github.com/graphql", @@ -106,11 +196,6 @@ export default async function apiFetch(username: string): Promise { following { totalCount } - contributionsCollection { - totalCommitContributions - restrictedContributionsCount - totalPullRequestReviewContributions - } openedIssues: issues(states: OPEN) { totalCount } @@ -143,5 +228,24 @@ export default async function apiFetch(username: string): Promise { if (data.data.errors?.length > 0) throw new Error(data.data.errors[0].message); - return data.data.data.user; + const user = data.data.data.user; + + return { + name: user.name, + login: user.login, + avatarUrl: user.avatarUrl, + repositories: user.repositories, + followers: user.followers, + following: user.following, + openedIssues: user.openedIssues, + closedIssues: user.closedIssues, + pullRequests: user.pullRequests, + mergedPullRequests: user.mergedPullRequests, + discussionStarted: user.discussionStarted, + discussionAnswered: user.discussionAnswered, + repositoriesContributedTo: user.repositoriesContributedTo, + totalCommitContributions: TotalCommitContributions, + restrictedContributionsCount: RestrictedContributionsCount, + totalPullRequestReviewContributions: TotalPullRequestReviewContributions, + }; } diff --git a/src/getData.ts b/src/getData.ts index cd344d2..d563189 100644 --- a/src/getData.ts +++ b/src/getData.ts @@ -58,10 +58,10 @@ async function getData(username: string): Promise { total_prs: millify(user.pullRequests.totalCount), total_prs_merged: millify(user.mergedPullRequests.totalCount), total_commits: millify( - user.contributionsCollection.restrictedContributionsCount + - user.contributionsCollection.totalCommitContributions + user.restrictedContributionsCount + + user.totalCommitContributions ), - total_review: millify(user.contributionsCollection.totalPullRequestReviewContributions), + total_review: millify(user.totalPullRequestReviewContributions), total_discussion_answered: millify(user.discussionAnswered.totalCount), total_discussion_started: millify(user.discussionStarted.totalCount), total_contributed_to: millify(user.repositoriesContributedTo.totalCount), From 04db312af7e992a20a1adc25fb2bbc1c5a3b2d90 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:03:10 +0700 Subject: [PATCH 113/539] refactor: revise code for readability and maintainability (#224) --- api/index.ts | 58 +++--- scripts/generate-theme-doc.ts | 30 +-- scripts/generate-translation-doc.ts | 21 +-- scripts/languageNames.ts | 23 ++- src/card.ts | 34 +--- src/common/utils.ts | 20 +- src/fetcher/repositoryFetch.ts | 87 --------- src/fetcher/repositoryStats.ts | 97 ++++++++++ src/fetcher/{apiFetch.ts => stats.ts} | 174 ++++++++++++++---- src/getData.ts | 50 +++-- src/getRandomToken.ts | 39 ---- src/getToken.ts | 39 ++++ src/icons.ts | 33 +++- src/translations.ts | 35 +++- tests/getToken.test.ts | 58 ++++++ tests/randomToken.test.ts | 45 ----- ...tsCard.test.ts => renderStatsCard.test.ts} | 63 +++++-- themes/index.ts | 28 ++- withexpress.ts | 2 +- 19 files changed, 574 insertions(+), 362 deletions(-) delete mode 100644 src/fetcher/repositoryFetch.ts create mode 100644 src/fetcher/repositoryStats.ts rename src/fetcher/{apiFetch.ts => stats.ts} (51%) delete mode 100644 src/getRandomToken.ts create mode 100644 src/getToken.ts create mode 100644 tests/getToken.test.ts delete mode 100644 tests/randomToken.test.ts rename tests/{renderAPIStatsCard.test.ts => renderStatsCard.test.ts} (65%) diff --git a/api/index.ts b/api/index.ts index 4ff2868..803b1ae 100644 --- a/api/index.ts +++ b/api/index.ts @@ -1,13 +1,32 @@ -// Importing necessary libraries and modules import escapeHTML from "escape-html"; import { Resvg } from "@resvg/resvg-js"; import getData from "../src/getData"; -import cardStyle from "../src/card"; +import card from "../src/card"; import { themes, Themes } from "../themes/index"; import { isValidHexColor, isValidGradient, parseBoolean } from "../src/common/utils"; -// User interface configuration type -export type UiConfig = { +/** + * Type representing the configuration for the card options. + * + * @typedef {Object} UiConfig + * @property {string} titleColor - Color for the title text. + * @property {string} textColor - Color for the main text. + * @property {string} iconColor - Color for icons. + * @property {string} borderColor - Color for borders. + * @property {string} strokeColor - Color for strokes. + * @property {string} usernameColor - Color for the username. + * @property {any} bgColor - Background color or gradient. + * @property {string} Locale - Locale setting. + * @property {number|string} borderWidth - Width of borders. + * @property {number|string} borderRadius - Radius of borders. + * @property {boolean|string} disabledAnimations - Toggle for disabling animations. + * @property {string} Format - Output format (e.g., "svg", "png", or "json"). + * @property {string|undefined} hiddenItems - Items to hide. + * @property {string|undefined} showItems - Items to show. + * @property {boolean|string} hideStroke - Toggle for hiding strokes. + * @property {boolean|string} hideBorder - Toggle for hiding borders. + */ +type UiConfig = { titleColor: string; textColor: string; iconColor: string; @@ -27,23 +46,20 @@ export type UiConfig = { }; /** - * Generates readme stats based on user input. + * Handles the generation card of a GitHub stats based on user data and specified options. * - * @param {any} req HTTP request object. - * @param {any} res HTTP response object. - * @returns {Promise} Promise representing the response. + * @param {any} req - The request object from the client. + * @param {any} res - The response object to send data back to the client. + * @returns {Promise} - A promise that resolves when the photo profile is generated and sent. */ -export default async function readmeStats(req: any, res: any): Promise { +async function readmeStats(req: any, res: any): Promise { try { - // Extracting and escaping username from the request const username = escapeHTML(req.query.username); - // Setting fallback and default themes const fallbackTheme = "default"; const defaultTheme: Themes[keyof Themes] = themes[fallbackTheme]; const selectTheme: Themes[keyof Themes] = themes[req.query.theme] || defaultTheme; - // Configuring UI based on request parameters or using default values const uiConfig: UiConfig = { titleColor: escapeHTML(req.query.title_color || selectTheme.title_color || defaultTheme.title_color), textColor: escapeHTML(req.query.text_color || selectTheme.text_color || defaultTheme.text_color), @@ -63,7 +79,6 @@ export default async function readmeStats(req: any, res: any): Promise { hideBorder: parseBoolean(escapeHTML(req.query.hide_border)) || false, }; - // Validating username and color codes if (!username) { throw new Error("Username is required"); } @@ -79,38 +94,35 @@ export default async function readmeStats(req: any, res: any): Promise { throw new Error("Enter a valid hex color code"); } - // Validating background color or gradient if (!isValidGradient(uiConfig.bgColor)) { if (!isValidHexColor(uiConfig.bgColor)) { throw new Error("Enter a valid hex color code"); } } - // Fetching user stats data const fetchStats = await getData(username); res.setHeader("Cache-Control", "s-maxage=3600, stale-while-revalidate"); - // Handling different response formats (JSON, PNG, SVG) if (uiConfig.Format === "json") { res.json(fetchStats); } else if (uiConfig.Format === "png") { - // Converting SVG to PNG using @resvg/resvg-js - const svgString = cardStyle(fetchStats, uiConfig); + const svgString = card(fetchStats, uiConfig); const resvg = new Resvg(svgString, { font: { defaultFontFamily: "Segoe UI" }}); const pngBuffer = await resvg.render().asPng(); - // Sending PNG in the response res.setHeader("Content-Type", "image/png"); res.send(pngBuffer); } else { - // Sending SVG in the response res.setHeader("Content-Type", "image/svg+xml"); - const svg = cardStyle(fetchStats, uiConfig); + const svg = card(fetchStats, uiConfig); res.send(svg); } } catch (error: any) { - // Handling and logging errors in the response + const message = error.message; res.setHeader("Cache-Control", "s-maxage=7200, stale-while-revalidate"); - res.status(500).send(escapeHTML(error.message)); + res.status(500).send(escapeHTML(message)); } } + +export { UiConfig, readmeStats }; +export default readmeStats; diff --git a/scripts/generate-theme-doc.ts b/scripts/generate-theme-doc.ts index e8ab605..f3f04a8 100644 --- a/scripts/generate-theme-doc.ts +++ b/scripts/generate-theme-doc.ts @@ -1,43 +1,20 @@ -// Importing necessary libraries and modules import fs from "fs"; -import { themes } from "../themes/index"; +import themes from "../themes/index"; const TARGET_FILE = "./themes/README.md"; -/** - * Generates the markdown for a theme. - * - * @param {string} theme Theme name. - * @returns {string} Theme markdown string. - */ function generateThemeMarkdown(theme: string): string { - // Creates a markdown string for a given theme return `\`${theme}\` ![${theme}][${theme}]`; } -/** - * Generates the link to the theme image for a username and theme. - * - * @param {string} username GitHub username. - * @param {string} theme Theme name. - * @returns {string} Theme link string. - */ function generateThemeLink(username: string, theme: string): string { - // Creates a link to the theme image for a specific username and theme return `[${theme}]: https://github-readme-profile-alpha.vercel.app/api?username=${username}&theme=${theme}`; } -/** - * Generates the content for the README file with available themes and preview links. - * - * @param {string} username GitHub username. - * @returns {string} README content string. - */ export function generateReadmeThemes(username: string): string { const availableThemes = Object.keys(themes); const itemsPerRow = 3; - // Generate table rows with theme markdown let themesPreviewTable = ""; for (let i = 0; i < availableThemes.length; i += itemsPerRow) { const themesSlice = availableThemes.slice(i, i + itemsPerRow); @@ -45,7 +22,6 @@ export function generateReadmeThemes(username: string): string { themesPreviewTable += `| ${row} |\n`; } - // Generate individual theme links let themesPreviewLink = ""; for (let i = 0; i < availableThemes.length; i += 1) { const themesSlice = availableThemes.slice(i, i + 1); @@ -53,7 +29,6 @@ export function generateReadmeThemes(username: string): string { themesPreviewLink += `${row}\n`; } - // Final README content with themes and links const readmeContent = ` ## Available Themes @@ -78,11 +53,8 @@ ${themesPreviewLink}`; return readmeContent; } -// GitHub username to generate the README const username = "FajarKim"; -// Generate the README content const generatedReadme = generateReadmeThemes(username); -// Write the README content to the specified file fs.writeFileSync(TARGET_FILE, generatedReadme); diff --git a/scripts/generate-translation-doc.ts b/scripts/generate-translation-doc.ts index 6dfc5fc..fdce7e5 100644 --- a/scripts/generate-translation-doc.ts +++ b/scripts/generate-translation-doc.ts @@ -1,30 +1,16 @@ -// Importing necessary libraries and modules import fs from "fs"; -import { locales } from "../src/translations"; -import { languageNames } from "./languageNames"; +import locales from "../src/translations"; +import languageNames from "./languageNames"; const TARGET_FILE = "./docs/translations.md"; -/** - * Generates the markdown for a locale. - * - * @param {string} locale Locale code. - * @returns {string} Locale markdown string. - */ function generateTranslationsMarkdown(locale: string): string { - // Returns the markdown string for a specific locale return `${locale}`; } -/** - * Generates the content for the README file with available locales and progress. - * - * @returns {string} README content string. - */ export function generateReadmeLocales(): string { const availableLocales = Object.keys(locales); - // Generate table rows with locale details let localesListTable = ""; for (let i = 0; i < availableLocales.length; i += 1) { const localesSlice = availableLocales.slice(i, i + 1); @@ -36,7 +22,6 @@ export function generateReadmeLocales(): string { \n`; } - // Final README content with locales and progress const readmeContent = ` ## Available Locales Use \`?locale=LOCALE_CODE\` parameter like so :- @@ -61,8 +46,6 @@ Want to add new translations? Consider reading the [contribution guidelines](htt return readmeContent; } -// Generate the README content const generatedReadme = generateReadmeLocales(); -// Write the README content to the specified file fs.writeFileSync(TARGET_FILE, generatedReadme); diff --git a/scripts/languageNames.ts b/scripts/languageNames.ts index 411a5d4..b2d7565 100644 --- a/scripts/languageNames.ts +++ b/scripts/languageNames.ts @@ -1,10 +1,20 @@ -// Represents the structure of localized code languages name in English -export type LanguageNames = { +/** + * Type representing a collection of language names based on language codes. + * + * @typedef {Object} LanguageNames + * @property {string} [key] - Language code. + * @property {string} [value] - Language name. + */ +type LanguageNames = { [key: string]: string; }; -// Object containing localized strings for different languages name in English -export const languageNames: LanguageNames = { +/** + * LanguageNames object stores language code and language name. + * + * @type {LanguageNames} + */ +const languageNames: LanguageNames = { "af": "Afrikaans", "af-NA": "Afrikaans (Namibia)", "af-ZA": "Afrikaans (South Africa)", @@ -810,4 +820,7 @@ export const languageNames: LanguageNames = { "zh-Hant-TW": "Chinese (Traditional, Taiwan)", "zu": "Zulu", "zu-ZA": "Zulu (South Africa)", -} +}; + +export { LanguageNames, languageNames }; +export default languageNames; diff --git a/src/card.ts b/src/card.ts index 31de846..4dc2615 100644 --- a/src/card.ts +++ b/src/card.ts @@ -1,28 +1,24 @@ -// Importing necessary types and modules import type { GetData } from "./getData"; import type { UiConfig } from "../api/index"; import { locales, Locales } from "./translations"; -import { icons } from "./icons"; +import icons from "./icons"; import { parseBoolean } from "./common/utils"; /** - * Generates the SVG code for the user's GitHub stats card based on provided data and UI configuration. + * Generates the SVG markup for the GitHub stats card. * - * @param {GetData} data User's GitHub stats data. - * @param {UiConfig} uiConfig User interface configuration. - * @returns {string} SVG code representing the GitHub stats card. + * @param {GetData} data - GitHub user data stats. + * @param {UiConfig} uiConfig - Configuration for the UI card options. + * @returns {string} - SVG markup for the GitHub stats card. */ -export default function cardStyle(data: GetData, uiConfig: UiConfig): string { - // Setting fallback and default locale +function card(data: GetData, uiConfig: UiConfig): string { const fallbackLocale = "en"; const defaultLocale: Locales[keyof Locales] = locales[fallbackLocale]; const selectLocale: Locales[keyof Locales] = locales[uiConfig.Locale] || defaultLocale; - // Determining text direction and animations based on UI configuration const isRtlDirection = parseBoolean(selectLocale.rtlDirection); const isDisabledAnimations = parseBoolean(uiConfig.disabledAnimations || uiConfig.Format === "png"); - // Setting angles and positions for SVG elements const direction = isRtlDirection ? "rtl" : "ltr"; const angle = { titleXAngle: isDisabledAnimations ? (isRtlDirection ? 520 : 15) : (isRtlDirection ? 510 : 5), @@ -38,11 +34,9 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { follYAngle: isDisabledAnimations ? 161 : 151, }; - // Setting styles for hiding stroke and border based on UI configuration const hideStroke = parseBoolean(uiConfig.hideStroke) ? `` : `stroke="#${uiConfig.strokeColor}" stroke-width="5"`; const hideBorder = parseBoolean(uiConfig.hideBorder) ? `` : `stroke="#${uiConfig.borderColor}" stroke-opacity="1" stroke-width="${uiConfig.borderWidth}"`; - // CSS animations for SVG elements const animations = parseBoolean(uiConfig.disabledAnimations || uiConfig.Format === "png") ? `` : ` /* Animations */ @keyframes scaleInAnimation { @@ -86,13 +80,11 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { animation: fadeInAnimation 0.3s ease-in-out forwards; }`; - // Extracting and formatting hidden and shown items based on UI configuration const hiddenItems = uiConfig.hiddenItems || ""; const hiddenItemsArray = hiddenItems.split(","); const showItems = uiConfig.showItems || ""; const showItemsArray = showItems.split(","); - // Array containing information about different GitHub stats to be displayed on the card const cardItems = [ { text: selectLocale.totalReposText || defaultLocale.totalReposText, value: data.public_repos, icon: icons.repository, hidden: hiddenItemsArray.includes("repos") }, { text: selectLocale.starsCountText || defaultLocale.starsCountText, value: data.total_stars, icon: icons.star, hidden: hiddenItemsArray.includes("stars") }, @@ -108,10 +100,8 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { { text: selectLocale.contributedToText || defaultLocale.contributedToText, value: data.total_contributed_to, icon: icons.contributed_to, hidden: hiddenItemsArray.includes("contributed") }, ]; - // Filtering items based on hiddenItemsArray and showItemsArray const cardItemsToShow = cardItems.filter(item => !item.hidden); - // Generating SVG code for each visible card item const cardItemsSVG = cardItemsToShow.map((item, index) => ` @@ -123,12 +113,6 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { `).join("\n"); - /** - * Generates a linear gradient SVG code based on an array of color stops. - * - * @param {string[]} colors Array of color codes for the gradient stops. - * @returns {string} SVG code representing the linear gradient. - */ function generateGradient(colors: string[]): string { const gradientId = "gradient"; const gradientAngle = colors[0]; @@ -146,7 +130,6 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { `; } - // Generating SVG code for the background based on background color or gradient let backgroundSVG; if (uiConfig.bgColor) { if (Array.isArray(uiConfig.bgColor)) { @@ -163,7 +146,6 @@ export default function cardStyle(data: GetData, uiConfig: UiConfig): string { } } - // Final SVG code for the GitHub stats card return ` `; } + +export default card; diff --git a/src/common/utils.ts b/src/common/utils.ts index 3b8ffa5..48ae38a 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -1,8 +1,8 @@ /** - * Checks if the provided value is a valid hexadecimal color code. + * Checks whether the provided value is a valid hexadecimal color. * - * @param {any} hexColor Value to be checked. - * @returns {boolean} True if the value is a valid hexadecimal color code, false otherwise. + * @param {any} hexColor - The input value to check for valid hexadecimal color. + * @returns {boolean} - True if the input is a valid hexadecimal color, false otherwise. */ function isValidHexColor(hexColor: any): boolean { return new RegExp( @@ -11,10 +11,10 @@ function isValidHexColor(hexColor: any): boolean { } /** - * Checks if the provided array of color codes represents a valid gradient. + * Checks whether the provided array of hexadecimal colors is a valid gradient. * - * @param {string[]} hexColors Array of color codes to be checked. - * @returns {boolean} True if the array represents a valid gradient, false otherwise. + * @param {string[]} hexColors - The array of hexadecimal colors to check for a valid gradient. + * @returns {boolean} - True if the array represents a valid gradient, false otherwise. */ function isValidGradient(hexColors: string[]): boolean { const colors = [hexColors]; @@ -27,10 +27,10 @@ function isValidGradient(hexColors: string[]): boolean { } /** - * Parses a boolean value or string representation of a boolean. + * Parses a boolean value from either a boolean or string representation. * - * @param {boolean | string} value Value to be parsed. - * @returns {boolean | undefined} Parsed boolean value or undefined if parsing fails. + * @param {boolean | string} value - The input value to parse as a boolean. + * @returns {boolean | undefined} - The parsed boolean value, or undefined if parsing fails. */ function parseBoolean(value: boolean | string): boolean | undefined { if (typeof value === "boolean") { @@ -51,4 +51,4 @@ export { isValidHexColor, isValidGradient, parseBoolean -} \ No newline at end of file +} diff --git a/src/fetcher/repositoryFetch.ts b/src/fetcher/repositoryFetch.ts deleted file mode 100644 index 1eb4532..0000000 --- a/src/fetcher/repositoryFetch.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Importing necessary libraries and modules -import axios from "axios"; -import getRandomToken from "../getRandomToken"; - -// Represents the structure returned: Promise containing the repository data -type RepositoryData = { - stars: number; - forks: number; - openedIssues: number; -}; - -/** - * Fetches repository data for the specified user. - * - * @param {string} username GitHub username. - * @param {number} totalpage Total pages of repositories to fetch. - * @returns {Promise} Promise containing the repository data. - */ -export default async function repositoryFetch( - username: string, - totalpage: number -): Promise { - let stars = 0; - let forks = 0; - let openedIssues = 0; - - // Fetch repository data for each page in parallel - await Promise.all( - Array.from( - { length: totalpage }, - async (_, i) => await getPerPageReposData(username, i + 1) - ) - ).then((data: object[]) => { - // Accumulate data from each page - data.forEach((repo: any) => { - stars += repo.stars; - forks += repo.forks; - openedIssues += repo.openedIssues; - }); - }); - - return { - stars, - forks, - openedIssues, - }; -} - -/** - * Fetches repository data for a specific page. - * - * @param {string} username GitHub username. - * @param {number} pageno Page number to fetch. - * @returns {Promise} Promise containing the repository data for the specified page. - */ -async function getPerPageReposData( - username: string, - pageno: number -): Promise { - const sanitizedUsername = encodeURIComponent(username); - // Fetch data for the specified page - const data = await axios({ - method: "get", - url: `https://api.github.com/users/${sanitizedUsername}/repos?page=${pageno}&per_page=100`, - headers: { - "User-Agent": "FajarKim/github-readme-profile", - Authorization: getRandomToken(true), - }, - }); - - let stars = 0; - let forks = 0; - let openedIssues = 0; - - // Accumulate data from each repository on the page - data.data.forEach((repo: any) => { - stars += repo.stargazers_count; - forks += repo.forks_count; - openedIssues += repo.open_issues; - }); - - return { - stars, - forks, - openedIssues, - }; -} diff --git a/src/fetcher/repositoryStats.ts b/src/fetcher/repositoryStats.ts new file mode 100644 index 0000000..119afe8 --- /dev/null +++ b/src/fetcher/repositoryStats.ts @@ -0,0 +1,97 @@ +import axios from "axios"; +import getToken from "../getToken"; + +/** + * Type representing the data associated with a user's repository stats. + * + * @typedef {Object} RepositoryData + * @property {number} stars - The total count of stars across repositories. + * @property {number} forks - The total count of forks across repositories. + * @property {number} openedIssues - The total count of opened issues across repositories. + */ +type RepositoryData = { + stars: number; + forks: number; + openedIssues: number; +}; + +/** + * Retrieves and calculates repository statistics for a given user. + * + * @param {string} username - The username of the GitHub user. + * @param {number} totalpage - The total number of pages to retrieve data from. + * @returns {Promise} - A promise that resolves to the repository statistics. + */ +async function repositoryStats( + username: string, + totalpage: number +): Promise { + let stars = 0; + let forks = 0; + let openedIssues = 0; + + await Promise.all( + Array.from( + { length: totalpage }, + async (_, i) => await getPerPageRepositoryData(username, i + 1) + ) + ).then((data: object[]) => { + data.forEach((repo: any) => { + stars += repo.stars; + forks += repo.forks; + openedIssues += repo.openedIssues; + }); + }); + + return { + stars, + forks, + openedIssues, + }; +} + +/** + * Retrieves repository data for a specific page. + * + * @param {string} username - The username of the GitHub user. + * @param {number} pageno - The page number to retrieve data from. + * @returns {Promise} - A promise that resolves to the repository data for the specified page. + */ +async function getPerPageRepositoryData( + username: string, + pageno: number +): Promise { + const sanitizedUsername = encodeURIComponent(username); + + const data = await axios({ + method: "get", + url: `https://api.github.com/users/${sanitizedUsername}/repos?page=${pageno}&per_page=100`, + headers: { + "User-Agent": "FajarKim/github-readme-profile", + Authorization: getToken(true), + }, + }); + + let stars = 0; + let forks = 0; + let openedIssues = 0; + + data.data.forEach((repo: any) => { + stars += repo.stargazers_count; + forks += repo.forks_count; + openedIssues += repo.open_issues; + }); + + return { + stars, + forks, + openedIssues, + }; +} + +export { + RepositoryData, + repositoryStats, + getPerPageRepositoryData +}; +export default repositoryStats; diff --git a/src/fetcher/apiFetch.ts b/src/fetcher/stats.ts similarity index 51% rename from src/fetcher/apiFetch.ts rename to src/fetcher/stats.ts index f3dc2d1..4d4ae29 100644 --- a/src/fetcher/apiFetch.ts +++ b/src/fetcher/stats.ts @@ -1,9 +1,28 @@ -// Importing necessary libraries and modules import axios from "axios"; -import getRandomToken from "../getRandomToken"; +import getToken from "../getToken"; -// Represents the user data obtained from the GitHub GraphQL API -export interface User { +/** + * Represents a user's information and statistics. + * + * @interface User + * @property {string} name - The name of the user. + * @property {string} login - The login username of the user. + * @property {string} avatarUrl - The URL of the user's avatar. + * @property {Repositories} repositories - Information about user repositories. + * @property {Followers} followers - Information about user followers. + * @property {Following} following - Information about users being followed by the user. + * @property {OpenedIssues} openedIssues - Information about opened issues by the user. + * @property {ClosedIssues} closedIssues - Information about closed issues by the user. + * @property {PullRequests} pullRequests - Information about user pull requests. + * @property {MergedPullRequests} mergedPullRequests - Information about merged pull requests by the user. + * @property {DiscussionStarted} discussionStarted - Information about discussions started by the user. + * @property {DiscussionAnswered} discussionAnswered - Information about discussions answered by the user. + * @property {RepositoriesContributedTo} repositoriesContributedTo - Information about repositories contributed to by the user. + * @property {number} totalCommitContributions - The total count of commit contributions by the user. + * @property {number} restrictedContributionsCount - The count of restricted contributions by the user. + * @property {number} totalPullRequestReviewContributions - The total count of pull request review contributions by the user. + */ +interface User { name: string; login: string; avatarUrl: string; @@ -22,70 +41,133 @@ export interface User { totalPullRequestReviewContributions: number; } -// Represents the total count of repositories -export interface Repositories { +/** + * Represents information about user repositories. + * + * @interface Repositories + * @property {number} totalCount - The total count of repositories. + */ +interface Repositories { totalCount: number; } -// Represents the total count of followers -export interface Followers { +/** + * Represents information about user followers. + * + * @interface Followers + * @property {number} totalCount - The total count of followers. + */ +interface Followers { totalCount: number; } -// Represents the total count of following -export interface Following { +/** + * Represents information about user following. + * + * @interface Following + * @property {number} totalCount - The total count of following. + */ +interface Following { totalCount: number; } -// Represents contribution data -export interface ContributionsCollection { +/** + * Represents contributions data collected over a specific time period. + * + * @interface ContributionsCollection + * @property {number} totalCommitContributions - The total count of commit contributions. + * @property {number} restrictedContributionsCount - The count of restricted contributions. + * @property {number} totalPullRequestReviewContributions - The total count of pull request review contributions. + */ +interface ContributionsCollection { totalCommitContributions: number; restrictedContributionsCount: number; totalPullRequestReviewContributions: number; } -// Represents the total count of opened issues -export interface OpenedIssues { +/** + * Represents information about user opened issues. + * + * @interface OpenedIssues + * @property {number} totalCount - The total count of opened issues. + */ +interface OpenedIssues { totalCount: number; } -// Represents the total count of closed issues -export interface ClosedIssues { +/** + * Represents information about user closed issues. + * + * @interface ClosedIssues + * @property {number} totalCount - The total count of closed issues. + */ +interface ClosedIssues { totalCount: number; } -// Represents the total count of pull requests -export interface PullRequests { +/** + * Represents information about user pull requests. + * + * @interface PullRequests + * @property {number} totalCount - The total count of pull requests. + */ +interface PullRequests { totalCount: number; } -// Represents the total count of merged pull requests -export interface MergedPullRequests { +/** + * Represents information about user merged pull requests. + * + * @interface MergedPullRequests + * @property {number} totalCount - The total count of merged pull requests. + */ +interface MergedPullRequests { totalCount: number; } -// Represents the total count of started discussions -export interface DiscussionStarted { +/** + * Represents information about user discussion started. + * + * @interface DiscussionStarted + * @property {number} totalCount - The total count of discussion started. + */ +interface DiscussionStarted { totalCount: number; } -// Represents the total count of answered discussions -export interface DiscussionAnswered { +/** + * Represents information about user discussion answered. + * + * @interface DiscussionAnswered + * @property {number} totalCount - The total count of discussion answered. + */ +interface DiscussionAnswered { totalCount: number; } -// Represents the total count of repositories contributed to -export interface RepositoriesContributedTo { +/** + * Represents information about user repositories contributed to. + * + * @interface RepositoriesContributedTo + * @property {number} totalCount - The total count of repositories contributed to. + */ +interface RepositoriesContributedTo { totalCount: number; } +/** + * Fetches the user's join year based on the provided username. + * + * @param {string} username - The GitHub username of the user. + * @returns {Promise} - A promise that resolves with the user's join year. + */ async function getUserJoinYear(username: string): Promise { const data = await axios({ method: "post", url: "https://api.github.com/graphql", headers: { "User-Agent": "FajarKim/github-readme-profile", - Authorization: getRandomToken(true), + Authorization: getToken(true), }, data: { query: `query userInfo($username: String!) { @@ -112,6 +194,13 @@ async function getUserJoinYear(username: string): Promise { return joinDate.getFullYear(); } +/** + * Fetches the contributions data for the specified year. + * + * @param {string} username - The GitHub username of the user. + * @param {number} year - The year for which contributions data is fetched. + * @returns {Promise} - A promise that resolves with contributions data. + */ async function fetchContributions(username: string, year: number): Promise { const from = `${year}-01-01T00:00:00Z`; const to = `${year}-12-31T23:59:59Z`; @@ -121,7 +210,7 @@ async function fetchContributions(username: string, year: number): Promise} Promise representing the user data obtained from the GitHub Graphql API. + * @param {string} username - The GitHub username of the user. + * @returns {Promise} - A promise that resolves with the user's information and statistics. */ -export default async function apiFetch(username: string): Promise { +async function stats(username: string): Promise { const startYear = await getUserJoinYear(username); const endYear = new Date().getFullYear(); @@ -179,7 +268,7 @@ export default async function apiFetch(username: string): Promise { url: "https://api.github.com/graphql", headers: { "User-Agent": "FajarKim/github-readme-profile", - Authorization: getRandomToken(true), + Authorization: getToken(true), }, data: { query: `query userInfo($username: String!) { @@ -249,3 +338,22 @@ export default async function apiFetch(username: string): Promise { totalPullRequestReviewContributions: TotalPullRequestReviewContributions, }; } + +export { + User, + Repositories, + Followers, + Following, + ContributionsCollection, + OpenedIssues, + ClosedIssues, + PullRequests, + MergedPullRequests, + DiscussionStarted, + DiscussionAnswered, + RepositoriesContributedTo, + getUserJoinYear, + fetchContributions, + stats +}; +export default stats; diff --git a/src/getData.ts b/src/getData.ts index d563189..23e61d3 100644 --- a/src/getData.ts +++ b/src/getData.ts @@ -1,14 +1,34 @@ -// Importing necessary libraries and modules import millify from "millify"; -import apiFetch from "./fetcher/apiFetch"; -import repositoryFetch from "./fetcher/repositoryFetch"; +import stats from "./fetcher/stats"; +import repositoryStats from "./fetcher/repositoryStats"; const base64ImageFetcher = require("node-base64-image"); -// Represents the data structure returned by the getData function -export type GetData = { +/** + * Type representing GitHub user information. + * + * @typedef {Object} GetData + * @property {string} username - GitHub username. + * @property {string} name - GitHub user's name. + * @property {string|Buffer} picture - Base64-encoded image or Buffer representing the user's profile picture. + * @property {string|number} public_repos - Formatted count of public repositories. + * @property {string|number} followers - Formatted count of followers. + * @property {string|number} following - Formatted count of users being followed. + * @property {string|number} total_stars - Formatted count of total stars received on repositories. + * @property {string|number} total_forks - Formatted count of total forks received on repositories. + * @property {string|number} total_issues - Formatted count of total issues (both open and closed). + * @property {string|number} total_closed_issues - Formatted count of closed issues. + * @property {string|number} total_prs - Formatted count of total pull requests. + * @property {string|number} total_prs_merged - Formatted count of total merged pull requests. + * @property {string|number} total_commits - Formatted count of total commits. + * @property {string|number} total_review - Formatted count of pull request reviews. + * @property {string|number} total_discussion_answered - Formatted count of discussions answered. + * @property {string|number} total_discussion_started - Formatted count of discussions started. + * @property {string|number} total_contributed_to - Formatted count of repositories contributed to. + */ +type GetData = { username: string; name: string; - pic: string | Buffer; + picture: string | Buffer; public_repos: string | number; followers: string | number; following: string | number; @@ -26,24 +46,22 @@ export type GetData = { }; /** - * Fetches and processes data for a given GitHub user. + * Fetches and formats GitHub user data based on the provided username. * - * @param {string} username GitHub username. - * @returns Promise Promise representing the data structure returned. + * @param {string} username - GitHub username. + * @returns {Promise} - A promise that resolves with formatted GitHub user data. */ async function getData(username: string): Promise { - const user = await apiFetch(username); + const user = await stats(username); const totalRepoPages = Math.ceil(user.repositories.totalCount / 100); - const userRepositories = await repositoryFetch(username, totalRepoPages); + const userRepositories = await repositoryStats(username, totalRepoPages); - // If user.name is not available, use user.login as name if (!user.name) user.name = user.login; - // Creating output object const output = { username: user.login, name: user.name, - pic: await base64ImageFetcher.encode(`${user.avatarUrl}&s=200`, { + picture: await base64ImageFetcher.encode(`${user.avatarUrl}&s=200`, { string: true, }), public_repos: millify(user.repositories.totalCount), @@ -58,8 +76,7 @@ async function getData(username: string): Promise { total_prs: millify(user.pullRequests.totalCount), total_prs_merged: millify(user.mergedPullRequests.totalCount), total_commits: millify( - user.restrictedContributionsCount + - user.totalCommitContributions + user.restrictedContributionsCount + user.totalCommitContributions ), total_review: millify(user.totalPullRequestReviewContributions), total_discussion_answered: millify(user.discussionAnswered.totalCount), @@ -70,4 +87,5 @@ async function getData(username: string): Promise { return output; } +export { GetData, getData }; export default getData; diff --git a/src/getRandomToken.ts b/src/getRandomToken.ts deleted file mode 100644 index 431a201..0000000 --- a/src/getRandomToken.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Importing necessary module -import dotenv from "dotenv"; -import { getInput } from "@actions/core"; - -// Loads environment variables from a .env file if present -dotenv.config(); - -/** - * Generates a random token based on the GH_ environment variables. - * - * @param {boolean} bearerHeader Indicates whether to include "Bearer " prefix for authorization header. - * @returns {string} A random token. - */ -function getRandomToken(bearerHeader: boolean): string { - const getEnvs: any = process.env; - let getGhEnv: any = Object.keys(getEnvs).filter((key) => - key.startsWith("GH_") - ); - getGhEnv = getGhEnv.map((key: string) => getEnvs[key]); - const getRandomEnv: string = - getGhEnv[Math.floor(Math.random() * getGhEnv.length)]; - - if (!getRandomEnv) { - // Use GitHub Actions core module to get the token - const getRandomEnv = getInput("github_token"); - - if (!getRandomEnv) { - throw new Error("Could not find github token"); - } - } - - if (bearerHeader) { - return `Bearer ${getRandomEnv}`; - } - - return getRandomEnv; -} - -export default getRandomToken; diff --git a/src/getToken.ts b/src/getToken.ts new file mode 100644 index 0000000..e84e2f7 --- /dev/null +++ b/src/getToken.ts @@ -0,0 +1,39 @@ +import dotenv from "dotenv"; +import { getInput } from "@actions/core"; + +dotenv.config(); + +/** + * Retrieves the GitHub token from the environment variables or GitHub Actions inputs. + * + * @param {boolean} bearerHeader - Flag indicating whether to return the token with 'Bearer' prefix. + * @returns {string} - The GitHub token. + */ +function getToken(bearerHeader: boolean): string { +const getEnvirontment: any = process.env; + let getGHEnvirontment: any = Object.keys(getEnvirontment).filter((key) => + key.startsWith("GH_") + ); + getGHEnvirontment = getGHEnvirontment.map((key: string) => getEnvirontment[key]); + + // Select a random GitHub environment variable + const getGHToken: string = + getGHEnvirontment[Math.floor(Math.random() * getGHEnvirontment.length)]; + + // If no GitHub environment variable is found, get the token from GitHub Actions inputs + if (!getGHToken) { + const getGHToken = getInput("github_token"); + + if (!getGHToken) { + throw new Error("Could not find github token"); + } + } + + if (bearerHeader) { + return `Bearer ${getGHToken}`; + } + + return getGHToken; +} + +export default getToken; diff --git a/src/icons.ts b/src/icons.ts index 020c8d7..cb327c4 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -1,5 +1,21 @@ -// Represents the available icons for GitHub stats cards -export type Icons = { +/** + * Type representing an object storing SVG icons for various categories. + * + * @typedef {Object} Icons + * @property {string} repository - SVG icon for the repository category. + * @property {string} star - SVG icon for the star category. + * @property {string} fork - SVG icon for the fork category. + * @property {string} commit - SVG icon for the commit category. + * @property {string} review - SVG icon for the review category. + * @property {string} pull_request - SVG icon for the pull request category. + * @property {string} pull_request_merged - SVG icon for the merged pull request category. + * @property {string} issue - SVG icon for the issue category. + * @property {string} issue_closed - SVG icon for the closed issue category. + * @property {string} discussion_started - SVG icon for the started discussion category. + * @property {string} discussion_answered - SVG icon for the answered discussion category. + * @property {string} contributed_to - SVG icon for the contributed to category. + */ +type Icons = { repository: string; star: string; fork: string; @@ -14,8 +30,12 @@ export type Icons = { contributed_to: string; }; -// Object containing various SVG path data for different GitHub-related icons -export const icons = { +/** + * Icons object stores SVG icons for various categories. + * + * @type {Icons} + */ +const icons: Icons = { repository: ``, star: ``, fork: ``, @@ -28,4 +48,7 @@ export const icons = { discussion_started: ``, discussion_answered: ``, contributed_to: ``, -} +}; + +export { Icons, icons }; +export default icons; diff --git a/src/translations.ts b/src/translations.ts index 3fd0379..e5dd93b 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -1,5 +1,25 @@ -// Represents the structure of localized strings -export type Locales = { +/** + * Type representing for local translation card strings. + * + * @typedef {Object} Locales + * @property {string} titleCard - Title for the GitHub stats card. + * @property {string} [followersText] - Text for followers count. + * @property {string} [followingText] - Text for following count. + * @property {string} [totalReposText] - Text for total repository count. + * @property {string} [starsCountText] - Text for stars count. + * @property {string} [forksCountText] - Text for forks count. + * @property {string} [commitsCountText] - Text for commits count. + * @property {string} [totalPRText] - Text for total pull requests count. + * @property {string} [totalPRMergedText] - Text for total merged pull requests count. + * @property {string} [totalPRReviewedText] - Text for total pull requests reviewed count. + * @property {string} [totalIssuesText] - Text for total issues count. + * @property {string} [totalIssuesClosedText] - Text for total closed issues count. + * @property {string} [totalDiscussionStartedText] - Text for total discussions started count. + * @property {string} [totalDiscussionAnsweredText] - Text for total discussions answered count. + * @property {string} [contributedToText] - Text for contributed repositories (last year). + * @property {boolean|string} rtlDirection - Flag indicating right-to-left direction or a string specifying direction. + */ +type Locales = { [key: string]: { titleCard: string; followersText?: string; @@ -20,8 +40,12 @@ export type Locales = { }; }; -// Object containing localized strings for different languages -export const locales: Locales = { +/** + * Localization strings for different languages. + * + * @type {Locales} + */ +const locales: Locales = { en: { titleCard: "{name}'s GitHub Stats", followersText: "Followers", @@ -221,3 +245,6 @@ export const locales: Locales = { rtlDirection: false, }, } + +export { Locales, locales }; +export default locales; diff --git a/tests/getToken.test.ts b/tests/getToken.test.ts new file mode 100644 index 0000000..23cf956 --- /dev/null +++ b/tests/getToken.test.ts @@ -0,0 +1,58 @@ +import getToken from "../src/getToken"; +import * as core from "@actions/core"; + +jest.mock("dotenv"); +jest.mock("@actions/core"); + +type MockedGetInput = jest.MockedFunction; + +const mockedGetInput = core.getInput as MockedGetInput; + + +describe("getToken function", () => { + const originalEnv = process.env; + beforeEach(() => { + process.env = { ...originalEnv }; + }); + afterAll(() => { + process.env = originalEnv; + }); + + it("should return an individual token without Bearer prefix", () => { + process.env.GH_TOKEN = "ghp_token"; + + const token = getToken(false); + + expect(token).toEqual("ghp_token"); + }); + + it("should return an individual token with Bearer prefix", () => { + process.env.GH_TOKEN = "ghp_token"; + + const token = getToken(true); + + expect(token).toEqual("Bearer ghp_token"); + }); + + it("should return a GitHub Actions bot token without Bearer prefix", () => { + mockedGetInput.mockReturnValue("GitHubActionsBotToken"); + + const token = getToken(false); + + expect(token).not.toEqual("GitHubActionsBotToken"); + }); + + it("should return a GitHub Actions bot token with Bearer prefix", () => { + mockedGetInput.mockReturnValue("GitHubActionsBotToken"); + + const token = getToken(true); + + expect(token).not.toEqual("Bearer GitHubActionsBotToken"); + }); + + it("should throw an error if no tokens are available", () => { + mockedGetInput.mockReturnValue(""); + + expect(() => getToken(false)).toThrowError("Could not find github token"); + }); +}); diff --git a/tests/randomToken.test.ts b/tests/randomToken.test.ts deleted file mode 100644 index f486e62..0000000 --- a/tests/randomToken.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import getRandomToken from "../src/getRandomToken"; - -// Mock the dependencies -jest.mock("dotenv"); -jest.mock("@actions/core"); - -describe("getRandomToken function", () => { - // Mock process.env values - const originalEnv = process.env; - beforeEach(() => { - process.env = { ...originalEnv }; - }); - afterAll(() => { - process.env = originalEnv; - }); - - it("should return a random token without Bearer prefix", () => { - // Mock GitHub environment variables - process.env.GH_TOKEN_1 = "token1"; - process.env.GH_TOKEN_2 = "token2"; - - const token = getRandomToken(false); - - expect(token).toEqual(expect.stringMatching(/^token\d$/)); - }); - - it("should return a random token with Bearer prefix", () => { - // Mock GitHub environment variables - process.env.GH_TOKEN_1 = "token1"; - process.env.GH_TOKEN_2 = "token2"; - - const token = getRandomToken(true); - - expect(token).toEqual(expect.stringMatching(/^Bearer token\d$/)); - }); - - it("should throw an error if no tokens are available", () => { - // No GitHub environment variables and no GitHub Actions input - jest.mock("@actions/core", () => ({ - getInput: jest.fn().mockReturnValue(""), - })); - - expect(() => getRandomToken(false)).toThrowError("Could not find github token"); - }); -}); diff --git a/tests/renderAPIStatsCard.test.ts b/tests/renderStatsCard.test.ts similarity index 65% rename from tests/renderAPIStatsCard.test.ts rename to tests/renderStatsCard.test.ts index 9da407e..0bc225b 100644 --- a/tests/renderAPIStatsCard.test.ts +++ b/tests/renderStatsCard.test.ts @@ -1,16 +1,40 @@ import readmeStats from "../api/index"; import getData from "../src/getData"; -import cardStyle from "../src/card"; -import { themes } from "../themes/index"; -import { locales } from "../src/translations"; +import type { User } from "../src/fetcher/stats"; +import card from "../src/card"; +import themes from "../themes/index"; +import locales from "../src/translations"; jest.mock("../src/getData"); jest.mock("../src/card"); -jest.mock("express"); -function valueReturn(value: string): string { - return `${value}`; -} +jest.mock("express", () => ({ + ...jest.requireActual("express"), + __esModule: true, + default: { + Request: jest.fn(), + Response: jest.fn(), + }, +})); + +const exampleUserData: User = { + name: "Fajar", + login: "FajarKim", + avatarUrl: "base64-encoded-image", + repositories: { totalCount: 20 }, + followers: { totalCount: 20 }, + following: { totalCount: 10 }, + openedIssues: { totalCount: 150 }, + closedIssues: { totalCount: 100 }, + pullRequests: { totalCount: 530 }, + mergedPullRequests: { totalCount: 490 }, + discussionStarted: { totalCount: 4 }, + discussionAnswered: { totalCount: 10 }, + repositoriesContributedTo: { totalCount: 12 }, + totalCommitContributions: 1200, + restrictedContributionsCount: 130, + totalPullRequestReviewContributions: 340, +}; describe("Test GitHub Readme Profile API", () => { let mockRequest: any; @@ -28,18 +52,18 @@ describe("Test GitHub Readme Profile API", () => { status: jest.fn(), }; - // Reset mock implementation for each module jest.clearAllMocks(); }); it("should handle request and generate JSON response", async () => { mockRequest.query.username = "FajarKim"; mockRequest.query.format = "json"; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(mockResponse.json).toHaveBeenCalledWith(await getData(mockRequest.query.username)); + expect(mockResponse.json).toHaveBeenCalledWith(exampleUserData); expect(mockResponse.send).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Cache-Control", "s-maxage=3600, stale-while-revalidate"); }); @@ -47,11 +71,12 @@ describe("Test GitHub Readme Profile API", () => { it("should handle request and generate SVG response", async () => { mockRequest.query.username = "FajarKim"; mockRequest.query.format = "svg"; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(card).toHaveBeenCalledWith(exampleUserData, expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); @@ -60,11 +85,12 @@ describe("Test GitHub Readme Profile API", () => { it.each(Object.keys(themes))("should handle request theme '%s' and generate SVG response", async (theme) => { mockRequest.query.username = "FajarKim"; mockRequest.query.theme = theme; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(card).toHaveBeenCalledWith(exampleUserData, expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); @@ -73,11 +99,12 @@ describe("Test GitHub Readme Profile API", () => { it.each(Object.keys(locales))("should handle request locale '%s' and generate SVG response", async (locale) => { mockRequest.query.username = "FajarKim"; mockRequest.query.locale = locale; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(card).toHaveBeenCalledWith(exampleUserData, expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); @@ -86,11 +113,12 @@ describe("Test GitHub Readme Profile API", () => { it("should handle request hide stats and generate SVG response", async () => { mockRequest.query.username = "FajarKim"; mockRequest.query.hide = "repos,forks,prs_merged"; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(card).toHaveBeenCalledWith(exampleUserData, expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); @@ -99,21 +127,24 @@ describe("Test GitHub Readme Profile API", () => { it("should handle request show stats and generate SVG response", async () => { mockRequest.query.username = "FajarKim"; mockRequest.query.show = "reviews,issues_closed"; + (getData as jest.Mock).mockResolvedValueOnce(exampleUserData); await readmeStats(mockRequest, mockResponse); expect(getData).toHaveBeenCalledWith(mockRequest.query.username); - expect(cardStyle).toHaveBeenCalledWith(await getData(mockRequest.query.username), expect.any(Object)); + expect(card).toHaveBeenCalledWith(exampleUserData, expect.any(Object)); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Content-Type", "image/svg+xml"); }); - it("should handle invalid username and send error response", async () => { + it("should handle invalid missing username and send error response", async () => { + mockRequest.query.username = undefined; + await readmeStats(mockRequest, mockResponse); expect(getData).not.toHaveBeenCalledWith(); - expect(cardStyle).not.toHaveBeenCalledWith(); + expect(card).not.toHaveBeenCalledWith(); expect(mockResponse.send).toHaveBeenCalled(); expect(mockResponse.json).not.toHaveBeenCalled(); expect(mockResponse.setHeader).toHaveBeenCalledWith("Cache-Control", "s-maxage=3600, stale-while-revalidate"); diff --git a/themes/index.ts b/themes/index.ts index 8efa3da..b4dd6cf 100644 --- a/themes/index.ts +++ b/themes/index.ts @@ -1,5 +1,16 @@ -// Represents the available themes for GitHub stats cards -export type Themes = { +/** + * Type representing a theme configuration. + * + * @typedef {Object} Theme + * @property {string|undefined} titleColor - Color for the title text. + * @property {string|undefined} textColor - Color for the main text. + * @property {string|undefined} iconColor - Color for icons. + * @property {string|undefined} borderColor - Color for borders. + * @property {string|undefined} bgColor - Background color. + * @property {string|undefined} strokeColor - Color for strokes. + * @property {string|undefined} usernameColor - Color for the username. + */ +type Themes = { [key: string]: { title_color?: string; text_color?: string; @@ -11,8 +22,12 @@ export type Themes = { }; }; -// Object containing various predefined themes for GitHub stats cards -export const themes: Themes = { +/** + * Themes object stores theme collection for the card. + * + * @type {Themes} + */ +const themes: Themes = { // Solid themes default: { title_color: "2f80ed", @@ -535,4 +550,7 @@ export const themes: Themes = { icon_color: "EFFA4B", bg_color: "50,4A1133,0B1133", }, -} +}; + +export { Themes, themes }; +export default themes; diff --git a/withexpress.ts b/withexpress.ts index fbde7a8..7f409ec 100644 --- a/withexpress.ts +++ b/withexpress.ts @@ -5,7 +5,7 @@ import readmeStats from "./api/index"; dotenv.config(); const app = express(); -app.use("/api", readmeStats); +app.use("/", readmeStats); const port: number = Number(process.env.PORT) || 3000; From b40f9b35e89f2d0d0d46a1ab19f483b6511f8028 Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 6 Jan 2024 09:26:18 +0700 Subject: [PATCH 114/539] fix: bugs check valid gradient color (#225) --- src/common/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/utils.ts b/src/common/utils.ts index 48ae38a..61ea7e2 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -4,7 +4,7 @@ * @param {any} hexColor - The input value to check for valid hexadecimal color. * @returns {boolean} - True if the input is a valid hexadecimal color, false otherwise. */ -function isValidHexColor(hexColor: any): boolean { +function isValidHexColor(hexColor: string): boolean { return new RegExp( /^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4})$/ ).test(hexColor); @@ -16,8 +16,8 @@ function isValidHexColor(hexColor: any): boolean { * @param {string[]} hexColors - The array of hexadecimal colors to check for a valid gradient. * @returns {boolean} - True if the array represents a valid gradient, false otherwise. */ -function isValidGradient(hexColors: string[]): boolean { - const colors = [hexColors]; +function isValidGradient(hexColors: string): boolean { + const colors = hexColors.split(","); for (let i = 1; i < colors.length; i++) { if (!isValidHexColor(colors[i])) { return false; From d0ebb68b1efcae3df4ef281d3782b597485ac39c Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Sat, 6 Jan 2024 09:30:03 +0700 Subject: [PATCH 115/539] tests: added card and utils performance test (#226) --- tests/card.test.ts | 138 ++++++++++++++++++++++++++++++++++++++++++++ tests/utils.test.ts | 41 +++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 tests/card.test.ts create mode 100644 tests/utils.test.ts diff --git a/tests/card.test.ts b/tests/card.test.ts new file mode 100644 index 0000000..9b09cab --- /dev/null +++ b/tests/card.test.ts @@ -0,0 +1,138 @@ +import card from "../src/card"; +import locales from "../src/translations"; + +describe("Test card function", () => { + const mockData = { + username: "FajarKim", + name: "Rangga Fajar Oktariansyah", + picture: "avatar", + public_repos: 20, + followers: 20, + following: 10, + total_stars: 140, + total_forks: 90, + total_issues: 150, + total_closed_issues: 100, + total_prs: 530, + total_prs_merged: 490, + total_commits: 1330, + total_review: 340, + total_discussion_answered: 4, + total_discussion_started: 10, + total_contributed_to: 12, + }; + + const mockUiConfig = { + Locale: "en", + Format: "svg", + titleColor: "2f80ed", + textColor: "434d58", + iconColor: "4c71f2", + borderColor: "e4e2e2", + bgColor: "ffffff", + strokeColor: "e4e2e2", + usernameColor: "2f80ed", + borderRadius: 5, + borderWidth: 1, + hideBorder: false, + hideStroke: false, + disabledAnimations: false, + showItems: "reviews,issues_closed", + hiddenItems: "forks,commits", + }; + + it("should generate SVG markup with default values", () => { + const svgMarkup = card(mockData, mockUiConfig); + + expect(svgMarkup).toContain("