Pretty much the same as dealing with traditional API versioning. You can version the functions themselves, or put a version in they payload and return an error telling the user to refresh.
https://github.com/vercel/next.js/blob/ffdfd33251165d8b2f092...