migrateIfNeeded

suspend fun migrateIfNeeded(lockFile: LockFile): <Error class: unknown class><ConfigFile, LockFile, Boolean>

Migrates configuration file based on lockfile version.

  • If lockfile version is 1 and export_server_side_projects_to_client is missing, sets it to true for backward compatibility and bumps lockfile to version 2.

  • If lockfile version is 2 or higher, no migration is needed; default is false.

Return

Triple of (ConfigFile, LockFile, wasMigrated: Boolean)

Parameters

lockFile

The lock file to check version and bump if needed