import { Requirement } from './requirements-file-parser' ; import { UpgradedRequirements } from './types' ; export function applyUpgrades ( originalRequirements , upgradedRequirements ) { const updated = [ ] ; for ( const requirement of originalRequirements ) { const { originalText } = requirement ; if ( upgradedRequirements [ originalText ] ) { updated . push ( upgradedRequirements [ originalText ] ) ; } else { updated . push ( originalText ) ; } } return updated ; }