diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 85fe8eb..1ad4e02 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: "/" schedule: interval: "monthly" + cooldown: + default-days: 7 groups: actions-minor: update-types: diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 3d6765a..af637dd 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -40,6 +40,7 @@ rules: 'eslint-comments/no-unused-disable': 'off', 'i18n-text/no-en': 'off', 'import/no-namespace': 'off', + 'import/no-unresolved': 'off', 'no-console': 'off', 'no-unused-vars': 'off', 'prettier/prettier': 'error', diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b9ba864..db7f34a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -211,7 +211,7 @@ jobs: - name: Switch back to base branch env: BRANCH: ${{ steps.branch-name.outputs.BRANCH }} - run: git switch $BRANCH + run: git switch "$BRANCH" - name: Make changes to commit and stage them run: | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 58d5416..d49902c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -39,13 +39,17 @@ jobs: - name: Lint Codebase id: super-linter - uses: super-linter/super-linter/slim@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0 + uses: super-linter/super-linter/slim@502f4fe48a81a392756e173e39a861f8c8efe056 # v8.3.0 env: DEFAULT_BRANCH: main FILTER_REGEX_EXCLUDE: dist/**/* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier VALIDATE_ALL_CODEBASE: true + VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false + VALIDATE_GITHUB_ACTIONS: false VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_JSCPD: false + VALIDATE_TYPESCRIPT_ES: false VALIDATE_TYPESCRIPT_STANDARD: false diff --git a/__tests__/index.test.ts b/__tests__/index.test.ts index bf6f582..aa3122d 100644 --- a/__tests__/index.test.ts +++ b/__tests__/index.test.ts @@ -3,14 +3,14 @@ */ import { describe, expect, it, vi } from 'vitest'; -import * as main from '../src/main'; +import * as main from '../src/main.js'; // Mock the action's entrypoint const runMock = vi.spyOn(main, 'run').mockImplementation(async () => {}); describe('index', () => { it('calls run when imported', async () => { - await import('../src/index'); + await import('../src/index.js'); expect(runMock).toHaveBeenCalled(); }); diff --git a/__tests__/lib.test.ts b/__tests__/lib.test.ts index 9ac708f..fc9a28e 100644 --- a/__tests__/lib.test.ts +++ b/__tests__/lib.test.ts @@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import * as core from '@actions/core'; import * as exec from '@actions/exec'; -import * as lib from '../src/lib'; +import * as lib from '../src/lib.js'; vi.mock('@actions/core'); vi.mock('@actions/exec'); diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 69f0ef2..c47cb88 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -5,9 +5,9 @@ import * as fs from 'node:fs'; import * as core from '@actions/core'; import { RequestError } from '@octokit/request-error'; -import * as lib from '../src/lib'; -import * as main from '../src/main'; -import { mockGetBooleanInput, mockGetInput } from './utils'; +import * as lib from '../src/lib.js'; +import * as main from '../src/main.js'; +import { mockGetBooleanInput, mockGetInput } from './utils.js'; const createCommit = vi.fn(); const createRef = vi.fn(); diff --git a/src/index.ts b/src/index.ts index 8395471..f52271f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ /** * The entrypoint for the action. */ -import { run } from './main'; +import { run } from './main.js'; // eslint-disable-next-line @typescript-eslint/no-floating-promises run(); diff --git a/src/main.ts b/src/main.ts index 40f69af..32beb6a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,7 +8,12 @@ import * as github from '@actions/github'; import { RequestError } from '@octokit/request-error'; import type { Endpoints } from '@octokit/types'; -import { getHeadRef, getHeadSha, getHeadTreeHash, getStagedFiles } from './lib'; +import { + getHeadRef, + getHeadSha, + getHeadTreeHash, + getStagedFiles +} from './lib.js'; type GitHubGitTreeType = Endpoints['POST /repos/{owner}/{repo}/git/trees']['parameters']['tree'];