@W-23659201@ Register uibundle engine in CLI - #2080
Conversation
Adds the new @salesforce/code-analyzer-uibundle-engine plugin to the CLI's EnginePluginsFactoryImpl so it runs alongside the other engines with `sf code-analyzer run`. Depends on forcedotcom/code-analyzer-core#499 being merged and the engine package being published before this PR's CI can go green.
5bff2e1 to
5ad4467
Compare
aruntyagiTutu
left a comment
There was a problem hiding this comment.
Thanks for the straightforward registration change — import + array entry + package.json dependency all look correct and match the existing pattern for the other engines.
One concrete gap for before this merges: test/lib/factories/EnginePluginsFactory.test.ts on dev currently asserts expect(enginePlugins).toHaveLength(7) and enumerates all 7 plugins by index (enginePlugins[0]...enginePlugins[6]). With uibundle added as an 8th plugin, that test will fail once @salesforce/code-analyzer-uibundle-engine is resolvable — it'll need toHaveLength(8) plus a new enginePlugins[7].getAvailableEngineNames()).toEqual(['uibundle']) assertion (or similar, depending on the engine's registered name).
Not blocking now since this is explicitly gated on the companion PR (code-analyzer-core#499) publishing first and your own test-plan checkbox for npm test is still open — just flagging so it's not missed when wiring up the actual merge.
ankitsinghkuntal09
left a comment
There was a problem hiding this comment.
Verified sanity plus regression:
W-23659201-Testing-Scenarios: https://docs.google.com/document/d/1amoe4NyOCJZVK3RAjZy23jJX9W1TLVhJ/edit

Summary
Registers
@salesforce/code-analyzer-uibundle-enginein the CLI'sEnginePluginsFactoryImplso the new UI Bundle engine runs by default withsf code-analyzer run.Changes
src/lib/factories/EnginePluginsFactory.ts— importUIBundleEngineModuleand addUIBundleEngineModule.createEnginePlugin()to the returned array.package.json— add"@salesforce/code-analyzer-uibundle-engine": "0.1.0-SNAPSHOT"to dependencies.Test plan
npm install && npm run build— will only succeed after the engine is published (see companion PR).npm test— verify engine listing showsuibundlealongside the other engines.Companion PR
forcedotcom/code-analyzer-core#499 — the engine implementation. This PR depends on that one being merged and the resulting package being published before CI here can go green.
Release-alignment note
The new engine pins
@salesforce/code-analyzer-engine-api@0.42.0-SNAPSHOT; the CLI currently pins0.39.0. At publish time, the CLI'sengine-apipin will need to move to match (or the engine must be published against a0.39.xline). Not blocking this PR's draft state; blocking the actual CLI cut.Related