From 0cfd1ebf57d5d8f1061db1eba48cbc15c4a0eb66 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 17 Jul 2025 20:21:33 -0400 Subject: [PATCH] Update linters --- .github/workflows/release.yml | 2 +- .github/workflows/unit.yml | 8 +------- cmd/compile-versions/main.go | 2 +- go.mod | 5 +++-- package.json | 4 ++++ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8512512..cc88cc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' registry-url: 'https://wombat-dressing-room.appspot.com/' - env: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index c154b59..af0a167 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -31,16 +31,10 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.12.x' # https://github.com/nodejs/node/issues/53033 + node-version-file: 'package.json' - name: 'npm build' run: 'npm ci && npm run build' - - name: 'npm lint' - # There's no need to run the linter for each operating system, since it - # will find the same thing 9x and clog up the PR review. - if: ${{ matrix.os == 'ubuntu-latest' }} - run: 'npm run lint' - - name: 'npm test' run: 'npm run test' diff --git a/cmd/compile-versions/main.go b/cmd/compile-versions/main.go index 1bd1d5d..f3fe1e3 100644 --- a/cmd/compile-versions/main.go +++ b/cmd/compile-versions/main.go @@ -68,7 +68,7 @@ func realMain(ctx context.Context) error { versionsMap := make(map[string]struct{}, len(names)) for _, name := range names { sub := versionRe.FindStringSubmatch(name) - if sub == nil || len(sub) < 2 { + if len(sub) < 2 { // no match continue } diff --git a/go.mod b/go.mod index bb8a4e1..c6979e8 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,8 @@ module github.com/google-github-actions/setup-cloud-sdk -go 1.22 -toolchain go1.24.1 +go 1.23.0 + +toolchain go1.24.5 require ( cloud.google.com/go/storage v1.40.0 diff --git a/package.json b/package.json index 1412603..cb88e9d 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,10 @@ "module": "dist/index.js", "main": "dist/index.js", "types": "dist/index.d.js", + "engines": { + "node": "20.x", + "npm": "10.x" + }, "scripts": { "build": "rm -rf dist/ && ncc build --source-map --no-source-map-register src/index.ts", "lint": "eslint .",