diff --git a/.eslintrc.json b/.eslintrc.json index 9ec7f296bd071..a560b9667a655 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,7 +19,7 @@ "no-unexpected-multiline": "error", // All JSDoc comments must be valid - + "valid-jsdoc": [ "error", { "requireReturn": true, "requireReturnDescription": true, @@ -48,8 +48,8 @@ // "dot-notation": "warn", // "eqeqeq": [ "error", "smart" ], // "guard-for-in": "warn", - // "no-alert": "error", - // "no-caller": "error", + "no-alert": "error", + "no-caller": "error", // "no-case-declarations": "warn", // "no-div-regex": "warn", // "no-else-return": "warn", @@ -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" ], @@ -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/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000000..b76bc3de3105f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @devantler diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..a9da986766816 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +## Description + +Describe your PR... + +Closes `#issue-number` diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000000000..123014908bebb --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" 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/labeler.yml b/.github/labeler.yml index aa276c6ec0c5e..46d637d7b5b2e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,52 +1,95 @@ -themes: themes/index.js -doc-translation: docs/* +themes: + - changed-files: + - any-glob-to-any-file: + - themes/index.js + +doc-translation: + - changed-files: + - any-glob-to-any-file: + - docs/* + card-i18n: - - src/translations.js - - src/common/I18n.js + - changed-files: + - any-glob-to-any-file: + - src/translations.js + - src/common/I18n.js + documentation: - - readme.md - - CONTRIBUTING.md - - CODE_OF_CONDUCT.md - - SECURITY.md + - changed-files: + - any-glob-to-any-file: + - readme.md + - CONTRIBUTING.md + - CODE_OF_CONDUCT.md + - SECURITY.md + dependencies: - - package.json - - package-lock.json + - changed-files: + - any-glob-to-any-file: + - package.json + - package-lock.json + lang-card: - - api/top-langs.js - - src/cards/top-languages-card.js - - src/fetchers/top-languages-fetcher.js - - tests/fetchTopLanguages.test.js - - tests/renderTopLanguagesCard.test.js - - tests/top-langs.test.js + - changed-files: + - any-glob-to-any-file: + - api/top-langs.js + - src/cards/top-languages-card.js + - src/fetchers/top-languages-fetcher.js + - tests/fetchTopLanguages.test.js + - tests/renderTopLanguagesCard.test.js + - tests/top-langs.test.js + repo-card: - - api/pin.js - - src/cards/repo-card.js - - src/fetchers/repo-fetcher.js - - tests/fetchRepo.test.js - - tests/renderRepoCard.test.js - - tests/pin.test.js + - changed-files: + - any-glob-to-any-file: + - api/pin.js + - src/cards/repo-card.js + - src/fetchers/repo-fetcher.js + - tests/fetchRepo.test.js + - tests/renderRepoCard.test.js + - tests/pin.test.js + stats-card: - - api/index.js - - src/cards/stats-card.js - - src/fetchers/stats-fetcher.js - - tests/fetchStats.test.js - - tests/renderStatsCard.test.js - - tests/api.test.js + - changed-files: + - any-glob-to-any-file: + - api/index.js + - src/cards/stats-card.js + - src/fetchers/stats-fetcher.js + - tests/fetchStats.test.js + - tests/renderStatsCard.test.js + - tests/api.test.js + wakatime-card: - - api/wakatime.js - - src/cards/wakatime-card.js - - src/fetchers/wakatime-fetcher.js - - tests/fetchWakatime.test.js - - tests/renderWakatimeCard.test.js + - changed-files: + - any-glob-to-any-file: + - api/wakatime.js + - src/cards/wakatime-card.js + - src/fetchers/wakatime-fetcher.js + - tests/fetchWakatime.test.js + - tests/renderWakatimeCard.test.js + - tests/wakatime.test.js + gist-card: - - api/gist.js - - src/cards/gist-card.js - - src/fetchers/gist-fetcher.js - - tests/fetchGist.test.js - - tests/renderGistCard.test.js - - tests/gist.test.js -ranks: src/calculateRank.js + - changed-files: + - any-glob-to-any-file: + - api/gist.js + - src/cards/gist-card.js + - src/fetchers/gist-fetcher.js + - tests/fetchGist.test.js + - tests/renderGistCard.test.js + - tests/gist.test.js + +ranks: + - changed-files: + - any-glob-to-any-file: + - src/calculateRank.js + ci: - - .github/workflows/* - - scripts/* -infrastructure: .eslintrc.json + - changed-files: + - any-glob-to-any-file: + - .github/workflows/* + - scripts/* + +infrastructure: + - changed-files: + - any-glob-to-any-file: + - .eslintrc.json diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000000000..9f541df0cbbd4 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,66 @@ +name-template: "v$RESOLVED_VERSION 🌈" +tag-template: "v$RESOLVED_VERSION" +categories: + - title: "🐛 Bug Fixes" + label: "bug" + - title: "📚 Documentation" + label: "documentation" + - title: "🚀 Enhancements" + label: "enhancement" + - title: "🔨 Refactorings" + label: "refactor" + - title: "🧹 Chore" + label: "chore" + - title: "🔬 Research" + label: "research" + - title: "⬆️ Dependencies" + collapse-after: 3 + labels: + - "dependencies" +autolabeler: + - label: 'bug' + branch: + - '/fix\/.+/' + - '/bug\/.*/' + title: + - '/fix\/.+/' + - '/bug\/.*/' + - label: 'documentation' + branch: + - '/documentation\/.+/' + - '/docs\/.+/' + - '/doc\/.*/' + title: + - '/documentation\/.+/' + - '/docs\/.+/' + - '/doc\/.*/' + files: + - '*.md' + - label: 'enhancement' + branch: + - '/feature\/.+/' + - '/enhancement\/.*' + title: + - '/feature\/.+/' + - '/enhancement\/.*' + - label: 'refactor' + branch: + - '/refactor\/.+/' + - '/refactoring\/.*' + title: + - '/refactor\/.+/' + - '/refactoring\/.*' + - label: 'chore' + branch: + - '/chore\/.*/' + title: + - '/chore\/.+/' +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +prerelease: true +prerelease-identifier: "prerelease" +tag-prefix: "v" +template: | + $CHANGES + + ## 📋 Other Changes diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000000000..616540f57706c --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended", ":disableDependencyDashboard"], + "flux": { + "fileMatch": [ + "^k8s/.+\\.ya?ml$" + ] + }, + "kubernetes": { + "fileMatch": [ + "^k8s/.+\\.ya?ml$" + ] + }, + "github-actions": { + "enabled": false + } +} diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml new file mode 100644 index 0000000000000..2b59f64268def --- /dev/null +++ b/.github/workflows/auto-merge.yaml @@ -0,0 +1,38 @@ +name: Auto Merge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + steps: + - id: auto-merge + uses: "pascalgn/automerge-action@v0.15.6" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: "" + MERGE_METHOD: "squash" + MERGE_RETRIES: 60 + UPDATE_LABELS: "" + UPDATE_METHOD: "rebase" diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 9f6febfd071b8..c3d7c57d803cd 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yml similarity index 93% rename from .github/workflows/empty-issues-closer.yaml rename to .github/workflows/empty-issues-closer.yml index e7d3738be77a9..ba61edf5ccdf8 100644 --- a/.github/workflows/empty-issues-closer.yaml +++ b/.github/workflows/empty-issues-closer.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Run empty issues closer action - uses: rickstaa/empty-issues-closer-action@af151e679df0e3b59cda0e10c43010556d6c5bff # v1.1.35 + uses: rickstaa/empty-issues-closer-action@67fade8af223e124eedb5e7c77e7df7c9a4a434c # v1.1.68 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/fork-sync.yaml b/.github/workflows/fork-sync.yaml new file mode 100644 index 0000000000000..f50edf4ed9690 --- /dev/null +++ b/.github/workflows/fork-sync.yaml @@ -0,0 +1,21 @@ +name: Sync Fork + +on: + schedule: + - cron: "0 0 * * *" # every 30 minutes + workflow_dispatch: # on button click + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: tgymnich/fork-sync@v1.9 + with: + owner: devantler + base: main + head: main + ignore_fail: true diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index 77ae534858838..194eba1e6c9f8 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/github-readme-tree.yaml b/.github/workflows/github-readme-tree.yaml new file mode 100644 index 0000000000000..97920c3470e0e --- /dev/null +++ b/.github/workflows/github-readme-tree.yaml @@ -0,0 +1,29 @@ +name: GitHub Readme Tree + +on: + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tree: + runs-on: ubuntu-latest + name: readme-tree + steps: + - uses: actions/checkout@v4 + - name: Create README Tree + uses: RavelloH/readme-tree@v1.1.0 + with: + showdirectoryname: "yes" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + branch: update-readme-tree + commit-message: Update README Tree + title: Update README Tree + body: This PR includes new updates to the README Tree. + labels: documentation diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index 2d191cc2831be..5318b304d3a36 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -21,6 +21,7 @@ jobs: if: github.repository == 'anuraghazra/github-readme-stats' runs-on: ubuntu-latest steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true diff --git a/.github/workflows/ossf-analysis.yml b/.github/workflows/ossf-analysis.yml index fb66b494964b3..217f7a86e6595 100644 --- a/.github/workflows/ossf-analysis.yml +++ b/.github/workflows/ossf-analysis.yml @@ -26,7 +26,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0 + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 with: results_file: results.sarif results_format: sarif @@ -35,7 +35,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0 with: name: SARIF file path: results.sarif diff --git a/.github/workflows/preview-theme.yml b/.github/workflows/preview-theme.yml index a9770f929a500..86ec1d3c7144b 100644 --- a/.github/workflows/preview-theme.yml +++ b/.github/workflows/preview-theme.yml @@ -33,12 +33,12 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm - - uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36 + - uses: bahmutov/npm-install@d476752204653fb5cce6c09db0eaf220761f5d9e # v1.8.37 with: useLockFile: false diff --git a/.github/workflows/prs-cache-clean.yml b/.github/workflows/prs-cache-clean.yml index faa3741672ef6..3d6e35f81684e 100644 --- a/.github/workflows/prs-cache-clean.yml +++ b/.github/workflows/prs-cache-clean.yml @@ -35,7 +35,7 @@ jobs: echo "Fetching list of cache key" cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) - ## Setting this to not fail the workflow while deleting cache keys. + ## Setting this to not fail the workflow while deleting cache keys. set +e echo "Deleting caches..." for cacheKey in $cacheKeysForPR diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml new file mode 100644 index 0000000000000..99e3116f0e275 --- /dev/null +++ b/.github/workflows/release-drafter.yaml @@ -0,0 +1,24 @@ +name: Release Drafter + +permissions: + contents: write + pull-requests: write + +on: + push: + branches: + - main + - master + pull_request: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/require-labels.yaml b/.github/workflows/require-labels.yaml new file mode 100644 index 0000000000000..f3a46bdb5b5e3 --- /dev/null +++ b/.github/workflows/require-labels.yaml @@ -0,0 +1,27 @@ +name: Require Pull Request Labels +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + require-labels: + if: | + github.actor != 'github-actions[bot]' && + github.actor != 'dependabot[bot]' && + github.actor != 'renovate[bot]' && + github.actor != 'web-flow' && + github.event.pull_request.title != 'Update global workflows' + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: "bug,documentation,enhancement,refactor,research" diff --git a/.github/workflows/stale-theme-pr-closer.yaml b/.github/workflows/stale-theme-pr-closer.yml similarity index 90% rename from .github/workflows/stale-theme-pr-closer.yaml rename to .github/workflows/stale-theme-pr-closer.yml index 1387cdb92ec4e..37b42464e7c87 100644 --- a/.github/workflows/stale-theme-pr-closer.yaml +++ b/.github/workflows/stale-theme-pr-closer.yml @@ -39,12 +39,12 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm - - uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36 + - uses: bahmutov/npm-install@d476752204653fb5cce6c09db0eaf220761f5d9e # v1.8.37 with: useLockFile: false diff --git a/.github/workflows/sync-labels.yaml b/.github/workflows/sync-labels.yaml new file mode 100644 index 0000000000000..9c3b9e8eb64d9 --- /dev/null +++ b/.github/workflows/sync-labels.yaml @@ -0,0 +1,20 @@ +name: Sync labels +on: + schedule: + - cron: "0 7 * * 1" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + sync: + name: Run EndBug/label-sync + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: EndBug/label-sync@v2 + with: + config-file: "https://raw.githubusercontent.com/devantler/.github/main/.github/labels.yaml" + delete-other-labels: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f757a5edb204..71b559bbaf192 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/todos-to-issues.yaml b/.github/workflows/todos-to-issues.yaml new file mode 100644 index 0000000000000..f34b2e72834b7 --- /dev/null +++ b/.github/workflows/todos-to-issues.yaml @@ -0,0 +1,17 @@ +name: "TODOs" +on: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "alstr/todo-to-issue-action@v4" + env: + AUTO_ASSIGN: true diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml index e07c269addcd6..8d13974025e22 100644 --- a/.github/workflows/top-issues-dashboard.yml +++ b/.github/workflows/top-issues-dashboard.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run top issues action - uses: rickstaa/top-issues-action@36df2af30c15ddf48558931420138890ed1b1708 # v1.3.61 + uses: rickstaa/top-issues-action@eefb38db8e2fa93f349623f5fc987daf7816ffbd # v1.3.93 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: @@ -47,3 +47,7 @@ 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.yml similarity index 96% rename from .github/workflows/update-langs.yaml rename to .github/workflows/update-langs.yml index d1b12d12a11ce..111eed586a99d 100644 --- a/.github/workflows/update-langs.yaml +++ b/.github/workflows/update-langs.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.nvmrc b/.nvmrc index 25bf17fc5aaab..2edeafb09db00 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 \ No newline at end of file +20 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index caf5ce7acf533..f607da7b512c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,8 +34,8 @@ _(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. Run the command `vercel dev` to start a development server at . -6. 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. 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 adfd33174cdbc..2029367ca3eb9 100644 --- a/api/index.js +++ b/api/index.js @@ -42,11 +42,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 { @@ -111,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..0bc029d7ffda3 100644 --- a/api/pin.js +++ b/api/pin.js @@ -24,16 +24,33 @@ export default async (req, res) => { locale, border_radius, border_color, + description_lines_count, } = req.query; 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 { @@ -80,6 +97,7 @@ export default async (req, res) => { border_color, show_owner: parseBoolean(show_owner), locale: locale ? locale.toLowerCase() : null, + description_lines_count, }), ); } catch (err) { @@ -89,6 +107,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..de263e0644c43 100644 --- a/api/wakatime.js +++ b/api/wakatime.js @@ -30,12 +30,22 @@ export default async (req, res) => { api_domain, border_radius, border_color, + display_format, + disable_animations, } = req.query; 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 { @@ -75,6 +85,8 @@ export default async (req, res) => { locale: locale ? locale.toLowerCase() : null, layout, langs_count, + display_format, + disable_animations: parseBoolean(disable_animations), }), ); } catch (err) { @@ -84,6 +96,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_np.md b/docs/readme_np.md index f5909ae718219..41053f1ef2c88 100644 --- a/docs/readme_np.md +++ b/docs/readme_np.md @@ -57,7 +57,7 @@ Türkçe

