

const require_updates = require('./updates.js');
const require_version = require('../../utils/version.js');

//#region src/storage/migration/isUpToDate.ts
function isStorageUpToDate(storageVersion, updateToVersion) {
	const currentStorageVersion = require_version.parseVersionString(storageVersion);
	const compareToVersion = require_version.parseVersionString(updateToVersion ?? require_updates.CURRENT_FRAMEWORK_STORAGE_VERSION);
	return require_version.isFirstVersionEqualToSecond(currentStorageVersion, compareToVersion) || require_version.isFirstVersionHigherThanSecond(currentStorageVersion, compareToVersion);
}

//#endregion
exports.isStorageUpToDate = isStorageUpToDate;