diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cceec26..ced4ba3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,34 +1,33 @@ version: 2 updates: - - package-ecosystem: "npm" - # Look for `package.json` and `lock` files in the `root` directory + - package-ecosystem: gomod directory: "/" schedule: - interval: "weekly" - groups: - production-dependencies: - dependency-type: "production" - development-dependencies: - dependency-type: "development" - commit-message: - prefix: "chore: " - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" + interval: weekly commit-message: - prefix: "chore: " - # Group updates for the same action across different workflows + prefix: "chore(deps): " + cooldown: + default-days: 7 groups: - actions-minor: + actions-deps: patterns: - "*" + + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + groups: + npm-development: + dependency-type: development update-types: - minor - patch - actions-major: - patterns: - - "*" + npm-production: + dependency-type: production update-types: - - major + - patch + commit-message: + prefix: "chore(deps): " diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb194b7..249e59c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: with: node-version-file: package.json - run: npm ci + - run: npm test - run: npm run build lint: runs-on: ubuntu-latest @@ -27,5 +28,6 @@ jobs: - uses: actions/setup-node@v6 with: node-version-file: package.json + cache: 'npm' - run: npm ci - run: npm run lint diff --git a/.github/workflows/conv-commits.yml b/.github/workflows/conv-commits.yml deleted file mode 100644 index c8da6d6..0000000 --- a/.github/workflows/conv-commits.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: conventional-commits - -on: - pull_request: - types: - - opened - - reopened - - edited - - synchronize - -jobs: - pr-title: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - packages: read - pull-requests: write - statuses: write - steps: - - uses: sethrylan/actions/conventional-commits@main - diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml new file mode 100644 index 0000000..d3ddae9 --- /dev/null +++ b/.github/workflows/conventional-commits.yml @@ -0,0 +1,43 @@ +name: conventional-commits + +on: + pull_request: + types: + - opened + - reopened + - edited + - synchronize + +permissions: + contents: read + pull-requests: write + statuses: write + +jobs: + conventional-title: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 + id: lint_pr_title + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + wip: true + - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 + # Even if the lint_pr_title step fails, we should populate error message. + if: always() && (steps.lint_pr_title.outputs.error_message != null) + with: + header: pr-title-lint + message: | + This repo requires all pull request titles to follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. + + ``` + ${{ steps.lint_pr_title.outputs.error_message }} + ``` + # Delete the comment when the issue has been resolved + - if: ${{ steps.lint_pr_title.outputs.error_message == null }} + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 + with: + header: pr-title-lint + delete: true diff --git a/.repolint.yaml b/.repolint.yaml new file mode 100644 index 0000000..92923c8 --- /dev/null +++ b/.repolint.yaml @@ -0,0 +1,13 @@ +# gh-repolint configuration +# See https://github.com/sethrylan/gh-repolint for documentation + +checks: + files: + - name: ".github/dependabot.yml" + reference: "sethrylan/sethrylan/.repolint/npm-dependabot.yml" + - name: ".github/workflows/ci.yml" + reference: "sethrylan/sethrylan/.repolint/workflows/npm-ci.yml" + - name: ".github/workflows/conventional-commits.yml" + reference: "sethrylan/sethrylan/.repolint/workflows/conventional-commits.yml" + - name: "LICENSE" + reference: "sethrylan/sethrylan/.repolint/LICENSE" diff --git a/LICENSE b/LICENSE index eedeaab..14fac91 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,21 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2013 Seth Rylan Gainey +Copyright (c) 2026 -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json index aa5fde1..0cda0ad 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "rollup -c -w", "start": "sirv dist --no-clear", "check": "svelte-check", - "lint": "svelte-check" + "lint": "svelte-check", + "test": "svelte-check" }, "devDependencies": { "@rollup/plugin-commonjs": "^29.0.0",