From bc621574ade5a7b030df0be69086f90ea5ceadf9 Mon Sep 17 00:00:00 2001 From: Gabor Demeter Date: Fri, 14 Aug 2026 19:52:57 +0200 Subject: [PATCH] Fix: reusable-sf-code-analyze pinned a Node the SF CLI no longer runs on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The workflow installs `@salesforce/cli` unpinned but pinned `node-version` to the exact string `20.9.0`. The CLI has since raised its engines floor to `>=22.0.0`, so the two drifted apart and the job now fails for every consumer: npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@salesforce/cli@2.147.7', npm WARN EBADENGINE required: { node: '>=22.0.0' }, npm WARN EBADENGINE current: { node: 'v20.9.0', npm: '10.1.0' } followed by a bare `##[error]Process completed with exit code 1` — the warning is the only thing naming the cause, and it is a WARN, so it reads as noise. Default is now `24`, matching what all three sf-docker-images pin. Tracking the major rather than an exact patch is deliberate: an exact pin beside an unpinned dependency is what produced the drift. Found from sf-develop-demo, whose new thin PR gate calls this workflow and could not get past static analysis. Co-Authored-By: Claude Opus 5 --- .github/workflows/reusable-sf-code-analyze.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-sf-code-analyze.yml b/.github/workflows/reusable-sf-code-analyze.yml index c28229a..34b8057 100644 --- a/.github/workflows/reusable-sf-code-analyze.yml +++ b/.github/workflows/reusable-sf-code-analyze.yml @@ -53,9 +53,17 @@ on: default: false type: boolean node-version: - description: 'Node.js version to use' + description: >- + Node.js version. Must satisfy the SF CLI's own engines field — this + job installs @salesforce/cli, and the CLI now requires >= 22. required: false - default: '20.9.0' + # Was pinned at '20.9.0'. That exact pin is how this broke: the CLI is + # unpinned here, so when it raised its engines floor to >=22 the pair + # drifted apart and every consumer's static-analysis job started failing + # with `npm WARN EBADENGINE` followed by a bare `exit code 1`. Tracking + # the major (and matching what the sf-docker-images pin) keeps the two + # moving together. + default: '24' type: string java-version: description: 'Java version to use'