Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ jobs:
uses: DeLaGuardo/[email protected]
with:
lein: latest
- run: sudo sh ./script/install-phantom-js-ubuntu.sh
- run: lein do clean, compile :all, test :all, doo phantom test once
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- run: lein do clean, compile :all, test :all, doo node test once
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# clj-momo

[![Clojars Project](https://img.shields.io/clojars/v/threatgrid/clj-momo.svg)](https://clojars.org/threatgrid/clj-momo)

This clojure library can be seen as a common library for many `threatgrid` projects.
It centralizes many generic functions.

## Changes

- 0.4.1
- Dependency upgrades:
- clojure: 1.10.1 → 1.12.3
- tools.logging: 0.5.0 → 1.3.0
- prismatic/schema: 1.1.12 → 1.4.1
- metosin/schema-tools: 0.12.2 → 0.13.1
- cheshire: 5.9.0 → 6.1.0
- clj-http: 3.12.3 → 3.13.1
- riemann-clojure-client: 0.5.1 → 0.5.4
- error_prone_annotations: 2.1.3 → 2.42.0
- clojurescript: 1.10.597 → 1.12.42
- logback-classic: 1.2.3 → 1.5.19
- Switch from PhantomJS to Node.js for ClojureScript tests
- Fix `goog.date.UtcDateTime` comparison support for Node.js

- 0.4.0
- upgrades clj-http 3.12.3 which deprecates `json-strict` operations

Expand Down
28 changes: 16 additions & 12 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(def clj-version "1.10.1")
(def clj-version "1.12.3")
(def metrics-clojure-version "2.10.0")

(defproject threatgrid/clj-momo "0.4.1-SNAPSHOT"
Expand All @@ -15,16 +15,16 @@
; Avoid combining :exclusions with an override as it can obscure the indended
; dependencies when browsing the full deps tree.
:dependencies [[org.clojure/clojure ~clj-version]
[org.clojure/tools.logging "0.5.0"]
[prismatic/schema "1.1.12"]
[metosin/schema-tools "0.12.2"]
[org.clojure/tools.logging "1.3.0"]
[prismatic/schema "1.4.1"]
[metosin/schema-tools "0.13.1"]
[com.andrewmcveigh/cljs-time "0.5.2"]
[clj-time "0.15.2"]
[com.arohner/uri "0.1.2"]
[cheshire "5.9.0"]
[clj-http "3.12.3"]
[cheshire "6.1.0"]
[clj-http "3.13.1"]
[slugger "1.0.1"]
[riemann-clojure-client "0.5.1"]
[riemann-clojure-client "0.5.4"]
[metrics-clojure ~metrics-clojure-version]
[metrics-clojure-jvm ~metrics-clojure-version]
[metrics-clojure-ring ~metrics-clojure-version]
Expand Down Expand Up @@ -55,9 +55,13 @@

:test {:source-paths ["src" "test"]
:compiler {:output-to "target/tests.js"
:optimizations :whitespace
:optimizations :none
:main clj-momo.runner
:pretty-print true}}}}
:pretty-print true
:target :nodejs}}}}

:doo {:build "test"
:alias {:default [:node]}}

:test-selectors {:integration :integration
:default (complement :integration)
Expand All @@ -66,9 +70,9 @@
:global-vars {*warn-on-reflection* true}

:profiles {:dev {:dependencies [;https://clojure.atlassian.net/browse/CLJS-3047
[com.google.errorprone/error_prone_annotations "2.1.3"]
[com.google.errorprone/error_prone_annotations "2.42.0"]
;https://clojure.atlassian.net/browse/CLJS-3047
[com.google.code.findbugs/jsr305 "3.0.2"]
[org.clojure/clojurescript "1.10.597"]
[ch.qos.logback/logback-classic "1.2.3"]]
[org.clojure/clojurescript "1.12.42"]
[ch.qos.logback/logback-classic "1.5.19"]]
:resource-paths ["test/resources"]}})
33 changes: 0 additions & 33 deletions script/install-phantom-js-ubuntu.sh

This file was deleted.

5 changes: 3 additions & 2 deletions src/clj_momo/lib/clj_time/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
(:require [clj-momo.lib.clj-time.coerce :as time-coerce]
#?(:clj [clj-momo.lib.clj-time.macros :refer [immigrate]])
#?(:clj [clj-time.core :as time-delegate]
:cljs [cljs-time.core :as time-delegate]))
:cljs [cljs-time.core :as time-delegate])
#?@(:cljs [[goog.array :as garray]]))
#?(:clj
(:import [java.util Calendar Date GregorianCalendar TimeZone]
[org.joda.time ReadablePartial ReadableInstant ReadablePeriod
Expand Down Expand Up @@ -603,7 +604,7 @@
cljs.core/IComparable
(^number -compare [x y]
(if (instance? goog.date.UtcDateTime y)
(goog.array/defaultCompare
(garray/defaultCompare
(.getTime x)
(.getTime y))
(throw
Expand Down