Gets the version name and build number from the pubspec content.
@param {String} content The pubspec file content.
@returns {{versionName: String, buildNumber: String?}} The version data, or null if not found.
Updates the version in the pubspec.yaml file.
@param {String} newVersionName The new version name (e.g., "1.0.1").
@param {String?} newBuildNumber The new build number, or null to keep existing.