diff --git a/.eslintrc.json b/.eslintrc.json index d8c31c735a28d..01db70ff0d989 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -98,8 +98,8 @@ "terms": [ "TODO", "FIXME" ], "location": "start" }], - // "no-with": "warn", - // "radix": "warn", + "no-with": "warn", + "radix": "warn", // "vars-on-top": "error", // Enforces the style of wrapped functions @@ -113,7 +113,7 @@ // "init-declarations": [ "error", "always" ], // "no-catch-shadow": "warn", - // "no-delete-var": "error", + "no-delete-var": "error", // "no-label-var": "error", // "no-shadow-restricted-names": "error", // "no-shadow": "warn", @@ -150,12 +150,12 @@ // "arrow-body-style": [ "error", "always" ], // "arrow-parens": [ "error", "always" ], // "arrow-spacing": [ "error", { "before": true, "after": true }], - // "constructor-super": "error", + "constructor-super": "error", // "generator-star-spacing": [ "error", "before" ], // "no-arrow-condition": "error", - // "no-class-assign": "error", - // "no-const-assign": "error", - // "no-dupe-class-members": "error", + "no-class-assign": "error", + "no-const-assign": "error", + "no-dupe-class-members": "error", "no-this-before-super": "error", // "no-var": "warn", "object-shorthand": [ "warn" ], @@ -193,9 +193,9 @@ // "no-continue": "off", // "no-inline-comments": "off", // "no-lonely-if": "warn", - // "no-mixed-spaces-and-tabs": "warn", - // "no-multiple-empty-lines": "warn", - // "no-negated-condition": "off", + "no-mixed-spaces-and-tabs": "warn", + "no-multiple-empty-lines": "warn", + "no-negated-condition": "warn", // "no-nested-ternary": "warn", // "no-new-object": "warn", // "no-plusplus": "off", @@ -217,14 +217,13 @@ "MethodDefinition": true, "ClassDeclaration": false } - }] + }], // "semi-spacing": [ "warn", { "before": false, "after": true }], // "semi": [ "error", "always" ], // "sort-vars": "off", - // "space-after-keywords": [ "warn", "always" ], + "keyword-spacing": ["error", { "before": true, "after": true }] // "space-before-blocks": [ "warn", "always" ], // "space-before-function-paren": [ "warn", "never" ], - // "space-before-keywords": [ "warn", "always" ], // "space-in-parens": [ "warn", "never" ], // "space-infix-ops": [ "warn", { "int32Hint": true } ], // "space-return-throw-case": "error", diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1691b12b5769f..ec984a5500178 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,6 +6,11 @@ updates: schedule: interval: weekly open-pull-requests-limit: 10 + commit-message: + prefix: "build(deps)" + prefix-development: "build(deps-dev)" + reviewers: + - "qwerty541" # Maintain dependencies for GitHub Actions - package-ecosystem: github-actions @@ -13,3 +18,8 @@ updates: schedule: interval: weekly open-pull-requests-limit: 10 + commit-message: + prefix: "build(deps)" + prefix-development: "build(deps-dev)" + reviewers: + - "qwerty541" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000000000..8d053d31d7e49 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,41 @@ +name: "Static code analysis workflow (CodeQL)" + +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: write + statuses: read + +jobs: + CodeQL-Build: + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5 + with: + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5 diff --git a/.github/workflows/deploy-prep.yml b/.github/workflows/deploy-prep.yml index c50c04e89a0dc..03853f9737174 100644 --- a/.github/workflows/deploy-prep.yml +++ b/.github/workflows/deploy-prep.yml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'anuraghazra/github-readme-stats' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Deployment Prep run: python ./.github/workflows/deploy-prep.py - uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0 diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index c537f37f90402..9f6febfd071b8 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -17,10 +17,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yaml index e1a325ba3e853..29b1dd561dc62 100644 --- a/.github/workflows/empty-issues-closer.yaml +++ b/.github/workflows/empty-issues-closer.yaml @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest steps: # NOTE: Retrieve issue templates. - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Run empty issues closer action - uses: rickstaa/empty-issues-closer-action@e9e79c66b85961ebc9dc11493b65b6e4bb355ed0 # v1.1.28 + uses: rickstaa/empty-issues-closer-action@37f2cd30a4fb97504bbb570dc73264cfa522dee3 # v1.1.40 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index b94208991968b..77ae534858838 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -29,10 +29,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/ossf-analysis.yml b/.github/workflows/ossf-analysis.yml index 34ce9c65b9630..7b1b63a907928 100644 --- a/.github/workflows/ossf-analysis.yml +++ b/.github/workflows/ossf-analysis.yml @@ -21,12 +21,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0 + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 with: results_file: results.sarif results_format: sarif diff --git a/.github/workflows/preview-theme.yml b/.github/workflows/preview-theme.yml index 87932c7382e3c..a9770f929a500 100644 --- a/.github/workflows/preview-theme.yml +++ b/.github/workflows/preview-theme.yml @@ -30,15 +30,15 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm - - uses: bahmutov/npm-install@c46e3830503dcb831cf4aee3f26b4e6bce8cc9d2 # v1.8.35 + - uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36 with: useLockFile: false diff --git a/.github/workflows/prs-cache-clean.yml b/.github/workflows/prs-cache-clean.yml index f894fcf2cfed2..faa3741672ef6 100644 --- a/.github/workflows/prs-cache-clean.yml +++ b/.github/workflows/prs-cache-clean.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cleanup run: | diff --git a/.github/workflows/stale-theme-pr-closer.yaml b/.github/workflows/stale-theme-pr-closer.yaml index dc199ac00a035..1387cdb92ec4e 100644 --- a/.github/workflows/stale-theme-pr-closer.yaml +++ b/.github/workflows/stale-theme-pr-closer.yaml @@ -36,15 +36,15 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm - - uses: bahmutov/npm-install@c46e3830503dcb831cf4aee3f26b4e6bce8cc9d2 # v1.8.35 + - uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36 with: useLockFile: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index caa80012ad130..1f757a5edb204 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,10 +18,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm @@ -35,6 +35,10 @@ jobs: run: | npm run lint + - name: Run bench tests + run: | + npm run bench + - name: Run Prettier run: | npm run format:check diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml index 9e703193a7644..ee0dd56ccfcf9 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@a2f94d3653b3c2490e0d997c8ec4a5e7beba4c7d # v1.3.54 + uses: rickstaa/top-issues-action@da2fb7f2bd61828135e0971f8d33efb1a079e9a9 # v1.3.65 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: @@ -47,7 +47,3 @@ jobs: top_bugs: true top_features: true top_pull_requests: true - custom_pull_requests_label: themes - top_custom_pull_requests_label: ":star: top themes" - top_custom_pull_requests_label_description: Top themes - top_custom_pull_requests_label_colour: "#A23599" diff --git a/.github/workflows/update-langs.yaml b/.github/workflows/update-langs.yaml index e1c6db6a0e4b0..d1b12d12a11ce 100644 --- a/.github/workflows/update-langs.yaml +++ b/.github/workflows/update-langs.yaml @@ -15,7 +15,7 @@ on: permissions: actions: read checks: read - contents: read + contents: write deployments: read issues: read discussions: read @@ -36,10 +36,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.gitignore b/.gitignore index 80db7787ddad5..b1d9a017c5b80 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules *.lock .idea/ coverage +benchmarks vercel_token # IDE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9693c4b62a11b..f607da7b512c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,33 +34,28 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_ 2. Fork the repository and clone the code to your local machine. 3. Run `npm install` in the repository root. 4. Run the command `vercel` in the root and follow the steps there. -5. Open `vercel.json` and set the maxDuration to 10. -6. Create a `.env` file in the root of the directory. -7. In the .env file add a new variable named `PAT_1` with your [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). -8. Run the command `vercel dev` to start a development server at . -9. The cards will then be available from this local endpoint (i.e. `https://localhost:3000/api?username=anuraghazra`). +5. Run the command `vercel dev` to start a development server at . +6. The cards will then be available from this local endpoint (i.e. `http://localhost:3000/api?username=anuraghazra`). > [!NOTE]\ > You can debug the package code in [Vscode](https://code.visualstudio.com/) by using the [Node.js: Attach to process](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_setting-up-an-attach-configuration) debug option. You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information, see https://github.com/jest-community/vscode-jest/issues/912. ## Themes Contribution -GitHub Readme Stats supports custom theming, and you can also contribute new themes! +We're currently paused addition of new themes to decrease maintenance efforts. All pull requests related to new themes will be closed. > [!NOTE]\ -> If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead. +> If you are considering contributing your theme just because you are using it personally, then instead of adding it to our theme collection, you can use card [customization options](./readme.md#customization). -> [!NOTE]\ -> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up :+1: emojis (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). We expect to see at least 10-15 thumbs up before making a decision to merge your pull request into the master branch. Remember that you can also support themes of other contributors that you liked to speed up their merge. +## Translations Contribution -> [!NOTE]\ -> Before submitting pull request, please make sure that your theme pass WCAG 2.0 level AA contrast ration test. You can use [this tool](https://webaim.org/resources/contrastchecker/) to check it. +GitHub Readme Stats supports multiple languages, if we are missing your language, you can contribute it! You can check the currently supported languages [here](./readme.md#available-locales). -To contribute your theme you need to edit the [themes/index.js](./themes/index.js) file and add it at the end of the file. +To contribute your language you need to edit the [src/translations.js](./src/translations.js) file and add new property to each object where the key is the language code in [ISO 639-1 standard](https://www.andiamo.co.uk/resources/iso-language-codes/) and the value is the translated string. ## Any contributions you make will be under the MIT Software License -In short, when you submit changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. +In short, when you submit changes, your submissions are understood to be under the same [MIT License](https://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report issues/bugs using GitHub's [issues](https://github.com/anuraghazra/github-readme-stats/issues) @@ -113,7 +108,3 @@ People _love_ thorough bug reports. I'm not even kidding. - A quick idea summary - What & why do you want to add the specific feature - Additional context like images, links to resources to implement the feature, etc. - -## License - -By contributing, you agree that your contributions will be licensed under its [MIT License](./LICENSE). diff --git a/api/gist.js b/api/gist.js index 1dbc5aeeddd53..8821c7b094b9e 100644 --- a/api/gist.js +++ b/api/gist.js @@ -27,7 +27,15 @@ export default async (req, res) => { res.setHeader("Content-Type", "image/svg+xml"); if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { @@ -83,6 +91,14 @@ export default async (req, res) => { CONSTANTS.ERROR_CACHE_SECONDS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ); // Use lower cache period for errors. - return res.send(renderError(err.message, err.secondaryMessage)); + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/index.js b/api/index.js index 25e4151fab1c0..2029367ca3eb9 100644 --- a/api/index.js +++ b/api/index.js @@ -42,18 +42,39 @@ export default async (req, res) => { res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { + const showStats = parseArray(show); const stats = await fetchStats( username, parseBoolean(include_all_commits), parseArray(exclude_repo), + showStats.includes("prs_merged") || + showStats.includes("prs_merged_percentage"), + showStats.includes("discussions_started"), + showStats.includes("discussions_answered"), ); let cacheSeconds = clampValue( @@ -96,7 +117,7 @@ export default async (req, res) => { locale: locale ? locale.toLowerCase() : null, disable_animations: parseBoolean(disable_animations), rank_icon, - show: parseArray(show), + show: showStats, }), ); } catch (err) { @@ -106,6 +127,14 @@ export default async (req, res) => { CONSTANTS.ERROR_CACHE_SECONDS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ); // Use lower cache period for errors. - return res.send(renderError(err.message, err.secondaryMessage)); + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/pin.js b/api/pin.js index 21ecf966b3ff4..c67df29abffe3 100644 --- a/api/pin.js +++ b/api/pin.js @@ -29,11 +29,27 @@ export default async (req, res) => { res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { @@ -89,6 +105,14 @@ export default async (req, res) => { CONSTANTS.ERROR_CACHE_SECONDS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ); // Use lower cache period for errors. - return res.send(renderError(err.message, err.secondaryMessage)); + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/top-langs.js b/api/top-langs.js index d9bf6b09da01a..382ee4205a87e 100644 --- a/api/top-langs.js +++ b/api/top-langs.js @@ -37,7 +37,15 @@ export default async (req, res) => { res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { @@ -105,6 +113,14 @@ export default async (req, res) => { CONSTANTS.ERROR_CACHE_SECONDS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ); // Use lower cache period for errors. - return res.send(renderError(err.message, err.secondaryMessage)); + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/wakatime.js b/api/wakatime.js index b2582caa5bd31..732b05a5a9468 100644 --- a/api/wakatime.js +++ b/api/wakatime.js @@ -35,7 +35,15 @@ export default async (req, res) => { res.setHeader("Content-Type", "image/svg+xml"); if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { @@ -84,6 +92,14 @@ export default async (req, res) => { CONSTANTS.ERROR_CACHE_SECONDS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ); // Use lower cache period for errors. - return res.send(renderError(err.message, err.secondaryMessage)); + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/docs/readme_cn.md b/docs/readme_cn.md index f33f98da1f29e..0773656fc7e7c 100644 --- a/docs/readme_cn.md +++ b/docs/readme_cn.md @@ -24,12 +24,6 @@

- - - - - -

diff --git a/docs/readme_de.md b/docs/readme_de.md index b1c43f0111f70..edc5f8b24c695 100644 --- a/docs/readme_de.md +++ b/docs/readme_de.md @@ -25,12 +25,6 @@

- - - - - -

