Skip to content

Commit

Permalink
release: v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
st-cheewah committed Jan 4, 2025
1 parent 8a47247 commit 0a51c82
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 19 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}}
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<packaging>jar</packaging>
<groupId>com.github.s-expresso</groupId>
<artifactId>clojobuf</artifactId>
<version>0.1.12</version>
<version>0.2.0</version>
<name>clojobuf</name>
<scm>
<connection>scm:git:git://github.com/s-expresso/clojobuf.git</connection>
<developerConnection>scm:git:ssh://git@github.com/s-expresso/clojobuf.git</developerConnection>
<tag>v0.1.12</tag>
<tag>v0.2.0</tag>
<url>https://github.com/s-expresso/clojobuf</url>
</scm>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.11.1</version>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
Expand All @@ -28,6 +28,11 @@
<artifactId>test.check</artifactId>
<version>0.10.0</version>
</dependency>
<dependency>
<groupId>com.rpl</groupId>
<artifactId>specter</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler-unshaded</artifactId>
Expand All @@ -41,7 +46,7 @@
<dependency>
<groupId>com.github.s-expresso</groupId>
<artifactId>rubberbuf</artifactId>
<version>0.1.9.a</version>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>com.github.s-expresso</groupId>
Expand Down

0 comments on commit 0a51c82

Please sign in to comment.