From 8fd15366a5930982eabc6b676b0b7affcb02cdec Mon Sep 17 00:00:00 2001 From: Joshua Feingold Date: Thu, 21 Nov 2024 14:40:59 -0600 Subject: [PATCH 1/2] @W-17100664@ Integrated FlowTest engine --- package.json | 1 + src/lib/factories/EnginePluginsFactory.ts | 4 +++- test/lib/factories/EnginePluginsFactory.test.ts | 3 ++- yarn.lock | 12 ++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 361060367..de752cb2f 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@salesforce/code-analyzer-core": "0.17.0", "@salesforce/code-analyzer-engine-api": "0.14.0", "@salesforce/code-analyzer-eslint-engine": "0.14.0", + "@salesforce/code-analyzer-flowtest-engine": "0.14.0", "@salesforce/code-analyzer-pmd-engine": "0.14.0", "@salesforce/code-analyzer-regex-engine": "0.14.0", "@salesforce/code-analyzer-retirejs-engine": "0.14.0", diff --git a/src/lib/factories/EnginePluginsFactory.ts b/src/lib/factories/EnginePluginsFactory.ts index accc6ce7c..e390bf337 100644 --- a/src/lib/factories/EnginePluginsFactory.ts +++ b/src/lib/factories/EnginePluginsFactory.ts @@ -3,6 +3,7 @@ import * as ESLintEngineModule from '@salesforce/code-analyzer-eslint-engine'; import * as PmdCpdEnginesModule from '@salesforce/code-analyzer-pmd-engine'; import * as RetireJSEngineModule from '@salesforce/code-analyzer-retirejs-engine'; import * as RegexEngineModule from '@salesforce/code-analyzer-regex-engine'; +import * as FlowTestEngineModule from '@salesforce/code-analyzer-flowtest-engine'; export interface EnginePluginsFactory { create(): EnginePlugin[]; @@ -14,7 +15,8 @@ export class EnginePluginsFactoryImpl implements EnginePluginsFactory { ESLintEngineModule.createEnginePlugin(), PmdCpdEnginesModule.createEnginePlugin(), RetireJSEngineModule.createEnginePlugin(), - RegexEngineModule.createEnginePlugin() + RegexEngineModule.createEnginePlugin(), + FlowTestEngineModule.createEnginePlugin() ]; } } diff --git a/test/lib/factories/EnginePluginsFactory.test.ts b/test/lib/factories/EnginePluginsFactory.test.ts index 7b645c793..9e00e08e3 100644 --- a/test/lib/factories/EnginePluginsFactory.test.ts +++ b/test/lib/factories/EnginePluginsFactory.test.ts @@ -6,10 +6,11 @@ describe('EnginePluginsFactoryImpl', () => { const pluginsFactory = new EnginePluginsFactoryImpl(); const enginePlugins = pluginsFactory.create(); - expect(enginePlugins).toHaveLength(4); + expect(enginePlugins).toHaveLength(5); expect(enginePlugins[0].getAvailableEngineNames()).toEqual(['eslint']); expect(enginePlugins[1].getAvailableEngineNames()).toEqual(['pmd', 'cpd']); expect(enginePlugins[2].getAvailableEngineNames()).toEqual(['retire-js']); expect(enginePlugins[3].getAvailableEngineNames()).toEqual(['regex']); + expect(enginePlugins[4].getAvailableEngineNames()).toEqual(['flowtest']); }); }); diff --git a/yarn.lock b/yarn.lock index cc7aff676..f1424a3f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1739,6 +1739,18 @@ eslint-plugin-import "^2.29.1" eslint-plugin-jest "^28.6.0" +"@salesforce/code-analyzer-flowtest-engine@0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@salesforce/code-analyzer-flowtest-engine/-/code-analyzer-flowtest-engine-0.14.0.tgz#2e7fd02c4f71d0a0a4dd96460a16f261f2ae0434" + integrity sha512-SKcwtdB7h7GagowUsfZYoQYM5HSoTyQI5SNsGnwXxaJ7VCLBbxG8Ag1811cvqMAbk1DUb/44nHNBeb5XqUN3nA== + dependencies: + "@salesforce/code-analyzer-engine-api" "0.14.0" + "@types/node" "^20.0.0" + "@types/semver" "^7.5.8" + "@types/tmp" "^0.2.6" + semver "^7.6.3" + tmp "^0.2.3" + "@salesforce/code-analyzer-pmd-engine@0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@salesforce/code-analyzer-pmd-engine/-/code-analyzer-pmd-engine-0.14.0.tgz#580a4b038a9f6468689e35a0e8e2867e71b5d75c" From c5f44788f76ab06eda52bc93d63fc3cb4a054ee5 Mon Sep 17 00:00:00 2001 From: Joshua Feingold Date: Thu, 21 Nov 2024 15:07:02 -0600 Subject: [PATCH 2/2] @W-17100664@ Fixing smoke tests --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 21c6a9bdd..4c00e3153 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -96,6 +96,9 @@ jobs: with: distribution: 'temurin' java-version: '11' + - uses: actions/setup-python@v5 + with: + python-version: '3.12' # Install SF CLI via NPM - run: npm install -g @salesforce/cli # Download and install the Tarball artifact