diff --git a/.github/actions/action_tests/action.yaml b/.github/actions/action_tests/action.yaml index faac5b6c3..74775a4e6 100644 --- a/.github/actions/action_tests/action.yaml +++ b/.github/actions/action_tests/action.yaml @@ -55,6 +55,7 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --passWithNoTests --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: JEST_SUITE_NAME: Action Tests PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} @@ -80,6 +81,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/actions/linter_tests/action.yaml b/.github/actions/linter_tests/action.yaml index 43bc45381..0f2af97d3 100644 --- a/.github/actions/linter_tests/action.yaml +++ b/.github/actions/linter_tests/action.yaml @@ -98,13 +98,14 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: PLUGINS_TEST_LINTER_VERSION: ${{ inputs.linter-version }} PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} SOURCERY_TOKEN: ${{ inputs.sourcery-token }} # Debug recurrent eslint circular JSON errors - DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:* + DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:*,Driver:trunk-toolbox:* JEST_SUITE_NAME: Linter Tests JEST_JUNIT_SUITE_NAME: "{title} ${{ runner.os }} ${{ inputs.ref-type }} ${{ inputs.linter-version }}" @@ -129,6 +130,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/actions/tool_tests/action.yaml b/.github/actions/tool_tests/action.yaml index 598f8c7cd..f9cba9e88 100644 --- a/.github/actions/tool_tests/action.yaml +++ b/.github/actions/tool_tests/action.yaml @@ -71,6 +71,7 @@ runs: run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci shell: bash working-directory: ${{ inputs.path }} + continue-on-error: true env: PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} @@ -97,6 +98,6 @@ runs: junit-paths: junit.xml org-slug: trunk-staging-org token: ${{ inputs.trunk-staging-token }} - continue-on-error: true + quarantine: true env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 71d8bd7c0..667b66339 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -5,8 +5,7 @@ updates: schedule: interval: weekly day: sunday - # trunk-ignore(yamllint/quoted-strings) - time: "08:00" # UTC + time: "10:00" # UTC groups: dependencies: patterns: @@ -18,13 +17,9 @@ updates: schedule: interval: weekly day: sunday - # trunk-ignore(yamllint/quoted-strings) - time: "08:00" # UTC + time: "10:00" # UTC groups: dependencies: patterns: - "*" - # TODO(Tyler): Readd once eslint9 is resolved. - ignore: - - dependency-name: eslint open-pull-requests-limit: 2 diff --git a/.github/workflows/annotate_pr.yaml b/.github/workflows/annotate_pr.yaml index 4bbd60768..603d010a6 100644 --- a/.github/workflows/annotate_pr.yaml +++ b/.github/workflows/annotate_pr.yaml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Trunk Check - uses: trunk-io/trunk-action@12da16fcdd5cad1903d0082e591e09df7b67c7f0 # v1.1.17 + uses: trunk-io/trunk-action@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19 with: post-annotations: true # This job may fail when the PR was not run on a fork, and that's okay diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 752b29034..4c9909926 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -34,7 +34,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 + uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1 # Override language selection by uncommenting this and choosing your languages with: languages: javascript @@ -42,7 +42,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 + uses: github/codeql-action/autobuild@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -56,4 +56,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 + uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index c0f8e9ec4..38ca98d4b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,8 +1,8 @@ name: Nightly on: schedule: - # Times in UTC (PST+8), this translates to running Mon-Fri at midnight/1am (depending on DST) - - cron: 0 8 * * 1-5 + # Times in UTC (PST+8), this translates to running Mon-Fri at 2am/3am (depending on DST) + - cron: 0 10 * * 1-5 # Only enable on pull requests for testing # pull_request: # paths: [.github/workflows/nightly.yaml] @@ -43,7 +43,7 @@ jobs: - name: Cache tool downloads # ubuntu runner has persistent cache if: matrix.os == 'windows-latest' - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. @@ -151,7 +151,7 @@ jobs: - name: Cache tool downloads # ubuntu, mac runners have persistent cache if: matrix.os == 'windows-latest' - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 2da02d921..75df408b3 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -234,7 +234,7 @@ jobs: lfs: true - name: Trunk Check - uses: trunk-io/trunk-action@12da16fcdd5cad1903d0082e591e09df7b67c7f0 + uses: trunk-io/trunk-action@4d5ecc89b2691705fd08c747c78652d2fc806a94 env: TRUNK_GITHUB_CHECK_RUN_TITLE: Trunk Check @@ -251,7 +251,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache key: trunk-${{ runner.os }} @@ -279,7 +279,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache key: trunk-${{ runner.os }} diff --git a/.github/workflows/repo_tests.reusable.yaml b/.github/workflows/repo_tests.reusable.yaml index c3e28f4e2..e22591ab7 100644 --- a/.github/workflows/repo_tests.reusable.yaml +++ b/.github/workflows/repo_tests.reusable.yaml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup node - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version: 18 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index cb8047437..214b67ac4 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -65,6 +65,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 + uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1 with: sarif_file: results.sarif diff --git a/.github/workflows/upgrade_trunk.yaml b/.github/workflows/upgrade_trunk.yaml index 0875ef33b..d9a6fc8b9 100644 --- a/.github/workflows/upgrade_trunk.yaml +++ b/.github/workflows/upgrade_trunk.yaml @@ -1,8 +1,8 @@ name: Upgrade Trunk Weekly on: schedule: - # Weekly at midnight W morning - - cron: 0 8 * * 3 + # Weekly W morning + - cron: 0 10 * * 3 workflow_dispatch: {} permissions: read-all @@ -26,7 +26,7 @@ jobs: private_key: ${{ secrets.TRUNK_OPEN_PR_APP_PRIVATE_KEY }} - name: Trunk Upgrade - uses: trunk-io/trunk-action/upgrade@12da16fcdd5cad1903d0082e591e09df7b67c7f0 + uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 with: arguments: -n --bleeding-edge github-token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/upload_results.reusable.yaml b/.github/workflows/upload_results.reusable.yaml index 7e72f9b58..728a403b4 100644 --- a/.github/workflows/upload_results.reusable.yaml +++ b/.github/workflows/upload_results.reusable.yaml @@ -121,7 +121,7 @@ jobs: SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} - name: Setup Node - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version: 18 @@ -241,7 +241,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version: 18 diff --git a/.github/workflows/windows_nightly.yaml b/.github/workflows/windows_nightly.yaml index 59a0f3776..5825a4486 100644 --- a/.github/workflows/windows_nightly.yaml +++ b/.github/workflows/windows_nightly.yaml @@ -1,6 +1,6 @@ name: Windows Tests on: - # TODO(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it. + # NOTE(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it. workflow_dispatch: {} permissions: read-all @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. @@ -62,7 +62,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Cache tool downloads - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: /tmp/plugins_testing_download_cache # No need to key on trunk version unless we change how we store downloads. diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 07d464a58..6a23e8dc4 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -2,7 +2,7 @@ version: 0.1 # version used for local trunk runs and testing cli: - version: 1.22.6-beta.14 + version: 1.22.8-beta.6 shell_hooks: enforce: true @@ -17,7 +17,7 @@ plugins: - id: configs uri: https://github.com/trunk-io/configs - ref: v1.0.8 + ref: v1.0.9 lint: files: @@ -42,8 +42,8 @@ lint: enabled: # enabled linters inherited from github.com/trunk-io/configs plugin - definition-checker - - eslint@9.11.1 - - trunk-toolbox@0.4.1 + - eslint@9.14.0 + - trunk-toolbox@0.5.3 disabled: - pylint # pylint diagnostics are too strict - semgrep diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d8735670..a5515c6fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,8 +69,9 @@ To add a new linter: ``` 3. Add your linter definition to `plugin.yaml` (consult the docs for [custom linters] and [custom - parsers] to understand how it should be defined). Most linters in this repository are defined as - tools as well, so that they can be easily run manually from the command line. + parsers] + to understand how it should be defined). Most linters in this repository are defined as tools as + well, so that they can be easily run manually from the command line. 4. Run `trunk check enable ` to enable your linter, and run `trunk check` to verify that the configuration is valid and that you get desired diagnostics. Running `trunk check --verbose` can help provide greater insights when debugging. You may also wish to run on your test data, @@ -81,8 +82,8 @@ To add a new linter: 6. Revert any `.trunk/trunk.yaml` changes, and run `trunk check` to lint your changes. 7. Open a PR! -[custom linters]: https://docs.trunk.io/check/custom-linters -[custom parsers]: https://docs.trunk.io/check/custom-parsers +[custom linters]: https://docs.trunk.io/code-quality/linters/custom-linters +[custom parsers]: https://docs.trunk.io/cli/configuration/lint/output-parsing ## Tools diff --git a/linters/ansible-lint/plugin.yaml b/linters/ansible-lint/plugin.yaml index ca71524ac..0e9caec4d 100644 --- a/linters/ansible-lint/plugin.yaml +++ b/linters/ansible-lint/plugin.yaml @@ -1,7 +1,6 @@ version: 0.1 tools: definitions: - # TODO(Tyler): Once we can make ansible its own tool without breaking upgrade, this should be extracted into its own tool directory - name: ansible-lint runtime: python package: ansible-lint diff --git a/linters/gitleaks/test_data/basic.py b/linters/gitleaks/test_data/basic.py index df29d6281..476a221a6 100644 --- a/linters/gitleaks/test_data/basic.py +++ b/linters/gitleaks/test_data/basic.py @@ -1,4 +1,11 @@ aws_access_key_id = "AKIAIO5FODNN7EXAMPLE" +aws_token = "AKIALALEMEL33243OLIA" -aws_access_key_id = "AKIAIO5FODNN7EXAMPLE" +private_key = """-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XAAAAJDiKO3C4ijt +wgAAAAtzc2gtZWQyNTUxOQAAACA8YWKYztuuvxUIMomc3zv0OdXCT57Cc2cRYu3TMbX9XA +AAAECzmj8DGxg5YHtBK4AmBttMXDQHsPAaCyYHQjJ4YujRBTxhYpjO266/FQgyiZzfO/Q5 +1cJPnsJzZxFi7dMxtf1cAAAADHJvb3RAZGV2aG9zdAE= +-----END OPENSSH PRIVATE KEY-----""" diff --git a/linters/gitleaks/test_data/gitleaks_v8.1.3_basic.check.shot b/linters/gitleaks/test_data/gitleaks_v8.1.3_basic.check.shot index 3eaf2efc2..32d0d885a 100644 --- a/linters/gitleaks/test_data/gitleaks_v8.1.3_basic.check.shot +++ b/linters/gitleaks/test_data/gitleaks_v8.1.3_basic.check.shot @@ -23,18 +23,36 @@ exports[`Testing linter gitleaks test basic 1`] = ` }, { "code": "aws-access-token", - "column": "23", + "column": "15", "file": "test_data/basic.py", "issueClass": "ISSUE_CLASS_EXISTING", "level": "LEVEL_HIGH", - "line": "4", + "line": "3", "linter": "gitleaks", "message": "aws-access-token has detected secret for file test_data/basic.py.", "ranges": [ { "filePath": "test_data/basic.py", "length": "19", - "offset": "67", + "offset": "58", + }, + ], + "targetType": "ALL", + }, + { + "code": "OPENSSH-PK", + "column": "19", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "gitleaks", + "message": "OPENSSH-PK has detected secret for file test_data/basic.py.", + "ranges": [ + { + "filePath": "test_data/basic.py", + "length": "34", + "offset": "98", }, ], "targetType": "ALL", diff --git a/linters/gitleaks/test_data/gitleaks_v8.21.2_basic.check.shot b/linters/gitleaks/test_data/gitleaks_v8.21.2_basic.check.shot new file mode 100644 index 000000000..0811d0681 --- /dev/null +++ b/linters/gitleaks/test_data/gitleaks_v8.21.2_basic.check.shot @@ -0,0 +1,68 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter gitleaks test basic 1`] = ` +{ + "issues": [ + { + "code": "aws-access-token", + "column": "15", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "gitleaks", + "message": "aws-access-token has detected secret for file test_data/basic.py.", + "ranges": [ + { + "filePath": "test_data/basic.py", + "length": "20", + "offset": "58", + }, + ], + "targetType": "ALL", + }, + { + "code": "private-key", + "column": "19", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "gitleaks", + "message": "private-key has detected secret for file test_data/basic.py.", + "ranges": [ + { + "filePath": "test_data/basic.py", + "length": "397", + "offset": "98", + }, + ], + "targetType": "ALL", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "gitleaks", + "paths": [ + "test_data/basic.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "gitleaks", + "paths": [ + "test_data/basic.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/gitleaks/test_data/gitleaks_v8.8.7_basic.check.shot b/linters/gitleaks/test_data/gitleaks_v8.8.7_basic.check.shot index 3eaf2efc2..828b35564 100644 --- a/linters/gitleaks/test_data/gitleaks_v8.8.7_basic.check.shot +++ b/linters/gitleaks/test_data/gitleaks_v8.8.7_basic.check.shot @@ -23,18 +23,36 @@ exports[`Testing linter gitleaks test basic 1`] = ` }, { "code": "aws-access-token", - "column": "23", + "column": "15", "file": "test_data/basic.py", "issueClass": "ISSUE_CLASS_EXISTING", "level": "LEVEL_HIGH", - "line": "4", + "line": "3", "linter": "gitleaks", "message": "aws-access-token has detected secret for file test_data/basic.py.", "ranges": [ { "filePath": "test_data/basic.py", "length": "19", - "offset": "67", + "offset": "58", + }, + ], + "targetType": "ALL", + }, + { + "code": "private-key", + "column": "19", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "gitleaks", + "message": "private-key has detected secret for file test_data/basic.py.", + "ranges": [ + { + "filePath": "test_data/basic.py", + "length": "396", + "offset": "98", }, ], "targetType": "ALL", diff --git a/linters/hadolint/hadolint.test.ts b/linters/hadolint/hadolint.test.ts index 166239e36..5c1873dcf 100644 --- a/linters/hadolint/hadolint.test.ts +++ b/linters/hadolint/hadolint.test.ts @@ -1,5 +1,15 @@ import { customLinterCheckTest } from "tests"; import { TEST_DATA } from "tests/utils"; +const manualVersionReplacer = (version: string) => { + if (version === "2.12.0") { + // This version may segfault on certain versions on macOS. + // The beta version is identical except with upx compression disabled on the binary. + // See https://github.com/hadolint/hadolint/issues/919#issuecomment-1672031271 + return "2.12.1-beta"; + } + return version; +}; + // We have a number of different files to determine which are valid Dockerfiles, validated by lint actions in the snapshot -customLinterCheckTest({ linterName: "hadolint", args: TEST_DATA }); +customLinterCheckTest({ linterName: "hadolint", args: TEST_DATA, manualVersionReplacer }); diff --git a/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot b/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot new file mode 100644 index 000000000..e5b0d64c0 --- /dev/null +++ b/linters/hadolint/test_data/hadolint_v2.12.1-beta_CUSTOM.check.shot @@ -0,0 +1,157 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter hadolint test CUSTOM 1`] = ` +{ + "issues": [ + { + "code": "DL3059", + "column": "1", + "file": "test_data/basic.Dockerfile", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/hadolint/hadolint/wiki/DL3059", + "level": "LEVEL_LOW", + "line": "4", + "linter": "hadolint", + "message": "Multiple consecutive \`RUN\` instructions. Consider consolidation.", + "targetType": "docker", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/basic.Dockerfile", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/empty.Dockerfile", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/dockerfile", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/prefix.Dockerfile", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/Dockerfile.empty", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/basic.Dockerfile", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/empty.Dockerfile", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/Dockerfile.debug", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/dockerfile", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "docker", + "linter": "hadolint", + "paths": [ + "test_data/nested/prefix.Dockerfile", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/mypy/test_data/mypy_v1.13.0_CUSTOM.check.shot b/linters/mypy/test_data/mypy_v1.13.0_CUSTOM.check.shot new file mode 100644 index 000000000..2472079b1 --- /dev/null +++ b/linters/mypy/test_data/mypy_v1.13.0_CUSTOM.check.shot @@ -0,0 +1,142 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter mypy test CUSTOM 1`] = ` +{ + "issues": [ + { + "code": "arg-type", + "column": "10", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "13", + "linter": "mypy", + "message": "Argument 1 to "greeting" has incompatible type "int"; expected "str"", + "targetType": "python", + }, + { + "code": "arg-type", + "column": "10", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "mypy", + "message": "Argument 1 to "greeting" has incompatible type "bytes"; expected "str"", + "targetType": "python", + }, + { + "code": "func-returns-value", + "column": "5", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "15", + "linter": "mypy", + "message": ""printer" does not return a value (it only ever returns None)", + "targetType": "python", + }, + { + "code": "assignment", + "column": "10", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "16", + "linter": "mypy", + "message": "Incompatible types in assignment (expression has type "int", variable has type "str")", + "targetType": "python", + }, + { + "code": "attr-defined", + "column": "1", + "file": "test_data/basic.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "mypy", + "message": "Module "test_data" has no attribute "mypy_import2"", + "targetType": "python", + }, + { + "code": "return", + "column": "1", + "file": "test_data/source.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://mypy.readthedocs.io/en/stable/error_code_list.html", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "mypy", + "message": "Missing return statement", + "targetType": "python", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/__init__.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/basic.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/source.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/__init__.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/basic.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "mypy", + "paths": [ + "test_data/source.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/plugin.yaml b/linters/plugin.yaml index a4ad69cf9..3150762b0 100644 --- a/linters/plugin.yaml +++ b/linters/plugin.yaml @@ -455,7 +455,6 @@ lint: - name: postcss extensions: - # TODO(Tyler): Do we want to include css here as well? - pcss - postcss diff --git a/linters/ruff/ruff.test.ts b/linters/ruff/ruff.test.ts index 288de6565..4427e030a 100644 --- a/linters/ruff/ruff.test.ts +++ b/linters/ruff/ruff.test.ts @@ -3,7 +3,7 @@ import { linterCheckTest, linterFmtTest } from "tests"; import { TrunkLintDriver } from "tests/driver"; import { skipOS } from "tests/utils"; -linterCheckTest({ linterName: "ruff", namedTestPrefixes: ["basic", "interface"] }); +linterCheckTest({ linterName: "ruff", namedTestPrefixes: ["basic", "interface", "syntax"] }); const skipJupyterTestIf = (version?: string) => { if (!version || !semver.valid(version)) { diff --git a/linters/ruff/ruff_to_sarif.py b/linters/ruff/ruff_to_sarif.py index 20a81ace9..73e2afefc 100755 --- a/linters/ruff/ruff_to_sarif.py +++ b/linters/ruff/ruff_to_sarif.py @@ -30,7 +30,8 @@ def get_region(entry, column_offset=0): continue filepath = result["filename"] - rule_id = result["code"] + # Ruff will set code to null for syntax errors + rule_id = result["code"] or "E999" message = result["message"] sarif_result = { diff --git a/linters/ruff/test_data/ruff_v0.2.1_syntax.check.shot b/linters/ruff/test_data/ruff_v0.2.1_syntax.check.shot new file mode 100644 index 000000000..8a963657f --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.2.1_syntax.check.shot @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter ruff test syntax 1`] = ` +{ + "issues": [ + { + "code": "E999", + "column": "1", + "file": "test_data/syntax.in.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#E999", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ruff", + "message": "SyntaxError: unexpected EOF while parsing", + "targetType": "python", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/syntax.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/syntax.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ruff/test_data/syntax.in.py b/linters/ruff/test_data/syntax.in.py new file mode 100644 index 000000000..4314b3c57 --- /dev/null +++ b/linters/ruff/test_data/syntax.in.py @@ -0,0 +1 @@ +def f(): { diff --git a/linters/scalafmt/plugin.yaml b/linters/scalafmt/plugin.yaml index a1ce10dcb..e3fecea56 100644 --- a/linters/scalafmt/plugin.yaml +++ b/linters/scalafmt/plugin.yaml @@ -46,3 +46,5 @@ lint: parse_regex: scalafmt ${semver} run: scalafmt --version known_good_version: 3.4.3 + # We don't support this semver format, and it's a prerelease + known_bad_versions: [3.8.4-RC1] diff --git a/linters/trunk-toolbox/plugin.yaml b/linters/trunk-toolbox/plugin.yaml index 561c98a7d..219e4a5c1 100644 --- a/linters/trunk-toolbox/plugin.yaml +++ b/linters/trunk-toolbox/plugin.yaml @@ -2,7 +2,7 @@ version: 0.1 downloads: - name: trunk-toolbox - version: 0.4.1 + version: 0.5.3 downloads: - os: linux: unknown-linux-gnu @@ -17,14 +17,28 @@ tools: - name: trunk-toolbox download: trunk-toolbox shims: [trunk-toolbox] - known_good_version: 0.4.1 + known_good_version: 0.5.3 lint: definitions: - name: trunk-toolbox description: Repository level linting tools main_tool: trunk-toolbox files: [ALL] + affects_cache: [toolbox.toml, log4rs.yaml] commands: + - name: lint + version: ">=0.5.3" + run: + trunk-toolbox --upstream=${upstream-ref} --cache-dir=${cachedir} --results=${tmpfile} + ${target} + output: sarif + batch: true + success_codes: [0] + read_output_from: tmp_file + cache_results: true + disable_upstream: false + direct_configs: [toolbox.toml] + max_concurrency: 1 - name: lint version: ">=0.4.1" run: @@ -34,6 +48,9 @@ lint: batch: true success_codes: [0] read_output_from: tmp_file + disable_upstream: true + direct_configs: [toolbox.toml] + max_concurrency: 1 - name: lint run: trunk-toolbox --upstream=${upstream-ref} --results=${tmpfile} ${target} output: sarif diff --git a/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot b/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot new file mode 100644 index 000000000..293b5fc21 --- /dev/null +++ b/linters/trunk-toolbox/test_data/trunk_toolbox_v0.5.3_do_not_land.check.shot @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing linter trunk-toolbox test do_not_land 1`] = ` +{ + "issues": [ + { + "code": "do-not-land", + "column": "3", + "file": "test_data/do_not_land.in.txt", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "trunk-toolbox", + "message": "Found 'DONOTLAND'", + "ranges": [ + { + "filePath": "test_data/do_not_land.in.txt", + "length": "9", + "offset": "2", + }, + ], + "targetType": "ALL", + }, + { + "code": "do-not-land", + "column": "3", + "file": "test_data/do_not_land.in.txt", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "trunk-toolbox", + "message": "Found 'do-not-land'", + "ranges": [ + { + "filePath": "test_data/do_not_land.in.txt", + "length": "11", + "offset": "14", + }, + ], + "targetType": "ALL", + }, + { + "code": "do-not-land", + "column": "3", + "file": "test_data/do_not_land.in.txt", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "trunk-toolbox", + "message": "Found 'do_not_land'", + "ranges": [ + { + "filePath": "test_data/do_not_land.in.txt", + "length": "11", + "offset": "28", + }, + ], + "targetType": "ALL", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trunk-toolbox", + "paths": [ + "test_data/do_not_land.in.txt", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trunk-toolbox", + "paths": [ + "test_data/do_not_land.in.txt", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/package-lock.json b/package-lock.json index 99cf72f45..ae9be6871 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,24 +11,24 @@ "@jest/console": "^29.4.1", "@jest/reporters": "^29.4.1", "@jest/test-result": "^29.4.1", - "@trunkio/launcher": "^1.3.2", + "@trunkio/launcher": "^1.3.4", "@types/caller": "^1.0.2", "@types/debug": "^4.1.12", - "@types/jest": "^29.5.13", + "@types/jest": "^29.5.14", "@types/jest-specific-snapshot": "^0.5.9", - "@types/node": "^22.7.4", + "@types/node": "^22.9.0", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^8.8.0", - "@typescript-eslint/parser": "^8.8.0", + "@typescript-eslint/eslint-plugin": "^8.13.0", + "@typescript-eslint/parser": "^8.13.0", "caller": "^1.1.0", "debug": "^4.3.7", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-import-x": "^4.3.1", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-n": "^17.10.3", + "eslint-plugin-import-x": "^4.4.0", + "eslint-plugin-jest": "^28.9.0", + "eslint-plugin-n": "^17.13.1", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-simple-import-sort": "^12.1.1", "fast-sort": "^3.4.1", @@ -40,9 +40,9 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.1.2", - "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", - "yaml": "^2.5.1" + "typescript": "^5.6.3", + "typescript-eslint": "^8.13.0", + "yaml": "^2.6.0" }, "engines": { "node": ">=16" @@ -631,23 +631,28 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, - "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -1226,9 +1231,9 @@ } }, "node_modules/@trunkio/launcher": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@trunkio/launcher/-/launcher-1.3.2.tgz", - "integrity": "sha512-b5XTWaCjfXDk1wrFKutBqhoc3jVBEjD6l36aUc9AI+QFWWOqX5bLjkgOMAa2krN1QqAjP834wDYIW4n3PvXhCA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@trunkio/launcher/-/launcher-1.3.4.tgz", + "integrity": "sha512-4LCsFVvZtKht7EkbOq5gDsRLIBOH05ycNxm1Vrv+YzY+uOK2HueLBcLU8oejV9v01LTtWjfLJxonIgTSo7lwng==", "dev": true, "dependencies": { "semver": "^7.5.4", @@ -1342,9 +1347,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.13", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", - "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -1370,12 +1375,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", - "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/semver": { @@ -1403,16 +1408,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", - "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.13.0.tgz", + "integrity": "sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/type-utils": "8.8.0", - "@typescript-eslint/utils": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/type-utils": "8.13.0", + "@typescript-eslint/utils": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1436,15 +1441,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", - "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.13.0.tgz", + "integrity": "sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/typescript-estree": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "debug": "^4.3.4" }, "engines": { @@ -1464,13 +1469,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", - "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz", + "integrity": "sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0" + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1481,13 +1486,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", - "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.13.0.tgz", + "integrity": "sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/utils": "8.8.0", + "@typescript-eslint/typescript-estree": "8.13.0", + "@typescript-eslint/utils": "8.13.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1505,9 +1510,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", - "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.13.0.tgz", + "integrity": "sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1518,13 +1523,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", - "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz", + "integrity": "sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1570,15 +1575,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", - "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.13.0.tgz", + "integrity": "sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0" + "@typescript-eslint/scope-manager": "8.13.0", + "@typescript-eslint/types": "8.13.0", + "@typescript-eslint/typescript-estree": "8.13.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1592,12 +1597,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", - "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz", + "integrity": "sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.8.0", + "@typescript-eslint/types": "8.13.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -2409,9 +2414,9 @@ "license": "MIT" }, "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -2635,9 +2640,9 @@ } }, "node_modules/eslint-compat-utils": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.0.tgz", - "integrity": "sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", "dev": true, "dependencies": { "semver": "^7.5.4" @@ -2739,21 +2744,22 @@ } }, "node_modules/eslint-plugin-es-x": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.6.0.tgz", - "integrity": "sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", "dev": true, + "funding": [ + "https://github.com/sponsors/ota-meshi", + "https://opencollective.com/eslint" + ], "dependencies": { "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.6.0", - "eslint-compat-utils": "^0.5.0" + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, "peerDependencies": { "eslint": ">=8" } @@ -2792,9 +2798,9 @@ } }, "node_modules/eslint-plugin-import-x": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.3.1.tgz", - "integrity": "sha512-5TriWkXulDl486XnYYRgsL+VQoS/7mhN/2ci02iLCuL7gdhbiWxnsuL/NTcaKY9fpMgsMFjWZBtIGW7pb+RX0g==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.4.0.tgz", + "integrity": "sha512-me58aWTjdkPtgmOzPe+uP0bebpN5etH4bJRnYzy85Rn9g/3QyASg6kTCqdwNzyaJRqMI2ii2o8s01P2LZpREHg==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^8.1.0", @@ -2897,9 +2903,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "28.8.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz", - "integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==", + "version": "28.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.9.0.tgz", + "integrity": "sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -2922,19 +2928,19 @@ } }, "node_modules/eslint-plugin-n": { - "version": "17.10.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.10.3.tgz", - "integrity": "sha512-ySZBfKe49nQZWR1yFaA0v/GsH6Fgp8ah6XV0WDz6CN8WO0ek4McMzb7A2xnf4DCYV43frjCygvb9f/wx7UUxRw==", + "version": "17.13.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.13.1.tgz", + "integrity": "sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "enhanced-resolve": "^5.17.0", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^15.8.0", - "ignore": "^5.2.4", + "@eslint-community/eslint-utils": "^4.4.1", + "enhanced-resolve": "^5.17.1", + "eslint-plugin-es-x": "^7.8.0", + "get-tsconfig": "^4.8.1", + "globals": "^15.11.0", + "ignore": "^5.3.2", "minimatch": "^9.0.5", - "semver": "^7.5.3" + "semver": "^7.6.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2956,9 +2962,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/globals": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.8.0.tgz", - "integrity": "sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==", + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.11.0.tgz", + "integrity": "sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==", "dev": true, "engines": { "node": ">=18" @@ -3474,9 +3480,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", - "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -3657,9 +3663,10 @@ } }, "node_modules/ignore": { - "version": "5.3.1", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } @@ -6182,9 +6189,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -6195,14 +6202,14 @@ } }, "node_modules/typescript-eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", - "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.13.0.tgz", + "integrity": "sha512-vIMpDRJrQd70au2G8w34mPps0ezFSPMEX4pXkTzUkrNbRX+36ais2ksGWN0esZL+ZMaFJEneOBHzCgSqle7DHw==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.8.0", - "@typescript-eslint/parser": "8.8.0", - "@typescript-eslint/utils": "8.8.0" + "@typescript-eslint/eslint-plugin": "8.13.0", + "@typescript-eslint/parser": "8.13.0", + "@typescript-eslint/utils": "8.13.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6232,9 +6239,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.6.tgz", - "integrity": "sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/update-browserslist-db": { @@ -6409,9 +6416,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "dev": true, "bin": { "yaml": "bin.mjs" diff --git a/package.json b/package.json index 98f02d305..ba194beff 100644 --- a/package.json +++ b/package.json @@ -9,24 +9,24 @@ "@jest/console": "^29.4.1", "@jest/reporters": "^29.4.1", "@jest/test-result": "^29.4.1", - "@trunkio/launcher": "^1.3.2", + "@trunkio/launcher": "^1.3.4", "@types/caller": "^1.0.2", "@types/debug": "^4.1.12", - "@types/jest": "^29.5.13", + "@types/jest": "^29.5.14", "@types/jest-specific-snapshot": "^0.5.9", - "@types/node": "^22.7.4", + "@types/node": "^22.9.0", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^8.8.0", - "@typescript-eslint/parser": "^8.8.0", + "@typescript-eslint/eslint-plugin": "^8.13.0", + "@typescript-eslint/parser": "^8.13.0", "caller": "^1.1.0", "debug": "^4.3.7", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-import-x": "^4.3.1", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-n": "^17.10.3", + "eslint-plugin-import-x": "^4.4.0", + "eslint-plugin-jest": "^28.9.0", + "eslint-plugin-n": "^17.13.1", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-simple-import-sort": "^12.1.1", "fast-sort": "^3.4.1", @@ -38,9 +38,9 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.1.2", - "typescript": "^5.6.2", - "typescript-eslint": "^8.8.0", - "yaml": "^2.5.1" + "typescript": "^5.6.3", + "typescript-eslint": "^8.13.0", + "yaml": "^2.6.0" }, "bundleDependencies": [ "tests" diff --git a/tests/utils/landing_state.ts b/tests/utils/landing_state.ts index 4613cb2ca..da433ca78 100644 --- a/tests/utils/landing_state.ts +++ b/tests/utils/landing_state.ts @@ -21,8 +21,7 @@ const normalizePlatformPath = (originalPath: string | undefined) => { return originalPath; }; -// TODO(Tyler): These extract functions are used to filter down to deterministic fields. In the future -// we should preserve the original structure and use jest matchers on the non-deterministic fields. +// These extract functions are used to filter down to deterministic fields. const extractLintActionFields = ({ actionDurationMs: _actionDurationMs, cacheHit: _cacheHit,