Skip to content

Commit 9f9c716

Browse files
committed
Babashka compatibility
1 parent 909c9ea commit 9f9c716

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ test
2020
resources/public/
2121
.store
2222
package-lock.json
23+
.cache

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## Fixed
66

7+
- Babashka compatibility
8+
79
## Changed
810

911
# 2.5.151 (2022-11-21 / 92232a1)
@@ -132,4 +134,4 @@
132134

133135
## Added
134136

135-
- Extracted from Kaocha, and added a top-level namespace.
137+
- Extracted from Kaocha, and added a top-level namespace.

bb.edn

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{:deps
22
{lambdaisland/open-source {:git/url "https://github.com/lambdaisland/open-source"
3-
:git/sha "f2133b2a88bff3898e027c9b50516161c237792e"}}}
3+
:git/sha "f2133b2a88bff3898e027c9b50516161c237792e"}}
4+
:tasks
5+
{test:bb {:doc "Run babashka tests with custom runner"
6+
:extra-paths ["src" "test"]
7+
:extra-deps {current/project {:local/root "."}
8+
org.clojure/test.check {:mvn/version "1.1.1"}}
9+
:task (exec 'lambdaisland.deep-diff2.runner/run-tests)}}}

deps.edn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{:paths ["resources" "src"]
22
:deps {fipp/fipp {:mvn/version "0.6.26"}
33
org.clojure/core.rrb-vector {:mvn/version "0.1.2"}
4-
lambdaisland/clj-diff {:mvn/version "1.3.67"}
4+
lambdaisland/clj-diff {:git/url "https://github.com/borkdude/lambdaisland-clj-diff"
5+
:git/sha "55ea1d4200e2ea6a2e4ba3c8ec2a615df7e60d24"}
6+
;; lambdaisland/clj-diff {:mvn/version "1.3.67"}
57
mvxcvi/arrangement {:mvn/version "2.1.0"}}
68

79
:aliases {:cljs

src/lambdaisland/deep_diff2/puget/printer.cljc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,16 @@
319319
(doto (.setTimeZone (java.util.TimeZone/getTimeZone "GMT")))
320320
(.format ^java.util.Date %)))
321321

322-
java.util.GregorianCalendar
323-
(tagged-handler
324-
'inst
325-
#(let [formatted (format "%1$tFT%1$tT.%1$tL%1$tz" %)
326-
offset-minutes (- (.length formatted) 2)]
327-
(str (subs formatted 0 offset-minutes)
328-
":"
329-
(subs formatted offset-minutes))))
322+
#?@(:bb []
323+
:clj
324+
[java.util.GregorianCalendar
325+
(tagged-handler
326+
'inst
327+
#(let [formatted (format "%1$tFT%1$tT.%1$tL%1$tz" %)
328+
offset-minutes (- (.length formatted) 2)]
329+
(str (subs formatted 0 offset-minutes)
330+
":"
331+
(subs formatted offset-minutes))))])
330332

331333
java.sql.Timestamp
332334
(tagged-handler

0 commit comments

Comments
 (0)