diff --git a/.zprintrc b/.zprintrc new file mode 100644 index 0000000000..629be65622 --- /dev/null +++ b/.zprintrc @@ -0,0 +1,47 @@ +;; -*- mode: clojure -*- +;; vi: ft=clojure +{:width 105 + :style [;; community style + ;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community + :community + + ;; no comma in map + :no-comma + + :custom-justify + + ;; respect all newlines + ;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl + :respect-nl + + ;; respect blank line + ;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl + :respect-bl] + :fn-map + {"reg-sub" :arg1-pair + "list-comp" :binding + "defview" :arg1-body + "letsubs" :binding + "testing" :arg1-body + "deftest-sub" :arg1-body + "with-deps-check" :arg1-body + "ns" [:arg1-body + {:list {:respect-nl? false} + :vector {:respect-nl? false}}] + "->" [:noarg1-body + {:list {:constant-pair? false :force-nl? false} + :next-inner-restore [[:list :constant-pair?]]}] + "set!" "reset!" + "assoc-when" "assoc" + "assoc-some" "assoc" + "conj-when" "conj" + "conj-some" "conj"} + :remove {:fn-force-nl #{:noarg1-body}} + :style-map + {:no-comma {:map {:comma? false}} + :rj-var {:pair {:justify {:max-variance 1000}}} + :custom-justify + {:doc "Justify everything using pre-1.1.2 approach" + :binding {:justify? true :justify {:max-variance 1000}} + :map {:justify? true :justify {:max-variance 1000}} + :pair {:justify? true :justify {:max-variance 1000}}}}} diff --git a/Makefile b/Makefile index a782eb7001..cd10a4e9a7 100644 --- a/Makefile +++ b/Makefile @@ -285,16 +285,20 @@ endif # Tests #-------------- -lint: export TARGET := clojure +lint: export TARGET := default lint: ##@test Run code style checks sh scripts/lint-re-frame-in-quo-components.sh && \ clj-kondo --config .clj-kondo/config.edn --cache false --lint src && \ - TARGETS=$$(git diff --diff-filter=d --cached --name-only src && echo src) && \ - clojure -Scp "$$CLASS_PATH" -m cljfmt.main check --indents indentation.edn $$TARGETS + TARGETS=$$(git diff --diff-filter=d --cached --name-only | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn$$ || echo shadow-cljs.edn) && \ + zprint '{:search-config? true}' -fc $$TARGETS -lint-fix: export TARGET := clojure +lint-fix: export TARGET := default lint-fix: ##@test Run code style checks and fix issues - clojure -Scp "$$CLASS_PATH" -m cljfmt.main fix src --indents indentation.edn + TARGETS=$$(git diff --diff-filter=d --cached --name-only | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn$$ || echo shadow-cljs.edn) && \ + clojure-lsp clean-ns --filenames $$(echo $$TARGETS | xargs | sed -e 's/ /,/g') && \ + zprint '{:search-config? true}' -fw $$TARGETS && \ + zprint '{:search-config? true}' -fw $$TARGETS + shadow-server: export TARGET := clojure shadow-server:##@ Start shadow-cljs in server mode for watching diff --git a/indentation.edn b/indentation.edn deleted file mode 100644 index 051043e373..0000000000 --- a/indentation.edn +++ /dev/null @@ -1 +0,0 @@ -{letsubs [[:inner 0]]} diff --git a/nix/deps/clojure/deps.json b/nix/deps/clojure/deps.json index c1ade5f491..6836bc6c5b 100644 --- a/nix/deps/clojure/deps.json +++ b/nix/deps/clojure/deps.json @@ -51,6 +51,45 @@ } }, + { + "path": "borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "488f403591739aab5a68ce6e7f82c0e855c23fd6", + "sha256": "1cw712kzza733g55s02ql35q630zd8j8nmnpivcczjkg240jans4" + }, + "jar": { + "sha1": "371f3e232e7fdb04b7b2044825eb9822280e8f93", + "sha256": "1iyxq6jypjd875cgdyllknh27mx5fnkyjz80mr927d5i94r0ywj4" + } + }, + + { + "path": "borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "eb3aff6c7db85d91f7e05b98e06d1354a4fce36c", + "sha256": "1bvr7cvpbvqi7swypzpbfrig16zipwvmg4m47y2x5chs5czwxv15" + }, + "jar": { + "sha1": "33dfc86102e0ea400498cbca47572459c1c43b00", + "sha256": "0a5gxmj8kzc01y9bn7l4x7c1v5q9wcbvw5hdr525d3ylsyl6xfkw" + } + }, + + { + "path": "borkdude/sci/0.2.1-alpha.1/sci-0.2.1-alpha.1", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "516cb8e3a8e430d59d9c3e7a51f9f859e3b249e0", + "sha256": "1nrww29m90q1avaahw7i5418c18crc3cidhbg3ml7h7vjjplsl9y" + }, + "jar": { + "sha1": "96e39dcbc3fb3a41c6bf2e628303cf0f534b28a3", + "sha256": "1cjvz85ls982rmx90igv4mcfaa53fj5z29df9mf4jplyig3l9dxb" + } + }, + { "path": "cider/cider-nrepl/0.25.3/cider-nrepl-0.25.3", "host": "https://repo.clojars.org", @@ -78,15 +117,15 @@ }, { - "path": "cljfmt/cljfmt/0.6.7/cljfmt-0.6.7", + "path": "clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8", "host": "https://repo.clojars.org", "pom": { - "sha1": "3d7ac9112908c9c9349adc056d1d06ae2cd33c21", - "sha256": "1q46q43mykn61f032y5734j84gcjca41pwd3iik9xghnzmphy2mn" + "sha1": "c5a47e6858344c9fd42eecafc7920a7a18d6126d", + "sha256": "1az0fs9k5xvzl8bz564apd77kqc83nl8sxsrvmswmbmkamvy4hd3" }, "jar": { - "sha1": "91e8afa2c19db72acdef7f881aad905871ba6e69", - "sha256": "0ara83gaqnafjgr2aqz5zqmywdsmhsz483xkkxpiwbn9lfqvidmh" + "sha1": "b0654b98763199ee57182526465d823492d1cc3f", + "sha256": "1029wd82qyxv6ji9pd38m32nqia56h6845lqv4ym4dsz5i201g9a" } }, @@ -104,15 +143,15 @@ }, { - "path": "cljsjs/react/17.0.1-0/react-17.0.1-0", + "path": "cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0", "host": "https://repo.clojars.org", "pom": { - "sha1": "d5d3681281585d981375fe7bb29362bfcd0d4449", - "sha256": "0rskh6mfq5h0l0wybs68w9v585a6zlnnfgrvsf5k3h51fk2p28da" + "sha1": "ff154f318e1f63061b5bd42d9a38fc8547360cb4", + "sha256": "166ynlrph7rx3nql0c85c37vcbcsnwbjamk71hw74rz451pgnncr" }, "jar": { - "sha1": "726da8a9305a865df90d81e9a8d58f87ff0ee8bd", - "sha256": "0bfmvw8gk98vdf9azll6041r1jaz1pmb0dyb35cfc8dr3mmr4ag7" + "sha1": "d5c53eca9f3884402c76268b82e3828223dcbf90", + "sha256": "1530hwqpxzxfjm6dy77whqwjzzx79jpnd9xvnkxy1lnk7l7lj494" } }, @@ -130,15 +169,15 @@ }, { - "path": "cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0", + "path": "cljsjs/react/17.0.1-0/react-17.0.1-0", "host": "https://repo.clojars.org", "pom": { - "sha1": "ff154f318e1f63061b5bd42d9a38fc8547360cb4", - "sha256": "166ynlrph7rx3nql0c85c37vcbcsnwbjamk71hw74rz451pgnncr" + "sha1": "d5d3681281585d981375fe7bb29362bfcd0d4449", + "sha256": "0rskh6mfq5h0l0wybs68w9v585a6zlnnfgrvsf5k3h51fk2p28da" }, "jar": { - "sha1": "d5c53eca9f3884402c76268b82e3828223dcbf90", - "sha256": "1530hwqpxzxfjm6dy77whqwjzzx79jpnd9xvnkxy1lnk7l7lj494" + "sha1": "726da8a9305a865df90d81e9a8d58f87ff0ee8bd", + "sha256": "0bfmvw8gk98vdf9azll6041r1jaz1pmb0dyb35cfc8dr3mmr4ag7" } }, @@ -272,32 +311,6 @@ } }, - { - "path": "com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "7d5e372ff32c90095800f96d8308c41af0285a41", - "sha256": "1dj7p0m0kwnjvy1y3kq63zb6bw0azjf79i5xbccmy3wv63b1vqrg" - }, - "jar": { - "sha1": "7e060dd5b19431e6d198e91ff670644372f60fbd", - "sha256": "1hn5plp7iyl626h8mrra56sysfm2qannj1dapr1m5afwkb24vfk1" - } - }, - - { - "path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "5e902aae26ac5c36f6420f689f43333129dd69e2", - "sha256": "10vzlnl8vbjv2jqf818wdb7kgy9c6qjka7fjmmi3vdpg1mcn6pv6" - }, - "jar": { - "sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1", - "sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf" - } - }, - { "path": "com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1", "host": "https://repo1.maven.org/maven2", @@ -428,6 +441,19 @@ } }, + { + "path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "5e902aae26ac5c36f6420f689f43333129dd69e2", + "sha256": "10vzlnl8vbjv2jqf818wdb7kgy9c6qjka7fjmmi3vdpg1mcn6pv6" + }, + "jar": { + "sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1", + "sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf" + } + }, + { "path": "com/ibm/icu/icu4j/66.1/icu4j-66.1", "host": "https://repo1.maven.org/maven2", @@ -441,58 +467,6 @@ } }, - { - "path": "commons-codec/commons-codec/1.10/commons-codec-1.10", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "44b9477418d2942d45550f7e7c66c16262062d0e", - "sha256": "1yscxabk7i59vgfjg7c1y3prj39h1d8prnwgxbisc4ni29qdpf5x" - }, - "jar": { - "sha1": "4b95f4897fa13f2cd904aee711aeafc0c5295cd8", - "sha256": "0scm6321zz76dc3bs8sy2qyami755lz4lq5455gl67bi9slxyha2" - } - }, - - { - "path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "65112009d674333c1acfafb4e198ff250d710764", - "sha256": "007nyd66fqp3fbrmnsbfp1fpkhmr2lk33qmkp3salqld3xd7qlc8" - }, - "jar": { - "sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0", - "sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54" - } - }, - - { - "path": "commons-io/commons-io/2.6/commons-io-2.6", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "5060835593e5b6ed18c82fc2e782f0a3c30a00b1", - "sha256": "0q4a6fp6xkyd86ikymkyv2plhf9vj8aqvggxg9d1yad2jcw8c8qc" - }, - "jar": { - "sha1": "815893df5f31da2ece4040fe0a12fd44b577afaf", - "sha256": "04v5fg53jl9gbn6pyz3l7kbpxv0xjzyasnw6yd1a3hhacq2d6xzq" - } - }, - - { - "path": "compojure/compojure/1.5.2/compojure-1.5.2", - "host": "https://repo.clojars.org", - "pom": { - "sha1": "9e8da477b6682094d56802cb155291a2acb829bd", - "sha256": "036z64iprypccz03iq7lqxvw99xjh4xlsfmfwbs37pmhfnfmbdnx" - }, - "jar": { - "sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439", - "sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf" - } - }, - { "path": "com/taoensso/encore/2.105.0/encore-2.105.0", "host": "https://repo.clojars.org", @@ -571,6 +545,58 @@ } }, + { + "path": "commons-codec/commons-codec/1.10/commons-codec-1.10", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "44b9477418d2942d45550f7e7c66c16262062d0e", + "sha256": "1yscxabk7i59vgfjg7c1y3prj39h1d8prnwgxbisc4ni29qdpf5x" + }, + "jar": { + "sha1": "4b95f4897fa13f2cd904aee711aeafc0c5295cd8", + "sha256": "0scm6321zz76dc3bs8sy2qyami755lz4lq5455gl67bi9slxyha2" + } + }, + + { + "path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "65112009d674333c1acfafb4e198ff250d710764", + "sha256": "007nyd66fqp3fbrmnsbfp1fpkhmr2lk33qmkp3salqld3xd7qlc8" + }, + "jar": { + "sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0", + "sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54" + } + }, + + { + "path": "commons-io/commons-io/2.6/commons-io-2.6", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "5060835593e5b6ed18c82fc2e782f0a3c30a00b1", + "sha256": "0q4a6fp6xkyd86ikymkyv2plhf9vj8aqvggxg9d1yad2jcw8c8qc" + }, + "jar": { + "sha1": "815893df5f31da2ece4040fe0a12fd44b577afaf", + "sha256": "04v5fg53jl9gbn6pyz3l7kbpxv0xjzyasnw6yd1a3hhacq2d6xzq" + } + }, + + { + "path": "compojure/compojure/1.5.2/compojure-1.5.2", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "9e8da477b6682094d56802cb155291a2acb829bd", + "sha256": "036z64iprypccz03iq7lqxvw99xjh4xlsfmfwbs37pmhfnfmbdnx" + }, + "jar": { + "sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439", + "sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf" + } + }, + { "path": "crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0", "host": "https://repo.clojars.org", @@ -649,6 +675,19 @@ } }, + { + "path": "hashp/hashp/0.2.1/hashp-0.2.1", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "32530b9106a64fd5442d2aa27c6da4175d1f1440", + "sha256": "1z94k8c52r87rq3nhc0mqazcxff6d4phi8gy1bgndhiz4nq1mia7" + }, + "jar": { + "sha1": "fb501db2eb4a028c1875382d58c17c381aec47b8", + "sha256": "1lwirzb60zvksvkb3arpwi4fk1xnp0x5ljmrca5vf7dq25lmwmsd" + } + }, + { "path": "hiccup/hiccup/1.0.5/hiccup-1.0.5", "host": "https://repo.clojars.org", @@ -779,6 +818,32 @@ } }, + { + "path": "mvxcvi/arrangement/1.2.0/arrangement-1.2.0", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "4f19bd291595870162eadd35456a0b2e76444a64", + "sha256": "1qqnl05nwcjnzhlgplcsbckrp8pqvf8n6bf8kr8rz7lz2q4px3vb" + }, + "jar": { + "sha1": "036e640bb9e14c2aa95589a45a018eb8358ce3f6", + "sha256": "1m3v1rkpdmv7aym5vq2swh0mf9mg7xppdr3vrl4g6qm3s42c24b7" + } + }, + + { + "path": "mvxcvi/puget/1.3.1/puget-1.3.1", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "07104dc20a13c7e255fffee4f16de9a6873c187f", + "sha256": "1129rb3qksg7n85j03k6d3sr6868g724097vxids1r4wqj2phxkf" + }, + "jar": { + "sha1": "a4f7dcf71ccd8d69d4ecd2b19f3d671dfc169308", + "sha256": "029znh7p8f1h91gri4jhzwqsa0rnn3i34yr3kav55npym2sw5sfp" + } + }, + { "path": "net/cgrand/macrovich/0.2.1/macrovich-0.2.1", "host": "https://repo.clojars.org", @@ -884,15 +949,15 @@ }, { - "path": "org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1", + "path": "org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2", "host": "https://repo1.maven.org/maven2", "pom": { - "sha1": "3231642aa1dcf628c864a5f208cd293fbd6a385a", - "sha256": "18kk5sds5lg8r2kidhz9qpgyrvggkj8j4sgfdsmyyl93w3f16lnp" + "sha1": "e9336ac820c5a7e07fe0aa431df981cbab6db3e3", + "sha256": "07q9qmxc7ggaxh27imgs34svn4j269rhslbnrs63ahrqzk5bmqlf" }, "jar": { - "sha1": "aafb7677ec1e9f344fc834bbbdb91e8ba02af474", - "sha256": "0cqyy1vqrhilgwrdxsibd7360ch3hhwjnbbnzsak38v6i6mg66xl" + "sha1": "0404feea925608b921b56acd11d3b187a0d33fe4", + "sha256": "13hkx1285f2imqlj6wbgyxki2yg8rmfr49iq1zijxm1cgfx8xyai" } }, @@ -935,19 +1000,6 @@ } }, - { - "path": "org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "dea94d117aa88d75e281f877914454f79df06bf2", - "sha256": "1nysls9ywj3b3zvlfwy68kayx47r4bacidmq1vx8w4h043l9kxrr" - }, - "jar": { - "sha1": "6025affb7181cd40418600864f58eed1ea80055d", - "sha256": "0w6waii2qps7vp3nzbj5nai809xdq26ss0cabl4wz1s8fc6js6qw" - } - }, - { "path": "org/clojure/google-closure-library-third-party/0.0-20191016-6ae1f72f/google-closure-library-third-party-0.0-20191016-6ae1f72f", "host": "https://repo1.maven.org/maven2", @@ -961,6 +1013,19 @@ } }, + { + "path": "org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "dea94d117aa88d75e281f877914454f79df06bf2", + "sha256": "1nysls9ywj3b3zvlfwy68kayx47r4bacidmq1vx8w4h043l9kxrr" + }, + "jar": { + "sha1": "6025affb7181cd40418600864f58eed1ea80055d", + "sha256": "0w6waii2qps7vp3nzbj5nai809xdq26ss0cabl4wz1s8fc6js6qw" + } + }, + { "path": "org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176", "host": "https://repo1.maven.org/maven2", @@ -987,19 +1052,6 @@ } }, - { - "path": "org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "fa72b6392b31762b55e0dc3de1c220ecdc6bb8a7", - "sha256": "1yg46a9zbga7rsrhwdv877hh60hcbyaykn37r3i50icxmgqcylq4" - }, - "jar": { - "sha1": "d2fb65426c7998647fb1fb3db1fb5b222ab91df6", - "sha256": "0mj1xi3v03fzcw1smpayvbvbgly2p3ysbgfz7jgfdhmxi4gl6gs6" - } - }, - { "path": "org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0", "host": "https://repo1.maven.org/maven2", @@ -1013,6 +1065,19 @@ } }, + { + "path": "org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "fa72b6392b31762b55e0dc3de1c220ecdc6bb8a7", + "sha256": "1yg46a9zbga7rsrhwdv877hh60hcbyaykn37r3i50icxmgqcylq4" + }, + "jar": { + "sha1": "d2fb65426c7998647fb1fb3db1fb5b222ab91df6", + "sha256": "0mj1xi3v03fzcw1smpayvbvbgly2p3ysbgfz7jgfdhmxi4gl6gs6" + } + }, + { "path": "org/clojure/tools.cli/1.0.194/tools.cli-1.0.194", "host": "https://repo1.maven.org/maven2", @@ -1078,19 +1143,6 @@ } }, - { - "path": "org/graalvm/js/js/20.1.0/js-20.1.0", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "95452a7fdac1d358f1dd66b33e49f4440e986922", - "sha256": "0gkazzg8771g3pc90fb99wmlk99rjimcryrmzz6zab742m4dbina" - }, - "jar": { - "sha1": "0abe5e8068014ccb34cf075637a00b7ce37e4a8c", - "sha256": "0v5pxjl9p7wwfrrzkkqh6qbvnn0p8n342smxzcqk3qxl4ah3aqnk" - } - }, - { "path": "org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0", "host": "https://repo1.maven.org/maven2", @@ -1104,6 +1156,19 @@ } }, + { + "path": "org/graalvm/js/js/20.1.0/js-20.1.0", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "95452a7fdac1d358f1dd66b33e49f4440e986922", + "sha256": "0gkazzg8771g3pc90fb99wmlk99rjimcryrmzz6zab742m4dbina" + }, + "jar": { + "sha1": "0abe5e8068014ccb34cf075637a00b7ce37e4a8c", + "sha256": "0v5pxjl9p7wwfrrzkkqh6qbvnn0p8n342smxzcqk3qxl4ah3aqnk" + } + }, + { "path": "org/graalvm/regex/regex/20.1.0/regex-20.1.0", "host": "https://repo1.maven.org/maven2", @@ -1234,19 +1299,6 @@ } }, - { - "path": "org/ow2/asm/asm/7.1/asm-7.1", - "host": "https://repo1.maven.org/maven2", - "pom": { - "sha1": "7e40eb6619fd20bd7d98bf775bfdd810aec87ac7", - "sha256": "101i3pyrq082kjyz413hfqwkjjsyfnk9kx3rqr38ln56mlp78a8g" - }, - "jar": { - "sha1": "fa29aa438674ff19d5e1386d2c3527a0267f291e", - "sha256": "1pnlb1ick32bihpzc599xl9ppd07qhls6pm0xaqwrj9cdlmzmcja" - } - }, - { "path": "org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1", "host": "https://repo1.maven.org/maven2", @@ -1299,6 +1351,19 @@ } }, + { + "path": "org/ow2/asm/asm/7.1/asm-7.1", + "host": "https://repo1.maven.org/maven2", + "pom": { + "sha1": "7e40eb6619fd20bd7d98bf775bfdd810aec87ac7", + "sha256": "101i3pyrq082kjyz413hfqwkjjsyfnk9kx3rqr38ln56mlp78a8g" + }, + "jar": { + "sha1": "fa29aa438674ff19d5e1386d2c3527a0267f291e", + "sha256": "1pnlb1ick32bihpzc599xl9ppd07qhls6pm0xaqwrj9cdlmzmcja" + } + }, + { "path": "org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final", "host": "https://repo1.maven.org/maven2", @@ -1351,19 +1416,6 @@ } }, - { - "path": "reagent/reagent/1.0.0/reagent-1.0.0", - "host": "https://repo.clojars.org", - "pom": { - "sha1": "93ad5ccb0101108fb0843a3f2c50da28f8fd8336", - "sha256": "1l4xzgc4wbd8b29mhj5j336cf8w1zccaia0w413zf3bnj6jf5m38" - }, - "jar": { - "sha1": "a1dd4d40425bb2e1afad0fe72780b43ff394ccfa", - "sha256": "1g607s1ymns85923bvhwrsj0y5czyqqq1jmxx0a58fnsm1b318fa" - } - }, - { "path": "re-com/re-com/2.8.0/re-com-2.8.0", "host": "https://repo.clojars.org", @@ -1377,19 +1429,6 @@ } }, - { - "path": "refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0", - "host": "https://repo.clojars.org", - "pom": { - "sha1": "0bce30b420249ba7e4b90cbb3e046b4bb5416389", - "sha256": "0zmg5qc8d55pry7832isiwd2q237znfjqjpxchd2hvlpalh5qnva" - }, - "jar": { - "sha1": "6bc3441afc94f7ca024e41a864ca75e05df7e207", - "sha256": "0w8hax99y98l53mixxzx2ja0vcnhjv8dnsaz1zj3vqk775ns5w6i" - } - }, - { "path": "re-frame/re-frame/0.12.0/re-frame-0.12.0", "host": "https://repo.clojars.org", @@ -1429,6 +1468,32 @@ } }, + { + "path": "reagent/reagent/1.0.0/reagent-1.0.0", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "93ad5ccb0101108fb0843a3f2c50da28f8fd8336", + "sha256": "1l4xzgc4wbd8b29mhj5j336cf8w1zccaia0w413zf3bnj6jf5m38" + }, + "jar": { + "sha1": "a1dd4d40425bb2e1afad0fe72780b43ff394ccfa", + "sha256": "1g607s1ymns85923bvhwrsj0y5czyqqq1jmxx0a58fnsm1b318fa" + } + }, + + { + "path": "refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "0bce30b420249ba7e4b90cbb3e046b4bb5416389", + "sha256": "0zmg5qc8d55pry7832isiwd2q237znfjqjpxchd2hvlpalh5qnva" + }, + "jar": { + "sha1": "6bc3441afc94f7ca024e41a864ca75e05df7e207", + "sha256": "0w8hax99y98l53mixxzx2ja0vcnhjv8dnsaz1zj3vqk775ns5w6i" + } + }, + { "path": "rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1", "host": "https://repo.clojars.org", @@ -1443,15 +1508,15 @@ }, { - "path": "rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4", + "path": "rewrite-cljs/rewrite-cljs/0.4.5/rewrite-cljs-0.4.5", "host": "https://repo.clojars.org", "pom": { - "sha1": "4e7a2542517a5b0231631305461603605bea1592", - "sha256": "050imgkzw5q7200klwrkd4v32xxy1f4aghs8g4ma5dbg4rl4pgcd" + "sha1": "378cd53218027b9a93640dcf64c040665f6c9c6b", + "sha256": "1qrhrgzhqdyqizh0ngnr4zgj9xkfzq0qhsws4pxxra3qc9ikl9cq" }, "jar": { - "sha1": "dd14a371d0d09eedccb39f01e3edabefb2d1e64f", - "sha256": "0hb07wg71i2bjn8wzs8q6w1nb3jb2s36nhr9kv9mc0gyrr6im244" + "sha1": "c35be115c39dadc71a4de3f584aa8ca295e11257", + "sha256": "1dnw0jhr1hhqz80w3z5d8qdbaqdvgzg4fyhv6lffa51c9ca1dsr1" } }, @@ -1583,5 +1648,18 @@ "sha1": "09af0b348e6253dcf9fd567d0d22ffebdea46176", "sha256": "1qg2iyblykfkzmplc2c46916b9m0h5ad6lxmvrk5qn3pdxqr8vw0" } + }, + + { + "path": "zprint/zprint/1.1.1/zprint-1.1.1", + "host": "https://repo.clojars.org", + "pom": { + "sha1": "d7225bdc4978d3a8eac8613187cddd2efb9e39d2", + "sha256": "0yyy31h88zww238c2v4zi9va3pjp7ii76zjggglakd3wm1fdbnck" + }, + "jar": { + "sha1": "3bd9bbedb188a66ccf72c1e22819e8e423a6757a", + "sha256": "1bvrarxw0dqvxlhj6gdwrv6mklzh4p79537g293fqlm07f2knfph" + } } ] diff --git a/nix/deps/clojure/deps.list b/nix/deps/clojure/deps.list index ba20bde8a1..86c30c386a 100644 --- a/nix/deps/clojure/deps.list +++ b/nix/deps/clojure/deps.list @@ -2,13 +2,16 @@ args4j/args4j/2.0.26/args4j-2.0.26.jar bidi/bidi/2.1.6/bidi-2.1.6.jar binaryage/env-config/0.2.2/env-config-0.2.2.jar binaryage/oops/0.7.0/oops-0.7.0.jar +borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28.jar +borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar +borkdude/sci/0.2.1-alpha.1/sci-0.2.1-alpha.1.jar cider/cider-nrepl/0.25.3/cider-nrepl-0.25.3.jar cider/piggieback/0.4.1/piggieback-0.4.1.jar -cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.jar +clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8.jar cljs-bean/cljs-bean/1.3.0/cljs-bean-1.3.0.jar -cljsjs/react/17.0.1-0/react-17.0.1-0.jar -cljsjs/react-dom/17.0.1-0/react-dom-17.0.1-0.jar cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0.jar +cljsjs/react-dom/17.0.1-0/react-dom-17.0.1-0.jar +cljsjs/react/17.0.1-0/react-17.0.1-0.jar clout/clout/2.1.2/clout-2.1.2.jar com/andrewmcveigh/cljs-time/0.5.2/cljs-time-0.5.2.jar com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar @@ -19,8 +22,6 @@ com/cognitect/transit-js/0.8.846/transit-js-0.8.846.jar com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.jar com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar com/google/code/gson/gson/2.7/gson-2.7.jar -com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar -com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar com/google/guava/guava/25.1-jre/guava-25.1-jre.jar @@ -31,23 +32,25 @@ com/google/jsinterop/base/1.0.0/base-1.0.0.jar com/google/jsinterop/jsinterop-annotations/1.0.2/jsinterop-annotations-1.0.2.jar com/google/protobuf/protobuf-java/3.11.1/protobuf-java-3.11.1.jar com/google/re2j/re2j/1.3/re2j-1.3.jar +com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar com/ibm/icu/icu4j/66.1/icu4j-66.1.jar -commons-codec/commons-codec/1.10/commons-codec-1.10.jar -commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar -commons-io/commons-io/2.6/commons-io-2.6.jar -compojure/compojure/1.5.2/compojure-1.5.2.jar com/taoensso/encore/2.105.0/encore-2.105.0.jar com/taoensso/timbre/4.10.0/timbre-4.10.0.jar com/taoensso/truss/1.5.0/truss-1.5.0.jar com/taoensso/tufte/2.1.0/tufte-2.1.0.jar com/wsscode/pathom/2.2.31/pathom-2.2.31.jar com/wsscode/spec-inspec/1.0.0-alpha2/spec-inspec-1.0.0-alpha2.jar +commons-codec/commons-codec/1.10/commons-codec-1.10.jar +commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar +commons-io/commons-io/2.6/commons-io-2.6.jar +compojure/compojure/1.5.2/compojure-1.5.2.jar crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar day8/re-frame/test/0.1.5/test-0.1.5.jar edn-query-language/eql/0.0.9/eql-0.0.9.jar expound/expound/0.8.5/expound-0.8.5.jar fipp/fipp/0.6.23/fipp-0.6.23.jar +hashp/hashp/0.2.1/hashp-0.2.1.jar hiccup/hiccup/1.0.5/hiccup-1.0.5.jar hickory/hickory/0.7.1/hickory-0.7.1.jar http-kit/http-kit/2.2.0/http-kit-2.2.0.jar @@ -58,6 +61,8 @@ javax/servlet/servlet-api/2.5/servlet-api-2.5.jar javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar medley/medley/0.8.2/medley-0.8.2.jar mvxcvi/alphabase/1.0.0/alphabase-1.0.0.jar +mvxcvi/arrangement/1.2.0/arrangement-1.2.0.jar +mvxcvi/puget/1.3.1/puget-1.3.1.jar net/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar nrepl/nrepl/0.7.0/nrepl-0.7.0.jar org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar @@ -66,23 +71,23 @@ org/clojure/clojurescript/1.10.773/clojurescript-1.10.773.jar org/clojure/core.async/1.3.610/core.async-1.3.610.jar org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar org/clojure/core.memoize/1.0.236/core.memoize-1.0.236.jar -org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1.jar +org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2.jar org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar org/clojure/data.json/1.0.0/data.json-1.0.0.jar org/clojure/data.priority-map/1.0.0/data.priority-map-1.0.0.jar -org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar org/clojure/google-closure-library-third-party/0.0-20191016-6ae1f72f/google-closure-library-third-party-0.0-20191016-6ae1f72f.jar +org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar org/clojure/test.check/1.1.0/test.check-1.1.0.jar -org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0.jar +org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar org/clojure/tools.cli/1.0.194/tools.cli-1.0.194.jar org/clojure/tools.logging/0.4.1/tools.logging-0.4.1.jar org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar -org/graalvm/js/js/20.1.0/js-20.1.0.jar org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.jar +org/graalvm/js/js/20.1.0/js-20.1.0.jar org/graalvm/regex/regex/20.1.0/regex-20.1.0.jar org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.jar org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.jar @@ -93,23 +98,23 @@ org/jboss/xnio/xnio-api/3.8.0.Final/xnio-api-3.8.0.Final.jar org/jboss/xnio/xnio-nio/3.8.0.Final/xnio-nio-3.8.0.Final.jar org/jsoup/jsoup/1.9.2/jsoup-1.9.2.jar org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar -org/ow2/asm/asm/7.1/asm-7.1.jar org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar org/ow2/asm/asm-util/7.1/asm-util-7.1.jar +org/ow2/asm/asm/7.1/asm-7.1.jar org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final.jar org/wildfly/common/wildfly-common/1.5.2.Final/wildfly-common-1.5.2.Final.jar prismatic/schema/1.1.7/schema-1.1.7.jar quoin/quoin/0.1.2/quoin-0.1.2.jar -reagent/reagent/1.0.0/reagent-1.0.0.jar re-com/re-com/2.8.0/re-com-2.8.0.jar -refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0.jar re-frame/re-frame/0.12.0/re-frame-0.12.0.jar re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0.jar re-frisk/sente/1.15.0/sente-1.15.0.jar +reagent/reagent/1.0.0/reagent-1.0.0.jar +refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0.jar rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1.jar -rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.jar +rewrite-cljs/rewrite-cljs/0.4.5/rewrite-cljs-0.4.5.jar ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar ring/ring-codec/1.1.2/ring-codec-1.1.2.jar ring/ring-core/1.8.1/ring-core-1.8.1.jar @@ -120,3 +125,4 @@ thheller/shadow-cljs/2.11.16/shadow-cljs-2.11.16-aot.jar thheller/shadow-cljsjs/0.0.21/shadow-cljsjs-0.0.21.jar thheller/shadow-util/0.7.0/shadow-util-0.7.0.jar viebel/codox-klipse-theme/0.0.1/codox-klipse-theme-0.0.1.jar +zprint/zprint/1.1.1/zprint-1.1.1.jar diff --git a/nix/shell.nix b/nix/shell.nix index 4995374a14..6547d58a82 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -17,6 +17,8 @@ in mkShell { lsof # used in start-react-native.sh # build specific utilities clojure maven watchman + # lint specific utilities + clj-kondo zprint clojure-lsp # other nice to have stuff yarn nodejs python27 ] # and some special cases diff --git a/nix/shells.nix b/nix/shells.nix index 91f7b2900f..382d6a5a6a 100644 --- a/nix/shells.nix +++ b/nix/shells.nix @@ -23,7 +23,7 @@ let # for calling clojure targets in CI or Makefile clojure = mkShell { - buildInputs = with pkgs; [ clojure flock maven openjdk clj-kondo ]; + buildInputs = with pkgs; [ clojure flock maven openjdk ]; inputsFrom = [ nodejs-sh ]; # CLASSPATH from clojure deps with 'src' appended to find local sources. shellHook = with pkgs; '' diff --git a/shadow-cljs.edn b/shadow-cljs.edn index 730b1b4252..f494982cde 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -1,118 +1,120 @@ ;; shadow-cljs configuration -{:source-paths ["src" "test/cljs"] +{:source-paths ["src" "test/cljs"] - :dependencies [[reagent "1.0.0"] - [re-frame "0.12.0"] - [binaryage/oops "0.7.0"] - [com.andrewmcveigh/cljs-time "0.5.2"] - [status-im/timbre "4.10.0-2-status"] - [com.taoensso/encore "2.105.0"] - [hickory "0.7.1"] - [cljs-bean "1.3.0"] - [com.cognitect/transit-cljs "0.8.248"] - [mvxcvi/alphabase "1.0.0"] - ;; dev dependencies - [refactor-nrepl "2.5.0"] - [cider/cider-nrepl "0.25.3"] - [cider/piggieback "0.4.1"] - [re-frisk-remote "1.6.0"] - ;; routing - [bidi "2.1.6"] - ;; test dependencies - [day8.re-frame/test "0.1.5"] - [com.taoensso/tufte "2.1.0"] - ;; linting - [cljfmt/cljfmt "0.6.7"]] + :dependencies [[reagent "1.0.0"] + [re-frame "0.12.0"] + [binaryage/oops "0.7.0"] + [com.andrewmcveigh/cljs-time "0.5.2"] + [status-im/timbre "4.10.0-2-status"] + [com.taoensso/encore "2.105.0"] + [hickory "0.7.1"] + [cljs-bean "1.3.0"] + [com.cognitect/transit-cljs "0.8.248"] + [mvxcvi/alphabase "1.0.0"] + ;; dev dependencies + [refactor-nrepl "2.5.0"] + [cider/cider-nrepl "0.25.3"] + [cider/piggieback "0.4.1"] + [re-frisk-remote "1.6.0"] + ;; routing + [bidi "2.1.6"] + ;; test dependencies + [day8.re-frame/test "0.1.5"] + [com.taoensso/tufte "2.1.0"]] ;; port and middleware for repl in development - :nrepl {:port 7888 - :middleware [cider.piggieback/wrap-cljs-repl - refactor-nrepl.middleware/wrap-refactor]} + :nrepl {:port 7888 + :middleware [cider.piggieback/wrap-cljs-repl + refactor-nrepl.middleware/wrap-refactor]} ;; shadow-cljs web interface - :http {:port 3449 - :host "0.0.0.0"} + :http {:port 3449 + :host "0.0.0.0"} :cache-blockers #{status-im.utils.js-resources status-im.ui.components.icons.icons} - :builds {:mobile - {:target :react-native - :output-dir "app" - :init-fn status-im2.setup.core/init - ;; When false, the Shadow-CLJS watcher won't automatically refresh - ;; the target files (a.k.a hot reload). When false, you can manually - ;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`. - :devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]} - :dev {:devtools {:after-load status-im2.setup.hot-reload/reload - :build-notify status-im2.setup.hot-reload/build-notify - :preloads [re-frisk-remote.preload]} - :closure-defines - {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" - status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} - :compiler-options {:output-feature-set :es5 - :closure-defines - {re-frame.trace/trace-enabled? true} - :source-map false - :infer-externs true} - ;; if you want to use a real device, set your local ip - ;; in the SHADOW_HOST env variable to make sure that - ;; it will use the right interface - :local-ip #shadow/env "SHADOW_HOST"} - :chunks {:fleets status-im.fleet.default-fleet/default-fleets - :chats status-im.chat.default-chats/default-chats} - :release - {:closure-defines - {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" - status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} - :compiler-options {:output-feature-set :es6 - ;;disable for android build as there - ;;is an intermittent warning with deftype - :warnings-as-errors false - :infer-externs :auto - :static-fns true - :fn-invoke-direct true - :optimizations :advanced - :js-options {:js-provider :closure}}}} - ;; the tests are ran with node, react-native dependencies are mocked - ;; by using node --require override.js, which uses the node-library - ;; produced by the target :mocks below and redefines node require - ;; function to use the mocks instead of the rn libraries - :test - {:output-to "target/test/test.js" - :output-dir "target/test" - :optimizations :simple - :target :node-test - ;; When running tests without a REPL you can uncomment the below line to `make test-watch` a specific file - ;:ns-regexp "status-im.chat.models-test$" - :main status-im.test-runner/main - ;; set :ui-driven to true to let shadow-cljs inject node-repl - :ui-driven true - :closure-defines - {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" - status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} - :compiler-options {;; needed because we override require and it - ;; messes with source-map which reports callstack - ;; exceeded exceptions instead of real issues - :source-map false - ;; needed because we use deref in tests - :static-fns false - :optimizations :simple - :infer-externs true}} + :builds + {:mobile + {:target :react-native + :output-dir "app" + :init-fn status-im2.setup.core/init + ;; When false, the Shadow-CLJS watcher won't automatically refresh + ;; the target files (a.k.a hot reload). When false, you can manually + ;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`. + :devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]} + :dev {:devtools {:after-load status-im2.setup.hot-reload/reload + :build-notify status-im2.setup.hot-reload/build-notify + :preloads [re-frisk-remote.preload]} + :closure-defines + {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" + status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} + :compiler-options {:output-feature-set :es5 + :closure-defines + {re-frame.trace/trace-enabled? true} + :source-map false + :infer-externs true} + ;; if you want to use a real device, set your local ip + ;; in the SHADOW_HOST env variable to make sure that + ;; it will use the right interface + :local-ip #shadow/env "SHADOW_HOST"} + :chunks {:fleets status-im.fleet.default-fleet/default-fleets + :chats status-im.chat.default-chats/default-chats} + :release + {:closure-defines + {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" + status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} + :compiler-options {:output-feature-set :es6 + ;;disable for android build as there + ;;is an intermittent warning with deftype + :warnings-as-errors false + :infer-externs :auto + :static-fns true + :fn-invoke-direct true + :optimizations :advanced + :js-options {:js-provider :closure}}}} + ;; the tests are ran with node, react-native dependencies are mocked + ;; by using node --require override.js, which uses the node-library + ;; produced by the target :mocks below and redefines node require + ;; function to use the mocks instead of the rn libraries + :test + {:output-to "target/test/test.js" + :output-dir "target/test" + :optimizations :simple + :target :node-test + ;; When running tests without a REPL you can uncomment below line to `make test-watch` a specific file + ;; :ns-regexp "status-im.chat.models-test$" + :main + status-im.test-runner/main + ;; set :ui-driven to true to let shadow-cljs inject node-repl + :ui-driven + true + :closure-defines + {status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN" + status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} + :compiler-options + {;; needed because we override require and it + ;; messes with source-map which reports callstack + ;; exceeded exceptions instead of real issues + :source-map false + ;; needed because we use deref in tests + :static-fns false + :optimizations :simple + :infer-externs true}} - ;; mock.js-dependencies is mocking the react-native libraries - ;; we build it as a node library so that it can be required by - ;; override.js - :mocks - {:target :node-library - :exports {:mocks mocks.js-dependencies/mock} - :output-to "target/mocks/mocks.js" - :output-dir "target/mocks" - :compiler-options {:optimizations :simple - :source-map false}} - :component-test {:target :npm-module - :entries [quo2.core-spec] - :ns-regexp "-component-spec$" - :output-dir "component-spec" - :compiler-options {:warnings-as-errors false - :static-fns false - :infer-externs true}}}} + ;; mock.js-dependencies is mocking the react-native libraries + ;; we build it as a node library so that it can be required by + ;; override.js + :mocks + {:target :node-library + :exports {:mocks mocks.js-dependencies/mock} + :output-to "target/mocks/mocks.js" + :output-dir "target/mocks" + :compiler-options {:optimizations :simple + :source-map false}} + :component-test {:target :npm-module + :entries [quo2.core-spec] + :ns-regexp "-component-spec$" + :output-dir "component-spec" + :compiler-options {:warnings-as-errors false + :static-fns false + :infer-externs true}}}}