-

परियोजना मनपर्‍यो? तपाईं मद्दत गर्न सक्नुहुन्छ यो परियोजना बढ्न +

परियोजना मनपर्‍यो? तपाईं मद्दत गर्न सक्नुहुन्छ यो परियोजना बढ्न # विशेषताहरु @@ -84,7 +84,7 @@ - [देप्लोय आफ्नै वेर्चेल इन्स्तंस](#देप्लोय--आफ्नै--वेर्चेल--इन्स्तंस) - [:sparkling\_heart: सहपोर्ट द प्रोजेक्ट](#sparkling_heart-सहपोर्ट-द-प्रोजेक्ट) -# गितहब स्टेट कार्ड +# गितहब स्टेट कार्ड Copy-paste this into your markdown content, and that's it. Simple! @@ -118,7 +118,7 @@ _Note: If you are deploying this project yourself, the private contributions wil ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&count_private=true) ``` -### देखाउनु होस् इकोन +### देखाउनु होस् इकोन To enable icons, you can pass `show_icons=true` in the query param, like so: @@ -208,7 +208,7 @@ You can provide multiple comma-separated values in bg_color option to render a g --- -# गितहब अतिरिक्त पिन्स +# गितहब अतिरिक्त पिन्स GitHub extra pins allow you to pin more than 6 repositories in your profile using a GitHub readme profile. @@ -226,7 +226,7 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats) ``` -### डेमो +### डेमो [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats) @@ -234,12 +234,12 @@ Use [show_owner](#customization) variable to include the repo's owner username [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&show_owner=true)](https://github.com/anuraghazra/github-readme-stats) -# टोप भाषा कार्ड +# टोप भाषा कार्ड -टोप भाषाकार्डले github परयोग गर्नेहरुको प्रोग्रम्मिंग भाषाहरु देखाऊने गर्दछ |. +टोप भाषाकार्डले github परयोग गर्नेहरुको प्रोग्रम्मिंग भाषाहरु देखाऊने गर्दछ |. _NOTE: टोप भाषाहरुले आफ्नो सिपलाए संकेत गरेको होईन | योचै GitHub Metricबाट धेरै कुन भाषा परयोग भाकोलाए संकेत गरेको हो | -### प्रयोग +### प्रयोग कोदलाए कपी- पेसेत readme मा गर्नु होला र लिंक परिवतन गर्नु होला | @@ -257,7 +257,7 @@ You can use `?exclude_repo=repo1,repo2` parameter to exclude individual reposito [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&exclude_repo=github-readme-stats,anuraghazra.github.io)](https://github.com/anuraghazra/github-readme-stats) ``` -### कुनै भाषा चुपौनॆ तरिका +### कुनै भाषा चुपौनॆ तरिका You can use `?hide=language1,language2` parameter to hide individual languages. @@ -265,7 +265,7 @@ You can use `?hide=language1,language2` parameter to hide individual languages. [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide=javascript,html)](https://github.com/anuraghazra/github-readme-stats) ``` -### धेरॆ भाषाहरु हेर्नको लागि +### धेरॆ भाषाहरु हेर्नको लागि You can use the `&langs_count=` option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 10 (inclusive), and the default is 5. @@ -273,15 +273,15 @@ You can use the `&langs_count=` option to increase or decrease the number of lan [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&langs_count=8)](https://github.com/anuraghazra/github-readme-stats) ``` -### कम्प्याक्ट भाषा कार्ड ळयोउत +### कम्प्याक्ट भाषा कार्ड ळयोउत -तपाइले `&layout=compact` ओप्तिओनपनि कार्ड देसिग्न को लागि परहयोग गर्न सक्नु हुन्क्ष +तपाइले `&layout=compact` ओप्तिओनपनि कार्ड देसिग्न को लागि परहयोग गर्न सक्नु हुन्क्ष ```md [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) ``` -### डेमो +### डेमो [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) @@ -289,7 +289,7 @@ You can use the `&langs_count=` option to increase or decrease the number of lan [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# वाका समय वीक स्तट्स +# वाका समय वीक स्तट्स Change the `?username=` value to your [WakaTime](https://wakatime.com) username. @@ -305,51 +305,51 @@ Change the `?username=` value to your [WakaTime](https://wakatime.com) username. --- -### सबै डेमोहरु +### सबै डेमोहरु -- देफौल्ट +- देफौल्ट ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra) -- हिदिंग स्पेचific स्तट्स +- हिदिंग स्पेचific स्तट्स ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,issues) -- इकोनहरु शो गर्ने +- इकोनहरु शो गर्ने ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=issues&show_icons=true) -- सबै कमितहरु +- सबै कमितहरु ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&include_all_commits=true) -- थेम्स +- थेम्स कुनै एउटा चोज गर्नुस [default themes](#themes) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical) -- घ्रदिएन्त +- घ्रदिएन्त ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&bg_color=30,e96443,904e95&title_color=fff&text_color=fff) -- स्तत्स कार्ड लाए कस्तोमेज गर्ने +- स्तत्स कार्ड लाए कस्तोमेज गर्ने ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&show_icons=true&title_color=fff&icon_color=79ff97&text_color=9f9f9f&bg_color=151515) -- सेत्तिंग कार्ड लोचले +- सेत्तिंग कार्ड लोचले ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&locale=es) -- रेपो कार्डलाई एडित गर्नु +- रेपो कार्डलाई एडित गर्नु ![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra&repo=github-readme-stats&title_color=fff&icon_color=f9f9f9&text_color=9f9f9f&bg_color=151515) -- टोप भाषा +- टोप भाषा [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](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) @@ -368,12 +368,12 @@ Change the `?username=` value to your [WakaTime](https://wakatime.com) username. ``` -## देप्लोय आफ्नै वेर्चेल इन्स्तंस +## देप्लोय आफ्नै वेर्चेल इन्स्तंस #### [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) -गितहब को अपिएले पाच हजार रेक़ुएस्त प्रति घण्टा मात्र मिल्क्ष । मेरो - `https://github-readme-stats.vercel.app/api` प्रोजेक्ट मा रेत् लिमिट हुन सक्क्ष । तर तपाइले आफ्नै वेर्चेल सेर्वेर मा होस्ट गर्नु बाको छ बने यो प्रोब्लेम हुदैन। +गितहब को अपिएले पाच हजार रेक़ुएस्त प्रति घण्टा मात्र मिल्क्ष । मेरो + `https://github-readme-stats.vercel.app/api` प्रोजेक्ट मा रेत् लिमिट हुन सक्क्ष । तर तपाइले आफ्नै वेर्चेल सेर्वेर मा होस्ट गर्नु बाको छ बने यो प्रोब्लेम हुदैन। होस्ट गर्ने तरिका यस पकारका षन । NOTE: Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) we should be able to handle more than 5k requests and have no issues with downtime :D @@ -401,7 +401,7 @@ NOTE: Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) we -## :sparkling_heart: सहपोर्ट द प्रोजेक्ट +## :sparkling_heart: सहपोर्ट द प्रोजेक्ट म सके सम्म आफ्नो प्रोजेक्ट हरु ओपेन्सोउर्चे गर्छु र अरु ले पनि सहयोग गर्क्षु । मेले सहयोग गर्दा आफ्नो समय पनि देरै ने दिन्क्षु । तपाइहरु ले यो सेर्विचेस फ्री मा चलाउनु सक्नु हुनेक्ष । @@ -419,4 +419,4 @@ NOTE: Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) we योगधन को लागी स्वगत छ! <3 -जाभास्क्रिप्ट बाटा बनको :heart: +जाभास्क्रिप्ट बाटा बनको :heart: diff --git a/docs/readme_tr.md b/docs/readme_tr.md index f654cd95cf252..79dee7a9d0593 100644 --- a/docs/readme_tr.md +++ b/docs/readme_tr.md @@ -404,7 +404,7 @@ NOT: [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) geliştir ![](https://files.catbox.moe/pqub9q.png) 1. Root'u seçin ve her şeyi olduğu gibi bırakın, [burada](https://github.com/settings/tokens/new) kolayca oluşturabileceğiniz kişisel bir erişim belirteci (personal access token) (PAT) içerecek olan PAT_1 adlı ortam değişkeninizi (gösterildiği gibi) ekleyin. (istediğiniz bir isim verin, çok da mühim değil açıkçası) ![](https://files.catbox.moe/0ez4g7.png) -1. Deploy'u tıklayın ve hazırsınız. +1. Deploy'u tıklayın ve hazırsınız. Click deploy, and you're good to go. API'ı kullanmak için alanlarınızı (domainlerinizi) görün! @@ -418,7 +418,7 @@ Ayrıca, bu projeyi kullanıyor ve memnunsanız veya sadece bir şeyler yaratmay - Readme'nizde github-readme-stats'ı kullanırken bu projeye uygun bir link verebilirsiniz. - Projeye yıldız verebilir ve paylaşabilirsiniz :rocket: -- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - PayPal ile tek seferlik bağış yapabilirsiniz. Muhtemelen bir ~~kahve~~ ya da çay :tea: alacağım. +- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - PayPal ile tek seferlik bağış yapabilirsiniz. Muhtemelen bir ~~kahve~~ ya da çay :tea: alacağım. Teşekkürler! :heart: 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/package-lock.json b/package-lock.json index ca82673ecc57d..0a800ae04a9c2 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.5", "dotenv": "^16.3.1", "emoji-name-map": "^1.2.8", "github-username-regex": "^1.0.0", @@ -19,23 +19,23 @@ "devDependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", - "@testing-library/dom": "^9.3.3", - "@testing-library/jest-dom": "^6.1.4", + "@testing-library/dom": "^9.3.4", + "@testing-library/jest-dom": "^6.2.0", "@uppercod/css-to-object": "^1.1.1", "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", - "eslint": "^8.52.0", - "eslint-config-prettier": "^9.0.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "hjson": "^3.2.2", - "husky": "^8.0.3", + "husky": "^9.0.0", "jest": "^29.7.0", - "jest-bench": "^29.4.1", + "jest-bench": "^29.7.1", "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^15.0.2", + "lint-staged": "^15.2.0", "lodash.snakecase": "^4.1.1", "parse-diff": "^0.11.1", - "prettier": "^3.0.3" + "prettier": "^3.2.2" }, "engines": { "node": ">=18.0.0" @@ -83,9 +83,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", - "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", + "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", "dev": true }, "node_modules/@ampproject/remapping": { @@ -769,9 +769,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -792,9 +792,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -819,9 +819,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1519,9 +1519,9 @@ } }, "node_modules/@testing-library/dom": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", - "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", + "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", @@ -1538,17 +1538,17 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", - "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.2.tgz", + "integrity": "sha512-CzqH0AFymEMG48CpzXFriYYkOjk6ZGPCLMhW9e9jg3KMCn5OfJecF8GtGW7yGfR/IgCe3SX8BSwjdzI6BBbZLw==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.3.1", + "@adobe/css-tools": "^4.3.2", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", + "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.15", "redent": "^3.0.0" }, @@ -1559,6 +1559,7 @@ }, "peerDependencies": { "@jest/globals": ">= 28", + "@types/bun": "latest", "@types/jest": ">= 28", "jest": ">= 28", "vitest": ">= 0.32" @@ -1567,6 +1568,9 @@ "@jest/globals": { "optional": true }, + "@types/bun": { + "optional": true + }, "@types/jest": { "optional": true }, @@ -1591,6 +1595,12 @@ "node": ">=8" } }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -1908,11 +1918,11 @@ } }, "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.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2054,12 +2064,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2225,16 +2235,16 @@ } }, "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "dependencies": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2253,23 +2263,23 @@ } }, "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2621,22 +2631,16 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/electron-to-chromium": { "version": "1.4.478", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.478.tgz", @@ -2758,15 +2762,15 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2813,9 +2817,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -3163,9 +3167,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3207,9 +3211,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -3300,6 +3304,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -3551,15 +3567,15 @@ } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -3578,9 +3594,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -4126,20 +4142,20 @@ } }, "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==", + "version": "29.7.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.7.1.tgz", + "integrity": "sha512-eFjQa+KVThwqY+Ecs9jeD+CdTUlDrJUAAFLy+DlWW5H1crnG1F4ad5Dk8K+kV6nB2aGCdFcusKBdgtx1SXYiHQ==", "dev": true, "dependencies": { - "@jest/globals": "^29.4.1", - "@jest/reporters": "^29.4.1", + "@jest/globals": "^29.7.0", + "@jest/reporters": "^29.7.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", "lodash": "^4.17.20", "ndjson": "^2.0.0" }, "peerDependencies": { - "jest": "^29.4.1" + "jest": "^29.7.0" } }, "node_modules/jest-changed-files": { @@ -5162,12 +5178,12 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/lines-and-columns": { @@ -5177,21 +5193,21 @@ "dev": true }, "node_modules/lint-staged": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz", - "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==", + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", "dev": true, "dependencies": { "chalk": "5.3.0", "commander": "11.1.0", "debug": "4.3.4", "execa": "8.0.1", - "lilconfig": "2.1.0", - "listr2": "7.0.2", + "lilconfig": "3.0.0", + "listr2": "8.0.1", "micromatch": "4.0.5", "pidtree": "0.6.0", "string-argv": "0.3.2", - "yaml": "2.3.3" + "yaml": "2.3.4" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -5284,9 +5300,9 @@ } }, "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { "path-key": "^4.0.0" @@ -5350,20 +5366,20 @@ } }, "node_modules/listr2": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.2.tgz", - "integrity": "sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", "dev": true, "dependencies": { - "cli-truncate": "^3.1.0", + "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", + "log-update": "^6.0.0", "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/listr2/node_modules/ansi-regex": { @@ -5391,23 +5407,23 @@ } }, "node_modules/listr2/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "node_modules/listr2/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5429,17 +5445,17 @@ } }, "node_modules/listr2/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -5476,34 +5492,34 @@ "dev": true }, "node_modules/log-update": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", - "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", "dev": true, "dependencies": { - "ansi-escapes": "^5.0.0", + "ansi-escapes": "^6.2.0", "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/ansi-escapes": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", - "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", "dev": true, "dependencies": { - "type-fest": "^1.0.2" + "type-fest": "^3.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5534,23 +5550,54 @@ } }, "node_modules/log-update/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, "node_modules/log-update/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5572,29 +5619,29 @@ } }, "node_modules/log-update/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -6122,9 +6169,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -6881,9 +6928,9 @@ } }, "node_modules/undici": { - "version": "5.26.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", - "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -7170,16 +7217,16 @@ } }, "node_modules/ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -7221,9 +7268,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", - "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", "dev": true, "engines": { "node": ">= 14" @@ -7309,9 +7356,9 @@ } }, "@adobe/css-tools": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", - "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", + "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", "dev": true }, "@ampproject/remapping": { @@ -7826,9 +7873,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.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -7843,9 +7890,9 @@ }, "dependencies": { "globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7860,9 +7907,9 @@ } }, "@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true }, "@fastify/busboy": { @@ -8416,9 +8463,9 @@ } }, "@testing-library/dom": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", - "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", + "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", @@ -8432,17 +8479,17 @@ } }, "@testing-library/jest-dom": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", - "integrity": "sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.2.tgz", + "integrity": "sha512-CzqH0AFymEMG48CpzXFriYYkOjk6ZGPCLMhW9e9jg3KMCn5OfJecF8GtGW7yGfR/IgCe3SX8BSwjdzI6BBbZLw==", "dev": true, "requires": { - "@adobe/css-tools": "^4.3.1", + "@adobe/css-tools": "^4.3.2", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", + "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.15", "redent": "^3.0.0" }, @@ -8456,6 +8503,12 @@ "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } + }, + "dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true } } }, @@ -8728,11 +8781,11 @@ "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.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -8850,12 +8903,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -8951,13 +9004,13 @@ } }, "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "requires": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "dependencies": { "ansi-regex": { @@ -8967,20 +9020,20 @@ "dev": true }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, "strip-ansi": { @@ -9254,15 +9307,9 @@ } }, "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "electron-to-chromium": { "version": "1.4.478", @@ -9355,15 +9402,15 @@ } }, "eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -9491,9 +9538,9 @@ } }, "eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "requires": {} }, @@ -9648,9 +9695,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -9683,9 +9730,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "for-each": { "version": "0.3.3", @@ -9743,6 +9790,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true + }, "get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -9922,9 +9975,9 @@ "dev": true }, "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true }, "iconv-lite": { @@ -9937,9 +9990,9 @@ } }, "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true }, "import-fresh": { @@ -10306,13 +10359,13 @@ } }, "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==", + "version": "29.7.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.7.1.tgz", + "integrity": "sha512-eFjQa+KVThwqY+Ecs9jeD+CdTUlDrJUAAFLy+DlWW5H1crnG1F4ad5Dk8K+kV6nB2aGCdFcusKBdgtx1SXYiHQ==", "dev": true, "requires": { - "@jest/globals": "^29.4.1", - "@jest/reporters": "^29.4.1", + "@jest/globals": "^29.7.0", + "@jest/reporters": "^29.7.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", "lodash": "^4.17.20", @@ -11104,9 +11157,9 @@ } }, "lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", "dev": true }, "lines-and-columns": { @@ -11116,21 +11169,21 @@ "dev": true }, "lint-staged": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz", - "integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==", + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", "dev": true, "requires": { "chalk": "5.3.0", "commander": "11.1.0", "debug": "4.3.4", "execa": "8.0.1", - "lilconfig": "2.1.0", - "listr2": "7.0.2", + "lilconfig": "3.0.0", + "listr2": "8.0.1", "micromatch": "4.0.5", "pidtree": "0.6.0", "string-argv": "0.3.2", - "yaml": "2.3.3" + "yaml": "2.3.4" }, "dependencies": { "chalk": { @@ -11181,9 +11234,9 @@ "dev": true }, "npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "requires": { "path-key": "^4.0.0" @@ -11219,17 +11272,17 @@ } }, "listr2": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-7.0.2.tgz", - "integrity": "sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", "dev": true, "requires": { - "cli-truncate": "^3.1.0", + "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", + "log-update": "^6.0.0", "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" + "wrap-ansi": "^9.0.0" }, "dependencies": { "ansi-regex": { @@ -11245,20 +11298,20 @@ "dev": true }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, "strip-ansi": { @@ -11271,14 +11324,14 @@ } }, "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } @@ -11311,25 +11364,25 @@ "dev": true }, "log-update": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", - "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", "dev": true, "requires": { - "ansi-escapes": "^5.0.0", + "ansi-escapes": "^6.2.0", "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { "ansi-escapes": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", - "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", "dev": true, "requires": { - "type-fest": "^1.0.2" + "type-fest": "^3.0.0" } }, "ansi-regex": { @@ -11345,20 +11398,39 @@ "dev": true }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "requires": { + "get-east-asian-width": "^1.0.0" + } + }, + "slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + } + }, "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, "strip-ansi": { @@ -11371,20 +11443,20 @@ } }, "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "dev": true }, "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } @@ -11777,9 +11849,9 @@ "dev": true }, "prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true }, "pretty-format": { @@ -12307,9 +12379,9 @@ "dev": true }, "undici": { - "version": "5.26.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", - "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "requires": { "@fastify/busboy": "^2.0.0" @@ -12521,9 +12593,9 @@ } }, "ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "requires": {} }, @@ -12552,9 +12624,9 @@ "dev": true }, "yaml": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", - "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 999ea0630faee..7d797bb7df26b 100644 --- a/package.json +++ b/package.json @@ -38,26 +38,26 @@ "devDependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", - "@testing-library/dom": "^9.3.3", - "@testing-library/jest-dom": "^6.1.4", + "@testing-library/dom": "^9.3.4", + "@testing-library/jest-dom": "^6.2.0", "@uppercod/css-to-object": "^1.1.1", "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", - "eslint": "^8.52.0", - "eslint-config-prettier": "^9.0.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "hjson": "^3.2.2", - "husky": "^8.0.3", + "husky": "^9.0.0", "jest": "^29.7.0", - "jest-bench": "^29.4.1", + "jest-bench": "^29.7.1", "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^15.0.2", + "lint-staged": "^15.2.0", "lodash.snakecase": "^4.1.1", "parse-diff": "^0.11.1", - "prettier": "^3.0.3" + "prettier": "^3.2.2" }, "dependencies": { - "axios": "^1.5.1", + "axios": "^1.6.5", "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 a010eca3b6d5f..fc35f827af02c 100644 --- a/readme.md +++ b/readme.md @@ -65,7 +65,7 @@

