diff --git a/README.md b/README.md index 95881a2..5bb230f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ clojobuf ========= -clojure(script) library that dynamically interprets protobuf files (.proto) and use the resultant schemas to encode/decode plain clojure(script) map into/from protobuf binaries. Supports both proto2 and proto3. +clojure(script) library that dynamically interprets protobuf files (.proto) and use the resultant schemas to encode/decode plain clojure(script) map into/from protobuf binaries. Supports proto2, proto3 and edition 2023. ## TL;DR Add the following to deps.edn (or its equivalent for lein). ```edn -{:deps {com.github.s-expresso/clojobuf {:mvn/version "0.1.12"}}} +{:deps {com.github.s-expresso/clojobuf {:mvn/version "0.2.0"}}} ``` Say you have the following `example.proto` file diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 0000000..fc55b7c --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,19 @@ +Releases +======== + +# v0.2.0 +* supports protobuf edition 2023 +* added `clojobuf.core/default-msg` method for creating a complete message filled based on the following rules: + * required: default (or `nil` for message field) + * optional: `nil` + * implicit: default + * repeated: `[]` + * oneof: `nil` + * map: {} +* allow message field to be `nil` which will not be serialized and will be interpretted as absent during validation +* `clojobuf.core/decode` will validate decoded message and return `nil` if it fails (i.e. missing required field) +* `clojobuf.core/decode` will merge validated decoded message with the default before returning +* use ordered-map for better dev QOL when viewing + +# v0.1.12 +* release: baseline \ No newline at end of file diff --git a/build.clj b/build.clj index fb4c5fa..380ffd8 100644 --- a/build.clj +++ b/build.clj @@ -2,7 +2,7 @@ (:require [clojure.tools.build.api :as b])) (def lib 'com.github.s-expresso/clojobuf) -(def version "0.1.12") ;(format "0.0.%s" (b/git-count-revs nil)) +(def version "0.2.0") ;(format "0.0.%s" (b/git-count-revs nil)) (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-%s.jar" (name lib) version)) diff --git a/deps.edn b/deps.edn index 87b6c75..324883a 100644 --- a/deps.edn +++ b/deps.edn @@ -34,4 +34,4 @@ :exec-fn deps-deploy.deps-deploy/deploy :exec-args {:installer :remote :sign-releases? false - :artifact "target/clojobuf-0.1.12.jar"}}}} + :artifact "target/clojobuf-0.2.0.jar"}}}} diff --git a/pom.xml b/pom.xml index 00bd3e2..a7a9692 100644 --- a/pom.xml +++ b/pom.xml @@ -4,19 +4,19 @@ jar com.github.s-expresso clojobuf - 0.1.12 + 0.2.0 clojobuf scm:git:git://github.com/s-expresso/clojobuf.git scm:git:ssh://git@github.com/s-expresso/clojobuf.git - v0.1.12 + v0.2.0 https://github.com/s-expresso/clojobuf org.clojure clojure - 1.11.1 + 1.12.0 org.clojure @@ -28,6 +28,11 @@ test.check 0.10.0 + + com.rpl + specter + 1.1.4 + com.google.javascript closure-compiler-unshaded @@ -41,7 +46,7 @@ com.github.s-expresso rubberbuf - 0.1.9.a + 0.3.1 com.github.s-expresso