From a9ff89596ffaf91e751a43d170546ae606511407 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Wed, 24 Jan 2024 09:29:06 +0100 Subject: [PATCH] [nop] Update project template --- .github/workflows/graal-tests.yml | 6 ++-- .github/workflows/main-tests.yml | 8 ++--- README.md | 10 +++--- SECURITY.md | 13 ++++++++ bb/graal_tests.clj | 4 ++- project.clj | 55 ++++++++++++++++--------------- test/taoensso/sente_tests.cljc | 6 ++++ wiki/Home.md | 2 +- 8 files changed, 63 insertions(+), 41 deletions(-) create mode 100644 SECURITY.md diff --git a/.github/workflows/graal-tests.yml b/.github/workflows/graal-tests.yml index b2ea89b..14495f4 100644 --- a/.github/workflows/graal-tests.yml +++ b/.github/workflows/graal-tests.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 with: version: 'latest' @@ -18,12 +18,12 @@ jobs: components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeLaGuardo/setup-clojure@10.0 + - uses: DeLaGuardo/setup-clojure@12.5 with: lein: latest bb: latest - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.m2/repository key: deps-${{ hashFiles('deps.edn') }} diff --git a/.github/workflows/main-tests.yml b/.github/workflows/main-tests.yml index 900a96e..faa64d6 100644 --- a/.github/workflows/main-tests.yml +++ b/.github/workflows/main-tests.yml @@ -10,17 +10,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: ${{ matrix.java }} - - uses: DeLaGuardo/setup-clojure@10.0 + - uses: DeLaGuardo/setup-clojure@12.5 with: lein: latest - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: cache-deps with: path: ~/.m2/repository diff --git a/README.md b/README.md index bfdcb1d..bd3ffb3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Sente -### Realtime web comms for Clojure/Script applications +### Realtime web comms library for Clojure/Script **Sente** is a small client+server library that makes it easy to build **realtime web applications** with Clojure + ClojureScript. @@ -15,7 +15,7 @@ Loosely inspired by [Socket.IO](https://socket.io/), it uses **core.async**, **W ## Latest release/s -- `2023-08-30` `1.19.2`: [changes](../../releases/tag/v1.19.2) +- `2023-08-30` `1.19.2`: [release info](../../releases/tag/v1.19.2) [![Main tests][Main tests SVG]][Main tests URL] [![Graal tests][Graal tests SVG]][Graal tests URL] @@ -46,8 +46,8 @@ So you can ignore the underlying protocol and deal directly with Sente's unified ## Documentation -- [Full documentation][GitHub wiki] (**getting started** and more) -- Auto-generated API reference: [Codox][Codox docs], [clj-doc][clj-doc docs] +- [Wiki][GitHub wiki] (getting started, usage, etc.) +- API reference: [Codox][Codox docs], [clj-doc][clj-doc docs] ## Funding @@ -55,7 +55,7 @@ You can [help support][sponsor] continued work on this project, thank you!! 🙏 ## License -Copyright © 2012-2023 [Peter Taoussanis][]. +Copyright © 2012-2024 [Peter Taoussanis][]. Licensed under [EPL 1.0](LICENSE.txt) (same as Clojure). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..42ec6fc --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security policy + +## Advisories + +All security advisories will be posted [on GitHub](https://github.com/taoensso/sente/security/advisories). + +## Reporting a vulnerability + +Please report possible security vulnerabilities [via GitHub](https://github.com/taoensso/sente/security/advisories), or by emailing me at `my first name at taoensso.com`. You may encrypt emails with [my public PGP/GPG key](https://www.taoensso.com/pgp). + +Thank you! + +\- [Peter Taoussanis](https://www.taoensso.com) diff --git a/bb/graal_tests.clj b/bb/graal_tests.clj index b8c00d6..3397ebe 100755 --- a/bb/graal_tests.clj +++ b/bb/graal_tests.clj @@ -28,7 +28,9 @@ (let [graalvm-home (System/getenv "GRAALVM_HOME") bin-dir (str (fs/file graalvm-home "bin"))] (shell (executable bin-dir "gu") "install" "native-image") - (shell (executable bin-dir "native-image") "-jar" "target/graal-tests.jar" "--no-fallback" "graal_tests"))) + (shell (executable bin-dir "native-image") + "--features=clj_easy.graal_build_time.InitClojureClasses" + "--no-fallback" "-jar" "target/graal-tests.jar" "graal_tests"))) (defn run-tests [] (let [{:keys [out]} (shell {:out :string} (executable "." "graal_tests"))] diff --git a/project.clj b/project.clj index a2b4078..6d29866 100644 --- a/project.clj +++ b/project.clj @@ -1,6 +1,6 @@ (defproject com.taoensso/sente "1.19.2" :author "Peter Taoussanis " - :description "Realtime web comms for Clojure/Script applications" + :description "Realtime web comms library for Clojure/Script" :url "https://github.com/taoensso/sente" :license @@ -14,19 +14,31 @@ [org.clojure/tools.reader "1.3.6"] [com.taoensso/timbre "6.2.2"]] + :test-paths ["test" #_"src"] + :profiles {;; :default [:base :system :user :provided :dev] :provided {:dependencies [[org.clojure/clojurescript "1.11.60"] [org.clojure/clojure "1.11.1"]]} + :c1.12 {:dependencies [[org.clojure/clojure "1.12.0-alpha9"]]} :c1.11 {:dependencies [[org.clojure/clojure "1.11.1"]]} :c1.10 {:dependencies [[org.clojure/clojure "1.10.2"]]} + :graal-tests + {:source-paths ["test"] + :main taoensso.graal-tests + :aot [taoensso.graal-tests] + :uberjar-name "graal-tests.jar" + :dependencies + [[org.clojure/clojure "1.11.1"] + [com.github.clj-easy/graal-build-time "1.0.5"]]} + :community {:dependencies [[org.immutant/web "2.1.10"] [nginx-clojure "0.6.0"] [aleph "0.6.3"] - [macchiato/core "0.2.23"] ; Note 0.2.24 seems to fail? + [macchiato/core "0.2.23"] ; 0.2.24 seems to fail? [luminus/ring-undertow-adapter "1.3.1"] [info.sunng/ring-jetty9-adapter "0.22.0"]] @@ -37,8 +49,9 @@ "--add-opens=java.base/sun.nio.cs=ALL-UNNAMED" "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"]} - :test - {:jvm-opts ["-Dtaoensso.elide-deprecated=true"] + :dev [:dev+ :community] + :dev+ + {:jvm-opts ["-server" "-Dtaoensso.elide-deprecated=true"] :global-vars {*warn-on-reflection* true *assert* true @@ -48,29 +61,17 @@ [[com.cognitect/transit-clj "1.0.333"] [com.cognitect/transit-cljs "0.8.280"] [org.clojure/test.check "1.1.1"] - [http-kit "2.7.0"]]} + [http-kit "2.7.0"]] - :graal-tests - {:dependencies [[org.clojure/clojure "1.11.1"] - [com.github.clj-easy/graal-build-time "0.1.4"]] - :main taoensso.graal-tests - :aot [taoensso.graal-tests] - :uberjar-name "graal-tests.jar"} + :plugins + [[lein-pprint "1.3.2"] + [lein-ancient "0.7.0"] + [lein-cljsbuild "1.1.8"] + [com.taoensso.forks/lein-codox "0.10.10"]] - :dev - [:c1.11 :community :test - {:jvm-opts ["-server"] - :plugins - [[lein-pprint "1.3.2"] - [lein-ancient "0.7.0"] - [lein-cljsbuild "1.1.8"] - [com.taoensso.forks/lein-codox "0.10.10"]] - - :codox - {:language #{:clojure :clojurescript} - :base-language :clojure}}]} - - :test-paths ["test" #_"src"] + :codox + {:language #{:clojure :clojurescript} + :base-language :clojure}}} :cljsbuild {:test-commands {"node" ["node" "target/test.js"]} @@ -93,6 +94,6 @@ "build-once" ["do" ["clean"] ["cljsbuild" "once"]] "deploy-lib" ["do" ["build-once"] ["deploy" "clojars"] ["install"]] - "test-clj" ["with-profile" "+c1.11:+c1.10:+c1.9" "test"] - "test-cljs" ["with-profile" "+test" "cljsbuild" "test"] + "test-clj" ["with-profile" "+c1.12:+c1.11:+c1.10" "test"] + "test-cljs" ["with-profile" "+c1.12" "cljsbuild" "test"] "test-all" ["do" ["clean"] ["test-clj"] ["test-cljs"]]}) diff --git a/test/taoensso/sente_tests.cljc b/test/taoensso/sente_tests.cljc index b3bb3be..03ede89 100644 --- a/test/taoensso/sente_tests.cljc +++ b/test/taoensso/sente_tests.cljc @@ -30,4 +30,10 @@ ;;;; +#?(:cljs + (defmethod test/report [:cljs.test/default :end-run-tests] [m] + (when-not (test/successful? m) + ;; Trigger non-zero `lein test-cljs` exit code for CI + (throw (ex-info "ClojureScript tests failed" {}))))) + #?(:cljs (test/run-tests)) diff --git a/wiki/Home.md b/wiki/Home.md index af3d591..bc53b93 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -1,4 +1,4 @@ -See the menu to the right for content 👉 +See the **menu to the right** for content 👉 # Contributions welcome