Skip to content

Commit

Permalink
Build fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Eknert <[email protected]>
  • Loading branch information
anderseknert committed Nov 14, 2022
1 parent f04e47c commit 7800301
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ Or if you so prefer, use the `apply-patch` function, which applies a single patc

## Development

`clj -X:test` to run the unit tests, or `shadow-cljs compile test && node target/cljs-test.js` for ClojureScript
### Test

* `clj -X:test` to run the unit and compliance tests
* `shadow-cljs compile test && node target/cljs-test.js` for ClojureScript

### Deploy

* `clj -T:build jar`
* `clj -X:deploy`
2 changes: 2 additions & 0 deletions build.clj → build/build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
:lib lib
:version version
:basis basis
:src-pom "./build/pom.xml"
:src-dirs ["src"]}))

(defn jar [_]
(compile nil)
(pom nil)
(b/copy-dir {:src-dirs ["src"] :target-dir class-dir})
(b/jar {:class-dir class-dir :jar-file jar-file}))
File renamed without changes.
7 changes: 4 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:paths ["src"]
:aliases
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.8.4" :git/sha "8c3cd69"}}
:ns-default build}
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.8.4" :git/sha "8c3cd69"}}
:extra-paths ["build"]
:ns-default build}
:deploy {:extra-deps {slipset/deps-deploy {:mvn/version "0.2.0"}}
:exec-fn deps-deploy.deps-deploy/deploy
:exec-args {:installer :remote
:sign-releases? true
:artifact "target/clj-json-pointer-1.0.0.jar"
:pom "target/classes/META-INF/maven/borge.by/clj-json-pointer/pom.xml"}}
:pom-file "target/classes/META-INF/maven/by.borge/clj-json-pointer/pom.xml"}}
:test {:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"]
Expand Down
4 changes: 3 additions & 1 deletion src/clj_json_pointer/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
(throw (ex-info (str "missing keys " (str/join ", " missing)) {:type "invalid patch" :op op}))
patch))))

(defn apply-patch [obj {:strs [op path value from] :as patch}]
(defn apply-patch
"Applies single JSON patch operation on obj"
[obj {:strs [op path value from] :as patch}]
(require-keys patch)
(when-not (valid-path? path) (throw (ex-info "invalid path" {:type "invalid path" :op op :path path})))
(let [path (strip-hash path)]
Expand Down

0 comments on commit 7800301

Please sign in to comment.