diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 82d0331..043c74d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms patreon: streetsidesoftware -tidelift: "npm/cspell" +tidelift: 'npm/cspell' github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] - streetsidesoftware open_collective: cspell diff --git a/.github/actions/github-app-token/action.yaml b/.github/actions/github-app-token/action.yaml deleted file mode 100644 index 0b56749..0000000 --- a/.github/actions/github-app-token/action.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: github_app_token -description: Create a token for making Pull Requests - -# Note: this just calls tibdex/github-app-token, but it allows us to keep it in one place. - -inputs: - app_id: - description: Application ID used to make the PR - required: true - app_private_key: - description: Application Private Key used to sign the PR - required: true -outputs: - token: - description: A token for making Pull Requests - value: ${{ steps.generate-token.outputs.token }} -runs: - using: "composite" - steps: - - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v1.5 # cspell:ignore tibdex - id: generate-token - with: - app_id: ${{ inputs.app_id }} - private_key: ${{ inputs.app_private_key }} diff --git a/.github/actions/pr/action.yaml b/.github/actions/pr/action.yaml deleted file mode 100644 index 4f84138..0000000 --- a/.github/actions/pr/action.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: create_pr -description: Create A Pull Request That will Trigger Workflows -inputs: - base: - description: The Base Ref to apply the diff - required: false - body: - description: Optional body of the PR - required: false - commit-message: - description: Commit Message for the PR - required: true - branch: - description: The Branch to create for the PR - required: true - title: - description: PR title - defaults to commit-message - required: false - app_id: - description: Application ID used to make the PR - required: true - app_private_key: - description: Application Private Key used to sign the PR - required: true -runs: - using: "composite" - steps: - - name: Has changes - shell: bash - run: | - git --no-pager diff --compact-summary --exit-code && echo "git_status=clean" >> $GITHUB_ENV || echo "git_status=dirty" >> $GITHUB_ENV - git --no-pager diff --compact-summary - - name: Gen Body - shell: bash - env: - BODY: ${{ inputs.body }} - run: | - echo 'git_body<> $GITHUB_ENV - echo "$BODY" >> $GITHUB_ENV - git --no-pager diff --compact-summary >> $GITHUB_ENV - echo 'DIFF' >> $GITHUB_ENV - - name: Echo git_status - shell: bash - run: echo "${{ env.git_status }}" - - - name: Body - shell: bash - run: | - echo "$git_body" - - - uses: ./.github/actions/github-app-token - if: env.git_status == 'dirty' - id: generate-token - with: - app_id: ${{ inputs.app_id }} - app_private_key: ${{ inputs.app_private_key }} - - - name: Create Pull Request - if: env.git_status == 'dirty' - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v4 - with: - commit-message: ${{ inputs.commit-message }} - branch: ${{ inputs.branch }} - base: ${{ inputs.base }} - title: ${{ inputs.title || inputs.commit-message }} - token: ${{ steps.generate-token.outputs.token }} - body: ${{ env.git_body }} - delete-branch: true diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index df36cb3..ea5f52e 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -4,16 +4,16 @@ inputs: node-version: required: false description: The version of Node to use. - default: "22.x" + default: '22.x' runs: - using: "composite" + using: 'composite' steps: - name: Use Node.js ${{ inputs.node-version }} - uses: actions/setup-node@v6 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 with: - registry-url: "https://registry.npmjs.org" + registry-url: 'https://registry.npmjs.org' node-version: ${{ inputs.node-version }} - cache: "npm" + cache: 'npm' - name: NPM Version run: npm -v; shell: bash diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 797854a..6d15fae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,16 +5,16 @@ version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: 'npm' # See documentation for possible values + directory: '/' # Location of package manifests schedule: - interval: "weekly" + interval: 'weekly' - - package-ecosystem: "github-actions" + - package-ecosystem: 'github-actions' # Workflow files stored in the # default location of `.github/workflows` directories: - - "/" - - "/.github/actions/*" + - '/' + - '/.github/actions/*' schedule: - interval: "daily" + interval: 'daily' diff --git a/.github/release.yml b/.github/release.yml index 4d58f8e..44eb8e1 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -17,7 +17,7 @@ changelog: - dev - title: Other Changes labels: - - "*" + - '*' - title: Maintenance labels: - chore diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index cd4f3df..1e87388 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: 'CodeQL' on: push: @@ -11,7 +11,7 @@ on: - cspell4 workflow_dispatch: schedule: - - cron: "0 23 * * 0" + - cron: '0 23 * * 0' jobs: analyze: @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: # Make sure it goes back far enough to find where the branch split from main fetch-depth: 20 @@ -28,7 +28,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: - languages: "javascript" + languages: 'javascript' - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/cspell-action.yml b/.github/workflows/cspell-action.yml index 1b47dcb..bcfdced 100644 --- a/.github/workflows/cspell-action.yml +++ b/.github/workflows/cspell-action.yml @@ -10,9 +10,9 @@ jobs: cspell: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - uses: streetsidesoftware/cspell-action@v8 with: - files: "." + files: '.' incremental_files_only: false check_dot_files: true diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index 93a0c88..d1ee855 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -2,34 +2,34 @@ # To get a newer version, you will need to update the SHA. # You can also reference a tag or branch, but the action may change without warning. -name: " ๐Ÿ“ฆ Publish Docker Images" +name: ' ๐Ÿ“ฆ Publish Docker Images' on: workflow_dispatch: inputs: dryRun: - description: "Dry Run" + description: 'Dry Run' type: choice options: - - "yes" - - "no" - default: "no" + - 'yes' + - 'no' + default: 'no' required: false ref: - description: "Reference / tag to publish" + description: 'Reference / tag to publish' required: false type: string workflow_call: inputs: ref: - description: "Reference / tag to publish" + description: 'Reference / tag to publish' required: true type: string env: REGISTRY: ghcr.io - IMAGE_NAME: "streetsidesoftware/cspell" + IMAGE_NAME: 'streetsidesoftware/cspell' permissions: contents: read @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: ref: ${{ github.event.inputs.ref || github.ref }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 486e5a4..b1ff45b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,4 +1,4 @@ -name: " ๐Ÿš€ release-please" +name: ' ๐Ÿš€ release-please' on: push: @@ -35,7 +35,7 @@ jobs: id-token: write steps: # The logic below handles the npm publication: - - uses: actions/checkout@v5 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: ref: ${{ needs.release-please.outputs.tag_name }} - name: Setup diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64f9b0e..94958f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: " ๐Ÿงช Test" +name: ' ๐Ÿงช Test' on: pull_request: push: @@ -16,47 +16,24 @@ jobs: # List of supported node versions (latest is tested in `test-os`) - 20.x - 22.x - - 23.x - + - 24.x + - 25.x os: - ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - name: Setup - uses: ./.github/actions/setup - with: - node-version: ${{ matrix.node-version }} - - - run: npm -v - - run: npm ci --omit=dev - - run: npm test - - # Ensure the repository is clean after build & test - - run: git --no-pager diff --compact-summary --exit-code - - test-os: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: - # Test the latest node version here, move older versions to `test-old-node-versions` - - 22.x - - os: - - windows-latest - # - macos-latest + include: + - os: windows-latest + node-version: 24.x steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - name: Setup uses: ./.github/actions/setup with: node-version: ${{ matrix.node-version }} + - run: npm -v - run: npm ci --omit=dev - run: npm test @@ -67,6 +44,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - run: docker build -t cspell . - - run: docker run -v $(pwd):/workdir cspell + - run: docker run -v $(pwd):/workdir cspell . diff --git a/.github/workflows/update-cspell.yml b/.github/workflows/update-cspell.yml index 122f909..386b092 100644 --- a/.github/workflows/update-cspell.yml +++ b/.github/workflows/update-cspell.yml @@ -1,4 +1,4 @@ -name: " ๐Ÿ“š Update CSpell" +name: ' ๐Ÿ“š Update CSpell' on: workflow_dispatch: @@ -6,17 +6,17 @@ on: base: description: The Base Ref to apply the diff required: false - default: "main" + default: 'main' push: branches: - main paths: - - "**/package.json" - - "**/package-lock.json" + - '**/package.json' + - '**/package-lock.json' schedule: - - cron: "0 7 * * *" + - cron: '0 7 * * *' jobs: update-cspell: @@ -33,7 +33,7 @@ jobs: echo "$EVENT_INPUTS" - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: ref: ${{ env.REF_BRANCH }} @@ -130,10 +130,10 @@ jobs: if: steps.git-status.outputs.isDirty uses: streetsidesoftware/actions/.github/actions/pr@v1 with: - commit-message: "${{ env.PR_TYPE }}: ${{ steps.commit_message.outputs.value }}" + commit-message: '${{ env.PR_TYPE }}: ${{ steps.commit_message.outputs.value }}' branch: ${{ env.NEW_BRANCH }} base: ${{ env.REF_BRANCH }} - title: "${{ env.PR_TYPE }}: ${{ steps.commit_message.outputs.value }}" + title: '${{ env.PR_TYPE }}: ${{ steps.commit_message.outputs.value }}' body: ${{ steps.body.outputs.body }} app_id: ${{ secrets.AUTOMATION_APP_ID }} app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }} diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 4400635..0bd804e 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -1,4 +1,4 @@ -name: " ๐Ÿ”— Update Dependencies Main" +name: ' ๐Ÿ”— Update Dependencies Main' on: workflow_dispatch: @@ -6,17 +6,17 @@ on: base: description: The Base Ref to apply the diff required: false - default: "main" + default: 'main' push: branches: - main paths: - - "**/package.json" - - "**/package-lock.json" + - '**/package.json' + - '**/package-lock.json' schedule: - - cron: "0 12 * * 0" + - cron: '0 12 * * 0' jobs: update-dependencies: @@ -33,7 +33,7 @@ jobs: echo "$EVENT_INPUTS" - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: ref: ${{ env.REF_BRANCH }} @@ -78,10 +78,10 @@ jobs: - name: PR uses: streetsidesoftware/actions/.github/actions/pr@v1 with: - commit-message: "chore: Workflow Bot -- Update ALL Dependencies" + commit-message: 'chore: Workflow Bot -- Update ALL Dependencies' branch: ${{ env.NEW_BRANCH }} base: ${{ env.REF_BRANCH }} - title: "chore: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})" + title: 'chore: Workflow Bot -- Update ALL Dependencies (${{ env.REF_BRANCH }})' body: ${{ steps.body.outputs.body }} app_id: ${{ secrets.AUTOMATION_APP_ID }} app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }} diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 4a5d91a..883b1cc 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -1,2 +1,2 @@ -singleQuote: false +singleQuote: true semi: true diff --git a/index.js b/index.js index 323a5c9..1217c1e 100755 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ #!/usr/bin/env node -import "cspell/bin"; +import 'cspell/bin';