From 7879374c7ce49a8b370a461b08760a981fc01921 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson Date: Wed, 1 Oct 2025 16:26:36 +0200 Subject: [PATCH 1/5] Dependency bump --- project.clj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/project.clj b/project.clj index 7667254..60efb8d 100644 --- a/project.clj +++ b/project.clj @@ -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" @@ -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] @@ -66,9 +66,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"]}}) From 421801670727d43b20e0d2bc3940bdbb27f31b6b Mon Sep 17 00:00:00 2001 From: Guillaume Buisson Date: Wed, 1 Oct 2025 16:42:59 +0200 Subject: [PATCH 2/5] switch the cljs runner to node --- project.clj | 8 ++++++-- src/clj_momo/lib/clj_time/core.cljc | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/project.clj b/project.clj index 60efb8d..2eda706 100644 --- a/project.clj +++ b/project.clj @@ -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) diff --git a/src/clj_momo/lib/clj_time/core.cljc b/src/clj_momo/lib/clj_time/core.cljc index c749322..01811d2 100644 --- a/src/clj_momo/lib/clj_time/core.cljc +++ b/src/clj_momo/lib/clj_time/core.cljc @@ -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 @@ -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 From 013f768f65ec2bfe403df359af4a8a29fcd0e3d5 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson Date: Wed, 1 Oct 2025 17:01:38 +0200 Subject: [PATCH 3/5] fixed the gh build workflow --- .github/workflows/build.yml | 7 ++++-- script/install-phantom-js-ubuntu.sh | 33 ----------------------------- 2 files changed, 5 insertions(+), 35 deletions(-) delete mode 100755 script/install-phantom-js-ubuntu.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c16f0c..fdafd89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,5 +44,8 @@ jobs: uses: DeLaGuardo/setup-clojure@12.5 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 diff --git a/script/install-phantom-js-ubuntu.sh b/script/install-phantom-js-ubuntu.sh deleted file mode 100755 index 479eeda..0000000 --- a/script/install-phantom-js-ubuntu.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# This script install PhantomJS in your Debian/Ubuntu System -# -# This script must be run as root: -# sudo sh install_phantomjs.sh -# -# https://gist.github.com/julionc/7476620 - -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root" 1>&2 - exit 1 -fi - -PHANTOM_VERSION="phantomjs-2.1.1" -ARCH=$(uname -m) - -if ! [ $ARCH = "x86_64" ]; then - $ARCH="i686" -fi - -PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH" - -sudo apt-get update -sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y -sudo apt-get install libfreetype6 libfreetype6-dev -y -sudo apt-get install libfontconfig1 libfontconfig1-dev -y - -cd ~ -wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 -sudo tar xvjf $PHANTOM_JS.tar.bz2 - -sudo mv $PHANTOM_JS /usr/local/share -sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin From 34a7f8d9198a7a1f4aa89165c00df6308f0a438b Mon Sep 17 00:00:00 2001 From: Guillaume Buisson Date: Wed, 1 Oct 2025 17:09:29 +0200 Subject: [PATCH 4/5] changelog --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 695dbdc..e494328 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,21 @@ 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 From 2ecafab57063e392ddab0e3d392a0e4daa7d1046 Mon Sep 17 00:00:00 2001 From: Guillaume Buisson Date: Wed, 1 Oct 2025 17:13:04 +0200 Subject: [PATCH 5/5] Adding clojars badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e494328..ca222c7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 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.