atuin/atuin-common
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
..
src feat: add semver checking to client requests (#1456) 2023-12-20 09:03:04 +00:00
Cargo.toml feat: add semver checking to client requests (#1456) 2023-12-20 09:03:04 +00:00