diff --git a/CHANGES.md b/CHANGES.md index 71b5c96d59..81048ff039 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,9 @@ * Lwt, Mirage: Add log warnings for uncaught exceptions (#592 by @ansiwen) * Port opam files to opam2 and add local synopsis and descriptions. * Lwt: Add Expert response action for servers (#647 by @andreas) +* Use the namespaced `js_of_ocaml` interfaces from 3.3.0 onwards (#654 @avsm) +* Use Base64 3.1.0 interfaces (#655 @avsm) +* Clean up redundant conflicts in the `opam` files (@avsm) Compatibility breaking interface changes: diff --git a/cohttp-lwt-unix.opam b/cohttp-lwt-unix.opam index df4c5856bc..8bf4c5bad9 100644 --- a/cohttp-lwt-unix.opam +++ b/cohttp-lwt-unix.opam @@ -37,9 +37,6 @@ depends: [ "base-unix" "ounit" {with-test} ] -conflicts: [ - "lwt" {< "2.5.0"} -] build: [ ["dune" "subst"] {pinned} ["dune" "build" "-p" name "-j" jobs] diff --git a/cohttp-lwt.opam b/cohttp-lwt.opam index 2ed1f3347c..f0565a4afb 100644 --- a/cohttp-lwt.opam +++ b/cohttp-lwt.opam @@ -28,14 +28,11 @@ depends: [ "ocaml" {>= "4.04.1"} "dune" {build & >= "1.1.0"} "cohttp" {>= "1.0.0"} - "lwt" + "lwt" {>= "2.5.0"} "sexplib0" "ppx_sexp_conv" {>= "v0.9.0"} "logs" ] -conflicts: [ - "lwt" {< "2.5.0"} -] build: [ ["dune" "subst"] {pinned} ["dune" "build" "-p" name "-j" jobs] diff --git a/cohttp.opam b/cohttp.opam index 31f77cf669..85d3c7d8bd 100644 --- a/cohttp.opam +++ b/cohttp.opam @@ -41,7 +41,7 @@ depends: [ "ppx_fields_conv" {>= "v0.9.0"} "ppx_sexp_conv" {>= "v0.9.0"} "stringext" - "base64" {>= "2.0.0" & <"3.0.0"} + "base64" {>= "3.1.0"} "fmt" {with-test} "jsonm" {build} "alcotest" {with-test} diff --git a/cohttp/src/auth.ml b/cohttp/src/auth.ml index 1b22daf3ac..a153561627 100644 --- a/cohttp/src/auth.ml +++ b/cohttp/src/auth.ml @@ -29,13 +29,13 @@ type credential = [ let string_of_credential (cred:credential) = match cred with | `Basic (user, pass) -> - "Basic " ^ (B64.encode (sprintf "%s:%s" user pass)) + "Basic " ^ (Base64.encode_string (sprintf "%s:%s" user pass)) | `Other buf -> buf let credential_of_string (buf:string) : credential = try let b64 = Scanf.sscanf buf "Basic %s" (fun b -> b) in - match Stringext.split ~on:':' (B64.decode b64) ~max:2 with + match Stringext.split ~on:':' (Base64.decode_exn b64) ~max:2 with |[user;pass] -> `Basic (user,pass) |_ -> `Other buf with _ -> `Other buf