@gluonjs/vue-migration-analyzer
@gluonjs/vue-migration-analyzer / packages/vue-migration-analyzer/src / RawFinding
Interface: RawFinding
Properties
code
readonlycode:`GVA${number}`
confidence
readonlyconfidence:Confidence
location
readonlylocation:RawLocation|null
message
readonlymessage:string
relatedStages?
readonlyoptionalrelatedStages?: readonlyMigrationStage[]
severity
readonlyseverity:Severity
stage
readonlystage:MigrationStage
Example
Carry a worker finding's diagnostic code, severity, confidence, message, stage, and raw optional location before stable IDs are assigned:
import {
type RawBlock,
type RawFinding,
type RawInventory,
type RawLocation,
type WorkerResult,
} from '@gluonjs/vue-migration-analyzer';
const location = { start: 12, end: 36 } satisfies RawLocation;
const inventory = {
category: 'reactivity-lifecycle',
kind: 'reactive-primitive',
name: 'ref',
importSource: 'vue',
confidence: 'exact',
stage: 'state-form',
location,
} satisfies RawInventory;
const finding = {
code: 'GVA2001',
severity: 'warning',
confidence: 'structural',
message: 'Review reactive ownership manually.',
stage: 'state-form',
location,
} satisfies RawFinding;
const block = { kind: 'script-setup', lang: 'ts', scoped: false, module: null, location } satisfies RawBlock;
const worker = {
inventory: [inventory],
findings: [finding],
blocks: [block],
scriptMode: 'setup',
nodeCount: 42,
maxDepth: 7,
} satisfies WorkerResult;
console.log(worker.inventory[0]?.kind, worker.findings[0]?.code, worker.blocks[0]?.kind);