{"version":3,"file":"isUpToDate.mjs","names":[],"sources":["../../../src/storage/migration/isUpToDate.ts"],"sourcesContent":["import type { VersionString } from '../../utils/version'\nimport { isFirstVersionEqualToSecond, isFirstVersionHigherThanSecond, parseVersionString } from '../../utils/version'\nimport type { UpdateToVersion } from './updates'\n\nimport { CURRENT_FRAMEWORK_STORAGE_VERSION } from './updates'\n\nexport function isStorageUpToDate(storageVersion: VersionString, updateToVersion?: UpdateToVersion) {\n  const currentStorageVersion = parseVersionString(storageVersion)\n  const compareToVersion = parseVersionString(updateToVersion ?? CURRENT_FRAMEWORK_STORAGE_VERSION)\n\n  const isUpToDate =\n    isFirstVersionEqualToSecond(currentStorageVersion, compareToVersion) ||\n    isFirstVersionHigherThanSecond(currentStorageVersion, compareToVersion)\n\n  return isUpToDate\n}\n"],"mappings":";;;;;;AAMA,SAAgB,kBAAkB,gBAA+B,iBAAmC;CAClG,MAAM,wBAAwB,mBAAmB,eAAe;CAChE,MAAM,mBAAmB,mBAAmB,mBAAmB,kCAAkC;AAMjG,QAHE,4BAA4B,uBAAuB,iBAAiB,IACpE,+BAA+B,uBAAuB,iBAAiB"}