import semVerDifference , { versionDifference } from './semVerDifference' ; import currentVersion from './version' ; import config from '@config/config' ; const getVersionDifference = async ( figma ) : Promise < versionDifference > => { const lastVersionSettingsOpened = await figma . clientStorage . getAsync ( config . key . lastVersionSettingsOpened ) ; const versionDifference = semVerDifference ( currentVersion , lastVersionSettingsOpened ) ; if ( ! lastVersionSettingsOpened || lastVersionSettingsOpened !== currentVersion ) { await figma . clientStorage . setAsync ( config . key . lastVersionSettingsOpened , currentVersion ) ; } return versionDifference ; } ; export default getVersionDifference ;