atuin/atuin-common/src
Ellie Huxtable 86f50e0356
feat: add semver checking to client requests (#1456)
* feat: add semver checking to client requests

This enforces that the client and the server run the same major version
in order to sync successfully.

We're using the `Atuin-Version` http header to transfer this information

If the user is not on the same MAJOR, then they will see an error like
this

> Atuin version mismatch! In order to successfully sync, the client and the server must run the same *major* version
> Client: 17.1.0
> Server: 18.1.0
> Error: could not sync records due to version mismatch

This change means two things

1. We will now only increment major versions if there is a breaking
   change for sync
2. We can now add breaking changes to sync, for any version >17.1.0.
   Clients will fail in a meaningful way.

* lint, fmt, etc

* only check for client newer than server

* Add version header to client too
2023-12-20 09:03:04 +00:00
..
api.rs feat: add semver checking to client requests (#1456) 2023-12-20 09:03:04 +00:00
calendar.rs refactor (#327) 2022-04-22 19:24:38 +01:00
lib.rs Add new sync (#1093) 2023-07-14 20:44:08 +01:00
record.rs replace chrono with time (#806) 2023-09-11 09:26:05 +01:00
utils.rs chore(deps): uuidv7 stable (#1451) 2023-12-16 19:21:04 +00:00