-

Please note that documentation translations may be outdated, try to use english documentation if possible.

+

Please note that documentation translations may be outdated; try to use English documentation if possible.

Love the project? Please consider donating to help it improve!

@@ -73,11 +73,11 @@ Give india logo -Are you considering supporting the project by donating to me? Please DO NOT!! +Are you considering supporting the project by donating to me? Please DO NOT!!! Picture of Coromandel Express train tragedy -India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were affected by this tragedy. +India has recently suffered one of the most devastating train accidents, and your help will be immensely valuable for the people who were affected by this tragedy. Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart: @@ -129,11 +129,11 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of 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. +> We're a small team, and to prioritize, we rely on upvotes :+1:. We use the Top Issues dashboard for tracking community demand (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935)). Do not hesitate to upvote the issues and pull requests you are interested in. We will work on the most upvoted first. # GitHub Stats Card -Copy-paste this into your markdown content, and that is it. Simple! +Copy and paste this into your markdown, and that's it. Simple! Change the `?username=` value to your GitHub username. @@ -142,10 +142,10 @@ Change the `?username=` value to your GitHub username. ``` > [!WARNING]\ -> By default, the stats card only shows statistics like stars, commits and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token. +> By default, the stats card only shows statistics like stars, commits, and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token. > [!NOTE]\ -> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile. +> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars, and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile. ### Hiding individual stats @@ -191,7 +191,7 @@ GitHub Readme Stats comes with several built-in themes (e.g. `dark`, `radical`, 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). Please note that we paused addition of new themes to decrease maintenance efforts, all pull requests related to new themes will be closed. +You can look at a preview for [all available themes](themes/README.md) or checkout the [theme config file](themes/index.js). Please note that we paused the addition of new themes to decrease maintenance efforts; all pull requests related to new themes will be closed. #### Responsive Card Theme @@ -288,16 +288,18 @@ You can customize the appearance of all your cards however you wish with URL par #### Common Options -* `title_color` - Card's title color *(hex color)*. Default: `2f80ed`. -* `text_color` - Body text color *(hex color)*. Default: `434d58`. -* `icon_color` - Icons color if available *(hex color)*. Default: `4c71f2`. -* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (Does not apply when `hide_border` is enabled). -* `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe` -* `hide_border` - Hides the card's border *(boolean)*. Default: `false` -* `theme` - Name of the theme, choose from [all available themes](themes/README.md). Default: `default` theme. -* `cache_seconds` - Sets the cache header manually *(min: 21600, max: 86400)*. Default: `21600 seconds (6 hours)`. -* `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`. -* `border_radius` - Corner rounding on the card. Default: `4.5`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `title_color` | Card's title color. | string (hex color) | `2f80ed` | +| `text_color` | Body text color. | string (hex color) | `434d58` | +| `icon_color` | Icons color if available. | string (hex color) | `4c71f2` | +| `border_color` | Card's border color. Does not apply when `hide_border` is enabled. | string (hex color) | `e4e2e2` | +| `bg_color` | Card's background color. | string (hex color or a gradient in the form of *angle,start,end*) | `fffefe` | +| `hide_border` | Hides the card's border. | boolean | `false` | +| `theme` | Name of the theme, choose from [all available themes](themes/README.md). | enum | `default` | +| `cache_seconds` | Sets the cache header manually (min: 21600, max: 86400). | integer | `1800` | +| `locale` | Sets the language in the card, you can check full list of available locales [here](#available-locales). | enum | `en` | +| `border_radius` | Corner rounding on the card. | number | `4.5` | > [!WARNING]\ > We use caching to decrease the load on our servers (see ). Our cards have a default cache of 6 hours (21600 seconds). Also, note that the cache is clamped to a minimum of 6 hours and a maximum of 24 hours. If you want the data on your statistics card to be updated more often you can [deploy your own instance](#deploy-on-your-own) and set [environment variable](#disable-rate-limit-protections) `CACHE_SECONDS` to a value of your choosing. @@ -364,46 +366,55 @@ If we don't support your language, please consider contributing! You can find mo #### Stats Card Exclusive Options -* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`. -* `hide_title` - *(boolean)*. Default: `false`. -* `card_width` - Sets the card's width manually *(number)*. Default: `500px (approx.)`. -* `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`. -* `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile` or `default`). Default: `default`. -* `show_icons` - *(boolean)*. Default: `false`. -* `include_all_commits` - Counts total commits instead of just the current year commits *(boolean)*. Default: `false`. -* `line_height` - Sets the line height between text *(number)*. Default: `25`. -* `exclude_repo` - Excludes stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`. -* `custom_title` - Sets a custom title for the card. Default: ` GitHub Stats`. -* `text_bold` - Uses bold text *(boolean)*. Default: `true`. -* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`. -* `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color. -* `number_format` - Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`. -* `show` - Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`) *(Comma-separated values)*. Default: `[] (blank array)`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the [specified items](#hiding-individual-stats) from stats. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your stats card. | boolean | `false` | +| `card_width` | Sets the card's width manually. | number | `500px (approx.)` | +| `hide_rank` | Hides the rank and automatically resizes the card width. | boolean | `false` | +| `rank_icon` | Shows alternative rank icon (i.e. `github`, `percentile` or `default`). | enum | `default` | +| `show_icons` | Shows icons near all stats. | boolean | `false` | +| `include_all_commits` | Count total commits instead of just the current year commits. | boolean | `false` | +| `line_height` | Sets the line height between text. | integer | `25` | +| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` | +| `custom_title` | Sets a custom title for the card. | string | ` GitHub Stats` | +| `text_bold` | Uses bold text. | boolean | `true` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | +| `ring_color` | Color of the rank circle. | string (hex color) | `2f80ed` | +| `number_format` | Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). | enum | `short` | +| `show` | Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`). | string (comma-separated values) | `null` | > [!NOTE]\ > When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding. #### Repo Card Exclusive Options -* `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `show_owner` | Shows the repo's owner name. | boolean | `false` | +| `description_lines_count` | Manually set the number of lines for the description. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. | number | `null` | #### Gist Card Exclusive Options -* `show_owner` - Shows the gist's owner name *(boolean)*. Default: `false`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `show_owner` | Shows the gist's owner name. | boolean | `false` | #### Language Card Exclusive Options -* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`. -* `hide_title` - *(boolean)*. Default: `false`. -* `layout` - Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`. -* `card_width` - Sets the card's width manually *(number)*. Default `300`. -* `langs_count` - Shows more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts. -* `exclude_repo` - Excludes specified repositories *(Comma-separated values)*. Default: `[] (blank array)`. -* `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`. -* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`. -* `hide_progress` - Uses the compact layout option, hides percentages, and removes the bars. Default: `false`. -* `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1. -* `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the [specified languages](#hide-individual-languages) from card. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your card. | boolean | `false` | +| `layout` | Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. | enum | `normal` | +| `card_width` | Sets the card's width manually. | number | `300` | +| `langs_count` | Shows more languages on the card, between 1-20. | integer | `5` for `normal` and `donut`, `6` for other layouts | +| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` | +| `custom_title` | Sets a custom title for the card. | string | `Most Used Languages` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | +| `hide_progress` | Uses the compact layout option, hides percentages, and removes the bars. | boolean | `false` | +| `size_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `1` | +| `count_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `0` | > [!WARNING]\ > Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding) @@ -412,14 +423,18 @@ If we don't support your language, please consider contributing! You can find mo #### WakaTime Card Exclusive Options -* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`. -* `hide_title` - *(boolean)*. Default `false`. -* `line_height` - Sets the line height between text *(number)*. Default `25`. -* `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`. -* `custom_title` - Sets a custom title for the card *(string)*. Default `WakaTime Stats`. -* `layout` - Switches between two available layouts `default` & `compact`. Default `default`. -* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*. -* `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the languages specified from the card. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your card. | boolean | `false` | +| `line_height` | Sets the line height between text. | integer | `25` | +| `hide_progress` | Hides the progress bar and percentage. | boolean | `false` | +| `custom_title` | Sets a custom title for the card. | string | `WakaTime Stats` | +| `layout` | Switches between two available layouts `default` & `compact`. | enum | `default` | +| `langs_count` | Limits the number of languages on the card, defaults to all reported languages. | integer | `null` | +| `api_domain` | Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) | string | `wakatime.com` | +| `display_format` | Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. | enum | `time` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | *** @@ -480,10 +495,10 @@ The top languages card shows a GitHub user's most frequently used languages. > Top Languages does not indicate the user's skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats. > [!WARNING]\ -> This card shows languages usage only inside your own non-forked repositories, not depending from who is the author of the commits. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community. +> This card shows language usage only inside your own non-forked repositories, not depending on who the author of the commits is. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community. > [!WARNING]\ -> Currently this card shows data only about first 100 repositories. This is because GitHub API limitations which cause downtimes of public instance (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). In future this behavior will be improved by releasing GitHub action or providing environment variable for user's own instances. +> Currently this card shows data only about first 100 repositories. This is because GitHub API limitations which cause downtimes of public instances (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). In future this behavior will be improved by releasing GitHub action or providing environment variables for user's own instances. ### Usage @@ -800,7 +815,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme Github Readme Stats contains several Vercel environment variables that can be used to remove the rate limit protections: -* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self Hosted Vercel instances. +* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self-hosted Vercel instances. See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance. @@ -815,9 +830,9 @@ this takes time. You can use this service for free. However, if you are using this project and are happy with it or just want to encourage me to continue creating stuff, there are a few ways you can do it: -* Giving proper credit when you use github-readme-stats on your readme, linking back to it :D -* Starring and sharing the project :rocket: -* [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: +* Giving proper credit when you use github-readme-stats on your readme, linking back to it. :D +* Starring and sharing the project. :rocket: +* [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make a one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: Thanks! :heart: diff --git a/scripts/preview-theme.js b/scripts/preview-theme.js index 3137abae3e275..f7d6741ffba77 100644 --- a/scripts/preview-theme.js +++ b/scripts/preview-theme.js @@ -500,14 +500,12 @@ export const run = async () => { ); invalidColors = true; } else if ( - !isValidHexColor(colorValue) || - !( - colorKey === "bg_color" && - isValidGradient(colorValue.split(",")) - ) + !(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; } @@ -523,7 +521,7 @@ export const run = async () => { \r### ${ themeName.charAt(0).toUpperCase() + themeName.slice(1) } theme preview - + \r${warnings.map((warning) => `- :warning: ${warning}.\n`).join("")} \r${errors.map((error) => `- :x: ${error}.\n`).join("")} @@ -548,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}`)) { @@ -565,7 +567,7 @@ export const run = async () => { \r### ${ themeName.charAt(0).toUpperCase() + themeName.slice(1) } theme preview - + \r${warnings.map((warning) => `- :warning: ${warning}.\n`).join("")} \ntitle_color: #${titleColor} | icon_color: #${iconColor} | text_color: #${textColor} | bg_color: #${bgColor}${ @@ -598,7 +600,7 @@ export const run = async () => { ? "**Result:** :heavy_check_mark: All themes are valid." : "**Result:** :x: Some themes are invalid.\n\n" + FAIL_TEXT } - + \r## Details \r${previewBody} `; 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/repo-card.js b/src/cards/repo-card.js index 09b5841880a97..bbfda52d47778 100644 --- a/src/cards/repo-card.js +++ b/src/cards/repo-card.js @@ -12,10 +12,13 @@ import { wrapTextMultiline, iconWithLabel, createLanguageNode, + clampValue, } from "../common/utils.js"; import { repoCardLocales } from "../translations.js"; const ICON_SIZE = 16; +const DESCRIPTION_LINE_WIDTH = 59; +const DESCRIPTION_MAX_LINES = 3; /** * Retrieves the repository description and wraps it to fit the card width. @@ -73,22 +76,34 @@ const renderRepoCard = (repo, options = {}) => { border_radius, border_color, locale, + description_lines_count, } = options; const lineHeight = 10; const header = show_owner ? nameWithOwner : name; const langName = (primaryLanguage && primaryLanguage.name) || "Unspecified"; const langColor = (primaryLanguage && primaryLanguage.color) || "#333"; + const descriptionMaxLines = description_lines_count + ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES) + : DESCRIPTION_MAX_LINES; const desc = parseEmojis(description || "No description provided"); - const multiLineDescription = wrapTextMultiline(desc); - const descriptionLines = multiLineDescription.length; + const multiLineDescription = wrapTextMultiline( + desc, + DESCRIPTION_LINE_WIDTH, + descriptionMaxLines, + ); + const descriptionLinesCount = description_lines_count + ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES) + : multiLineDescription.length; + const descriptionSvg = multiLineDescription .map((line) => `${encodeHTML(line)}`) .join(""); const height = - (descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight; + (descriptionLinesCount > 1 ? 120 : 110) + + descriptionLinesCount * lineHeight; const i18n = new I18n({ locale, @@ -160,9 +175,9 @@ const renderRepoCard = (repo, options = {}) => { ? // @ts-ignore getBadgeSVG(i18n.t("repocard.template"), colors.textColor) : isArchived - ? // @ts-ignore - getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) - : "" + ? // @ts-ignore + getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) + : "" } diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js index 5f57205602016..28bdb9f51da4a 100644 --- a/src/cards/stats-card.js +++ b/src/cards/stats-card.js @@ -76,7 +76,7 @@ const createTextNode = ({ }; /** - * Calculates progress along the boundary of the circle i.e it's circumference. + * Calculates progress along the boundary of the circle, i.e. its circumference. * * @param {number} value The rank value to calculate progress for. * @returns {number} Progress value. @@ -158,7 +158,7 @@ const getStyles = ({ .rank-percentile-text { font-size: 16px; } - + .not_bold { font-weight: 400 } .bold { font-weight: 700 } .icon { @@ -412,8 +412,8 @@ const renderStatsCard = (stats, options = {}) => { custom_title ? custom_title : statItems.length - ? i18n.t("statcard.title") - : i18n.t("statcard.ranktitle"), + ? i18n.t("statcard.title") + : i18n.t("statcard.ranktitle"), ); }; @@ -431,14 +431,14 @@ const renderStatsCard = (stats, options = {}) => { Infinity, ) : statItems.length - ? RANK_CARD_MIN_WIDTH - : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth; + ? RANK_CARD_MIN_WIDTH + : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth; const defaultCardWidth = (hide_rank ? CARD_DEFAULT_WIDTH : statItems.length - ? RANK_CARD_DEFAULT_WIDTH - : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth; + ? RANK_CARD_DEFAULT_WIDTH + : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth; let width = card_width ? isNaN(card_width) ? defaultCardWidth diff --git a/src/cards/top-languages-card.js b/src/cards/top-languages-card.js index 758bd34baff5d..9385f4a7ebed3 100644 --- a/src/cards/top-languages-card.js +++ b/src/cards/top-languages-card.js @@ -755,8 +755,8 @@ const renderTopLanguages = (topLangs, options = {}) => { ? isNaN(card_width) ? DEFAULT_CARD_WIDTH : card_width < MIN_CARD_WIDTH - ? MIN_CARD_WIDTH - : card_width + ? MIN_CARD_WIDTH + : card_width : DEFAULT_CARD_WIDTH; let height = calculateNormalLayoutHeight(langs.length); diff --git a/src/cards/types.d.ts b/src/cards/types.d.ts index dce964d21af7e..9a21be4a0160a 100644 --- a/src/cards/types.d.ts +++ b/src/cards/types.d.ts @@ -32,6 +32,7 @@ export type StatCardOptions = CommonOptions & { export type RepoCardOptions = CommonOptions & { show_owner: boolean; + description_lines_count: number; }; export type TopLangOptions = CommonOptions & { @@ -45,7 +46,7 @@ export type TopLangOptions = CommonOptions & { hide_progress: boolean; }; -type WakaTimeOptions = CommonOptions & { +export type WakaTimeOptions = CommonOptions & { hide_title: boolean; hide: string[]; line_height: string; @@ -53,6 +54,8 @@ type WakaTimeOptions = CommonOptions & { custom_title: string; layout: "compact" | "normal"; langs_count: number; + display_format: "time" | "percent"; + disable_animations: boolean; }; export type GistCardOptions = CommonOptions & { diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js index a6a203dad9c29..65e1d54d779ea 100644 --- a/src/cards/wakatime-card.js +++ b/src/cards/wakatime-card.js @@ -39,6 +39,20 @@ const noCodingActivityNode = ({ color, text }) => { * @typedef {import('../fetchers/types').WakaTimeLang} WakaTimeLang */ +/** + * Format language value. + * + * @param {Object} args The function arguments. + * @param {WakaTimeLang} args.lang The language object. + * @param {"time" | "percent"} args.display_format The display format of the language node. + * @returns {string} The formatted language value. + */ +const formatLanguageValue = ({ display_format, lang }) => { + return display_format === "percent" + ? `${lang.percent.toFixed(2).toString()} %` + : lang.text; +}; + /** * Create compact WakaTime layout. * @@ -46,16 +60,18 @@ const noCodingActivityNode = ({ color, text }) => { * @param {WakaTimeLang} args.lang The languages array. * @param {number} args.x The x position of the language node. * @param {number} args.y The y position of the language node. + * @param {"time" | "percent"} args.display_format The display format of the language node. * @returns {string} The compact layout language SVG node. */ -const createCompactLangNode = ({ lang, x, y }) => { +const createCompactLangNode = ({ lang, x, y, display_format }) => { const color = languageColors[lang.name] || "#858585"; + const value = formatLanguageValue({ display_format, lang }); return ` - ${lang.name} - ${lang.text} + ${lang.name} - ${value} `; @@ -67,21 +83,24 @@ const createCompactLangNode = ({ lang, x, y }) => { * @param {Object} args The function arguments. * @param {WakaTimeLang[]} args.langs The language objects. * @param {number} args.y The y position of the language node. + * @param {"time" | "percent"} args.display_format The display format of the language node. * @returns {string[]} The language text node items. */ -const createLanguageTextNode = ({ langs, y }) => { +const createLanguageTextNode = ({ langs, y, display_format }) => { return langs.map((lang, index) => { if (index % 2 === 0) { return createCompactLangNode({ lang, x: 25, y: 12.5 * index + y, + display_format, }); } return createCompactLangNode({ lang, x: 230, y: 12.5 + 12.5 * index, + display_format, }); }); }; @@ -218,6 +237,8 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { langs_count = languages.length, border_radius, border_color, + display_format = "time", + disable_animations, } = options; const shouldHideLangs = Array.isArray(hide) && hide.length > 0; @@ -311,6 +332,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { ? createLanguageTextNode({ y: 25, langs: filteredLanguages, + display_format, }).join("") : noCodingActivityNode({ // @ts-ignore @@ -330,7 +352,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { return createTextNode({ id: language.name, label: language.name, - value: language.text, + value: formatLanguageValue({ display_format, lang: language }), index, percent: language.percent, // @ts-ignore @@ -382,6 +404,10 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { }, }); + if (disable_animations) { + card.disableAnimations(); + } + card.setHideBorder(hide_border); card.setHideTitle(hide_title); card.setCSS( diff --git a/src/common/languageColors.json b/src/common/languageColors.json index 8c1c23d49e491..263fdcdb7b1d3 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", @@ -129,6 +130,7 @@ "Easybuild": "#069406", "Ecere Projects": "#913960", "Ecmarkup": "#eb8131", + "EdgeQL": "#31A7FF", "EditorConfig": "#fff1f2", "Eiffel": "#4d6977", "Elixir": "#6e4a7e", @@ -169,8 +171,8 @@ "Game Maker Language": "#71b417", "Gemfile.lock": "#701516", "Gemini": "#ff6900", - "Genero": "#63408e", - "Genero Forms": "#d8df39", + "Genero 4gl": "#63408e", + "Genero per": "#d8df39", "Genie": "#fb855d", "Genshi": "#951531", "Gentoo Ebuild": "#9400ff", @@ -181,6 +183,7 @@ "Git Config": "#F44D27", "Git Revision List": "#F44D27", "Gleam": "#ffaff3", + "Glimmer JS": "#F5835F", "Glyph": "#c1ac7f", "Gnuplot": "#f0a9f0", "Go": "#00ADD8", @@ -192,6 +195,7 @@ "Gosu": "#82937f", "Grace": "#615f8b", "Gradle": "#02303a", + "Gradle Kotlin DSL": "#02303a", "Grammatical Framework": "#ff0000", "GraphQL": "#e10098", "Graphviz (DOT)": "#2596be", @@ -384,6 +388,7 @@ "PostScript": "#da291c", "PowerBuilder": "#8f0f8d", "PowerShell": "#012456", + "Praat": "#c8506d", "Prisma": "#0c344b", "Processing": "#0096D8", "Procfile": "#3B2F63", @@ -422,6 +427,7 @@ "Red": "#f50000", "Regular Expression": "#009a00", "Ren'Py": "#ff7f7f", + "Rez": "#FFDAB3", "Ring": "#2D54CB", "Riot": "#A71E49", "RobotFramework": "#00c0b5", @@ -475,7 +481,8 @@ "SugarSS": "#2fcc9f", "SuperCollider": "#46390b", "Svelte": "#ff3e00", - "Sway": "#dea584", + "Sway": "#00F58C", + "Sweave": "#198ce7", "Swift": "#F05138", "SystemVerilog": "#DAE1C2", "TI Program": "#A0AA87", @@ -490,12 +497,15 @@ "Tcl": "#e4cc98", "TeX": "#3D6117", "Terra": "#00004c", + "Terraform Template": "#7b42bb", "TextMate Properties": "#df66e4", "Textile": "#ffe7ac", "Thrift": "#D12127", + "Toit": "#c2c9fb", "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 8fefe3857a13d..7196397b1aca4 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -39,61 +39,6 @@ class CustomError extends Error { static WAKATIME_ERROR = "WAKATIME_ERROR"; } -// 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. - * @returns {string} The SVG markup. - */ -const renderError = (message, secondaryMessage = "") => { - return ` - - - - Something went wrong!${ - UPSTREAM_API_ERRORS.includes(secondaryMessage) - ? "" - : " file an issue at https://tiny.one/readme-stats" - } - - ${encodeHTML(message)} - ${secondaryMessage} - - - `; -}; - /** * Auto layout utility, allows us to layout things vertically or horizontally with * proper gaping. @@ -245,7 +190,10 @@ const clampValue = (number, min, max) => { * @returns {boolean} True if the given string is a valid gradient. */ const isValidGradient = (colors) => { - return colors.slice(1).every((color) => isValidHexColor(color)); + return ( + colors.length > 2 && + colors.slice(1).every((color) => isValidHexColor(color)) + ); }; /** @@ -377,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. * @@ -428,6 +451,17 @@ const SIX_HOURS = 21600; const EIGHT_HOURS = 28800; const ONE_DAY = 86400; +const ONE_MINUTE = 60; +const FIVE_MINUTES = 300; +const TEN_MINUTES = 600; +const FIFTEEN_MINUTES = 900; +const THIRTY_MINUTES = 1800; +const TWO_HOURS = 7200; +const FOUR_HOURS = 14400; +const SIX_HOURS = 21600; +const EIGHT_HOURS = 28800; +const ONE_DAY = 86400; + const CONSTANTS = { ONE_MINUTE, FIVE_MINUTES, 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/translations.js b/src/translations.js index 865fd4ae2f809..08b13ab39299c 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", @@ -676,6 +676,132 @@ const wakatimeCardLocales = { vi: "Người dùng không chia sẻ thống kê mã chi tiết công khai", se: "Användaren delar inte offentligt detaljerad kodstatistik", }, + "wakatimecard.lastyear": { + ar: "العام الماضي", + cn: "去年", + "zh-tw": "去年", + cs: "Minulý rok", + de: "Letztes Jahr", + en: "last year", + bn: "গত বছর", + es: "El año pasado", + fr: "L'année dernière", + hu: "Tavaly", + it: "L'anno scorso", + ja: "昨年", + kr: "작년", + nl: "Vorig jaar", + "pt-pt": "Ano passado", + "pt-br": "Ano passado", + np: "गत वर्ष", + el: "Πέρυσι", + ru: "За прошлый год", + "uk-ua": "За минулий рік", + id: "Tahun lalu", + ml: "കഴിഞ്ഞ വർഷം", + my: "Tahun lepas", + sk: "Minulý rok", + tr: "Geçen yıl", + pl: "W zeszłym roku", + uz: "O'tgan yil", + vi: "Năm ngoái", + se: "Förra året", + }, + "wakatimecard.last7days": { + ar: "آخر 7 أيام", + cn: "最近 7 天", + "zh-tw": "最近 7 天", + cs: "Posledních 7 dní", + de: "Letzte 7 Tage", + en: "last 7 days", + bn: "গত ৭ দিন", + es: "Últimos 7 días", + fr: "7 derniers jours", + hu: "Elmúlt 7 nap", + it: "Ultimi 7 giorni", + ja: "過去 7 日間", + kr: "지난 7 일", + nl: "Afgelopen 7 dagen", + "pt-pt": "Últimos 7 dias", + "pt-br": "Últimos 7 dias", + np: "गत ७ दिन", + el: "Τελευταίες 7 ημέρες", + ru: "Последние 7 дней", + "uk-ua": "Останні 7 днів", + id: "7 hari terakhir", + ml: "കഴിഞ്ഞ 7 ദിവസം", + my: "7 hari lepas", + sk: "Posledných 7 dní", + tr: "Son 7 gün", + pl: "Ostatnie 7 dni", + uz: "O'tgan 7 kun", + vi: "7 ngày qua", + se: "Senaste 7 dagarna", + }, + "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", + }, + "wakatimecard.nocodedetails": { + ar: "المستخدم لا يشارك معلومات تفصيلية عن البرمجة", + cn: "用户不公开分享详细的代码统计信息", + "zh-tw": "使用者不公開分享詳細的程式碼統計資訊", + cs: "Uživatel nesdílí podrobné statistiky kódu", + de: "Benutzer teilt keine detaillierten Code-Statistiken", + en: "User doesn't publicly share detailed code statistics", + bn: "ব্যবহারকারী বিস্তারিত কোড পরিসংখ্যান প্রকাশ করেন না", + es: "El usuario no comparte públicamente estadísticas detalladas de código", + fr: "L'utilisateur ne partage pas publiquement de statistiques de code détaillées", + hu: "A felhasználó nem osztja meg nyilvánosan a részletes kódstatisztikákat", + it: "L'utente non condivide pubblicamente statistiche dettagliate sul codice", + ja: "ユーザーは詳細なコード統計を公開しません", + kr: "사용자는 자세한 코드 통계를 공개하지 않습니다", + nl: "Gebruiker deelt geen gedetailleerde code-statistieken", + "pt-pt": + "O utilizador não partilha publicamente estatísticas detalhadas de código", + "pt-br": + "O usuário não compartilha publicamente estatísticas detalhadas de código", + np: "प्रयोगकर्ता सार्वजनिक रूपमा विस्तृत कोड तथ्याङ्क साझा गर्दैन", + el: "Ο χρήστης δεν δημοσιεύει δημόσια λεπτομερείς στατιστικές κώδικα", + ru: "Пользователь не делится подробной статистикой кода", + "uk-ua": "Користувач не публікує детальну статистику коду", + id: "Pengguna tidak membagikan statistik kode terperinci secara publik", + ml: "ഉപയോക്താവ് പൊതുവെ വിശദീകരിച്ച കോഡ് സ്റ്റാറ്റിസ്റ്റിക്സ് പങ്കിടുന്നില്ല", + my: "Pengguna tidak berkongsi statistik kod terperinci secara awam", + sk: "Používateľ neposkytuje verejne podrobné štatistiky kódu", + tr: "Kullanıcı ayrıntılı kod istatistiklerini herkese açık olarak paylaşmıyor", + pl: "Użytkownik nie udostępnia publicznie szczegółowych statystyk kodu", + uz: "Foydalanuvchi umumiy ko`d statistikasini ochiq ravishda almashmaydi", + vi: "Người dùng không chia sẻ thống kê mã chi tiết công khai", + se: "Användaren delar inte offentligt detaljerad kodstatistik", + }, "wakatimecard.nocodingactivity": { ar: "لا يوجد نشاط برمجي لهذا الأسبوع", cn: "本周没有编程活动", diff --git a/tests/__snapshots__/renderWakatimeCard.test.js.snap b/tests/__snapshots__/renderWakatimeCard.test.js.snap index f38ac26ef07f7..fc495904152df 100644 --- a/tests/__snapshots__/renderWakatimeCard.test.js.snap +++ b/tests/__snapshots__/renderWakatimeCard.test.js.snap @@ -25,8 +25,8 @@ exports[`Test Render WakaTime Card should render correctly with compact layout 1 /* Selector detects Firefox */ .header { font-size: 15.5px; } } - - + + .stat { font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: #434d58; } @@ -40,7 +40,7 @@ exports[`Test Render WakaTime Card should render correctly with compact layout 1 } .not_bold { font-weight: 400 } .bold { font-weight: 700 } - + @keyframes slideInAnimation { from { width: 0; @@ -64,13 +64,13 @@ exports[`Test Render WakaTime Card should render correctly with compact layout 1 .lang-progress{ animation: growWidthAnimation 0.6s ease-in-out forwards; } - - - + + + - + - + WakaTime Stats (last 7 days) - + - + - + - + - + - - + + Other - 19 mins - + TypeScript - 1 min - - + + - + " @@ -177,8 +177,8 @@ exports[`Test Render WakaTime Card should render correctly with compact layout w /* Selector detects Firefox */ .header { font-size: 15.5px; } } - - + + .stat { font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: #434d58; } @@ -192,7 +192,7 @@ exports[`Test Render WakaTime Card should render correctly with compact layout w } .not_bold { font-weight: 400 } .bold { font-weight: 700 } - + @keyframes slideInAnimation { from { width: 0; @@ -216,13 +216,13 @@ exports[`Test Render WakaTime Card should render correctly with compact layout w .lang-progress{ animation: growWidthAnimation 0.6s ease-in-out forwards; } - - - + + + - + - + WakaTime Stats (last 7 days) - + - + - + - + - + - - + + Other - 19 mins - + TypeScript - 1 min - - + + - + " diff --git a/tests/api.test.js b/tests/api.test.js index a6ed04b5c0260..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 () => { diff --git a/tests/bench/gist.bench.js b/tests/bench/gist.bench.js new file mode 100644 index 0000000000000..69f381379c20b --- /dev/null +++ b/tests/bench/gist.bench.js @@ -0,0 +1,51 @@ +import { benchmarkSuite } from "jest-bench"; +import gist from "../../api/gist.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const gist_data = { + data: { + viewer: { + gist: { + description: + "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023", + owner: { + login: "Yizack", + }, + stargazerCount: 33, + forks: { + totalCount: 11, + }, + files: [ + { + name: "countries.json", + language: { + name: "JSON", + }, + size: 85858, + }, + ], + }, + }, + }, +}; + +const mock = new MockAdapter(axios); +mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + +benchmarkSuite("test /api/gist", { + ["simple request"]: async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await gist(req, res); + }, +}); diff --git a/tests/bench/pin.bench.js b/tests/bench/pin.bench.js new file mode 100644 index 0000000000000..636e0d58bdd79 --- /dev/null +++ b/tests/bench/pin.bench.js @@ -0,0 +1,50 @@ +import { benchmarkSuite } from "jest-bench"; +import pin from "../../api/pin.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const data_repo = { + repository: { + username: "anuraghazra", + name: "convoychat", + stargazers: { + totalCount: 38000, + }, + description: "Help us take over the world! React + TS + GraphQL Chat App", + primaryLanguage: { + color: "#2b7489", + id: "MDg6TGFuZ3VhZ2UyODc=", + name: "TypeScript", + }, + forkCount: 100, + isTemplate: false, + }, +}; + +const data_user = { + data: { + user: { repository: data_repo.repository }, + organization: null, + }, +}; + +const mock = new MockAdapter(axios); +mock.onPost("https://api.github.com/graphql").reply(200, data_user); + +benchmarkSuite("test /api/pin", { + ["simple request"]: async () => { + const req = { + query: { + username: "anuraghazra", + repo: "convoychat", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await pin(req, res); + }, +}); diff --git a/tests/card.test.js b/tests/card.test.js index 049b9e2635128..61e7ec0e00c14 100644 --- a/tests/card.test.js +++ b/tests/card.test.js @@ -89,7 +89,7 @@ describe("Card", () => { "200", ); expect(document.getElementsByTagName("svg")[0]).toHaveAttribute( - "height", + "width", "200", ); }); 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 ebad3a296a917..8e24893dfe0fd 100644 --- a/tests/fetchWakatime.test.js +++ b/tests/fetchWakatime.test.js @@ -103,7 +103,7 @@ const wakaTimeData = { }; describe("WakaTime fetcher", () => { - it("should fetch correct wakatime data", async () => { + it("should fetch correct WakaTime data", async () => { const username = "anuraghazra"; mock .onGet( 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/renderRepoCard.test.js b/tests/renderRepoCard.test.js index 050e7109490bb..abbad4dbe2a3b 100644 --- a/tests/renderRepoCard.test.js +++ b/tests/renderRepoCard.test.js @@ -339,4 +339,34 @@ describe("Test renderRepoCard", () => { "No description provided", ); }); + + it("should have correct height with specified `description_lines_count` parameter", () => { + // Testing short description + document.body.innerHTML = renderRepoCard(data_repo.repository, { + description_lines_count: 1, + }); + expect(document.querySelector("svg")).toHaveAttribute("height", "120"); + document.body.innerHTML = renderRepoCard(data_repo.repository, { + description_lines_count: 3, + }); + expect(document.querySelector("svg")).toHaveAttribute("height", "150"); + + // Testing long description + const longDescription = + "A tool that will make a lot of iPhone/iPad developers' life easier. It shares your app over-the-air in a WiFi network. Bonjour is used and no configuration is needed."; + document.body.innerHTML = renderRepoCard( + { ...data_repo.repository, description: longDescription }, + { + description_lines_count: 3, + }, + ); + expect(document.querySelector("svg")).toHaveAttribute("height", "150"); + document.body.innerHTML = renderRepoCard( + { ...data_repo.repository, description: longDescription }, + { + description_lines_count: 1, + }, + ); + expect(document.querySelector("svg")).toHaveAttribute("height", "120"); + }); }); diff --git a/tests/renderStatsCard.test.js b/tests/renderStatsCard.test.js index c203488bbb6db..973ee0a5a5db6 100644 --- a/tests/renderStatsCard.test.js +++ b/tests/renderStatsCard.test.js @@ -387,7 +387,9 @@ describe("Test renderStatsCard", () => { document.querySelector( 'g[transform="translate(0, 25)"]>.stagger>.stat.bold', ).textContent, - ).toMatchInlineSnapshot(`"累计提交数(commit) (2023):"`); + ).toMatchInlineSnapshot( + `"累计提交数(commit) (${new Date().getFullYear()}):"`, + ); expect( document.querySelector( 'g[transform="translate(0, 50)"]>.stagger>.stat.bold', 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 5d92a6676041a..5e50b5bbc8e6d 100644 --- a/themes/README.md +++ b/themes/README.md @@ -12,7 +12,7 @@ Use `?theme=THEME_NAME` parameter like so: ## Stats -> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and Wakatime Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -40,11 +40,11 @@ Use `?theme=THEME_NAME` parameter like so: | `rose_pine` ![rose_pine][rose_pine] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha] | | `date_night` ![date_night][date_night] | `one_dark_pro` ![one_dark_pro][one_dark_pro] | `rose` ![rose][rose] | | `holi` ![holi][holi] | `neon` ![neon][neon] | `blue_navy` ![blue_navy][blue_navy] | -| `calm_pink` ![calm_pink][calm_pink] | | [Add your theme][add-theme] | +| `calm_pink` ![calm_pink][calm_pink] | `ambient_gradient` ![ambient_gradient][ambient_gradient] | [Add your theme][add-theme] | ## Repo Card -> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and Wakatime Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -72,7 +72,7 @@ Use `?theme=THEME_NAME` parameter like so: | `rose_pine` ![rose_pine][rose_pine_repo] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte_repo] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha_repo] | | `date_night` ![date_night][date_night_repo] | `one_dark_pro` ![one_dark_pro][one_dark_pro_repo] | `rose` ![rose][rose_repo] | | `holi` ![holi][holi_repo] | `neon` ![neon][neon_repo] | `blue_navy` ![blue_navy][blue_navy_repo] | -| `calm_pink` ![calm_pink][calm_pink_repo] | | [Add your theme][add-theme] | +| `calm_pink` ![calm_pink][calm_pink_repo] | `ambient_gradient` ![ambient_gradient][ambient_gradient_repo] | [Add your theme][add-theme] | [default]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=default @@ -149,6 +149,7 @@ Use `?theme=THEME_NAME` parameter like so: [neon]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=neon [blue_navy]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=blue_navy [calm_pink]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=calm_pink +[ambient_gradient]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ambient_gradient [default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default @@ -225,6 +226,7 @@ Use `?theme=THEME_NAME` parameter like so: [neon_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=neon [blue_navy_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=blue_navy [calm_pink_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=calm_pink +[ambient_gradient_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ambient_gradient [add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js diff --git a/themes/index.js b/themes/index.js index 043ccf19880f0..f5d8d9160fd1b 100644 --- a/themes/index.js +++ b/themes/index.js @@ -456,6 +456,12 @@ export const themes = { border_color: "e1bc29", bg_color: "2b2d40", }, + ambient_gradient: { + title_color: "ffffff", + text_color: "ffffff", + icon_color: "ffffff", + bg_color: "35,4158d0,c850c0,ffcc70", + }, }; export default themes; diff --git a/vercel.json b/vercel.json index ddf82eb15666f..7f3d7ca0b5d45 100644 --- a/vercel.json +++ b/vercel.json @@ -8,7 +8,7 @@ "redirects": [ { "source": "/", - "destination": "https://github.com/anuraghazra/github-readme-stats" + "destination": "https://github.com/devantler/github-readme-stats" } ] }