Update rewrite-edn and hickory deps

shadow workaround for hickory is no longer needed since hickory got node
support
This commit is contained in:
Gabriel Horner
2022-12-07 10:26:57 -05:00
committed by Tienson Qin
parent 65fb452865
commit 7a5310eb5d
5 changed files with 5 additions and 24 deletions

View File

@@ -4,9 +4,7 @@
rum/rum {:mvn/version "0.12.9"}
datascript/datascript {:mvn/version "1.3.8"}
datascript-transit/datascript-transit {:mvn/version "0.3.0"}
;; TODO: bump to mvn/version when released
borkdude/rewrite-edn {:git/url "https://github.com/borkdude/rewrite-edn"
:sha "80f246139b1a43b6f2cbab329521d060ee7c1b7b"}
borkdude/rewrite-edn {:mvn/version "0.4.6"}
funcool/promesa {:mvn/version "4.0.2"}
medley/medley {:mvn/version "1.4.0"}
metosin/reitit-frontend {:mvn/version "0.3.10"}
@@ -18,8 +16,7 @@
cljs-drag-n-drop/cljs-drag-n-drop {:mvn/version "0.1.0"}
cljs-http/cljs-http {:mvn/version "0.1.46"}
org.babashka/sci {:mvn/version "0.3.2"}
hickory/hickory {:git/url "https://github.com/clj-commons/hickory"
:sha "a308fafdf1e0483087a105544f2cb190cc3289b0"}
org.clj-commons/hickory {:mvn/version "0.7.3"}
hiccups/hiccups {:mvn/version "0.3.0"}
tongue/tongue {:mvn/version "0.4.4"}
org.clojure/core.async {:mvn/version "1.3.610"}

View File

@@ -70,9 +70,7 @@
:closure-defines {frontend.util/NODETEST true}
:devtools {:enabled false}
;; disable :static-fns to allow for with-redefs and repl development
:compiler-options {:static-fns false
;; For custom conditional reading, see https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading
:reader-features #{:node-test}}
:compiler-options {:static-fns false}
:main frontend.test.frontend-node-test-runner/main}
:publishing {:target :browser

View File

@@ -1,12 +0,0 @@
(ns frontend.extensions.hickory
"A shim for conditional reading of the hickory lib in Node,
which requires DOM"
(:require #?(:node-test [lambdaisland.glogi :as log]
:default [hickory.core :as hickory])))
#?(:node-test (defn html->hiccup
[html]
(log/error :exception "Calling hickory from Node test environment is not expected!"))
:default (defn html->hiccup
[html]
(hickory/as-hiccup (hickory/parse html))))

View File

@@ -4,7 +4,7 @@
[clojure.walk :as walk]
[frontend.config :as config]
[frontend.util :as util]
[frontend.extensions.hickory :as hickory]))
[hickory.core :as hickory]))
(defonce *inside-pre? (atom false))
(defn- hiccup-without-style
@@ -271,7 +271,7 @@
(defn convert
[format html]
(when-not (string/blank? html)
(let [hiccup (hickory/html->hiccup html)
(let [hiccup (hickory/as-hiccup (hickory/parse html))
decoded-hiccup (html-decode-hiccup hiccup)]
(hiccup->doc format decoded-hiccup))))

View File

@@ -1,5 +1,3 @@
;; FIXME
;; this test is not focusable (unable to feed :node-test as reading feature?)
(ns frontend.extensions.zotero.extractor-test
(:require [clojure.edn :as edn]
[clojure.test :as test :refer [deftest is testing]]