@@ -81,7 +75,7 @@ - [Verbirg einzelne Sprachen](#verbirg-einzelne-sprachen) - [Kompaktes Sprachen-Karte Layout](#kompaktes-sprachen-karte-layout) - [Beispiel](#beispiel) -- [Wakatime Wochen-Statistik](#wakatime-wochen-statistik) +- [WakaTime Wochen-Statistik](#wakatime-wochen-statistik) - [Beispiel](#beispiel-1) - [Alle Beispiele](#alle-beispiele) - [Kleiner Tipp (Ausrichten der Repo-Karte)](#kleiner-tipp-ausrichten-der-repo-karte) @@ -195,7 +189,7 @@ Du kannst mehrere, mit Kommas separierte, Werte in der bg_color Option angeben, - `layout` - Wechselt zwischen zwei verschiedenen Layouts: `default` & `compact` - `langs_count` - Begrenzt die Anzahl der angezeigten Sprachen auf der Karte - `api_domain` - Legt eine benutzerdefinierte API Domain fest, z.B. für [Hakatime](https://github.com/mujx/hakatime) oder [Wakapi](https://github.com/muety/wakapi) -- `range` – Fragt eine andere Zeitspanne an, als jene, welche standardmäßig in Wakatime hinterlegt ist. Zum Beispiel `last_7_days`. Siehe [WakaTime API Dokumentation](https://wakatime.com/developers#stats). +- `range` – Fragt eine andere Zeitspanne an, als jene, welche standardmäßig in WakaTime hinterlegt ist. Zum Beispiel `last_7_days`. Siehe [WakaTime API Dokumentation](https://wakatime.com/developers#stats). --- @@ -266,23 +260,23 @@ Du kannst die `&layout=compact` Option nutzen, um das Kartendesign zu ändern. [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime Wochen-Statistik +# WakaTime Wochen-Statistik -Ändere `?username=` in den eigenen [Wakatime](https://wakatime.com)-Benutzernamen. +Ändere `?username=` in den eigenen [WakaTime](https://wakatime.com)-Benutzernamen. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Beispiel -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Kompaktes Layout -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_es.md b/docs/readme_es.md index b49f5f72ef323..89f647f7e08c7 100644 --- a/docs/readme_es.md +++ b/docs/readme_es.md @@ -25,12 +25,6 @@

- - - - - -

@@ -84,7 +78,7 @@ - [Mostrar más lenguajes](#mostrar-más-lenguajes) - [Diseño Compacto de Tarjeta de Lenguaje](#diseño-compacto-de-tarjeta-de-lenguaje) - [Ejemplo](#ejemplo-1) -- [Estadísticas de la semana de Wakatime](#estadísticas-de-la-semana-de-wakatime) +- [Estadísticas de la semana de WakaTime](#estadísticas-de-la-semana-de-wakatime) - [Ejemplo](#ejemplo-2) - [Todos los ejemplos](#todos-los-ejemplos) - [Consejo rápido (para alinear las tarjetas de repositorio)](#consejo-rápido-para-alinear-las-tarjetas-de-repositorio) @@ -206,7 +200,7 @@ Puedes pasar mútliples valores separados por coma en la opción `bg_color` para > Los nombres de los lenguajes deben estar codificados para URLs, como se especifica en [Código porciento](https://es.wikipedia.org/wiki/C%C3%B3digo_porciento) > (es decir: `c++` debería convertirse en `c%2B%2B`,`jupyter notebook` debería convertirse en `jupyter%20notebook`, etc.) -#### Opciones exclusivas de la Tarjeta de Wakatime: +#### Opciones exclusivas de la Tarjeta de WakaTime: - `hide_title` - _(booleano)_ - `line_height` - Establece el alto de línea entre texto _(número)_ @@ -298,23 +292,23 @@ Puedes usar la opción `& layout = compact` para cambiar el diseño de la tarjet [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Estadísticas de la semana de Wakatime +# Estadísticas de la semana de WakaTime -cambia el valor del parámetro `?username=` a tu username en [Wakatime](https://wakatime.com). +cambia el valor del parámetro `?username=` a tu username en [WakaTime](https://wakatime.com). ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Ejemplo -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Diseño compacto -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- @@ -362,9 +356,9 @@ Escoja cualquiera de los [temas por defecto](#themes) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Tarjeta de Wakatime +- Tarjeta de WakaTime -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_fr.md b/docs/readme_fr.md index 4d5866365cd40..0f035f96e76d7 100644 --- a/docs/readme_fr.md +++ b/docs/readme_fr.md @@ -24,12 +24,6 @@

- - - - - -

diff --git a/docs/readme_it.md b/docs/readme_it.md index aed9ced21a67c..8f16f4e6bd080 100644 --- a/docs/readme_it.md +++ b/docs/readme_it.md @@ -24,12 +24,6 @@

- - - - - -

diff --git a/docs/readme_ja.md b/docs/readme_ja.md index 24d66cd9be5d9..d338785f909d8 100644 --- a/docs/readme_ja.md +++ b/docs/readme_ja.md @@ -24,12 +24,6 @@

- - - - - -

diff --git a/docs/readme_kr.md b/docs/readme_kr.md index d3b9f489bdaa0..178d0342506f2 100644 --- a/docs/readme_kr.md +++ b/docs/readme_kr.md @@ -24,12 +24,6 @@

- - - - - -

@@ -83,7 +77,7 @@ - [표시할 언어 수 지정하기](#표시할-언어-수-지정하기) - [컴택트한 카드 레이아웃 설정하기](#컴택트한-카드-레이아웃-설정하기) - [미리보기](#미리보기-1) -- [Wakatime 주간 통계](#wakatime-주간-통계) +- [WakaTime 주간 통계](#wakatime-주간-통계) - [미리보기](#미리보기-2) - [전체 미리보기](#전체-미리보기) - [꿀팁 (저장소 핀 정렬하기)](#꿀팁-저장소-핀-정렬하기) @@ -222,7 +216,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr > ( 예를 들면, `c++` 는 `c%2B%2B`, `jupyter notebook` 는 `jupyter%20notebook`, 등등. ) > [urlencoder.org](https://www.urlencoder.org/) < 서비스를 이용하면 자동으로 생성할 수 있습니다. -#### Wakatime 카드의 표시 제한 옵션: +#### WakaTime 카드의 표시 제한 옵션: - `hide_title` - 타이틀 제외 _(boolean)_ - `line_height` - 텍스트 간 줄 높이 설정(자간) _(number)_ @@ -314,12 +308,12 @@ _참고: [![언어 사용량 통계](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime 주간 통계 +# WakaTime 주간 통계 -`?username=` 속성의 값을 [Wakatime](https://wakatime.com) 계정의 사용자 명(닉네임)으로 바꿔주세요. +`?username=` 속성의 값을 [WakaTime](https://wakatime.com) 계정의 사용자 명(닉네임)으로 바꿔주세요. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### 미리보기 @@ -378,9 +372,9 @@ _참고: [![언어 사용량 통계](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime 카드 +- WakaTime 카드 -[![Harlok 님의 Wakatime 카드](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok 님의 WakaTime 카드](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_nl.md b/docs/readme_nl.md index 2279b6609b000..7fbec69971517 100644 --- a/docs/readme_nl.md +++ b/docs/readme_nl.md @@ -24,12 +24,6 @@

- - - - - -

@@ -83,7 +77,7 @@ - [Laat meer programmeertalen zien](#laat-meer-programmeertalen-zien) - [Compacte Talen Kaart opmaak](#compacte-talen-kaart-opmaak) - [Demo](#demo-1) -- [Wekelijkse Wakatime Statistieken](#wekelijkse-wakatime-statistieken) +- [Wekelijkse WakaTime Statistieken](#wekelijkse-wakatime-statistieken) - [Demo](#demo-2) - [Alle demos](#alle-demos) - [Kleine tip (Verstel de repo kaart z'n positie)](#kleine-tip-verstel-de-repo-kaart-zn-positie) @@ -208,7 +202,7 @@ Je kan meerdere komma verdeelde waarden in de bg_color optie geven om een kleure > (Oftewel: `c++` moet `c%2B%2B` worden, `jupyter notebook` moet `jupyter%20notebook` worden, enzovoort...) > Zie [urlencoder.org](https://www.urlencoder.org/) om dit automatisch te doen. -#### Exclusieve opties voor Wakatime Kaart: +#### Exclusieve opties voor WakaTime Kaart: - `hide_title` - _(boolean)_ - `line_height` - Verandert de lijn hoogte tussen tekst _(nummer)_ @@ -299,19 +293,19 @@ Je kan de `&layout=compact` optie gebruiken om het kaart ontwerp aan te passen. [![Top programmeertalen](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wekelijkse Wakatime Statistieken +# Wekelijkse WakaTime Statistieken -Verander de `?username=` waarde naar je [Wakatime](https://wakatime.com) gebruikersnaam. +Verander de `?username=` waarde naar je [WakaTime](https://wakatime.com) gebruikersnaam. ```md -[![Harlok's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demo -[![Harlok's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- @@ -359,9 +353,9 @@ Kies uit de [standaard thema\'s](#themes) [![Top Programmeertalen](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime kaart +- WakaTime kaart -[![Harlok's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_np.md b/docs/readme_np.md index 4537e6e9768b4..f5909ae718219 100644 --- a/docs/readme_np.md +++ b/docs/readme_np.md @@ -24,12 +24,6 @@

- - - - - -

@@ -297,17 +291,17 @@ You can use the `&langs_count=` option to increase or decrease the number of lan # वाका समय वीक स्तट्स -Change the `?username=` value to your [Wakatime](https://wakatime.com) username. +Change the `?username=` value to your [WakaTime](https://wakatime.com) username. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### डेमो -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- @@ -357,7 +351,7 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username. - वक समय कार्ड -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_pt-BR.md b/docs/readme_pt-BR.md index ea123c609735f..35c334131ee93 100644 --- a/docs/readme_pt-BR.md +++ b/docs/readme_pt-BR.md @@ -24,12 +24,6 @@

- - - - - -

@@ -81,7 +75,7 @@ - [Ocultar linguagens individualmente](#ocultar-linguagens-individualmente) - [Layout de cartão de linguagens compacto](#layout-de-cartão-de-linguagens-compacto) - [Demonstração](#demonstração-1) -- [Estatística semanal Wakatime](#estatística-semanal-wakatime) +- [Estatística semanal WakaTime](#estatística-semanal-wakatime) - [Demonstração](#demonstração-2) - [Todas as demonstrações](#todas-as-demonstrações) - [Dica (Alinhandos os cartões de repositório)](#dica-alinhandos-os-cartões-de-repositório) @@ -256,19 +250,19 @@ Utilize a opção `&layout=compact` para mudar o layout do cartão. [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Estatística semanal Wakatime +# Estatística semanal WakaTime -Altere o valor de `?username=` para o seu username do Wakatime. +Altere o valor de `?username=` para o seu username do WakaTime. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demonstração -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_tr.md b/docs/readme_tr.md index bed1ca4b7380b..f654cd95cf252 100644 --- a/docs/readme_tr.md +++ b/docs/readme_tr.md @@ -24,12 +24,6 @@

- - - - - -

@@ -83,7 +77,7 @@ - [Daha Fazla Dil Gösterin](#daha-fazla-dil-gösterin) - [Kompakt Dil Kartı Düzeni](#kompakt-dil-kartı-düzeni) - [Demo](#demo-1) -- [Wakatime Haftalık İstatistikler](#wakatime-haftalık-i̇statistikler) +- [WakaTime Haftalık İstatistikler](#wakatime-haftalık-i̇statistikler) - [Demo](#demo-2) - [Tüm Demolar](#tüm-demolar) - [Hızlı İpucu (Repo Kartları Hizlayın)](#hızlı-i̇pucu-repo-kartları-hizlayın) @@ -208,7 +202,7 @@ bg_color içerisinde birden fazla rengi gradient olarak göstermek için virgül > (ör: `c++` yerine `c%2B%2B`, `jupyter notebook` yerine `jupyter%20notebook`, vb.) > [urlencoder.org](https://www.urlencoder.org/) adresini kullanarak otomatik olarak değerleri bu şekle çevirebilirsiniz. -#### Wakatime Kart Exclusive Özellikler: +#### WakaTime Kart Exclusive Özellikler: - `hide_title` - _(boolean)_ - `line_height` - Satır aralığı yüksekliği _(number)_ @@ -298,23 +292,23 @@ Endpoint: `api/top-langs?username=mustafacagri` [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=mustafacagri&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime Haftalık İstatistikler +# WakaTime Haftalık İstatistikler -`?username=` değerini [Wakatime](https://wakatime.com)'daki kullanıcı adınızla değiştirin. +`?username=` değerini [WakaTime](https://wakatime.com)'daki kullanıcı adınızla değiştirin. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demo -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Kompakt Düzen -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- @@ -362,9 +356,9 @@ Endpoint: `api/top-langs?username=mustafacagri` [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime kart +- WakaTime kart -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/express.js b/express.js index 99cc42db7fd34..ddc69ba7cba8e 100644 --- a/express.js +++ b/express.js @@ -1,12 +1,11 @@ +import "dotenv/config"; import statsCard from "./api/index.js"; import repoCard from "./api/pin.js"; import langCard from "./api/top-langs.js"; import wakatimeCard from "./api/wakatime.js"; import gistCard from "./api/gist.js"; import express from "express"; -import dotenv from "dotenv"; -dotenv.config(); const app = express(); app.listen(process.env.port || 9000); diff --git a/jest.bench.config.js b/jest.bench.config.js new file mode 100644 index 0000000000000..8a39b14d30743 --- /dev/null +++ b/jest.bench.config.js @@ -0,0 +1,16 @@ +export default { + // Jest-bench need its own test environment to function + testEnvironment: "jest-bench/environment", + testEnvironmentOptions: { + // still Jest-bench environment will run your environment if you specify it here + testEnvironment: "jest-environment-node", + testEnvironmentOptions: { + // specify any option for your environment + }, + }, + // always include "default" reporter along with Jest-bench reporter + // for error reporting + reporters: ["default", "jest-bench/reporter"], + // will pick up "*.bench.js" file. + testRegex: "(\\.bench)\\.(ts|tsx|js)$", +}; diff --git a/package-lock.json b/package-lock.json index f18280eb387da..05d2de969e7e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "axios": "^1.5.1", + "axios": "^1.6.0", "dotenv": "^16.3.1", "emoji-name-map": "^1.2.8", "github-username-regex": "^1.0.0", @@ -18,20 +18,21 @@ }, "devDependencies": { "@actions/core": "^1.10.1", - "@actions/github": "^5.1.1", + "@actions/github": "^6.0.0", "@testing-library/dom": "^9.3.3", - "@testing-library/jest-dom": "^6.1.3", + "@testing-library/jest-dom": "^6.1.4", "@uppercod/css-to-object": "^1.1.1", "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", - "eslint": "^8.51.0", + "eslint": "^8.53.0", "eslint-config-prettier": "^9.0.0", "hjson": "^3.2.2", "husky": "^8.0.3", "jest": "^29.7.0", + "jest-bench": "^29.4.1", "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^14.0.1", + "lint-staged": "^15.0.2", "lodash.snakecase": "^4.1.1", "parse-diff": "^0.11.1", "prettier": "^3.0.3" @@ -60,24 +61,25 @@ } }, "node_modules/@actions/github": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", - "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", + "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", "dev": true, "dependencies": { - "@actions/http-client": "^2.0.1", - "@octokit/core": "^3.6.0", - "@octokit/plugin-paginate-rest": "^2.17.0", - "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + "@actions/http-client": "^2.2.0", + "@octokit/core": "^5.0.1", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0" } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "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==", "dev": true, "dependencies": { - "tunnel": "^0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "node_modules/@adobe/css-tools": { @@ -100,17 +102,89 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "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.22.9", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", @@ -157,12 +231,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -191,22 +265,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -298,9 +372,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -330,13 +404,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -415,9 +489,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -616,33 +690,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@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.22.7", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -651,13 +725,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -695,9 +769,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -718,9 +792,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -745,21 +819,30 @@ } }, "node_modules/@eslint/js": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", - "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -781,9 +864,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -1282,114 +1365,133 @@ } }, "node_modules/@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3" + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz", + "integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==", "dev": true, "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz", + "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", + "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", "dev": true, "dependencies": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", + "@octokit/request": "^8.0.1", + "@octokit/types": "^12.0.0", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", + "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz", + "integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==", "dev": true, "dependencies": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^12.0.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=2" + "@octokit/core": ">=5" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.0.1.tgz", + "integrity": "sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==", "dev": true, "dependencies": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" + "@octokit/types": "^12.0.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=3" + "@octokit/core": ">=5" } }, "node_modules/@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", + "integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", "dev": true, "dependencies": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", + "@octokit/endpoint": "^9.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", + "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", + "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/openapi-types": "^19.0.0" } }, "node_modules/@sinclair/typebox": { @@ -1436,12 +1538,12 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.3.tgz", - "integrity": "sha512-YzpjRHoCBWPzpPNtg6gnhasqtE/5O4qz8WCwDEaxtfnPO6gkaLrnuXusrGSPyhIGPezr1HM7ZH0CFaUTY9PJEQ==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.3.0", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", @@ -1622,6 +1724,12 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@uppercod/css-to-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@uppercod/css-to-object/-/css-to-object-1.1.1.tgz", @@ -1800,9 +1908,9 @@ } }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1920,11 +2028,21 @@ "dev": true }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "node_modules/benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2244,9 +2362,9 @@ } }, "node_modules/commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "dev": true, "engines": { "node": ">=16" @@ -2640,18 +2758,19 @@ } }, "node_modules/eslint": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", - "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.51.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4006,6 +4125,23 @@ } } }, + "node_modules/jest-bench": { + "version": "29.4.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.4.1.tgz", + "integrity": "sha512-CbhGPgHX+b4AQKnxz/iziVHpgLG+eoGKIvIkOH+VmuOLxme7klbgvOpNB0Ab+XNq/u/AmOlKK5cd1dGuaN4iEA==", + "dev": true, + "dependencies": { + "@jest/globals": "^29.4.1", + "@jest/reporters": "^29.4.1", + "benchmark": "^2.1.4", + "chalk": "^4.1.0", + "lodash": "^4.17.20", + "ndjson": "^2.0.0" + }, + "peerDependencies": { + "jest": "^29.4.1" + } + }, "node_modules/jest-changed-files": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", @@ -4976,6 +5112,12 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -5035,27 +5177,27 @@ "dev": true }, "node_modules/lint-staged": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", - "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz", + "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==", "dev": true, "dependencies": { "chalk": "5.3.0", - "commander": "11.0.0", + "commander": "11.1.0", "debug": "4.3.4", - "execa": "7.2.0", + "execa": "8.0.1", "lilconfig": "2.1.0", - "listr2": "6.6.1", + "listr2": "7.0.2", "micromatch": "4.0.5", "pidtree": "0.6.0", "string-argv": "0.3.2", - "yaml": "2.3.1" + "yaml": "2.3.3" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": ">=18.12.0" }, "funding": { "url": "https://opencollective.com/lint-staged" @@ -5074,35 +5216,47 @@ } }, "node_modules/lint-staged/node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/lint-staged/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lint-staged/node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=14.18.0" + "node": ">=16.17.0" } }, "node_modules/lint-staged/node_modules/is-stream": { @@ -5171,6 +5325,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lint-staged/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -5184,9 +5350,9 @@ } }, "node_modules/listr2": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-6.6.1.tgz", - "integrity": "sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.2.tgz", + "integrity": "sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", @@ -5198,14 +5364,6 @@ }, "engines": { "node": ">=16.0.0" - }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" - }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } } }, "node_modules/listr2/node_modules/ansi-regex": { @@ -5593,6 +5751,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5605,46 +5772,23 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", "dev": true, "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" }, - "peerDependencies": { - "encoding": "^0.1.0" + "bin": { + "ndjson": "cli.js" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "engines": { + "node": ">=10" } }, "node_modules/node-int64": { @@ -5962,6 +6106,12 @@ "node": ">=8" } }, + "node_modules/platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "dev": true + }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -6093,6 +6243,20 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -6261,6 +6425,26 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6403,6 +6587,15 @@ "source-map": "^0.6.0" } }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -6433,6 +6626,15 @@ "node": ">= 0.4" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-argv": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", @@ -6573,6 +6775,15 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "dependencies": { + "readable-stream": "3" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -6669,6 +6880,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/undici": { + "version": "5.26.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", + "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "dev": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -6738,6 +6961,12 @@ "requires-port": "^1.0.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -6992,9 +7221,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", + "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", "dev": true, "engines": { "node": ">= 14" @@ -7058,24 +7287,25 @@ } }, "@actions/github": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", - "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", + "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", "dev": true, "requires": { - "@actions/http-client": "^2.0.1", - "@octokit/core": "^3.6.0", - "@octokit/plugin-paginate-rest": "^2.17.0", - "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + "@actions/http-client": "^2.2.0", + "@octokit/core": "^5.0.1", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0" } }, "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "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==", "dev": true, "requires": { - "tunnel": "^0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "@adobe/css-tools": { @@ -7095,12 +7325,71 @@ } }, "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "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 + }, + "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, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/compat-data": { @@ -7141,12 +7430,12 @@ } }, "@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -7166,19 +7455,19 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -7243,9 +7532,9 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -7266,13 +7555,13 @@ } }, "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -7335,9 +7624,9 @@ } }, "@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -7476,42 +7765,42 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@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.22.7", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -7537,9 +7826,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -7554,9 +7843,9 @@ }, "dependencies": { "globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7571,18 +7860,24 @@ } }, "@eslint/js": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", - "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "dev": true + }, + "@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" } @@ -7594,9 +7889,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -7997,108 +8292,103 @@ } }, "@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", - "dev": true, - "requires": { - "@octokit/types": "^6.0.3" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "dev": true }, "@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz", + "integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==", "dev": true, "requires": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz", + "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==", "dev": true, "requires": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", + "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", "dev": true, "requires": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", + "@octokit/request": "^8.0.1", + "@octokit/types": "^12.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", + "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==", "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz", + "integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==", "dev": true, "requires": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^12.0.0" } }, "@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.0.1.tgz", + "integrity": "sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==", "dev": true, "requires": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" + "@octokit/types": "^12.0.0" } }, "@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", + "integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", "dev": true, "requires": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", + "@octokit/endpoint": "^9.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" } }, "@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", + "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "dev": true, "requires": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", + "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", "dev": true, "requires": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/openapi-types": "^19.0.0" } }, "@sinclair/typebox": { @@ -8142,12 +8432,12 @@ } }, "@testing-library/jest-dom": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.3.tgz", - "integrity": "sha512-YzpjRHoCBWPzpPNtg6gnhasqtE/5O4qz8WCwDEaxtfnPO6gkaLrnuXusrGSPyhIGPezr1HM7ZH0CFaUTY9PJEQ==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", + "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", "dev": true, "requires": { - "@adobe/css-tools": "^4.3.0", + "@adobe/css-tools": "^4.3.1", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", @@ -8299,6 +8589,12 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "@uppercod/css-to-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@uppercod/css-to-object/-/css-to-object-1.1.1.tgz", @@ -8432,9 +8728,9 @@ "dev": true }, "axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -8528,11 +8824,21 @@ "dev": true }, "before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", + "dev": true, + "requires": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -8747,9 +9053,9 @@ } }, "commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "dev": true }, "concat-map": { @@ -9049,18 +9355,19 @@ } }, "eslint": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", - "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.51.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -9998,6 +10305,20 @@ "jest-cli": "^29.7.0" } }, + "jest-bench": { + "version": "29.4.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.4.1.tgz", + "integrity": "sha512-CbhGPgHX+b4AQKnxz/iziVHpgLG+eoGKIvIkOH+VmuOLxme7klbgvOpNB0Ab+XNq/u/AmOlKK5cd1dGuaN4iEA==", + "dev": true, + "requires": { + "@jest/globals": "^29.4.1", + "@jest/reporters": "^29.4.1", + "benchmark": "^2.1.4", + "chalk": "^4.1.0", + "lodash": "^4.17.20", + "ndjson": "^2.0.0" + } + }, "jest-changed-files": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", @@ -10748,6 +11069,12 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -10789,21 +11116,21 @@ "dev": true }, "lint-staged": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", - "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz", + "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==", "dev": true, "requires": { "chalk": "5.3.0", - "commander": "11.0.0", + "commander": "11.1.0", "debug": "4.3.4", - "execa": "7.2.0", + "execa": "8.0.1", "lilconfig": "2.1.0", - "listr2": "6.6.1", + "listr2": "7.0.2", "micromatch": "4.0.5", "pidtree": "0.6.0", "string-argv": "0.3.2", - "yaml": "2.3.1" + "yaml": "2.3.3" }, "dependencies": { "chalk": { @@ -10813,26 +11140,32 @@ "dev": true }, "execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "requires": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" } }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, "human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true }, "is-stream": { @@ -10871,6 +11204,12 @@ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, "strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -10880,9 +11219,9 @@ } }, "listr2": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-6.6.1.tgz", - "integrity": "sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.2.tgz", + "integrity": "sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g==", "dev": true, "requires": { "cli-truncate": "^3.1.0", @@ -11167,6 +11506,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -11179,37 +11524,17 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", "dev": true, "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" } }, "node-int64": { @@ -11439,6 +11764,12 @@ "find-up": "^4.0.0" } }, + "platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "dev": true + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -11521,6 +11852,17 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -11632,6 +11974,12 @@ "queue-microtask": "^1.2.2" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -11737,6 +12085,15 @@ "source-map": "^0.6.0" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "requires": { + "readable-stream": "^3.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -11761,6 +12118,15 @@ "internal-slot": "^1.0.4" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-argv": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", @@ -11862,6 +12228,15 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -11931,6 +12306,15 @@ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true }, + "undici": { + "version": "5.26.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", + "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "dev": true, + "requires": { + "@fastify/busboy": "^2.0.0" + } + }, "universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -11977,6 +12361,12 @@ "requires-port": "^1.0.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -12162,9 +12552,9 @@ "dev": true }, "yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", + "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index afdabff156572..b588391ae5e6e 100644 --- a/package.json +++ b/package.json @@ -30,32 +30,34 @@ "format": "prettier --write .", "format:check": "prettier --check .", "prepare": "husky install", - "lint": "npx eslint --max-warnings 0 \"./src/**/*.js\" \"./scripts/**/*.js\" \"./tests/**/*.js\" \"./api/**/*.js\" \"./themes/**/*.js\"" + "lint": "npx eslint --max-warnings 0 \"./src/**/*.js\" \"./scripts/**/*.js\" \"./tests/**/*.js\" \"./api/**/*.js\" \"./themes/**/*.js\"", + "bench": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.bench.config.js" }, "author": "Anurag Hazra", "license": "MIT", "devDependencies": { "@actions/core": "^1.10.1", - "@actions/github": "^5.1.1", + "@actions/github": "^6.0.0", "@testing-library/dom": "^9.3.3", - "@testing-library/jest-dom": "^6.1.3", + "@testing-library/jest-dom": "^6.1.4", "@uppercod/css-to-object": "^1.1.1", "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", - "eslint": "^8.51.0", + "eslint": "^8.53.0", "eslint-config-prettier": "^9.0.0", "hjson": "^3.2.2", "husky": "^8.0.3", "jest": "^29.7.0", + "jest-bench": "^29.4.1", "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^14.0.1", + "lint-staged": "^15.0.2", "lodash.snakecase": "^4.1.1", "parse-diff": "^0.11.1", "prettier": "^3.0.3" }, "dependencies": { - "axios": "^1.5.1", + "axios": "^1.6.0", "dotenv": "^16.3.1", "emoji-name-map": "^1.2.8", "github-username-regex": "^1.0.0", diff --git a/readme.md b/readme.md index f42f79e84d0b2..a010eca3b6d5f 100644 --- a/readme.md +++ b/readme.md @@ -24,11 +24,8 @@

- - - - - + +

@@ -112,7 +109,7 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of - [Pie Chart Language Card Layout](#pie-chart-language-card-layout) - [Hide Progress Bars](#hide-progress-bars) - [Demo](#demo-2) -- [Wakatime Stats Card](#wakatime-stats-card) +- [WakaTime Stats Card](#wakatime-stats-card) - [Demo](#demo-3) - [All Demos](#all-demos) - [Quick Tip (Align The Cards)](#quick-tip-align-the-cards) @@ -124,11 +121,16 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of - [Keep your fork up to date](#keep-your-fork-up-to-date) - [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project) -# Important Notice +# Important Notices > [!IMPORTANT]\ > Since the GitHub API only [allows 5k requests per hour per user account](https://docs.github.com/en/graphql/overview/resource-limitations), the public Vercel instance hosted on `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to prevent this from happening (see https://github.com/anuraghazra/github-readme-stats#common-options). You can turn off these rate limit protections by deploying [your own Vercel instance](#disable-rate-limit-protections). +Uptime Badge + +> [!IMPORTANT]\ +> We're a small team, and to prioritize, we rely on upvotes :+1:. We use Top issues dashboard for tracking community demand (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935)). Do not hesitate to upvote the issues and pull requests you are interested in. We will work on the most upvoted first. + # GitHub Stats Card Copy-paste this into your markdown content, and that is it. Simple! @@ -143,7 +145,7 @@ Change the `?username=` value to your GitHub username. > By default, the stats card only shows statistics like stars, commits and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token. > [!NOTE]\ -> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js). The circle around the rank shows 100 minus the global percentile. +> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile. ### Hiding individual stats @@ -189,7 +191,7 @@ GitHub Readme Stats comes with several built-in themes (e.g. `dark`, `radical`, GitHub Readme Stats Themes -You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js). You can also contribute new themes if you like, contributing guidelines can be found [here](./CONTRIBUTING.md#themes-contribution). +You can look at a preview for [all available themes](themes/README.md) or checkout the [theme config file](themes/index.js). Please note that we paused addition of new themes to decrease maintenance efforts, all pull requests related to new themes will be closed. #### Responsive Card Theme @@ -215,7 +217,7 @@ We have included a `transparent` theme that has a transparent background. This t ##### Add transparent alpha channel to a themes bg\_color -You can use the `bg_color` parameter to make any of [the available themes](./themes/README.md) transparent. This is done by setting the `bg_color` to a color with a transparent alpha channel (i.e. `bg_color=00000000`): +You can use the `bg_color` parameter to make any of [the available themes](themes/README.md) transparent. This is done by setting the `bg_color` to a color with a transparent alpha channel (i.e. `bg_color=00000000`): ```md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&bg_color=00000000) @@ -292,9 +294,9 @@ You can customize the appearance of all your cards however you wish with URL par * `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (Does not apply when `hide_border` is enabled). * `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe` * `hide_border` - Hides the card's border *(boolean)*. Default: `false` -* `theme` - Name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme. +* `theme` - Name of the theme, choose from [all available themes](themes/README.md). Default: `default` theme. * `cache_seconds` - Sets the cache header manually *(min: 21600, max: 86400)*. Default: `21600 seconds (6 hours)`. -* `locale` - Sets the language in the card *(e.g. cn, de, es, etc.)*. Default: `en`. +* `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`. * `border_radius` - Corner rounding on the card. Default: `4.5`. > [!WARNING]\ @@ -306,6 +308,60 @@ You can provide multiple comma-separated values in the bg\_color option to rende &bg_color=DEG,COLOR1,COLOR2,COLOR3...COLOR10 +##### Available locales + +Here is a list of all available locales: + + + +
+ +| Code | Locale | +| --- | --- | +| `cn` | Chinese | +| `zh-tw` | Chinese (Taiwan) | +| `ar` | Arabic | +| `cs` | Czech | +| `de` | German | +| `en` | English | +| `bn` | Bengali | +| `es` | Spanish | +| `fr` | French | +| `hu` | Hungarian | + + + +| Code | Locale | +| --- | --- | +| `it` | Italian | +| `ja` | Japanese | +| `kr` | Korean | +| `nl` | Dutch | +| `pt-pt` | Portuguese (Portugal) | +| `pt-br` | Portuguese (Brazil) | +| `np` | Nepali | +| `el` | Greek | +| `ru` | Russian | +| `uk-ua` | Ukrainian | + + + +| Code | Locale | +| --- | --- | +| `id` | Indonesian | +| `ml` | Malayalam | +| `my` | Burmese | +| `sk` | Slovak | +| `tr` | Turkish | +| `pl` | Polish | +| `uz` | Uzbek | +| `vi` | Vietnamese | +| `se` | Swedish | + +
+ +If we don't support your language, please consider contributing! You can find more information about how to do it in our [contributing guidelines](CONTRIBUTING.md#translations-contribution). + #### Stats Card Exclusive Options * `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`. @@ -354,13 +410,13 @@ You can provide multiple comma-separated values in the bg\_color option to rende > (i.e: `c++` should become `c%2B%2B`, `jupyter notebook` should become `jupyter%20notebook`, etc.) You can use > [urlencoder.org](https://www.urlencoder.org/) to help you do this automatically. -#### Wakatime Card Exclusive Options +#### WakaTime Card Exclusive Options * `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`. * `hide_title` - *(boolean)*. Default `false`. * `line_height` - Sets the line height between text *(number)*. Default `25`. * `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`. -* `custom_title` - Sets a custom title for the card *(string)*. Default `Wakatime Stats`. +* `custom_title` - Sets a custom title for the card *(string)*. Default `WakaTime Stats`. * `layout` - Switches between two available layouts `default` & `compact`. Default `default`. * `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*. * `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`. @@ -545,26 +601,26 @@ You can use the `&hide_progress=true` option to hide the percentages and the pro ![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&hide_progress=true) -# Wakatime Stats Card +# WakaTime Stats Card > [!WARNING]\ -> Please be aware that we currently only show data from Wakatime profiles that are public. You therefore have to make sure that **BOTH** `Display code time publicly` and `Display languages, editors, os, categories publicly` are enabled. +> Please be aware that we currently only show data from WakaTime profiles that are public. You therefore have to make sure that **BOTH** `Display code time publicly` and `Display languages, editors, os, categories publicly` are enabled. -Change the `?username=` value to your [Wakatime](https://wakatime.com) username. +Change the `?username=` value to your [WakaTime](https://wakatime.com) username. ```md -[![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demo -![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) -![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&hide_progress=true) +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&hide_progress=true) * Compact layout -![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&layout=compact) +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&layout=compact) *** @@ -638,7 +694,7 @@ Choose from any of the [default themes](#themes) * WakaTime card -![Harlok's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) *** @@ -697,7 +753,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme > Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58), we should be able to handle more than 5k requests and have fewer issues with downtime :grin:. > [!NOTE]\ -> If you are on the [Pro (i.e. paid)](https://vercel.com/pricing) Vercel plan, the [maxDuration](https://vercel.com/docs/concepts/projects/project-configuration#value-definition) value found in the [Vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than `30` seconds to prevent high memory usage. +> If you are on the [Pro (i.e. paid)](https://vercel.com/pricing) Vercel plan, the [maxDuration](https://vercel.com/docs/concepts/projects/project-configuration#value-definition) value found in the [vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than `30` seconds to prevent high memory usage. [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats) @@ -767,7 +823,7 @@ Thanks! :heart: *** -[![https://vercel.com?utm\_source=github\_readme\_stats\_team\&utm\_campaign=oss](./powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team\&utm_campaign=oss) +[![https://vercel.com?utm\_source=github\_readme\_stats\_team\&utm\_campaign=oss](powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team\&utm_campaign=oss) Contributions are welcome! <3 diff --git a/scripts/close-stale-theme-prs.js b/scripts/close-stale-theme-prs.js index 3b513f1732d15..4f2c936dca84f 100644 --- a/scripts/close-stale-theme-prs.js +++ b/scripts/close-stale-theme-prs.js @@ -155,7 +155,9 @@ const run = async () => { // Loop through all stale invalid theme pull requests and close them. for (const prNumber of staleThemePRsNumbers) { debug(`Closing #${prNumber} because it is stale...`); - if (!dryRun) { + if (dryRun) { + debug("Dry run enabled, skipping..."); + } else { await octokit.rest.issues.createComment({ owner, repo, @@ -168,8 +170,6 @@ const run = async () => { pull_number: prNumber, state: "closed", }); - } else { - debug("Dry run enabled, skipping..."); } } } catch (error) { diff --git a/scripts/generate-theme-doc.js b/scripts/generate-theme-doc.js index d29026e1ee7a1..1716ea6e95122 100644 --- a/scripts/generate-theme-doc.js +++ b/scripts/generate-theme-doc.js @@ -14,7 +14,7 @@ const THEME_TEMPLATE = `## Available Themes With inbuilt themes, you can customize the look of the card without doing any manual customization. -Use \`?theme=THEME_NAME\` parameter like so :- +Use \`?theme=THEME_NAME\` parameter like so: \`\`\`md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&theme=dark&show_icons=true) @@ -22,7 +22,7 @@ Use \`?theme=THEME_NAME\` parameter like so :- ## Stats -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -30,7 +30,7 @@ ${STAT_CARD_TABLE_FLAG} ## Repo Card -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -69,7 +69,7 @@ const createTableItem = ({ link, label, isRepoCard }) => { const generateTable = ({ isRepoCard }) => { const rows = []; const themesFiltered = Object.keys(themes).filter( - (name) => name !== (!isRepoCard ? "default_repocard" : "default"), + (name) => name !== (isRepoCard ? "default" : "default_repocard"), ); for (let i = 0; i < themesFiltered.length; i += 3) { diff --git a/scripts/preview-theme.js b/scripts/preview-theme.js index fd55d5773216a..25a2e45d0e40d 100644 --- a/scripts/preview-theme.js +++ b/scripts/preview-theme.js @@ -12,7 +12,7 @@ import Hjson from "hjson"; import snakeCase from "lodash.snakecase"; import parse from "parse-diff"; import { inspect } from "util"; -import { isValidHexColor } from "../src/common/utils.js"; +import { isValidHexColor, isValidGradient } from "../src/common/utils.js"; import { themes } from "../themes/index.js"; import { getGithubToken, getRepoInfo } from "./helpers.js"; @@ -32,6 +32,9 @@ const THEME_CONTRIB_GUIDELINES = ` \r> [!WARNING]\ \r> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up :+1: emojis (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). We expect to see at least 10-15 thumbs up before making a decision to merge your pull request into the master branch. Remember that you can also support themes of other contributors that you liked to speed up their merge. + \r> [!WARNING]\ + \r> Please do not submit a pull request with a batch of themes, since it will be hard to judge how the community will react to each of them. We will only merge one theme per pull request. If you have several themes, please submit a separate pull request for each of them. Situations when you have several versions of the same theme (e.g. light and dark) are an exception to this rule. + \r> [!NOTE]\ \r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization). `; @@ -39,7 +42,7 @@ const COLOR_PROPS = { title_color: 6, icon_color: 6, text_color: 6, - bg_color: 8, + bg_color: 23, border_color: 6, }; const ACCEPTED_COLOR_PROPS = Object.keys(COLOR_PROPS); @@ -172,18 +175,18 @@ const upsertComment = async ( body, ) => { let resp; - if (commentId !== undefined) { - resp = await octokit.rest.issues.updateComment({ + if (commentId === undefined) { + resp = await octokit.rest.issues.createComment({ owner, repo, - comment_id: commentId, + issue_number: issueNumber, body, }); } else { - resp = await octokit.rest.issues.createComment({ + resp = await octokit.rest.issues.updateComment({ owner, repo, - issue_number: issueNumber, + comment_id: commentId, body, }); } @@ -341,10 +344,10 @@ const parseJSON = (json) => { .filter((x) => typeof x !== "string" || !!x.trim()); // Split json into array of strings and objects. if (splitJson[0].replace(/\s+/g, "") === "},") { splitJson[0] = "},"; - if (!/\s*}\s*,?\s*$/.test(splitJson[1])) { - splitJson.push(splitJson.shift()); - } else { + if (/\s*}\s*,?\s*$/.test(splitJson[1])) { splitJson.shift(); + } else { + splitJson.push(splitJson.shift()); } parsedJson = splitJson.join(""); } @@ -466,10 +469,7 @@ export const run = async () => { // Check if the theme colors are valid. debug("Theme preview body: Check if the theme colors are valid..."); let invalidColors = false; - if (!colors) { - warnings.push("Theme colors are missing"); - invalidColors = true; - } else { + if (colors) { const missingKeys = REQUIRED_COLOR_PROPS.filter( (x) => !Object.keys(colors).includes(x), ); @@ -499,14 +499,21 @@ export const run = async () => { `Theme color property \`${colorKey}\` can not be longer than \`${COLOR_PROPS[colorKey]}\` characters`, ); invalidColors = true; - } else if (!isValidHexColor(colorValue)) { + } else if ( + !(colorKey === "bg_color" && colorValue.split(",").length > 1 + ? isValidGradient(colorValue.split(",")) + : isValidHexColor(colorValue)) + ) { errors.push( - `Theme color property \`${colorKey}\` is not a valid hex color: #${colorValue}`, + `Theme color property \`${colorKey}\` is not a valid hex color: ${colorValue}`, ); invalidColors = true; } } } + } else { + warnings.push("Theme colors are missing"); + invalidColors = true; } if (invalidColors) { themeValid[theme] = false; @@ -539,6 +546,10 @@ export const run = async () => { Object.keys(colorPairs).forEach((item) => { let color1 = colorPairs[item][0]; let color2 = colorPairs[item][1]; + const isGradientColor = color2.split(",").length > 1; + if (isGradientColor) { + return; + } color1 = color1.length === 4 ? color1.slice(0, 3) : color1.slice(0, 6); color2 = color2.length === 4 ? color2.slice(0, 3) : color2.slice(0, 6); if (!ccc.isLevelAA(`#${color1}`, `#${color2}`)) { @@ -597,7 +608,10 @@ export const run = async () => { // Create or update theme-preview comment. debug("Create or update theme-preview comment..."); let comment_url; - if (!DRY_RUN) { + if (DRY_RUN) { + info(`DRY_RUN: Comment body: ${commentBody}`); + comment_url = ""; + } else { comment_url = await upsertComment( OCTOKIT, PULL_REQUEST_ID, @@ -606,9 +620,6 @@ export const run = async () => { comment?.id, commentBody, ); - } else { - info(`DRY_RUN: Comment body: ${commentBody}`); - comment_url = ""; } // Change review state and add/remove `invalid` label based on theme PR validity. @@ -620,7 +631,10 @@ export const run = async () => { const reviewReason = themesValid ? undefined : INVALID_REVIEW_COMMENT(comment_url); - if (!DRY_RUN) { + if (DRY_RUN) { + info(`DRY_RUN: Review state: ${reviewState}`); + info(`DRY_RUN: Review reason: ${reviewReason}`); + } else { await addReview( OCTOKIT, PULL_REQUEST_ID, @@ -637,13 +651,13 @@ export const run = async () => { "invalid", !themesValid, ); - } else { - info(`DRY_RUN: Review state: ${reviewState}`); - info(`DRY_RUN: Review reason: ${reviewReason}`); } } catch (error) { debug("Set review state to `REQUEST_CHANGES` and add `invalid` label..."); - if (!DRY_RUN) { + if (DRY_RUN) { + info(`DRY_RUN: Review state: REQUEST_CHANGES`); + info(`DRY_RUN: Review reason: ${error.message}`); + } else { await addReview( OCTOKIT, PULL_REQUEST_ID, @@ -662,9 +676,6 @@ export const run = async () => { "invalid", true, ); - } else { - info(`DRY_RUN: Review state: REQUEST_CHANGES`); - info(`DRY_RUN: Review reason: ${error.message}`); } setFailed(error.message); } diff --git a/scripts/push-theme-readme.sh b/scripts/push-theme-readme.sh index 132a4b508e8e4..d983d54aa5603 100755 --- a/scripts/push-theme-readme.sh +++ b/scripts/push-theme-readme.sh @@ -10,6 +10,6 @@ git config --global --add safe.directory ${GITHUB_WORKSPACE} git branch -d $BRANCH_NAME || true git checkout -b $BRANCH_NAME git add --all -git commit --no-verify --message "docs(theme): Auto update theme readme" +git commit --no-verify --message "docs(theme): auto update theme readme" git remote add origin-$BRANCH_NAME https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git git push --force --quiet --set-upstream origin-$BRANCH_NAME $BRANCH_NAME diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js index dad81bbd21e4f..b7bc54ba92d4d 100644 --- a/src/cards/stats-card.js +++ b/src/cards/stats-card.js @@ -10,7 +10,6 @@ import { kFormatter, measureText, } from "../common/utils.js"; -import { getStyles } from "../getStyles.js"; import { statCardLocales } from "../translations.js"; const CARD_MIN_WIDTH = 287; @@ -76,6 +75,118 @@ const createTextNode = ({ `; }; +/** + * Calculates progress along the boundary of the circle, i.e. its circumference. + * + * @param {number} value The rank value to calculate progress for. + * @returns {number} Progress value. + */ +const calculateCircleProgress = (value) => { + const radius = 40; + const c = Math.PI * (radius * 2); + + if (value < 0) { + value = 0; + } + if (value > 100) { + value = 100; + } + + return ((100 - value) / 100) * c; +}; + +/** + * Retrieves the animation to display progress along the circumference of circle + * from the beginning to the given value in a clockwise direction. + * + * @param {{progress: number}} progress The progress value to animate to. + * @returns {string} Progress animation css. + */ +const getProgressAnimation = ({ progress }) => { + return ` + @keyframes rankAnimation { + from { + stroke-dashoffset: ${calculateCircleProgress(0)}; + } + to { + stroke-dashoffset: ${calculateCircleProgress(progress)}; + } + } + `; +}; + +/** + * Retrieves CSS styles for a card. + * + * @param {Object} colors The colors to use for the card. + * @param {string} colors.titleColor The title color. + * @param {string} colors.textColor The text color. + * @param {string} colors.iconColor The icon color. + * @param {string} colors.ringColor The ring color. + * @param {boolean} colors.show_icons Whether to show icons. + * @param {number} colors.progress The progress value to animate to. + * @returns {string} Card CSS styles. + */ +const getStyles = ({ + // eslint-disable-next-line no-unused-vars + titleColor, + textColor, + iconColor, + ringColor, + show_icons, + progress, +}) => { + return ` + .stat { + font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; + } + @supports(-moz-appearance: auto) { + /* Selector detects Firefox */ + .stat { font-size:12px; } + } + .stagger { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + } + .rank-text { + font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor}; + animation: scaleInAnimation 0.3s ease-in-out forwards; + } + .rank-percentile-header { + font-size: 14px; + } + .rank-percentile-text { + font-size: 16px; + } + + .not_bold { font-weight: 400 } + .bold { font-weight: 700 } + .icon { + fill: ${iconColor}; + display: ${show_icons ? "block" : "none"}; + } + + .rank-circle-rim { + stroke: ${ringColor}; + fill: none; + stroke-width: 6; + opacity: 0.2; + } + .rank-circle { + stroke: ${ringColor}; + stroke-dasharray: 250; + fill: none; + stroke-width: 6; + stroke-linecap: round; + opacity: 0.8; + transform-origin: -10px 8px; + transform: rotate(-90deg); + animation: rankAnimation 1s forwards ease-in-out; + } + ${process.env.NODE_ENV === "test" ? "" : getProgressAnimation({ progress })} + `; +}; + /** * @typedef {import('../fetchers/types').StatsData} StatsData * @typedef {import('./types').StatCardOptions} StatCardOptions diff --git a/src/cards/top-languages-card.js b/src/cards/top-languages-card.js index 9593f98b5ca1c..758bd34baff5d 100644 --- a/src/cards/top-languages-card.js +++ b/src/cards/top-languages-card.js @@ -383,14 +383,14 @@ const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => { return ` ${ - !hideProgress - ? ` - - - - ${compactProgressBar} - ` - : "" + hideProgress + ? "" + : ` + + + + ${compactProgressBar} + ` } ${createLanguageTextNode({ diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js index 187af7ed87c34..a6a203dad9c29 100644 --- a/src/cards/wakatime-card.js +++ b/src/cards/wakatime-card.js @@ -8,7 +8,6 @@ import { getCardColors, lowercaseTrim, } from "../common/utils.js"; -import { getStyles } from "../getStyles.js"; import { wakatimeCardLocales } from "../translations.js"; /** Import language colors. @@ -158,6 +157,36 @@ const recalculatePercentages = (languages) => { }); }; +/** + * Retrieves CSS styles for a card. + * + * @param {Object} colors The colors to use for the card. + * @param {string} colors.titleColor The title color. + * @param {string} colors.textColor The text color. + * @returns {string} Card CSS styles. + */ +const getStyles = ({ + // eslint-disable-next-line no-unused-vars + titleColor, + textColor, +}) => { + return ` + .stat { + font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; + } + @supports(-moz-appearance: auto) { + /* Selector detects Firefox */ + .stat { font-size:12px; } + } + .stagger { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + } + .not_bold { font-weight: 400 } + .bold { font-weight: 700 } + `; +}; + /** * @typedef {import('../fetchers/types').WakaTimeData} WakaTimeData * @typedef {import('./types').WakaTimeOptions} WakaTimeOptions @@ -235,7 +264,6 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { const cssStyles = getStyles({ titleColor, textColor, - iconColor, }); let finalLayout = ""; @@ -287,11 +315,11 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { : noCodingActivityNode({ // @ts-ignore color: textColor, - text: !stats.is_coding_activity_visible - ? i18n.t("wakatimecard.notpublic") - : stats.is_other_usage_visible - ? i18n.t("wakatimecard.nocodingactivity") - : i18n.t("wakatimecard.nocodedetails"), + text: stats.is_coding_activity_visible + ? stats.is_other_usage_visible + ? i18n.t("wakatimecard.nocodingactivity") + : i18n.t("wakatimecard.nocodedetails") + : i18n.t("wakatimecard.notpublic"), }) } `; @@ -316,11 +344,11 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { noCodingActivityNode({ // @ts-ignore color: textColor, - text: !stats.is_coding_activity_visible - ? i18n.t("wakatimecard.notpublic") - : stats.is_other_usage_visible - ? i18n.t("wakatimecard.nocodingactivity") - : i18n.t("wakatimecard.nocodedetails"), + text: stats.is_coding_activity_visible + ? stats.is_other_usage_visible + ? i18n.t("wakatimecard.nocodingactivity") + : i18n.t("wakatimecard.nocodedetails") + : i18n.t("wakatimecard.notpublic"), }), ], gap: lheight, diff --git a/src/common/Card.js b/src/common/Card.js index 33e6bb96e4974..d32da56255f89 100644 --- a/src/common/Card.js +++ b/src/common/Card.js @@ -1,4 +1,3 @@ -import { getAnimations } from "../getStyles.js"; import { encodeHTML, flexLayout } from "./utils.js"; class Card { @@ -40,9 +39,9 @@ class Card { // returns theme based colors with proper overrides and defaults this.colors = colors; this.title = - customTitle !== undefined - ? encodeHTML(customTitle) - : encodeHTML(defaultTitle); + customTitle === undefined + ? encodeHTML(defaultTitle) + : encodeHTML(customTitle); this.css = ""; @@ -173,6 +172,33 @@ class Card { : ""; } + /** + * Retrieves css animations for a card. + * + * @returns {string} Animation css. + */ + getAnimations = () => { + return ` + /* 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; + } + } + `; + }; + /** * @param {string} body The inner body of the card. * @returns {string} The rendered card. @@ -202,7 +228,7 @@ class Card { } ${this.css} - ${process.env.NODE_ENV === "test" ? "" : getAnimations()} + ${process.env.NODE_ENV === "test" ? "" : this.getAnimations()} ${ this.animations === false ? `* { animation-duration: 0s !important; animation-delay: 0s !important; }` diff --git a/src/common/languageColors.json b/src/common/languageColors.json index 8c1c23d49e491..4501dc8fe7485 100644 --- a/src/common/languageColors.json +++ b/src/common/languageColors.json @@ -53,6 +53,7 @@ "BlitzBasic": "#00FFAE", "BlitzMax": "#cd6400", "Bluespec": "#12223c", + "Bluespec BH": "#12223c", "Boo": "#d4bec1", "Boogie": "#c80fa0", "Brainfuck": "#2F2530", @@ -192,6 +193,7 @@ "Gosu": "#82937f", "Grace": "#615f8b", "Gradle": "#02303a", + "Gradle Kotlin DSL": "#02303a", "Grammatical Framework": "#ff0000", "GraphQL": "#e10098", "Graphviz (DOT)": "#2596be", @@ -422,6 +424,7 @@ "Red": "#f50000", "Regular Expression": "#009a00", "Ren'Py": "#ff7f7f", + "Rez": "#FFDAB3", "Ring": "#2D54CB", "Riot": "#A71E49", "RobotFramework": "#00c0b5", @@ -476,6 +479,7 @@ "SuperCollider": "#46390b", "Svelte": "#ff3e00", "Sway": "#dea584", + "Sweave": "#198ce7", "Swift": "#F05138", "SystemVerilog": "#DAE1C2", "TI Program": "#A0AA87", @@ -496,6 +500,7 @@ "Turing": "#cf142b", "Twig": "#c1d026", "TypeScript": "#3178c6", + "Typst": "#239dad", "Unified Parallel C": "#4e3617", "Unity3D Asset": "#222c37", "Uno": "#9933cc", diff --git a/src/common/utils.js b/src/common/utils.js index 09063516d18fc..48ea051783b7f 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -4,51 +4,40 @@ import toEmoji from "emoji-name-map"; import wrap from "word-wrap"; import { themes } from "../../themes/index.js"; -// Script parameters. -const ERROR_CARD_LENGTH = 576.5; +const TRY_AGAIN_LATER = "Please try again later"; -/** - * Encode string as HTML. - * - * @see https://stackoverflow.com/a/48073476/10629172 - * - * @param {string} str String to encode. - * @returns {string} Encoded string. - */ -const encodeHTML = (str) => { - return str - .replace(/[\u00A0-\u9999<>&](?!#)/gim, (i) => { - return "&#" + i.charCodeAt(0) + ";"; - }) - .replace(/\u0008/gim, ""); +const SECONDARY_ERROR_MESSAGES = { + MAX_RETRY: + "You can deploy own instance or wait until public will be no longer limited", + NO_TOKENS: + "Please add an env variable called PAT_1 with your GitHub API token in vercel", + USER_NOT_FOUND: "Make sure the provided username is not an organization", + GRAPHQL_ERROR: TRY_AGAIN_LATER, + GITHUB_REST_API_ERROR: TRY_AGAIN_LATER, + WAKATIME_USER_NOT_FOUND: "Make sure you have a public WakaTime profile", }; /** - * Renders error message on the card. - * - * @param {string} message Main error message. - * @param {string} secondaryMessage The secondary error message. - * @returns {string} The SVG markup. + * Custom error class to handle custom GRS errors. */ -const renderError = (message, secondaryMessage = "") => { - return ` - - - - Something went wrong! file an issue at https://tiny.one/readme-stats - - ${encodeHTML(message)} - ${secondaryMessage} - - - `; -}; +class CustomError extends Error { + /** + * @param {string} message Error message. + * @param {string} type Error type. + */ + constructor(message, type) { + super(message); + this.type = type; + this.secondaryMessage = SECONDARY_ERROR_MESSAGES[type] || type; + } + + static MAX_RETRY = "MAX_RETRY"; + static NO_TOKENS = "NO_TOKENS"; + static USER_NOT_FOUND = "USER_NOT_FOUND"; + static GRAPHQL_ERROR = "GRAPHQL_ERROR"; + static GITHUB_REST_API_ERROR = "GITHUB_REST_API_ERROR"; + static WAKATIME_ERROR = "WAKATIME_ERROR"; +} /** * Auto layout utility, allows us to layout things vertically or horizontally with @@ -188,7 +177,7 @@ const parseArray = (str) => { */ const clampValue = (number, min, max) => { // @ts-ignore - if (Number.isNaN(parseInt(number))) { + if (Number.isNaN(parseInt(number, 10))) { return min; } return Math.max(min, Math.min(number, max)); @@ -201,7 +190,10 @@ const clampValue = (number, min, max) => { * @returns {boolean} True if the given string is a valid gradient. */ const isValidGradient = (colors) => { - return isValidHexColor(colors[1]) && isValidHexColor(colors[2]); + return ( + colors.length > 2 && + colors.slice(1).every((color) => isValidHexColor(color)) + ); }; /** @@ -333,6 +325,81 @@ const getCardColors = ({ return { titleColor, iconColor, textColor, bgColor, borderColor, ringColor }; }; +// Script parameters. +const ERROR_CARD_LENGTH = 576.5; + +/** + * Encode string as HTML. + * + * @see https://stackoverflow.com/a/48073476/10629172 + * + * @param {string} str String to encode. + * @returns {string} Encoded string. + */ +const encodeHTML = (str) => { + return str + .replace(/[\u00A0-\u9999<>&](?!#)/gim, (i) => { + return "&#" + i.charCodeAt(0) + ";"; + }) + .replace(/\u0008/gim, ""); +}; + +const UPSTREAM_API_ERRORS = [ + TRY_AGAIN_LATER, + SECONDARY_ERROR_MESSAGES.MAX_RETRY, +]; + +/** + * Renders error message on the card. + * + * @param {string} message Main error message. + * @param {string} secondaryMessage The secondary error message. + * @param {object} options Function options. + * @returns {string} The SVG markup. + */ +const renderError = (message, secondaryMessage = "", options = {}) => { + const { + title_color, + text_color, + bg_color, + border_color, + theme = "default", + } = options; + + // returns theme based colors with proper overrides and defaults + const { titleColor, textColor, bgColor, borderColor } = getCardColors({ + title_color, + text_color, + icon_color: "", + bg_color, + border_color, + ring_color: "", + theme, + }); + + return ` + + + + Something went wrong!${ + UPSTREAM_API_ERRORS.includes(secondaryMessage) + ? "" + : " file an issue at https://tiny.one/readme-stats" + } + + ${encodeHTML(message)} + ${secondaryMessage} + + + `; +}; + /** * Split text over multiple lines based on the card width. * @@ -371,7 +438,7 @@ const wrapTextMultiline = (text, width = 59, maxLines = 3) => { const noop = () => {}; // return console instance based on the environment const logger = - process.env.NODE_ENV !== "test" ? console : { log: noop, error: noop }; + process.env.NODE_ENV === "test" ? { log: noop, error: noop } : console; const ONE_MINUTE = 60; const FIVE_MINUTES = 300; @@ -399,41 +466,6 @@ const CONSTANTS = { ERROR_CACHE_SECONDS: TEN_MINUTES, }; -const TRY_AGAING_LATER = "Please try again later"; - -const SECONDARY_ERROR_MESSAGES = { - MAX_RETRY: - "You can deploy own instance or wait until public will be no longer limited", - NO_TOKENS: - "Please add an env variable called PAT_1 with your GitHub API token in vercel", - USER_NOT_FOUND: "Make sure the provided username is not an organization", - GRAPHQL_ERROR: TRY_AGAING_LATER, - GITHUB_REST_API_ERROR: TRY_AGAING_LATER, - WAKATIME_USER_NOT_FOUND: "Make sure you have a public WakaTime profile", -}; - -/** - * Custom error class to handle custom GRS errors. - */ -class CustomError extends Error { - /** - * @param {string} message Error message. - * @param {string} type Error type. - */ - constructor(message, type) { - super(message); - this.type = type; - this.secondaryMessage = SECONDARY_ERROR_MESSAGES[type] || type; - } - - static MAX_RETRY = "MAX_RETRY"; - static NO_TOKENS = "NO_TOKENS"; - static USER_NOT_FOUND = "USER_NOT_FOUND"; - static GRAPHQL_ERROR = "GRAPHQL_ERROR"; - static GITHUB_REST_API_ERROR = "GITHUB_REST_API_ERROR"; - static WAKATIME_ERROR = "WAKATIME_ERROR"; -} - /** * Missing query parameter class. */ diff --git a/src/fetchers/stats-fetcher.js b/src/fetchers/stats-fetcher.js index 0f770d88a6fc2..115cd50a51564 100644 --- a/src/fetchers/stats-fetcher.js +++ b/src/fetchers/stats-fetcher.js @@ -40,7 +40,7 @@ const GRAPHQL_REPOS_QUERY = ` `; const GRAPHQL_STATS_QUERY = ` - query userInfo($login: String!, $after: String) { + query userInfo($login: String!, $after: String, $includeMergedPullRequests: Boolean!, $includeDiscussions: Boolean!, $includeDiscussionsAnswers: Boolean!) { user(login: $login) { name login @@ -54,7 +54,7 @@ const GRAPHQL_STATS_QUERY = ` pullRequests(first: 1) { totalCount } - mergedPullRequests: pullRequests(states: MERGED) { + mergedPullRequests: pullRequests(states: MERGED) @include(if: $includeMergedPullRequests) { totalCount } openIssues: issues(states: OPEN) { @@ -66,10 +66,10 @@ const GRAPHQL_STATS_QUERY = ` followers { totalCount } - repositoryDiscussions { + repositoryDiscussions @include(if: $includeDiscussions) { totalCount } - repositoryDiscussionComments(onlyAnswers: true) { + repositoryDiscussionComments(onlyAnswers: true) @include(if: $includeDiscussionsAnswers) { totalCount } ${GRAPHQL_REPOS_FIELD} @@ -89,7 +89,7 @@ const GRAPHQL_STATS_QUERY = ` * @returns {Promise} Axios response. */ const fetcher = (variables, token) => { - const query = !variables.after ? GRAPHQL_STATS_QUERY : GRAPHQL_REPOS_QUERY; + const query = variables.after ? GRAPHQL_REPOS_QUERY : GRAPHQL_STATS_QUERY; return request( { query, @@ -104,17 +104,33 @@ const fetcher = (variables, token) => { /** * Fetch stats information for a given username. * - * @param {string} username Github username. + * @param {object} variables Fetcher variables. + * @param {string} variables.username Github username. + * @param {boolean} variables.includeMergedPullRequests Include merged pull requests. + * @param {boolean} variables.includeDiscussions Include discussions. + * @param {boolean} variables.includeDiscussionsAnswers Include discussions answers. * @returns {Promise} Axios response. * * @description This function supports multi-page fetching if the 'FETCH_MULTI_PAGE_STARS' environment variable is set to true. */ -const statsFetcher = async (username) => { +const statsFetcher = async ({ + username, + includeMergedPullRequests, + includeDiscussions, + includeDiscussionsAnswers, +}) => { let stats; let hasNextPage = true; let endCursor = null; while (hasNextPage) { - const variables = { login: username, first: 100, after: endCursor }; + const variables = { + login: username, + first: 100, + after: endCursor, + includeMergedPullRequests, + includeDiscussions, + includeDiscussionsAnswers, + }; let res = await retryer(fetcher, variables); if (res.data.errors) { return res; @@ -122,10 +138,10 @@ const statsFetcher = async (username) => { // Store stats data. const repoNodes = res.data.data.user.repositories.nodes; - if (!stats) { - stats = res; - } else { + if (stats) { stats.data.data.user.repositories.nodes.push(...repoNodes); + } else { + stats = res; } // Disable multi page fetching on public Vercel instance due to rate limits. @@ -198,12 +214,18 @@ const totalCommitsFetcher = async (username) => { * @param {string} username GitHub username. * @param {boolean} include_all_commits Include all commits. * @param {string[]} exclude_repo Repositories to exclude. + * @param {boolean} include_merged_pull_requests Include merged pull requests. + * @param {boolean} include_discussions Include discussions. + * @param {boolean} include_discussions_answers Include discussions answers. * @returns {Promise} Stats data. */ const fetchStats = async ( username, include_all_commits = false, exclude_repo = [], + include_merged_pull_requests = false, + include_discussions = false, + include_discussions_answers = false, ) => { if (!username) { throw new MissingParamError(["username"]); @@ -224,7 +246,12 @@ const fetchStats = async ( rank: { level: "C", percentile: 100 }, }; - let res = await statsFetcher(username); + let res = await statsFetcher({ + username, + includeMergedPullRequests: include_merged_pull_requests, + includeDiscussions: include_discussions, + includeDiscussionsAnswers: include_discussions_answers, + }); // Catch GraphQL errors. if (res.data.errors) { @@ -259,14 +286,21 @@ const fetchStats = async ( } stats.totalPRs = user.pullRequests.totalCount; - stats.totalPRsMerged = user.mergedPullRequests.totalCount; - stats.mergedPRsPercentage = - (user.mergedPullRequests.totalCount / user.pullRequests.totalCount) * 100; + if (include_merged_pull_requests) { + stats.totalPRsMerged = user.mergedPullRequests.totalCount; + stats.mergedPRsPercentage = + (user.mergedPullRequests.totalCount / user.pullRequests.totalCount) * 100; + } stats.totalReviews = user.contributionsCollection.totalPullRequestReviewContributions; stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount; - stats.totalDiscussionsStarted = user.repositoryDiscussions.totalCount; - stats.totalDiscussionsAnswered = user.repositoryDiscussionComments.totalCount; + if (include_discussions) { + stats.totalDiscussionsStarted = user.repositoryDiscussions.totalCount; + } + if (include_discussions_answers) { + stats.totalDiscussionsAnswered = + user.repositoryDiscussionComments.totalCount; + } stats.contributedTo = user.repositoriesContributedTo.totalCount; // Retrieve stars while filtering out repositories to be hidden. diff --git a/src/fetchers/top-languages-fetcher.js b/src/fetchers/top-languages-fetcher.js index faf4bc917d612..485cc8b75de8a 100644 --- a/src/fetchers/top-languages-fetcher.js +++ b/src/fetchers/top-languages-fetcher.js @@ -92,7 +92,7 @@ const fetchTopLanguages = async ( ); } throw new CustomError( - "Something went while trying to retrieve the language data using the GraphQL API.", + "Something went wrong while trying to retrieve the language data using the GraphQL API.", CustomError.GRAPHQL_ERROR, ); } diff --git a/src/getStyles.js b/src/getStyles.js deleted file mode 100644 index c621ba1fcb707..0000000000000 --- a/src/getStyles.js +++ /dev/null @@ -1,142 +0,0 @@ -// @ts-check - -/** - * Calculates progress along the boundary of the circle i.e it's circumference. - * - * @param {number} value The rank value to calculate progress for. - * @returns {number} Progress value. - */ -const calculateCircleProgress = (value) => { - const radius = 40; - const c = Math.PI * (radius * 2); - - if (value < 0) { - value = 0; - } - if (value > 100) { - value = 100; - } - - return ((100 - value) / 100) * c; -}; - -/** - * Retrieves the animation to display progress along the circumference of circle - * from the beginning to the given value in a clockwise direction. - * - * @param {{progress: number}} progress The progress value to animate to. - * @returns {string} Progress animation css. - */ -const getProgressAnimation = ({ progress }) => { - return ` - @keyframes rankAnimation { - from { - stroke-dashoffset: ${calculateCircleProgress(0)}; - } - to { - stroke-dashoffset: ${calculateCircleProgress(progress)}; - } - } - `; -}; - -/** - * Retrieves css animations for a card. - * - * @returns {string} Animation css. - */ -const getAnimations = () => { - return ` - /* 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; - } - } - `; -}; - -/** - * Retrieves CSS styles for a card. - * - * @param {Object} colors The colors to use for the card. - * @param {string} colors.titleColor The title color. - * @param {string} colors.textColor The text color. - * @param {string} colors.iconColor The icon color. - * @param {string} colors.ringColor The ring color. - * @param {boolean} colors.show_icons Whether to show icons. - * @param {number} colors.progress The progress value to animate to. - * @returns {string} Card CSS styles. - */ -const getStyles = ({ - // eslint-disable-next-line no-unused-vars - titleColor, - textColor, - iconColor, - ringColor, - show_icons, - progress, -}) => { - return ` - .stat { - font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; - } - @supports(-moz-appearance: auto) { - /* Selector detects Firefox */ - .stat { font-size:12px; } - } - .stagger { - opacity: 0; - animation: fadeInAnimation 0.3s ease-in-out forwards; - } - .rank-text { - font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor}; - animation: scaleInAnimation 0.3s ease-in-out forwards; - } - .rank-percentile-header { - font-size: 14px; - } - .rank-percentile-text { - font-size: 16px; - } - - .not_bold { font-weight: 400 } - .bold { font-weight: 700 } - .icon { - fill: ${iconColor}; - display: ${!!show_icons ? "block" : "none"}; - } - - .rank-circle-rim { - stroke: ${ringColor}; - fill: none; - stroke-width: 6; - opacity: 0.2; - } - .rank-circle { - stroke: ${ringColor}; - stroke-dasharray: 250; - fill: none; - stroke-width: 6; - stroke-linecap: round; - opacity: 0.8; - transform-origin: -10px 8px; - transform: rotate(-90deg); - animation: rankAnimation 1s forwards ease-in-out; - } - ${process.env.NODE_ENV === "test" ? "" : getProgressAnimation({ progress })} - `; -}; - -export { getAnimations, getStyles }; diff --git a/src/index.js b/src/index.js index 27577f80f58db..ca8d586db136b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,2 @@ export * from "./common/index.js"; export * from "./cards/index.js"; -export { getStyles, getAnimations } from "./getStyles.js"; diff --git a/src/translations.js b/src/translations.js index 1ced5f69263fd..aa8744d7e1391 100644 --- a/src/translations.js +++ b/src/translations.js @@ -128,7 +128,7 @@ const statCardLocales = ({ name, apostrophe }) => { np: "कुल Commits", el: "Σύνολο Commits", ru: "Всего коммитов", - "uk-ua": "Всього коммітов", + "uk-ua": "Всього комітів", id: "Total Komitmen", ml: "ആകെ കമ്മിറ്റുകൾ", my: "Jumlah Komitmen", @@ -440,7 +440,7 @@ const repoCardLocales = { np: "अभिलेख राखियो", el: "Αρχειοθετημένα", ru: "Архивирован", - "uk-ua": "Архивирован", + "uk-ua": "Архивований", id: "Arsip", ml: "ശേഖരിച്ചത്", my: "Arkib", @@ -521,34 +521,34 @@ const langCardLocales = { const wakatimeCardLocales = { "wakatimecard.title": { ar: "إحصائيات واكا تايم", - cn: "Wakatime 周统计", - "zh-tw": "Wakatime 周統計", - cs: "Statistiky Wakatime", - de: "Wakatime Status", - en: "Wakatime Stats", - bn: "Wakatime স্ট্যাটাস", - es: "Estadísticas de Wakatime", - fr: "Statistiques de Wakatime", - hu: "Wakatime statisztika", - it: "Statistiche Wakatime", - ja: "Wakatime ワカタイム統計", - kr: "Wakatime 주간 통계", - nl: "Wakatime-statistieken", - "pt-pt": "Estatísticas Wakatime", - "pt-br": "Estatísticas Wakatime", - np: "Wakatime तथ्या .्क", - el: "Στατιστικά Wakatime", - ru: "Статистика Wakatime", - "uk-ua": "Статистика Wakatime", - id: "Status Wakatime", + cn: "WakaTime 周统计", + "zh-tw": "WakaTime 周統計", + cs: "Statistiky WakaTime", + de: "WakaTime Status", + en: "WakaTime Stats", + bn: "WakaTime স্ট্যাটাস", + es: "Estadísticas de WakaTime", + fr: "Statistiques de WakaTime", + hu: "WakaTime statisztika", + it: "Statistiche WakaTime", + ja: "WakaTime ワカタイム統計", + kr: "WakaTime 주간 통계", + nl: "WakaTime-statistieken", + "pt-pt": "Estatísticas WakaTime", + "pt-br": "Estatísticas WakaTime", + np: "WakaTime तथ्या .्क", + el: "Στατιστικά WakaTime", + ru: "Статистика WakaTime", + "uk-ua": "Статистика WakaTime", + id: "Status WakaTime", ml: "വേക്ക് ടൈം സ്ഥിതിവിവരക്കണക്കുകൾ", - my: "Statistik Wakatime", - sk: "Wakatime štatistika", - tr: "Waketime İstatistikler", - pl: "Statystyki Wakatime", - uz: "Wakatime statistikasi", - vi: "Thống Kê Wakatime", - se: "Wakatime statistik", + my: "Statistik WakaTime", + sk: "WakaTime štatistika", + tr: "WakaTime İstatistikler", + pl: "Statystyki WakaTime", + uz: "WakaTime statistikasi", + vi: "Thống Kê WakaTime", + se: "WakaTime statistik", }, "wakatimecard.lastyear": { ar: "العام الماضي", @@ -614,34 +614,34 @@ const wakatimeCardLocales = { }, "wakatimecard.notpublic": { ar: "ملف المستخدم غير عام", - cn: "Wakatime 用户个人资料未公开", - "zh-tw": "Wakatime 使用者個人資料未公開", - cs: "Profil uživatele Wakatime není veřejný", - de: "Wakatime-Benutzerprofil nicht öffentlich", - en: "Wakatime user profile not public", - bn: "Wakatime ব্যবহারকারীর প্রোফাইল প্রকাশ্য নয়", - es: "Perfil de usuario de Wakatime no público", - fr: "Profil utilisateur Wakatime non public", - hu: "A Wakatime felhasználói profilja nem nyilvános", - it: "Profilo utente Wakatime non pubblico", - ja: "Wakatime ユーザープロファイルは公開されていません", - kr: "Wakatime 사용자 프로필이 공개되지 않았습니다", - nl: "Wakatime gebruikersprofiel niet openbaar", - "pt-pt": "Perfil de usuário Wakatime não público", - "pt-br": "Perfil de usuário Wakatime não público", - np: "Wakatime प्रयोगकर्ता प्रोफाइल सार्वजनिक छैन", - el: "Το προφίλ χρήστη Wakatime δεν είναι δημόσιο", - ru: "Профиль пользователя Wakatime не является общедоступным", - "uk-ua": "Профіль користувача Wakatime не є публічним", - id: "Profil pengguna Wakatime tidak publik", - ml: "Wakatime ഉപയോക്തൃ പ്രൊഫൈൽ പൊതുവായി പ്രസിദ്ധീകരിക്കപ്പെടാത്തതാണ്", - my: "Profil pengguna Wakatime tidak awam", - sk: "Profil používateľa Wakatime nie je verejný", - tr: "Wakatime kullanıcı profili herkese açık değil", - pl: "Profil użytkownika Wakatime nie jest publiczny", - uz: "Wakatime foydalanuvchi profili ochiq emas", - vi: "Hồ sơ người dùng Wakatime không công khai", - se: "Wakatime användarprofil inte offentlig", + cn: "WakaTime 用户个人资料未公开", + "zh-tw": "WakaTime 使用者個人資料未公開", + cs: "Profil uživatele WakaTime není veřejný", + de: "WakaTime-Benutzerprofil nicht öffentlich", + en: "WakaTime user profile not public", + bn: "WakaTime ব্যবহারকারীর প্রোফাইল প্রকাশ্য নয়", + es: "Perfil de usuario de WakaTime no público", + fr: "Profil utilisateur WakaTime non public", + hu: "A WakaTime felhasználói profilja nem nyilvános", + it: "Profilo utente WakaTime non pubblico", + ja: "WakaTime ユーザープロファイルは公開されていません", + kr: "WakaTime 사용자 프로필이 공개되지 않았습니다", + nl: "WakaTime gebruikersprofiel niet openbaar", + "pt-pt": "Perfil de usuário WakaTime não público", + "pt-br": "Perfil de usuário WakaTime não público", + np: "WakaTime प्रयोगकर्ता प्रोफाइल सार्वजनिक छैन", + el: "Το προφίλ χρήστη WakaTime δεν είναι δημόσιο", + ru: "Профиль пользователя WakaTime не является общедоступным", + "uk-ua": "Профіль користувача WakaTime не є публічним", + id: "Profil pengguna WakaTime tidak publik", + ml: "WakaTime ഉപയോക്തൃ പ്രൊഫൈൽ പൊതുവായി പ്രസിദ്ധീകരിക്കപ്പെടാത്തതാണ്", + my: "Profil pengguna WakaTime tidak awam", + sk: "Profil používateľa WakaTime nie je verejný", + tr: "WakaTime kullanıcı profili herkese açık değil", + pl: "Profil użytkownika WakaTime nie jest publiczny", + uz: "WakaTime foydalanuvchi profili ochiq emas", + vi: "Hồ sơ người dùng WakaTime không công khai", + se: "WakaTime användarprofil inte offentlig", }, "wakatimecard.nocodedetails": { ar: "المستخدم لا يشارك معلومات تفصيلية عن البرمجة", diff --git a/tests/__snapshots__/renderWakatimeCard.test.js.snap b/tests/__snapshots__/renderWakatimeCard.test.js.snap index 2050be022d9eb..f38ac26ef07f7 100644 --- a/tests/__snapshots__/renderWakatimeCard.test.js.snap +++ b/tests/__snapshots__/renderWakatimeCard.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Test Render Wakatime Card should render correctly 1`] = `[Function]`; +exports[`Test Render WakaTime Card should render correctly 1`] = `[Function]`; -exports[`Test Render Wakatime Card should render correctly with compact layout 1`] = ` +exports[`Test Render WakaTime Card should render correctly with compact layout 1`] = ` " Wakatime Stats (last 7 days) + >WakaTime Stats (last 7 days) @@ -188,7 +154,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1 " `; -exports[`Test Render Wakatime Card should render correctly with compact layout when langs_count is set 1`] = ` +exports[`Test Render WakaTime Card should render correctly with compact layout when langs_count is set 1`] = ` " Wakatime Stats (last 7 days) + >WakaTime Stats (last 7 days) diff --git a/tests/api.test.js b/tests/api.test.js index 6af40f8818463..eee9a1a0a61af 100644 --- a/tests/api.test.js +++ b/tests/api.test.js @@ -120,6 +120,21 @@ describe("Test /api/", () => { ); }); + it("should render error card in same theme as requested card", async () => { + const { req, res } = faker({ theme: "merko" }, error); + + await api(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError( + error.errors[0].message, + "Make sure the provided username is not an organization", + { theme: "merko" }, + ), + ); + }); + it("should get the query options", async () => { const { req, res } = faker( { @@ -291,7 +306,9 @@ describe("Test /api/", () => { await api(req, res); expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); - expect(res.send).toBeCalledWith(renderError("Something went wrong")); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); }); it("should render error card when wrong locale is provided", async () => { @@ -321,5 +338,9 @@ describe("Test /api/", () => { expect(res.send).toBeCalledWith( renderError("Could not fetch total commits.", "Please try again later"), ); + // Received SVG output should not contain string "https://tiny.one/readme-stats" + expect(res.send.mock.calls[0][0]).not.toContain( + "https://tiny.one/readme-stats", + ); }); }); diff --git a/tests/bench/api.bench.js b/tests/bench/api.bench.js new file mode 100644 index 0000000000000..4796b64306e24 --- /dev/null +++ b/tests/bench/api.bench.js @@ -0,0 +1,76 @@ +import { benchmarkSuite } from "jest-bench"; +import api from "../../api/index.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const stats = { + name: "Anurag Hazra", + totalStars: 100, + totalCommits: 200, + totalIssues: 300, + totalPRs: 400, + totalPRsMerged: 320, + mergedPRsPercentage: 80, + totalReviews: 50, + totalDiscussionsStarted: 10, + totalDiscussionsAnswered: 40, + contributedTo: 50, + rank: null, +}; + +const data_stats = { + data: { + user: { + name: stats.name, + repositoriesContributedTo: { totalCount: stats.contributedTo }, + contributionsCollection: { + totalCommitContributions: stats.totalCommits, + totalPullRequestReviewContributions: stats.totalReviews, + }, + pullRequests: { totalCount: stats.totalPRs }, + mergedPullRequests: { totalCount: stats.totalPRsMerged }, + openIssues: { totalCount: stats.totalIssues }, + closedIssues: { totalCount: 0 }, + followers: { totalCount: 0 }, + repositoryDiscussions: { totalCount: stats.totalDiscussionsStarted }, + repositoryDiscussionComments: { + totalCount: stats.totalDiscussionsAnswered, + }, + repositories: { + totalCount: 1, + nodes: [{ stargazers: { totalCount: 100 } }], + pageInfo: { + hasNextPage: false, + endCursor: "cursor", + }, + }, + }, + }, +}; + +const mock = new MockAdapter(axios); + +const faker = (query, data) => { + const req = { + query: { + username: "anuraghazra", + ...query, + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").replyOnce(200, data); + + return { req, res }; +}; + +benchmarkSuite("test /api", { + ["simple request"]: async () => { + const { req, res } = faker({}, data_stats); + + await api(req, res); + }, +}); diff --git a/tests/bench/calculateRank.bench.js b/tests/bench/calculateRank.bench.js new file mode 100644 index 0000000000000..1ce6b05b28291 --- /dev/null +++ b/tests/bench/calculateRank.bench.js @@ -0,0 +1,17 @@ +import { benchmarkSuite } from "jest-bench"; +import { calculateRank } from "../../src/calculateRank.js"; + +benchmarkSuite("calculateRank", { + ["calculateRank"]: () => { + calculateRank({ + all_commits: false, + commits: 1300, + prs: 1500, + issues: 4500, + reviews: 1000, + repos: 0, + stars: 600000, + followers: 50000, + }); + }, +}); diff --git a/tests/fetchStats.test.js b/tests/fetchStats.test.js index 56125d8b5c1a7..ca8d7bc37062e 100644 --- a/tests/fetchStats.test.js +++ b/tests/fetchStats.test.js @@ -122,12 +122,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 300, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -158,12 +158,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 300, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -200,12 +200,12 @@ describe("Test fetchStats", () => { totalCommits: 1000, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 300, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -249,12 +249,12 @@ describe("Test fetchStats", () => { totalCommits: 1000, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 200, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -280,12 +280,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 400, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -311,12 +311,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, - totalPRsMerged: 240, - mergedPRsPercentage: 80, + totalPRsMerged: 0, + mergedPRsPercentage: 0, totalReviews: 50, totalStars: 300, - totalDiscussionsStarted: 10, - totalDiscussionsAnswered: 40, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -336,6 +336,64 @@ describe("Test fetchStats", () => { followers: 100, }); + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 100, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should not fetch additional stats data when it not requested", async () => { + let stats = await fetchStats("anuraghazra"); + const rank = calculateRank({ + all_commits: false, + commits: 100, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 300, + followers: 100, + }); + + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 100, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should fetch additional stats when it requested", async () => { + let stats = await fetchStats("anuraghazra", false, [], true, true, true); + const rank = calculateRank({ + all_commits: false, + commits: 100, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 300, + followers: 100, + }); + expect(stats).toStrictEqual({ contributedTo: 61, name: "Anurag Hazra", diff --git a/tests/fetchTopLanguages.test.js b/tests/fetchTopLanguages.test.js index 90648c3198dd9..e7bd54ac87d34 100644 --- a/tests/fetchTopLanguages.test.js +++ b/tests/fetchTopLanguages.test.js @@ -165,7 +165,7 @@ describe("FetchTopLanguages", () => { }); await expect(fetchTopLanguages("anuraghazra")).rejects.toThrow( - "Something went while trying to retrieve the language data using the GraphQL API.", + "Something went wrong while trying to retrieve the language data using the GraphQL API.", ); }); }); diff --git a/tests/fetchWakatime.test.js b/tests/fetchWakatime.test.js index 1636114ee5404..8e24893dfe0fd 100644 --- a/tests/fetchWakatime.test.js +++ b/tests/fetchWakatime.test.js @@ -102,8 +102,8 @@ const wakaTimeData = { }, }; -describe("Wakatime fetcher", () => { - it("should fetch correct wakatime data", async () => { +describe("WakaTime fetcher", () => { + it("should fetch correct WakaTime data", async () => { const username = "anuraghazra"; mock .onGet( diff --git a/tests/pin.test.js b/tests/pin.test.js index 0dcb5aa9768fd..105e4450c3805 100644 --- a/tests/pin.test.js +++ b/tests/pin.test.js @@ -155,7 +155,9 @@ describe("Test /api/pin", () => { await pin(req, res); expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); - expect(res.send).toBeCalledWith(renderError("Something went wrong")); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); }); it("should render error card if wrong locale provided", async () => { diff --git a/tests/renderGistCard.test.js b/tests/renderGistCard.test.js index 6e636fc50de6b..f514bf6dc0d93 100644 --- a/tests/renderGistCard.test.js +++ b/tests/renderGistCard.test.js @@ -135,9 +135,10 @@ describe("test renderGistCard", () => { ); expect(descClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); diff --git a/tests/renderRepoCard.test.js b/tests/renderRepoCard.test.js index 61c9bc6da9ac5..050e7109490bb 100644 --- a/tests/renderRepoCard.test.js +++ b/tests/renderRepoCard.test.js @@ -190,9 +190,10 @@ describe("Test renderRepoCard", () => { ); expect(descClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); diff --git a/tests/renderStatsCard.test.js b/tests/renderStatsCard.test.js index abbf2100306d7..c203488bbb6db 100644 --- a/tests/renderStatsCard.test.js +++ b/tests/renderStatsCard.test.js @@ -264,9 +264,10 @@ describe("Test renderStatsCard", () => { ); expect(statClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); diff --git a/tests/renderTopLanguagesCard.test.js b/tests/renderTopLanguagesCard.test.js index 6b7ef62aa30dd..8d67c3fb8ab98 100644 --- a/tests/renderTopLanguagesCard.test.js +++ b/tests/renderTopLanguagesCard.test.js @@ -524,9 +524,10 @@ describe("Test renderTopLanguages", () => { expect(headerStyles.fill.trim()).toBe(`#${themes[name].title_color}`); expect(langNameStyles.fill.trim()).toBe(`#${themes[name].text_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); diff --git a/tests/renderWakatimeCard.test.js b/tests/renderWakatimeCard.test.js index 5098a3ac4943a..7c3710758c5ec 100644 --- a/tests/renderWakatimeCard.test.js +++ b/tests/renderWakatimeCard.test.js @@ -5,7 +5,7 @@ import { getCardColors } from "../src/common/utils.js"; import { wakaTimeData } from "./fetchWakatime.test.js"; import { expect, it, describe } from "@jest/globals"; -describe("Test Render Wakatime Card", () => { +describe("Test Render WakaTime Card", () => { it("should render correctly", () => { // const card = renderWakatimeCard(wakaTimeData.data); expect(getCardColors).toMatchSnapshot(); @@ -39,12 +39,12 @@ describe("Test Render Wakatime Card", () => { it("should render translations", () => { document.body.innerHTML = renderWakatimeCard({}, { locale: "cn" }); expect(document.getElementsByClassName("header")[0].textContent).toBe( - "Wakatime 周统计", + "WakaTime 周统计", ); expect( document.querySelector('g[transform="translate(0, 0)"]>text.stat.bold') .textContent, - ).toBe("Wakatime 用户个人资料未公开"); + ).toBe("WakaTime 用户个人资料未公开"); }); it("should render without rounding", () => { diff --git a/tests/top-langs.test.js b/tests/top-langs.test.js index 272ee7eabea2b..692681b294da6 100644 --- a/tests/top-langs.test.js +++ b/tests/top-langs.test.js @@ -183,7 +183,9 @@ describe("Test /api/top-langs", () => { await topLangs(req, res); expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); - expect(res.send).toBeCalledWith(renderError("Something went wrong")); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); }); it("should render error card if wrong locale provided", async () => { diff --git a/tests/wakatime.test.js b/tests/wakatime.test.js new file mode 100644 index 0000000000000..944c3e020dd38 --- /dev/null +++ b/tests/wakatime.test.js @@ -0,0 +1,123 @@ +import { jest } from "@jest/globals"; +import "@testing-library/jest-dom"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import wakatime from "../api/wakatime.js"; +import { renderWakatimeCard } from "../src/cards/wakatime-card.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; + +const wakaTimeData = { + data: { + categories: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "Coding", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + daily_average: 16095, + daily_average_including_other_language: 16329, + days_including_holidays: 7, + days_minus_holidays: 5, + editors: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "VS Code", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + holidays: 2, + human_readable_daily_average: "4 hrs 28 mins", + human_readable_daily_average_including_other_language: "4 hrs 32 mins", + human_readable_total: "22 hrs 21 mins", + human_readable_total_including_other_language: "22 hrs 40 mins", + id: "random hash", + is_already_updating: false, + is_coding_activity_visible: true, + is_including_today: false, + is_other_usage_visible: true, + is_stuck: false, + is_up_to_date: true, + languages: [ + { + digital: "0:19", + hours: 0, + minutes: 19, + name: "Other", + percent: 1.43, + text: "19 mins", + total_seconds: 1170.434361, + }, + { + digital: "0:01", + hours: 0, + minutes: 1, + name: "TypeScript", + percent: 0.1, + text: "1 min", + total_seconds: 83.293809, + }, + { + digital: "0:00", + hours: 0, + minutes: 0, + name: "YAML", + percent: 0.07, + text: "0 secs", + total_seconds: 54.975151, + }, + ], + operating_systems: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "Mac", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + percent_calculated: 100, + range: "last_7_days", + status: "ok", + timeout: 15, + total_seconds: 80473.135716, + total_seconds_including_other_language: 81643.570077, + user_id: "random hash", + username: "anuraghazra", + writes_only: false, + }, +}; + +const mock = new MockAdapter(axios); + +afterEach(() => { + mock.reset(); +}); + +describe("Test /api/wakatime", () => { + it("should test the request", async () => { + const username = "anuraghazra"; + const req = { query: { username } }; + const res = { setHeader: jest.fn(), send: jest.fn() }; + mock + .onGet( + `https://wakatime.com/api/v1/users/${username}/stats?is_including_today=true`, + ) + .reply(200, wakaTimeData); + + await wakatime(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith(renderWakatimeCard(wakaTimeData.data, {})); + }); +}); diff --git a/themes/README.md b/themes/README.md index a20f028c966a9..5e50b5bbc8e6d 100644 --- a/themes/README.md +++ b/themes/README.md @@ -4,7 +4,7 @@ With inbuilt themes, you can customize the look of the card without doing any manual customization. -Use `?theme=THEME_NAME` parameter like so :- +Use `?theme=THEME_NAME` parameter like so: ```md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&theme=dark&show_icons=true) @@ -12,7 +12,7 @@ Use `?theme=THEME_NAME` parameter like so :- ## Stats -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -37,13 +37,14 @@ Use `?theme=THEME_NAME` parameter like so :- | `aura_dark` ![aura_dark][aura_dark] | `panda` ![panda][panda] | `noctis_minimus` ![noctis_minimus][noctis_minimus] | | `cobalt2` ![cobalt2][cobalt2] | `swift` ![swift][swift] | `aura` ![aura][aura] | | `apprentice` ![apprentice][apprentice] | `moltack` ![moltack][moltack] | `codeSTACKr` ![codeSTACKr][codeSTACKr] | -| `rose_pine` ![rose_pine][rose_pine] | `date_night` ![date_night][date_night] | `one_dark_pro` ![one_dark_pro][one_dark_pro] | -| `rose` ![rose][rose] | `holi` ![holi][holi] | `neon` ![neon][neon] | -| `blue_navy` ![blue_navy][blue_navy] | `calm_pink` ![calm_pink][calm_pink] | [Add your theme][add-theme] | +| `rose_pine` ![rose_pine][rose_pine] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha] | +| `date_night` ![date_night][date_night] | `one_dark_pro` ![one_dark_pro][one_dark_pro] | `rose` ![rose][rose] | +| `holi` ![holi][holi] | `neon` ![neon][neon] | `blue_navy` ![blue_navy][blue_navy] | +| `calm_pink` ![calm_pink][calm_pink] | `ambient_gradient` ![ambient_gradient][ambient_gradient] | [Add your theme][add-theme] | ## Repo Card -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -68,9 +69,10 @@ Use `?theme=THEME_NAME` parameter like so :- | `aura_dark` ![aura_dark][aura_dark_repo] | `panda` ![panda][panda_repo] | `noctis_minimus` ![noctis_minimus][noctis_minimus_repo] | | `cobalt2` ![cobalt2][cobalt2_repo] | `swift` ![swift][swift_repo] | `aura` ![aura][aura_repo] | | `apprentice` ![apprentice][apprentice_repo] | `moltack` ![moltack][moltack_repo] | `codeSTACKr` ![codeSTACKr][codeSTACKr_repo] | -| `rose_pine` ![rose_pine][rose_pine_repo] | `date_night` ![date_night][date_night_repo] | `one_dark_pro` ![one_dark_pro][one_dark_pro_repo] | -| `rose` ![rose][rose_repo] | `holi` ![holi][holi_repo] | `neon` ![neon][neon_repo] | -| `blue_navy` ![blue_navy][blue_navy_repo] | `calm_pink` ![calm_pink][calm_pink_repo] | [Add your theme][add-theme] | +| `rose_pine` ![rose_pine][rose_pine_repo] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte_repo] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha_repo] | +| `date_night` ![date_night][date_night_repo] | `one_dark_pro` ![one_dark_pro][one_dark_pro_repo] | `rose` ![rose][rose_repo] | +| `holi` ![holi][holi_repo] | `neon` ![neon][neon_repo] | `blue_navy` ![blue_navy][blue_navy_repo] | +| `calm_pink` ![calm_pink][calm_pink_repo] | `ambient_gradient` ![ambient_gradient][ambient_gradient_repo] | [Add your theme][add-theme] | [default]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=default @@ -138,6 +140,8 @@ Use `?theme=THEME_NAME` parameter like so :- [moltack]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=moltack [codeSTACKr]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=codeSTACKr [rose_pine]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose_pine +[catppuccin_latte]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=catppuccin_latte +[catppuccin_mocha]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=catppuccin_mocha [date_night]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=date_night [one_dark_pro]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=one_dark_pro [rose]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose @@ -145,6 +149,7 @@ Use `?theme=THEME_NAME` parameter like so :- [neon]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=neon [blue_navy]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=blue_navy [calm_pink]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=calm_pink +[ambient_gradient]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ambient_gradient [default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default @@ -212,6 +217,8 @@ Use `?theme=THEME_NAME` parameter like so :- [moltack_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=moltack [codeSTACKr_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=codeSTACKr [rose_pine_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose_pine +[catppuccin_latte_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=catppuccin_latte +[catppuccin_mocha_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=catppuccin_mocha [date_night_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=date_night [one_dark_pro_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=one_dark_pro [rose_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose @@ -219,6 +226,7 @@ Use `?theme=THEME_NAME` parameter like so :- [neon_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=neon [blue_navy_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=blue_navy [calm_pink_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=calm_pink +[ambient_gradient_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ambient_gradient [add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js diff --git a/themes/index.js b/themes/index.js index 6450655e2da85..f5d8d9160fd1b 100644 --- a/themes/index.js +++ b/themes/index.js @@ -395,6 +395,18 @@ export const themes = { text_color: "e0def4", bg_color: "191724", }, + catppuccin_latte: { + title_color: "137980", + icon_color: "8839ef", + text_color: "4c4f69", + bg_color: "eff1f5", + }, + catppuccin_mocha: { + title_color: "94e2d5", + icon_color: "cba6f7", + text_color: "cdd6f4", + bg_color: "1e1e2e", + }, date_night: { title_color: "DA7885", text_color: "E1B2A2", @@ -444,6 +456,12 @@ export const themes = { border_color: "e1bc29", bg_color: "2b2d40", }, + ambient_gradient: { + title_color: "ffffff", + text_color: "ffffff", + icon_color: "ffffff", + bg_color: "35,4158d0,c850c0,ffcc70", + }, }; export default themes;