diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4411875..289c089 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,8 @@ on: - main push: paths: ['src/**'] + branches: + - master workflow_dispatch: jobs: diff --git a/build.clj b/build.clj index f376775..1a8868c 100644 --- a/build.clj +++ b/build.clj @@ -3,7 +3,7 @@ [deps-deploy.deps-deploy :as dd])) (def lib 'org.clojars.some/depo) -(def version "0.0.21") +(def version "0.1.23") (def jar-file (format "target/%s-%s.jar" (name lib) version)) (def class-dir "target/classes") (def url "https://github.com/somecho/depo") diff --git a/generate.clj b/generate.clj index 4c5a95c..ec44a67 100644 --- a/generate.clj +++ b/generate.clj @@ -5,7 +5,7 @@ (def INPUT-FOLDER "test/resources/input/") (def SNAPSHOTS-FOLDER "test/resources/snapshots/") (def FILES ["project.clj" "deps.edn" "bb.edn" "shadow-cljs.edn"]) -(def TARGETS ["update-all"]) +(def TARGETS ["add-reagent-1.2.0" "add-multiple"]) (defn setup-directories [] (mapv #(io/make-parents (str SNAPSHOTS-FOLDER % "/FILE")) TARGETS)) @@ -23,6 +23,7 @@ (println "Setting up snapshot directories") (setup-directories) (println "Creating snapshots") - (println "Update-all snapshots") - (mapv #(create-snapshot % "update-all" "update") FILES) + (println "add-reagent-1.2.0 snapshots") + (mapv #(create-snapshot % "add-reagent-1.2.0" "add" "reagent@1.2.0") FILES) + (mapv #(create-snapshot % "add-multiple" "add" "reagent@1.2.0" "org.clojure/java.jdbc@0.7.12") FILES) (println "All snapshots have been created")) diff --git a/src/depo/core.clj b/src/depo/core.clj index 26801b1..cc93813 100644 --- a/src/depo/core.clj +++ b/src/depo/core.clj @@ -7,7 +7,9 @@ (let [args _arguments config-path (if file file (rw/get-config))] (if-not (empty? args) - (do (mapv #(rw/write-dependency config-path %) args) + (do (mapv #(rw/apply-operation {:config-path config-path + :id % + :operation :add}) args) (println "Done!")) (println (e/err :no-args))))) @@ -15,7 +17,9 @@ (let [args _arguments config-path (if file file (rw/get-config))] (if-not (empty? args) - (do (mapv #(rw/remove-dependency config-path %) args) + (do (mapv #(rw/apply-operation {:config-path config-path + :id % + :operation :remove}) args) (println "Done!")) (println (e/err :no-args))))) @@ -23,15 +27,19 @@ (let [args _arguments config-path (if file file (rw/get-config))] (if (empty? args) - (do (mapv #(rw/update-dependency config-path %) + (do (mapv #(rw/apply-operation {:config-path config-path + :id % + :operation :update}) (rw/get-all-dependency-names config-path)) (println "Done!")) - (mapv #(rw/update-dependency config-path %) args)))) + (mapv #(rw/apply-operation {:config-path config-path + :id % + :operation :update}) args)))) (def CONFIGURATION {:command "depo" :description "Manage dependencies for Clojure projects easily" - :version "0.0.21" + :version "0.1.23" :opts [{:as "path to configuration file" :default nil :option "file" diff --git a/src/depo/readwrite.clj b/src/depo/readwrite.clj index 809f891..1936649 100644 --- a/src/depo/readwrite.clj +++ b/src/depo/readwrite.clj @@ -6,142 +6,6 @@ [zprint.core :as zp] [rewrite-clj.zip :as z])) -(defn get-config - "Looks in the current directory for the following files - - deps.edn - - project.clj - - shadow-cljs.edn - - bb.edn - - Returns the a string matching the first file that it finds. - - Returns nil otherwise" - [] - (cond - (.exists (io/file "deps.edn")) "deps.edn" - (.exists (io/file "project.clj")) "project.clj" - (.exists (io/file "shadow-cljs.edn")) "shadow-cljs.edn" - (.exists (io/file "bb.edn")) "bb.edn")) - -(defmulti write-dependency - "Writes the dependency to the given configuration file" - (fn [config-path dependency] config-path)) - -(defmethod write-dependency :default - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID version]} (r/conform-version arg) - dep-key (if (= config-path "shadow-cljs.edn") :dependencies :deps) - deps (if-let [d (z/get zloc dep-key)] - d - (z/get (z/assoc zloc dep-key {}) dep-key))] - (println (str "Adding " groupID "/" artifactID " v" version)) - (-> deps - (z/assoc (symbol (str groupID "/" artifactID)) {:mvn/version version}) - (z/root-string) - (zp/zprint-str {:parse-string? true - :map {:sort? false - :hang? false}}) - (as-> new-conf (spit config-path new-conf))))) - -(defmethod write-dependency "project.clj" - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID version]} (r/conform-version arg) - dep-sym (symbol (if (= groupID artifactID) - artifactID - (str groupID "/" artifactID))) - zipper (if (z/find-value zloc z/next :dependencies) - zloc - (-> zloc - (z/append-child :dependencies) - (z/append-child [])))] - (println (str "Adding " groupID "/" artifactID " v" version)) - (-> zipper - (z/find-value z/next :dependencies) - (z/right) - (z/string) - (read-string) - (as-> dep-vec - (filter #(not= dep-sym (first %)) dep-vec)) - (vec) - (conj [dep-sym version]) - (as-> new-deps - (-> zipper - (z/find-value z/next :dependencies) - (z/right) - (z/replace new-deps))) - (as-> veczip - (z/map (fn [z] (if (z/rightmost? z) - z - (z/insert-newline-right z))) veczip)) - (z/root-string) - (zp/zprint-str {:parse-string? true - :vector {:respect-nl? true - :wrap-coll? nil}}) - (as-> new-conf (spit config-path new-conf))))) - -(defmulti remove-dependency - "Removes the dependency from the given configuration file" - (fn [config-path dependency] config-path)) - -(defmethod remove-dependency :default - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID]} (dp/parse arg) - dep-key (if (= config-path "shadow-cljs.edn") :dependencies :deps) - identifier (symbol (str groupID "/" artifactID))] - (-> zloc - (z/get dep-key) - (z/string) - (read-string) - (as-> dep-map - (if-not (contains? dep-map identifier) - (println arg "isn't a dependency. Skipping.") - (do - (println "Removing" (str identifier)) - (-> dep-map - (dissoc identifier) - (as-> new-deps - (-> zloc - (z/assoc :deps new-deps))) - (z/root-string) - (zp/zprint-str {:parse-string? true - :map {:sort? false - :hang? false}}) - (as-> new-conf (spit config-path new-conf))))))))) - -(defmethod remove-dependency "project.clj" - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID]} (dp/parse arg) - dep-sym (symbol (if (= groupID artifactID) - artifactID - (str groupID "/" artifactID)))] - (println "Removing" (str dep-sym)) - (-> zloc - (z/find-value z/next :dependencies) - (z/next) - (z/string) - (read-string) - (as-> dep-vec - (filter #(not= (first %) dep-sym) dep-vec)) - (vec) - (as-> new-deps - (-> zloc - (z/find-value z/next :dependencies) - (z/next) - (z/replace new-deps))) - (as-> veczip - (z/map (fn [z] (if (z/rightmost? z) - z - (z/insert-newline-right z))) veczip)) - (z/root-string) - (zp/zprint-str {:parse-string? true - :vector {:respect-nl? true - :wrap-coll? nil}}) - (as-> new-conf (spit config-path new-conf))))) - (defmulti get-all-dependency-names "Returns all the dependencies from the config" (fn [config-path] (last (str/split config-path #"/")))) @@ -167,75 +31,244 @@ (read-string) (as-> dep-vec (map #(str (first %)) dep-vec))))) -(defmulti update-dependency - "Updates a dependency in a Clojure project" - (fn [config-path dependency] (last (str/split config-path #"/")))) +(defn create-identifier + [groupID artifactID dep-type] + (case dep-type + :map (str groupID "/" artifactID) + :vector (if (= groupID artifactID) + artifactID + (str groupID "/" artifactID)))) -(defmethod update-dependency :default - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID version]} (r/conform-version arg) - identifier (symbol (str groupID "/" artifactID)) - dep-key (if (= (last (str/split config-path #"/")) "shadow-cljs.edn") :dependencies :deps) - dep-map (-> zloc (z/get dep-key) z/string read-string) - dependency-exists? (contains? dep-map identifier) - current-version (get-in dep-map [identifier :mvn/version])] - (if-not dependency-exists? - (println arg "isn't a dependency. Skipping.") - (if (not= current-version version) - (do - (println "Updating" (str identifier)) - (println "Current version:" current-version) - (println "Latest version:" version) - (-> zloc - (z/get dep-key) - (z/replace - (assoc dep-map identifier {:mvn/version version})) - (z/root-string) - (zp/zprint-str {:parse-string? true - :map {:sort? false - :hang? false}}) - (as-> new-conf (spit config-path new-conf)))) - (println (str identifier) current-version "is up to date. Skipping."))))) - -(defmethod update-dependency "project.clj" - [config-path arg] - (let [zloc (z/of-string (slurp config-path)) - {:keys [groupID artifactID version]} (dp/parse arg) - identifier (symbol (if (= groupID artifactID) - artifactID - (str groupID "/" artifactID))) - dep-vec (-> zloc - (z/find-value z/next :dependencies) - (z/next) - (z/string) - (read-string)) - dep-item (first (filter #(= (first %) identifier) dep-vec)) - current-version (second dep-item) - dependency-exists? (seq dep-item) - {:keys [groupID artifactID version]} (if dependency-exists? - (r/conform-version arg) - nil)] - (if-not dependency-exists? - (println arg "isn't a dependency. Skipping.") - (if-not (= current-version version) - (do - (println "Updating" (str identifier)) - (println "Current version:" current-version) - (println "Latest version:" version) - (-> zloc - (z/find-value z/next :dependencies) - (z/next) - (z/replace (vec (map #(if (= (first %) identifier) - [identifier version] - %) dep-vec))) - (as-> veczip - (z/map (fn [z] (if (z/rightmost? z) - z - (z/insert-newline-right z))) veczip)) - (z/root-string) - (zp/zprint-str {:parse-string? true - :vector {:respect-nl? true - :wrap-coll? nil}}) - (as-> new-conf (spit config-path new-conf)))) - (println (str identifier) current-version "is up to date. Skipping."))))) +(defn create-keys + "- `config-path` - the full path to the config file as a string + + Returns + - `:dependencies` for `:lein` and `:shadow` + - `:deps` for `:default` + " + [project-type] + (case project-type + (or :lein :shadow) :dependencies + :default :deps)) + +(defn get-config + "Looks in the current directory for the following files + - deps.edn + - project.clj + - shadow-cljs.edn + - bb.edn + + Returns the a string matching the first file that it finds. + + Returns nil otherwise" + [] + (cond + (.exists (io/file "deps.edn")) "deps.edn" + (.exists (io/file "project.clj")) "project.clj" + (.exists (io/file "shadow-cljs.edn")) "shadow-cljs.edn" + (.exists (io/file "bb.edn")) "bb.edn")) + +(defn get-dependency-data + [deps identifier] + (cond + (map? deps) (get deps identifier) + (vector? deps) (-> #(= identifier (first %)) + (filter deps) + (first) + (rest)))) + +(defn get-dependency-type + [deps] + (cond + (map? deps) :map + (vector? deps) :vector)) + +(defn get-project-type + "- `config-path` - the full path to the config file as a string + + Returns + - `:shadow` for shadow-cljs.edn + - `:lein` for project.clj + - `:default` for everything else + " + [config-path] + (let [config-name (-> config-path + (str/split #"/") + (last))] + (case config-name + "shadow-cljs.edn" :shadow + "project.clj" :lein + :default))) + +(defn traverse-zip-map + "- `zloc` - a zipper object created by rewrite-clj + - `keys` - a vector of keys + + Traverses the zipper object using `z/get`, `z` being + the `rewrite-clj.zip` namespace, using `keys` from left + to right" + [zloc keys] + (loop [zloc zloc + keys keys] + (if (not-empty keys) + (recur (z/get zloc (first keys)) + (rest keys)) + zloc))) + +(defmulti get-dep-vec-map + (fn [m] (:project-type m))) + +(defmethod get-dep-vec-map :default + [{:keys [zloc keys]}] + (-> zloc + (traverse-zip-map keys) + (z/string) + (read-string))) + +(defmethod get-dep-vec-map :lein + [{:keys [zloc keys]}] + (-> zloc + (z/find-value z/next (first keys)) + (z/next) + (as-> zpos + (if (not-empty (rest keys)) + (traverse-zip-map zpos (rest keys)) + zpos)) + (z/string) + (read-string))) + +(defn add-dependency + [{:keys [deps id]}] + (let [{:keys [groupID artifactID version]} (r/conform-version id) + dep-type (get-dependency-type deps) + identifier (create-identifier groupID + artifactID + dep-type)] + (println "Adding" identifier version) + (case dep-type + :map (assoc deps (symbol identifier) {:mvn/version version}) + :vector (-> (conj deps [(symbol identifier) version]) + (distinct) + (vec))))) + +(defn remove-dependency + [{:keys [deps id]}] + (let [{:keys [groupID artifactID version]} (r/conform-version id) + dep-type (get-dependency-type deps) + identifier (create-identifier groupID + artifactID + dep-type)] + (println "Removing" identifier version) + (case dep-type + :map (dissoc deps (symbol identifier)) + :vector (vec (filter #(not= (symbol identifier) (first %)) deps))))) + +(defn get-current-version + [deps identifier] + (cond + (map? deps) + (:mvn/version (get-dependency-data deps identifier)) + (vector? deps) + (first (get-dependency-data deps identifier)))) + +(defn update-dependency + [{:keys [deps id]}] + (let [{:keys [groupID artifactID version]} (r/conform-version id) + identifier (create-identifier groupID + artifactID + (get-dependency-type deps)) + current-version (get-current-version deps (symbol identifier))] + (if (= current-version version) + (do + (println identifier current-version "is up-to-date. Skipping.") + deps) + (do + (println "Updating" identifier current-version "->" version) + (cond + (map? deps) (assoc deps (symbol identifier) {:mvn/version version}) + (vector? deps) (mapv + #(if (= (symbol identifier) (first %)) + (vec (concat [(symbol identifier) version] + (rest (rest %)))) + %) + deps)))))) + +(defn zip-vec-add-newlines + "- `zloc` - a zipper object of a vector created by rewrite-clj + + Splits up a vector of vectors (dependencies) into multiple lines. + Indentation is not considered." + [zloc] + (z/map (fn [z] (if (z/rightmost? z) + z + (z/insert-newline-right z))) zloc)) + +(defn replace-dependencies + "Takes in a map with the following keys + - `:project-type` - `:lein`, `:shadow` or `:default` + - `:zloc` - zipper object of config file created by rewrite-clj + - `:keys` - a vector of keys telling Depo which dependencies to replace + - `:new-deps` - a vector or map of the newly written dependencies + + Replaces the specified dependencies in a map and returns + a string formatted by zprint" + [{:keys [zloc keys new-deps project-type]}] + (-> zloc + (as-> zipper + (case project-type + :lein (-> zipper + (z/find-value z/next (first keys)) + (z/next)) + (traverse-zip-map zipper keys))) + (z/replace new-deps) + (as-> zipper + (case project-type + :default zipper + (zip-vec-add-newlines zipper))) + (z/root-string) + (zp/zprint-str {:parse-string? true + :style (case project-type + :default :map-nl + :indent-only) + :map {:sort? false + :hang? false} + :vector {:hang? false + :wrap-coll? nil}}))) +(defn operate + "- `operation` - `:add`,`:update` or `:remove` + - `packet` - a map containing the keys `:deps` and `:id` + + Keys + - `deps` - either a map or a vector containing the dependencies, + as defined in `project.clj` or `deps.edn` files + - `id` - the artifact identifier, which follows the + `[groupID/]artifactID[@version]` schema + + Operates on the given packet and returns a new set of dependencies, + which is either a map or vec, depending on what was given to `:deps`" + [operation packet] + (case operation + :add (add-dependency packet) + :remove (remove-dependency packet) + :update (update-dependency packet))) + +(defn apply-operation + [{:keys [config-path id operation]}] + (let [config-zip (z/of-string (slurp config-path)) + project-type (get-project-type config-path) + access-keys [(create-keys project-type)] + dep-vec-map (get-dep-vec-map {:zloc config-zip + :keys access-keys + :project-type project-type}) + new-deps (operate operation {:deps dep-vec-map + :id id})] + (->> (replace-dependencies {:zloc config-zip + :project-type project-type + :new-deps new-deps + :keys access-keys}) + (spit config-path)))) + ; (println)))) + +; (apply-operation {:config-path "test/resources/input/bb.edn" +; :id "reagent" +; :operation :add}) diff --git a/test/depo/depo_e2e_test.clj b/test/depo/depo_e2e_test.clj index 4a829a6..9d82580 100644 --- a/test/depo/depo_e2e_test.clj +++ b/test/depo/depo_e2e_test.clj @@ -30,13 +30,24 @@ (apply sh (concat ["clojure" "-M" "-m" "depo.core" "-f" target] commands)) (= (slurp snapshot) (slurp target)))) -(deftest update-all - (io/make-parents (str TEMP-FOLDER "update-all/FILE")) +(deftest add-multiple + (io/make-parents (str TEMP-FOLDER "add-multiple/FILE")) (testing "project.clj" - (is (apply-compare "project.clj" "update-all" "update"))) + (is (apply-compare "project.clj" "add-multiple" "add" "reagent@1.2.0" "org.clojure/java.jdbc@0.7.12"))) (testing "deps.edn" - (is (apply-compare "project.clj" "update-all" "update"))) + (is (apply-compare "deps.edn" "add-multiple" "add" "reagent@1.2.0" "org.clojure/java.jdbc@0.7.12"))) (testing "shadow-cljs.edn" - (is (apply-compare "project.clj" "update-all" "update"))) + (is (apply-compare "shadow-cljs.edn" "add-multiple" "add" "reagent@1.2.0" "org.clojure/java.jdbc@0.7.12"))) (testing "bb.edn" - (is (apply-compare "project.clj" "update-all" "update")))) + (is (apply-compare "bb.edn" "add-multiple" "add" "reagent@1.2.0" "org.clojure/java.jdbc@0.7.12")))) + +(deftest add-reagent-1.2.0 + (io/make-parents (str TEMP-FOLDER "add-reagent-1.2.0/FILE")) + (testing "project.clj" + (is (apply-compare "project.clj" "add-reagent-1.2.0" "add" "reagent@1.2.0"))) + (testing "deps.edn" + (is (apply-compare "deps.edn" "add-reagent-1.2.0" "add" "reagent@1.2.0"))) + (testing "shadow-cljs.edn" + (is (apply-compare "shadow-cljs.edn" "add-reagent-1.2.0" "add" "reagent@1.2.0"))) + (testing "bb.edn" + (is (apply-compare "bb.edn" "add-reagent-1.2.0" "add" "reagent@1.2.0")))) diff --git a/test/resources/input/bb.edn b/test/resources/input/bb.edn index b31eb95..4d7b7e5 100644 --- a/test/resources/input/bb.edn +++ b/test/resources/input/bb.edn @@ -1,4 +1,13 @@ -{:paths ["src" "test"] - :deps {reagent/reagent {:mvn/version "1.2.0"} - emotion-cljs/emotion-cljs {:mvn/version "0.1.0"} - metosin/malli {:mvn/version "0.10.0"}}} +{:deps + {reagent/reagent {:mvn/version "1.1.0"} + metosin/malli {:mvn/version "0.10.0"} + lambdaisland/kaocha {:local/root "."} + lambdaisland/open-source {:git/url "https://github.com/lambdaisland/open-source" + :git/sha "4d6019ed2805f701c0d626732c5a886542e3b83b" + #_#_:local/root "../open-source"}} + :tasks + {test:bb + {:extra-deps {nubank/matcher-combinators {:mvn/version "3.8.5"}} + :extra-paths ["test/bb"] + :requires ([kaocha.runner]) + :task (apply kaocha.runner/-main "bb" "--config-file" "bb-tests.edn" *command-line-args*)}}} diff --git a/test/resources/input/deps.edn b/test/resources/input/deps.edn index b31eb95..cfce7ce 100644 --- a/test/resources/input/deps.edn +++ b/test/resources/input/deps.edn @@ -1,4 +1,190 @@ -{:paths ["src" "test"] - :deps {reagent/reagent {:mvn/version "1.2.0"} - emotion-cljs/emotion-cljs {:mvn/version "0.1.0"} - metosin/malli {:mvn/version "0.10.0"}}} +{:paths ["src" "feature-xml" + "feature-yaml" "feature-csv" "feature-transit" + "feature-java-time" "feature-java-nio" + "feature-httpkit-client" "feature-httpkit-server" + "feature-lanterna" + "feature-core-match" + "feature-hiccup" + "feature-test-check" + "feature-spec-alpha" + "feature-selmer" + "feature-logging" + "feature-priority-map" + "feature-rrb-vector" + "feature-jdbc" + "pods/src" + "babashka.nrepl/src" + "depstar/src" "process/src" + "deps.clj/src" "deps.clj/resources" + "resources" "sci/resources" + "impl-java/src"], + :deps {org.clojure/clojure {:mvn/version "1.11.1"}, + org.babashka/sci {:local/root "sci"} + org.babashka/babashka.impl.java {:mvn/version "0.1.8"} + org.babashka/sci.impl.types {:mvn/version "0.0.2"} + babashka/babashka.curl {:local/root "babashka.curl"} + babashka/fs {:local/root "fs"} + babashka/babashka.core {:local/root "babashka.core"} + borkdude/graal.locking {:mvn/version "0.0.2"}, + org.clojure/core.async {:mvn/version "1.6.673"}, + org.clojure/tools.cli {:mvn/version "1.0.214"}, + org.clojure/data.csv {:mvn/version "1.0.0"}, + cheshire/cheshire {:mvn/version "5.11.0"} + org.clojure/data.xml {:mvn/version "0.2.0-alpha8"} + clj-commons/clj-yaml {:mvn/version "1.0.26"} + com.cognitect/transit-clj {:mvn/version "1.0.333"} + org.clojure/test.check {:mvn/version "1.1.1"} + nrepl/bencode {:mvn/version "1.1.0"} + seancorfield/next.jdbc {:mvn/version "1.1.610"} + org.postgresql/postgresql {:mvn/version "42.2.18"} + org.hsqldb/hsqldb {:mvn/version "2.5.1"} + datascript/datascript {:mvn/version "1.0.1"} + http-kit/http-kit {:mvn/version "2.7.0-RC1"} + babashka/clojure-lanterna {:mvn/version "0.9.8-SNAPSHOT"} + org.clojure/core.match {:mvn/version "1.0.0"} + hiccup/hiccup {:mvn/version "2.0.0-RC1"} + rewrite-clj/rewrite-clj {:mvn/version "1.1.46"} + selmer/selmer {:mvn/version "1.12.50"} + com.taoensso/timbre {:mvn/version "6.0.1"} + org.clojure/tools.logging {:mvn/version "1.1.0"} + org.clojure/data.priority-map {:mvn/version "1.1.0"} + insn/insn {:mvn/version "0.5.2"} + org.clojure/core.rrb-vector {:mvn/version "0.1.2"} + org.babashka/cli {:mvn/version "0.7.51"} + org.babashka/http-client {:mvn/version "0.3.11"} + ;; native image bloat with ordered 1.5.10 + org.flatland/ordered {:mvn/version "1.5.9"}} + :aliases {:babashka/dev + {:main-opts ["-m" "babashka.main"]} + :profile + {:extra-deps + {com.clojure-goes-fast/clj-async-profiler {:mvn/version "0.5.0"}} + :extra-paths ["test"] + :jvm-opts ["-Djdk.attach.allowAttachSelf" + "-Dclojure.compiler.direct-linking=true"] + :main-opts ["-m" "babashka.profile"]} + :lib-tests + {:extra-paths ["process/src" "process/test" "test-resources/lib_tests"] + :extra-deps {org.clj-commons/clj-http-lite {:mvn/version "0.4.392"} + #_#_org.babashka/spec.alpha {:git/url "https://github.com/babashka/spec.alpha" + :sha "0dec1f88cbde74a0470b454396f09a03adb4ae39"} + lambdaisland/regal {:mvn/version "0.0.143"} + cprop/cprop {:mvn/version "0.1.16"} + comb/comb {:mvn/version "0.1.1"} + mvxcvi/arrangement {:mvn/version "2.0.0"} + org.clojure/data.zip {:mvn/version "1.0.0"} + clojure-csv/clojure-csv {:mvn/version "2.0.2"} + org.clojure/math.combinatorics {:mvn/version "0.1.6"} + doric/doric {:mvn/version "0.9.0"} + henryw374/cljc.java-time + {:git/url "https://github.com/henryw374/cljc.java-time.git" + :sha "e3d184b78e933322b3fcaa6ca66cbb8f42a6b35c"} + camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"} + aero/aero {:mvn/version "1.1.6"} + org.clojure/data.generators {:mvn/version "1.0.0"} + honeysql/honeysql {:mvn/version "1.0.461"} + com.github.seancorfield/honeysql {:mvn/version "2.2.840"} + minimallist/minimallist {:mvn/version "0.0.10"} + circleci/bond {:mvn/version "0.6.0"} + version-clj/version-clj {:mvn/version "2.0.2"} + gaka/gaka {:mvn/version "0.3.0"} + failjure/failjure {:mvn/version "2.2.0"} + io.helins/binf {:mvn/version "1.1.0-beta0"} + rm-hull/jasentaa {:mvn/version "0.2.5"} + slingshot/slingshot {:mvn/version "0.12.2"} + io.replikativ/hasch {:mvn/version "0.3.7"} + com.grammarly/omniconf {:mvn/version "0.4.3"} + crispin/crispin {:mvn/version "0.3.8"} + org.clojure/data.json {:mvn/version "2.4.0"} + clj-commons/multigrep {:mvn/version "0.5.0"} + amperity/vault-clj {:mvn/version "1.0.4"} + java-http-clj/java-http-clj {:mvn/version "0.4.3"} + com.stuartsierra/component {:mvn/version "1.0.0"} + org.clojars.askonomm/ruuter {:mvn/version "1.2.2"} + org.clj-commons/digest {:mvn/version "1.4.100"} + hato/hato {:mvn/version "0.8.2"} + better-cond/better-cond {:mvn/version "2.1.1"} + org.clojure/core.specs.alpha {:mvn/version "0.2.62"} + reifyhealth/specmonstah {:git/url "https://github.com/reifyhealth/specmonstah", :sha "a2b357009a3aa99a0c2d2361f3bbcd0b0e36505e"} + exoscale/coax {:mvn/version "1.0.0-alpha14"} + orchestra/orchestra {:mvn/version "2021.01.01-1"} + expound/expound {:mvn/version "0.8.10"} + integrant/integrant {:mvn/version "0.8.0"} + com.stuartsierra/dependency {:mvn/version "1.0.0"} + listora/again {:mvn/version "1.0.0"} + org.clojure/tools.gitlibs {:mvn/version "2.4.172"} + environ/environ {:mvn/version "1.2.0"} + table/table {:git/url "https://github.com/cldwalker/table", :sha "f6293c5f3dac1dd6f525a80fc80930f8ccdf16b7"} + markdown-clj/markdown-clj {:mvn/version "1.10.8"} + org.clojure/tools.namespace {:git/sha "daf82a10e70182aea4c0716a48f3922163441b32", + :git/url "https://github.com/clojure/tools.namespace"} + medley/medley {:mvn/version "1.3.0"} + io.github.cognitect-labs/test-runner {:git/url "https://github.com/cognitect-labs/test-runner", + :git/sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"} + borkdude/missing.test.assertions {:git/url "https://github.com/borkdude/missing.test.assertions", :sha "603cb01bee72fb17addacc53c34c85612684ad70"} + dev.nubank/docopt {:mvn/version "0.6.1-fix7"} + testdoc/testdoc {:mvn/version "1.4.1"} + org.clojars.lispyclouds/contajners {:mvn/version "0.0.6"} + borkdude/rewrite-edn {:mvn/version "0.1.0"} + clojure-term-colors/clojure-term-colors {:mvn/version "0.1.0"} + io.aviso/pretty {:mvn/version "1.1.1"} + progrock/progrock {:mvn/version "0.1.2"} + djblue/portal {:mvn/version "0.19.0"} + com.wsscode/cljc-misc {:mvn/version "2021.10.16"} + edn-query-language/eql {:mvn/version "2021.07.18"} + meta-merge/meta-merge {:mvn/version "1.0.0"} + com.exoscale/lingo {:mvn/version "1.0.0-alpha14"} + io.github.swirrl/dogstatsd {:mvn/version "0.1.39"} + org.clojure/algo.monads {:mvn/version "0.1.6"} + io.lambdaforge/datalog-parser {:mvn/version "0.1.9"} + clj-stacktrace/clj-stacktrace {:mvn/version "0.2.8"} + clojure-msgpack/clojure-msgpack {:mvn/version "1.2.1"} + cli-matic/cli-matic {:git/url "https://github.com/l3nz/cli-matic.git", :git/sha "9cd53ba7336363e3d06650dbad413b6f8b06e471"} + aysylu/loom {:mvn/version "1.0.2"} + com.layerware/hugsql-core {:mvn/version "0.5.3"} + com.github.seancorfield/expectations {:mvn/version "2.0.157"} + com.rpl/specter {:mvn/version "1.1.4"} + com.github.askonomm/clarktown {:mvn/version "1.1.2"} + org.clojure/math.numeric-tower {:git/tag "math.numeric-tower-0.0.5", :git/sha "12eb9c5", :git/url "https://github.com/clojure/math.numeric-tower"} + prismatic/schema {:git/url "https://github.com/plumatic/schema" + :git/sha "6846dc7c3a9df5bfd718f68f183c683ce0f621ff" + :git/tag "schema-1.3.0"} + metosin/malli {:git/url "https://github.com/metosin/malli" + :git/sha "588147ef49b2e41c7d12a8aa994b39c1c6fedd99" + :git/tag "0.8.9"} + meander/epsilon {:git/url "https://github.com/noprompt/meander" + :git/sha "55f5ce70e6ef717e95c58260f6bc725d70c0cb6d"} + cc.qbits/auspex {:git/url "https://github.com/mpenet/auspex" + :git/sha "1a9d7427e60e1a434a764aa820d1c53f7e22504a" + :deps/manifest :deps} + exoscale/interceptor {:git/url "https://github.com/exoscale/interceptor" + :git/sha "ca115fe00a0abf3a2f78452ab309c3aa4c00fc4e" + :deps/manifest :deps} + lambdaisland/uri {:git/url "https://github.com/lambdaisland/uri" + :git/sha "ac4f1f9c8e4f45a088db1c6383ce2191c973987c" + :deps/manifest :deps} + clj-commons/fs {:mvn/version "1.6.310"} + postmortem/postmortem {:git/url "https://github.com/athos/Postmortem" + :git/sha "1a29775a3d286f9f6fe3f979c78b6e2bf298d5ba"} + com.github.rawleyfowler/sluj {:git/url "https://github.com/rawleyfowler/sluj" + :git/sha "4a92e772b4e07bf127423448d4140748b5782198" + :deps/manifest :deps} + net.cgrand/xforms {:git/url "https://github.com/cgrand/xforms" + :git/sha "550dbc150a79c6ecc148d8a7e260e10bc36321c6" + :deps/manifest :deps}} + :classpath-overrides {org.clojure/clojure nil + org.clojure/spec.alpha nil}} + :clj-nvd + {:extra-deps {clj-nvd/clj-nvd {:git/url "https://github.com/miikka/clj-nvd.git" + :sha "f2ec98699e057a379baf170cb49cf7ad76874a70"}} + :main-opts ["-m" "clj-nvd.core"]} + :test + {:extra-paths ["test"] + :extra-deps {io.github.cognitect-labs/test-runner + {:git/tag "v0.5.0" :git/sha "b3fd0d2"} + nubank/matcher-combinators {:mvn/version "3.6.0"}} + :main-opts ["-m" "cognitect.test-runner"] + :exec-fn cognitect.test-runner.api/test} + :test-pod + {:extra-paths ["test-resources"] + :main-opts ["-m" "babashka.main" "test-resources/pod.clj"]}}} diff --git a/test/resources/input/project.clj b/test/resources/input/project.clj index 65106e6..52f6afe 100644 --- a/test/resources/input/project.clj +++ b/test/resources/input/project.clj @@ -1,4 +1,51 @@ -(defproject input-config "0.0.0" - :dependencies [[reagent "1.2.0"] - [emotion-cljs "0.1.0"] - [metosin/malli "0.10.0"]]) +(defproject clj-http "3.12.4-SNAPSHOT" + :description "A Clojure HTTP library wrapping the Apache HttpComponents client." + :url "https://github.com/dakrone/clj-http/" + :license {:name "The MIT License" + :url "http://opensource.org/licenses/mit-license.php" + :distribution :repo} + :global-vars {*warn-on-reflection* false} + :min-lein-version "2.0.0" + :exclusions [org.clojure/clojure] + :dependencies [[org.apache.httpcomponents/httpcore "4.4.14"] + [org.apache.httpcomponents/httpclient "4.5.13"] + [org.apache.httpcomponents/httpclient-cache "4.5.13"] + [org.apache.httpcomponents/httpasyncclient "4.1.4"] + [org.apache.httpcomponents/httpmime "4.5.13"] + [commons-codec "1.15"] + [commons-io "2.8.0"] + [slingshot "0.12.2"] + [potemkin "0.4.5"]] + :resource-paths ["resources"] + :profiles {:dev {:dependencies [;; optional deps + [cheshire "5.10.0"] + [crouton "0.1.2" :exclusions [[org.jsoup/jsoup]]] + [org.jsoup/jsoup "1.13.1"] + [org.clojure/tools.reader "1.3.5"] + [com.cognitect/transit-clj "1.0.324"] + [ring/ring-codec "1.1.3"] + ;; other (testing) deps + [org.clojure/clojure "1.10.3"] + [org.clojure/tools.logging "1.1.0"] + [ring/ring-jetty-adapter "1.9.3"] + [ring/ring-devel "1.9.3"] + ;; caching example deps + [org.clojure/core.cache "1.0.207"] + ;; logging + [org.apache.logging.log4j/log4j-api "2.17.1"] + [org.apache.logging.log4j/log4j-core "2.17.1"] + [org.apache.logging.log4j/log4j-1.2-api "2.17.1"]] + :plugins [[lein-ancient "0.7.0"] + [jonase/eastwood "0.2.5"] + [lein-kibit "0.1.5"] + [lein-nvd "0.5.2"]]} + :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} + :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]} + :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} + :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} + :1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}} + :aliases {"all" ["with-profile" "dev,1.6:dev,1.7:dev,1.8:dev,1.9:dev,1.10:dev"]} + :plugins [[codox "0.6.4"]] + :test-selectors {:default #(not (:integration %)) + :integration :integration + :all (constantly true)}) diff --git a/test/resources/input/shadow-cljs.edn b/test/resources/input/shadow-cljs.edn index f53fece..da63506 100644 --- a/test/resources/input/shadow-cljs.edn +++ b/test/resources/input/shadow-cljs.edn @@ -1,16 +1,50 @@ -{:dependencies {reagent/reagent {:mvn/version "1.2.0"} - emotion-cljs/emotion-cljs {:mvn/version "0.1.0"} - metosin/malli {:mvn/version "0.10.0"}} - :dev-http {8080 "public"}, +{:source-paths ["src" "repl-tooling/src" "repl-tooling/test" + "repl-tooling/resources"] + + :dependencies [[check "0.2.0-SNAPSHOT"] + [com.cognitect/transit-cljs "0.8.264"] + [funcool/promesa "6.0.0"] + [paprika "0.1.3-SNAPSHOT"] + [borkdude/sci "0.1.1-alpha.7"] + [compliment "0.4.0-SNAPSHOT"] + [reagent "0.10.0"] + [devcards "0.2.5"] + [org.rksm/suitable "0.3.2"] + [cider/orchard "0.5.8"] + [com.wsscode/pathom "2.3.1"] + [org.pinkgorilla/gorilla-renderable-ui "0.1.33"] + [link.szabo.mauricio/duck-repled "0.1.1-SNAPSHOT"]] + + :jvm-opts ["-Xmx800M"] :builds - {:app - {:target :browser, - :output-dir "public" - :release {:compiler-options {:optimizations :advanced}} - :devtools {:reload-strategy :full}, - :modules {:main {:entries [app.core]}}} - :unit-tests - {:target :node-test - :output-to "out/unit-tests.js" - :ns-regexp "-unit-test$" - :autorun true}}} + {:dev {:target :node-library + :js-options {:js-provider :shadow + :keep-native-requires true + :keep-as-require #{"atom"}} + + :dev {:closure-defines {chlorine.aux/TESTS true + com.wsscode.pathom.misc.INCLUDE_SPECS false}} + :compiler-options {:warnings {:fn-deprecated false} + :external-config + {:devtools/config + {:features-to-install [:formatters :hints] + :fn-symbol "F" + :print-config-overrides true}}} + :exports {:config chlorine.core/config + :commands chlorine.core/commands + :aux chlorine.core/aux + :repl chlorine.repl/exports + + :everything-provider + chlorine.providers-consumers.everything/activate + + :autocomplete-provider + chlorine.providers-consumers.autocomplete/provider + + :status-bar-consumer + chlorine.providers-consumers.status-bar/activate} + + :output-dir "lib/js" + :output-to "lib/cmds.js" + :devtools {:before-load-async chlorine.core/before + :after-load chlorine.core/after}}}} diff --git a/test/resources/snapshots/add-multiple/bb.edn b/test/resources/snapshots/add-multiple/bb.edn new file mode 100644 index 0000000..b0a2cd4 --- /dev/null +++ b/test/resources/snapshots/add-multiple/bb.edn @@ -0,0 +1,19 @@ +{:deps + {reagent/reagent {:mvn/version "1.2.0"}, + metosin/malli {:mvn/version "0.10.0"}, + lambdaisland/kaocha {:local/root "."}, + lambdaisland/open-source + {:git/url "https://github.com/lambdaisland/open-source", + :git/sha "4d6019ed2805f701c0d626732c5a886542e3b83b"}, + + org.clojure/java.jdbc {:mvn/version "0.7.12"}}, + + :tasks + {test:bb + {:extra-deps {nubank/matcher-combinators {:mvn/version "3.8.5"}}, + :extra-paths ["test/bb"], + :requires ([kaocha.runner]), + :task + (apply kaocha.runner/-main + "bb" "--config-file" + "bb-tests.edn" *command-line-args*)}}} \ No newline at end of file diff --git a/test/resources/snapshots/add-multiple/deps.edn b/test/resources/snapshots/add-multiple/deps.edn new file mode 100644 index 0000000..6691695 --- /dev/null +++ b/test/resources/snapshots/add-multiple/deps.edn @@ -0,0 +1,234 @@ +{:paths + ["src" "feature-xml" "feature-yaml" "feature-csv" "feature-transit" + "feature-java-time" "feature-java-nio" "feature-httpkit-client" + "feature-httpkit-server" "feature-lanterna" "feature-core-match" + "feature-hiccup" "feature-test-check" "feature-spec-alpha" "feature-selmer" + "feature-logging" "feature-priority-map" "feature-rrb-vector" "feature-jdbc" + "pods/src" "babashka.nrepl/src" "depstar/src" "process/src" "deps.clj/src" + "deps.clj/resources" "resources" "sci/resources" "impl-java/src"], + + :deps + {selmer/selmer {:mvn/version "1.12.50"}, + org.clojure/clojure {:mvn/version "1.11.1"}, + org.clojure/tools.logging {:mvn/version "1.1.0"}, + insn/insn {:mvn/version "0.5.2"}, + org.clojure/tools.cli {:mvn/version "1.0.214"}, + borkdude/graal.locking {:mvn/version "0.0.2"}, + rewrite-clj/rewrite-clj {:mvn/version "1.1.46"}, + babashka/babashka.core {:local/root "babashka.core"}, + org.flatland/ordered {:mvn/version "1.5.9"}, + org.postgresql/postgresql {:mvn/version "42.2.18"}, + babashka/clojure-lanterna {:mvn/version "0.9.8-SNAPSHOT"}, + org.babashka/babashka.impl.java {:mvn/version "0.1.8"}, + hiccup/hiccup {:mvn/version "2.0.0-RC1"}, + org.babashka/cli {:mvn/version "0.7.51"}, + seancorfield/next.jdbc {:mvn/version "1.1.610"}, + org.clojure/data.xml {:mvn/version "0.2.0-alpha8"}, + reagent/reagent {:mvn/version "1.2.0"}, + org.clojure/data.csv {:mvn/version "1.0.0"}, + com.taoensso/timbre {:mvn/version "6.0.1"}, + com.cognitect/transit-clj {:mvn/version "1.0.333"}, + org.clojure/java.jdbc {:mvn/version "0.7.12"}, + babashka/babashka.curl {:local/root "babashka.curl"}, + clj-commons/clj-yaml {:mvn/version "1.0.26"}, + org.clojure/core.rrb-vector {:mvn/version "0.1.2"}, + org.babashka/sci.impl.types {:mvn/version "0.0.2"}, + cheshire/cheshire {:mvn/version "5.11.0"}, + org.clojure/core.match {:mvn/version "1.0.0"}, + org.babashka/sci {:local/root "sci"}, + datascript/datascript {:mvn/version "1.0.1"}, + org.babashka/http-client {:mvn/version "0.3.11"}, + org.hsqldb/hsqldb {:mvn/version "2.5.1"}, + org.clojure/test.check {:mvn/version "1.1.1"}, + babashka/fs {:local/root "fs"}, + org.clojure/data.priority-map {:mvn/version "1.1.0"}, + nrepl/bencode {:mvn/version "1.1.0"}, + org.clojure/core.async {:mvn/version "1.6.673"}, + http-kit/http-kit {:mvn/version "2.7.0-RC1"}}, + + :aliases + {:babashka/dev {:main-opts ["-m" "babashka.main"]}, + :profile + {:extra-deps + {com.clojure-goes-fast/clj-async-profiler {:mvn/version "0.5.0"}}, + + :extra-paths ["test"], + :jvm-opts + ["-Djdk.attach.allowAttachSelf" "-Dclojure.compiler.direct-linking=true"], + + :main-opts ["-m" "babashka.profile"]}, + + :lib-tests + {:extra-paths ["process/src" "process/test" "test-resources/lib_tests"], + :extra-deps + {org.clj-commons/clj-http-lite {:mvn/version "0.4.392"}, + #_#_org.babashka/spec.alpha + {:git/url "https://github.com/babashka/spec.alpha", + :sha "0dec1f88cbde74a0470b454396f09a03adb4ae39"}, + lambdaisland/regal {:mvn/version "0.0.143"}, + cprop/cprop {:mvn/version "0.1.16"}, + comb/comb {:mvn/version "0.1.1"}, + mvxcvi/arrangement {:mvn/version "2.0.0"}, + org.clojure/data.zip {:mvn/version "1.0.0"}, + clojure-csv/clojure-csv {:mvn/version "2.0.2"}, + org.clojure/math.combinatorics {:mvn/version "0.1.6"}, + doric/doric {:mvn/version "0.9.0"}, + henryw374/cljc.java-time + {:git/url "https://github.com/henryw374/cljc.java-time.git", + :sha "e3d184b78e933322b3fcaa6ca66cbb8f42a6b35c"}, + + camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"}, + aero/aero {:mvn/version "1.1.6"}, + org.clojure/data.generators {:mvn/version "1.0.0"}, + honeysql/honeysql {:mvn/version "1.0.461"}, + com.github.seancorfield/honeysql {:mvn/version "2.2.840"}, + minimallist/minimallist {:mvn/version "0.0.10"}, + circleci/bond {:mvn/version "0.6.0"}, + version-clj/version-clj {:mvn/version "2.0.2"}, + gaka/gaka {:mvn/version "0.3.0"}, + failjure/failjure {:mvn/version "2.2.0"}, + io.helins/binf {:mvn/version "1.1.0-beta0"}, + rm-hull/jasentaa {:mvn/version "0.2.5"}, + slingshot/slingshot {:mvn/version "0.12.2"}, + io.replikativ/hasch {:mvn/version "0.3.7"}, + com.grammarly/omniconf {:mvn/version "0.4.3"}, + crispin/crispin {:mvn/version "0.3.8"}, + org.clojure/data.json {:mvn/version "2.4.0"}, + clj-commons/multigrep {:mvn/version "0.5.0"}, + amperity/vault-clj {:mvn/version "1.0.4"}, + java-http-clj/java-http-clj {:mvn/version "0.4.3"}, + com.stuartsierra/component {:mvn/version "1.0.0"}, + org.clojars.askonomm/ruuter {:mvn/version "1.2.2"}, + org.clj-commons/digest {:mvn/version "1.4.100"}, + hato/hato {:mvn/version "0.8.2"}, + better-cond/better-cond {:mvn/version "2.1.1"}, + org.clojure/core.specs.alpha {:mvn/version "0.2.62"}, + reifyhealth/specmonstah + {:git/url "https://github.com/reifyhealth/specmonstah", + :sha "a2b357009a3aa99a0c2d2361f3bbcd0b0e36505e"}, + + exoscale/coax {:mvn/version "1.0.0-alpha14"}, + orchestra/orchestra {:mvn/version "2021.01.01-1"}, + expound/expound {:mvn/version "0.8.10"}, + integrant/integrant {:mvn/version "0.8.0"}, + com.stuartsierra/dependency {:mvn/version "1.0.0"}, + listora/again {:mvn/version "1.0.0"}, + org.clojure/tools.gitlibs {:mvn/version "2.4.172"}, + environ/environ {:mvn/version "1.2.0"}, + table/table + {:git/url "https://github.com/cldwalker/table", + :sha "f6293c5f3dac1dd6f525a80fc80930f8ccdf16b7"}, + + markdown-clj/markdown-clj {:mvn/version "1.10.8"}, + org.clojure/tools.namespace + {:git/sha "daf82a10e70182aea4c0716a48f3922163441b32", + :git/url "https://github.com/clojure/tools.namespace"}, + + medley/medley {:mvn/version "1.3.0"}, + io.github.cognitect-labs/test-runner + {:git/url "https://github.com/cognitect-labs/test-runner", + :git/sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"}, + + borkdude/missing.test.assertions + {:git/url "https://github.com/borkdude/missing.test.assertions", + :sha "603cb01bee72fb17addacc53c34c85612684ad70"}, + + dev.nubank/docopt {:mvn/version "0.6.1-fix7"}, + testdoc/testdoc {:mvn/version "1.4.1"}, + org.clojars.lispyclouds/contajners {:mvn/version "0.0.6"}, + borkdude/rewrite-edn {:mvn/version "0.1.0"}, + clojure-term-colors/clojure-term-colors {:mvn/version "0.1.0"}, + io.aviso/pretty {:mvn/version "1.1.1"}, + progrock/progrock {:mvn/version "0.1.2"}, + djblue/portal {:mvn/version "0.19.0"}, + com.wsscode/cljc-misc {:mvn/version "2021.10.16"}, + edn-query-language/eql {:mvn/version "2021.07.18"}, + meta-merge/meta-merge {:mvn/version "1.0.0"}, + com.exoscale/lingo {:mvn/version "1.0.0-alpha14"}, + io.github.swirrl/dogstatsd {:mvn/version "0.1.39"}, + org.clojure/algo.monads {:mvn/version "0.1.6"}, + io.lambdaforge/datalog-parser {:mvn/version "0.1.9"}, + clj-stacktrace/clj-stacktrace {:mvn/version "0.2.8"}, + clojure-msgpack/clojure-msgpack {:mvn/version "1.2.1"}, + cli-matic/cli-matic + {:git/url "https://github.com/l3nz/cli-matic.git", + :git/sha "9cd53ba7336363e3d06650dbad413b6f8b06e471"}, + + aysylu/loom {:mvn/version "1.0.2"}, + com.layerware/hugsql-core {:mvn/version "0.5.3"}, + com.github.seancorfield/expectations {:mvn/version "2.0.157"}, + com.rpl/specter {:mvn/version "1.1.4"}, + com.github.askonomm/clarktown {:mvn/version "1.1.2"}, + org.clojure/math.numeric-tower + {:git/tag "math.numeric-tower-0.0.5", + :git/sha "12eb9c5", + :git/url "https://github.com/clojure/math.numeric-tower"}, + + prismatic/schema + {:git/url "https://github.com/plumatic/schema", + :git/sha "6846dc7c3a9df5bfd718f68f183c683ce0f621ff", + :git/tag "schema-1.3.0"}, + + metosin/malli + {:git/url "https://github.com/metosin/malli", + :git/sha "588147ef49b2e41c7d12a8aa994b39c1c6fedd99", + :git/tag "0.8.9"}, + + meander/epsilon + {:git/url "https://github.com/noprompt/meander", + :git/sha "55f5ce70e6ef717e95c58260f6bc725d70c0cb6d"}, + + cc.qbits/auspex + {:git/url "https://github.com/mpenet/auspex", + :git/sha "1a9d7427e60e1a434a764aa820d1c53f7e22504a", + :deps/manifest :deps}, + + exoscale/interceptor + {:git/url "https://github.com/exoscale/interceptor", + :git/sha "ca115fe00a0abf3a2f78452ab309c3aa4c00fc4e", + :deps/manifest :deps}, + + lambdaisland/uri + {:git/url "https://github.com/lambdaisland/uri", + :git/sha "ac4f1f9c8e4f45a088db1c6383ce2191c973987c", + :deps/manifest :deps}, + + clj-commons/fs {:mvn/version "1.6.310"}, + postmortem/postmortem + {:git/url "https://github.com/athos/Postmortem", + :git/sha "1a29775a3d286f9f6fe3f979c78b6e2bf298d5ba"}, + + com.github.rawleyfowler/sluj + {:git/url "https://github.com/rawleyfowler/sluj", + :git/sha "4a92e772b4e07bf127423448d4140748b5782198", + :deps/manifest :deps}, + + net.cgrand/xforms + {:git/url "https://github.com/cgrand/xforms", + :git/sha "550dbc150a79c6ecc148d8a7e260e10bc36321c6", + :deps/manifest :deps}}, + + :classpath-overrides {org.clojure/clojure nil, org.clojure/spec.alpha nil}}, + + :clj-nvd + {:extra-deps + {clj-nvd/clj-nvd + {:git/url "https://github.com/miikka/clj-nvd.git", + :sha "f2ec98699e057a379baf170cb49cf7ad76874a70"}}, + + :main-opts ["-m" "clj-nvd.core"]}, + + :test + {:extra-paths ["test"], + :extra-deps + {io.github.cognitect-labs/test-runner + {:git/tag "v0.5.0", :git/sha "b3fd0d2"}, + + nubank/matcher-combinators {:mvn/version "3.6.0"}}, + + :main-opts ["-m" "cognitect.test-runner"], + :exec-fn cognitect.test-runner.api/test}, + + :test-pod + {:extra-paths ["test-resources"], + :main-opts ["-m" "babashka.main" "test-resources/pod.clj"]}}} \ No newline at end of file diff --git a/test/resources/snapshots/add-multiple/project.clj b/test/resources/snapshots/add-multiple/project.clj new file mode 100644 index 0000000..fa56cd9 --- /dev/null +++ b/test/resources/snapshots/add-multiple/project.clj @@ -0,0 +1,53 @@ +(defproject clj-http "3.12.4-SNAPSHOT" + :description "A Clojure HTTP library wrapping the Apache HttpComponents client." + :url "https://github.com/dakrone/clj-http/" + :license {:name "The MIT License" + :url "http://opensource.org/licenses/mit-license.php" + :distribution :repo} + :global-vars {*warn-on-reflection* false} + :min-lein-version "2.0.0" + :exclusions [org.clojure/clojure] + :dependencies [[org.apache.httpcomponents/httpcore "4.4.14"] + [org.apache.httpcomponents/httpclient "4.5.13"] + [org.apache.httpcomponents/httpclient-cache "4.5.13"] + [org.apache.httpcomponents/httpasyncclient "4.1.4"] + [org.apache.httpcomponents/httpmime "4.5.13"] + [commons-codec "1.15"] + [commons-io "2.8.0"] + [slingshot "0.12.2"] + [potemkin "0.4.5"] + [reagent "1.2.0"] + [org.clojure/java.jdbc "0.7.12"]] + :resource-paths ["resources"] + :profiles {:dev {:dependencies [;; optional deps + [cheshire "5.10.0"] + [crouton "0.1.2" :exclusions [[org.jsoup/jsoup]]] + [org.jsoup/jsoup "1.13.1"] + [org.clojure/tools.reader "1.3.5"] + [com.cognitect/transit-clj "1.0.324"] + [ring/ring-codec "1.1.3"] + ;; other (testing) deps + [org.clojure/clojure "1.10.3"] + [org.clojure/tools.logging "1.1.0"] + [ring/ring-jetty-adapter "1.9.3"] + [ring/ring-devel "1.9.3"] + ;; caching example deps + [org.clojure/core.cache "1.0.207"] + ;; logging + [org.apache.logging.log4j/log4j-api "2.17.1"] + [org.apache.logging.log4j/log4j-core "2.17.1"] + [org.apache.logging.log4j/log4j-1.2-api "2.17.1"]] + :plugins [[lein-ancient "0.7.0"] + [jonase/eastwood "0.2.5"] + [lein-kibit "0.1.5"] + [lein-nvd "0.5.2"]]} + :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} + :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]} + :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} + :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} + :1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}} + :aliases {"all" ["with-profile" "dev,1.6:dev,1.7:dev,1.8:dev,1.9:dev,1.10:dev"]} + :plugins [[codox "0.6.4"]] + :test-selectors {:default #(not (:integration %)) + :integration :integration + :all (constantly true)}) \ No newline at end of file diff --git a/test/resources/snapshots/add-multiple/shadow-cljs.edn b/test/resources/snapshots/add-multiple/shadow-cljs.edn new file mode 100644 index 0000000..3c33d90 --- /dev/null +++ b/test/resources/snapshots/add-multiple/shadow-cljs.edn @@ -0,0 +1,52 @@ +{:source-paths ["src" "repl-tooling/src" "repl-tooling/test" + "repl-tooling/resources"] + + :dependencies [[check "0.2.0-SNAPSHOT"] + [com.cognitect/transit-cljs "0.8.264"] + [funcool/promesa "6.0.0"] + [paprika "0.1.3-SNAPSHOT"] + [borkdude/sci "0.1.1-alpha.7"] + [compliment "0.4.0-SNAPSHOT"] + [reagent "0.10.0"] + [devcards "0.2.5"] + [org.rksm/suitable "0.3.2"] + [cider/orchard "0.5.8"] + [com.wsscode/pathom "2.3.1"] + [org.pinkgorilla/gorilla-renderable-ui "0.1.33"] + [link.szabo.mauricio/duck-repled "0.1.1-SNAPSHOT"] + [reagent "1.2.0"] + [org.clojure/java.jdbc "0.7.12"]] + + :jvm-opts ["-Xmx800M"] + :builds + {:dev {:target :node-library + :js-options {:js-provider :shadow + :keep-native-requires true + :keep-as-require #{"atom"}} + + :dev {:closure-defines {chlorine.aux/TESTS true + com.wsscode.pathom.misc.INCLUDE_SPECS false}} + :compiler-options {:warnings {:fn-deprecated false} + :external-config + {:devtools/config + {:features-to-install [:formatters :hints] + :fn-symbol "F" + :print-config-overrides true}}} + :exports {:config chlorine.core/config + :commands chlorine.core/commands + :aux chlorine.core/aux + :repl chlorine.repl/exports + + :everything-provider + chlorine.providers-consumers.everything/activate + + :autocomplete-provider + chlorine.providers-consumers.autocomplete/provider + + :status-bar-consumer + chlorine.providers-consumers.status-bar/activate} + + :output-dir "lib/js" + :output-to "lib/cmds.js" + :devtools {:before-load-async chlorine.core/before + :after-load chlorine.core/after}}}} \ No newline at end of file diff --git a/test/resources/snapshots/add-reagent-1.2.0/bb.edn b/test/resources/snapshots/add-reagent-1.2.0/bb.edn new file mode 100644 index 0000000..76e4aa1 --- /dev/null +++ b/test/resources/snapshots/add-reagent-1.2.0/bb.edn @@ -0,0 +1,17 @@ +{:deps + {reagent/reagent {:mvn/version "1.2.0"}, + metosin/malli {:mvn/version "0.10.0"}, + lambdaisland/kaocha {:local/root "."}, + lambdaisland/open-source + {:git/url "https://github.com/lambdaisland/open-source", + :git/sha "4d6019ed2805f701c0d626732c5a886542e3b83b"}}, + + :tasks + {test:bb + {:extra-deps {nubank/matcher-combinators {:mvn/version "3.8.5"}}, + :extra-paths ["test/bb"], + :requires ([kaocha.runner]), + :task + (apply kaocha.runner/-main + "bb" "--config-file" + "bb-tests.edn" *command-line-args*)}}} \ No newline at end of file diff --git a/test/resources/snapshots/add-reagent-1.2.0/deps.edn b/test/resources/snapshots/add-reagent-1.2.0/deps.edn new file mode 100644 index 0000000..0a3fdc7 --- /dev/null +++ b/test/resources/snapshots/add-reagent-1.2.0/deps.edn @@ -0,0 +1,233 @@ +{:paths + ["src" "feature-xml" "feature-yaml" "feature-csv" "feature-transit" + "feature-java-time" "feature-java-nio" "feature-httpkit-client" + "feature-httpkit-server" "feature-lanterna" "feature-core-match" + "feature-hiccup" "feature-test-check" "feature-spec-alpha" "feature-selmer" + "feature-logging" "feature-priority-map" "feature-rrb-vector" "feature-jdbc" + "pods/src" "babashka.nrepl/src" "depstar/src" "process/src" "deps.clj/src" + "deps.clj/resources" "resources" "sci/resources" "impl-java/src"], + + :deps + {selmer/selmer {:mvn/version "1.12.50"}, + org.clojure/clojure {:mvn/version "1.11.1"}, + org.clojure/tools.logging {:mvn/version "1.1.0"}, + insn/insn {:mvn/version "0.5.2"}, + org.clojure/tools.cli {:mvn/version "1.0.214"}, + borkdude/graal.locking {:mvn/version "0.0.2"}, + rewrite-clj/rewrite-clj {:mvn/version "1.1.46"}, + babashka/babashka.core {:local/root "babashka.core"}, + org.flatland/ordered {:mvn/version "1.5.9"}, + org.postgresql/postgresql {:mvn/version "42.2.18"}, + babashka/clojure-lanterna {:mvn/version "0.9.8-SNAPSHOT"}, + org.babashka/babashka.impl.java {:mvn/version "0.1.8"}, + hiccup/hiccup {:mvn/version "2.0.0-RC1"}, + org.babashka/cli {:mvn/version "0.7.51"}, + seancorfield/next.jdbc {:mvn/version "1.1.610"}, + org.clojure/data.xml {:mvn/version "0.2.0-alpha8"}, + reagent/reagent {:mvn/version "1.2.0"}, + org.clojure/data.csv {:mvn/version "1.0.0"}, + com.taoensso/timbre {:mvn/version "6.0.1"}, + com.cognitect/transit-clj {:mvn/version "1.0.333"}, + babashka/babashka.curl {:local/root "babashka.curl"}, + clj-commons/clj-yaml {:mvn/version "1.0.26"}, + org.clojure/core.rrb-vector {:mvn/version "0.1.2"}, + org.babashka/sci.impl.types {:mvn/version "0.0.2"}, + cheshire/cheshire {:mvn/version "5.11.0"}, + org.clojure/core.match {:mvn/version "1.0.0"}, + org.babashka/sci {:local/root "sci"}, + datascript/datascript {:mvn/version "1.0.1"}, + org.babashka/http-client {:mvn/version "0.3.11"}, + org.hsqldb/hsqldb {:mvn/version "2.5.1"}, + org.clojure/test.check {:mvn/version "1.1.1"}, + babashka/fs {:local/root "fs"}, + org.clojure/data.priority-map {:mvn/version "1.1.0"}, + nrepl/bencode {:mvn/version "1.1.0"}, + org.clojure/core.async {:mvn/version "1.6.673"}, + http-kit/http-kit {:mvn/version "2.7.0-RC1"}}, + + :aliases + {:babashka/dev {:main-opts ["-m" "babashka.main"]}, + :profile + {:extra-deps + {com.clojure-goes-fast/clj-async-profiler {:mvn/version "0.5.0"}}, + + :extra-paths ["test"], + :jvm-opts + ["-Djdk.attach.allowAttachSelf" "-Dclojure.compiler.direct-linking=true"], + + :main-opts ["-m" "babashka.profile"]}, + + :lib-tests + {:extra-paths ["process/src" "process/test" "test-resources/lib_tests"], + :extra-deps + {org.clj-commons/clj-http-lite {:mvn/version "0.4.392"}, + #_#_org.babashka/spec.alpha + {:git/url "https://github.com/babashka/spec.alpha", + :sha "0dec1f88cbde74a0470b454396f09a03adb4ae39"}, + lambdaisland/regal {:mvn/version "0.0.143"}, + cprop/cprop {:mvn/version "0.1.16"}, + comb/comb {:mvn/version "0.1.1"}, + mvxcvi/arrangement {:mvn/version "2.0.0"}, + org.clojure/data.zip {:mvn/version "1.0.0"}, + clojure-csv/clojure-csv {:mvn/version "2.0.2"}, + org.clojure/math.combinatorics {:mvn/version "0.1.6"}, + doric/doric {:mvn/version "0.9.0"}, + henryw374/cljc.java-time + {:git/url "https://github.com/henryw374/cljc.java-time.git", + :sha "e3d184b78e933322b3fcaa6ca66cbb8f42a6b35c"}, + + camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"}, + aero/aero {:mvn/version "1.1.6"}, + org.clojure/data.generators {:mvn/version "1.0.0"}, + honeysql/honeysql {:mvn/version "1.0.461"}, + com.github.seancorfield/honeysql {:mvn/version "2.2.840"}, + minimallist/minimallist {:mvn/version "0.0.10"}, + circleci/bond {:mvn/version "0.6.0"}, + version-clj/version-clj {:mvn/version "2.0.2"}, + gaka/gaka {:mvn/version "0.3.0"}, + failjure/failjure {:mvn/version "2.2.0"}, + io.helins/binf {:mvn/version "1.1.0-beta0"}, + rm-hull/jasentaa {:mvn/version "0.2.5"}, + slingshot/slingshot {:mvn/version "0.12.2"}, + io.replikativ/hasch {:mvn/version "0.3.7"}, + com.grammarly/omniconf {:mvn/version "0.4.3"}, + crispin/crispin {:mvn/version "0.3.8"}, + org.clojure/data.json {:mvn/version "2.4.0"}, + clj-commons/multigrep {:mvn/version "0.5.0"}, + amperity/vault-clj {:mvn/version "1.0.4"}, + java-http-clj/java-http-clj {:mvn/version "0.4.3"}, + com.stuartsierra/component {:mvn/version "1.0.0"}, + org.clojars.askonomm/ruuter {:mvn/version "1.2.2"}, + org.clj-commons/digest {:mvn/version "1.4.100"}, + hato/hato {:mvn/version "0.8.2"}, + better-cond/better-cond {:mvn/version "2.1.1"}, + org.clojure/core.specs.alpha {:mvn/version "0.2.62"}, + reifyhealth/specmonstah + {:git/url "https://github.com/reifyhealth/specmonstah", + :sha "a2b357009a3aa99a0c2d2361f3bbcd0b0e36505e"}, + + exoscale/coax {:mvn/version "1.0.0-alpha14"}, + orchestra/orchestra {:mvn/version "2021.01.01-1"}, + expound/expound {:mvn/version "0.8.10"}, + integrant/integrant {:mvn/version "0.8.0"}, + com.stuartsierra/dependency {:mvn/version "1.0.0"}, + listora/again {:mvn/version "1.0.0"}, + org.clojure/tools.gitlibs {:mvn/version "2.4.172"}, + environ/environ {:mvn/version "1.2.0"}, + table/table + {:git/url "https://github.com/cldwalker/table", + :sha "f6293c5f3dac1dd6f525a80fc80930f8ccdf16b7"}, + + markdown-clj/markdown-clj {:mvn/version "1.10.8"}, + org.clojure/tools.namespace + {:git/sha "daf82a10e70182aea4c0716a48f3922163441b32", + :git/url "https://github.com/clojure/tools.namespace"}, + + medley/medley {:mvn/version "1.3.0"}, + io.github.cognitect-labs/test-runner + {:git/url "https://github.com/cognitect-labs/test-runner", + :git/sha "7284cda41fb9edc0f3bc6b6185cfb7138fc8a023"}, + + borkdude/missing.test.assertions + {:git/url "https://github.com/borkdude/missing.test.assertions", + :sha "603cb01bee72fb17addacc53c34c85612684ad70"}, + + dev.nubank/docopt {:mvn/version "0.6.1-fix7"}, + testdoc/testdoc {:mvn/version "1.4.1"}, + org.clojars.lispyclouds/contajners {:mvn/version "0.0.6"}, + borkdude/rewrite-edn {:mvn/version "0.1.0"}, + clojure-term-colors/clojure-term-colors {:mvn/version "0.1.0"}, + io.aviso/pretty {:mvn/version "1.1.1"}, + progrock/progrock {:mvn/version "0.1.2"}, + djblue/portal {:mvn/version "0.19.0"}, + com.wsscode/cljc-misc {:mvn/version "2021.10.16"}, + edn-query-language/eql {:mvn/version "2021.07.18"}, + meta-merge/meta-merge {:mvn/version "1.0.0"}, + com.exoscale/lingo {:mvn/version "1.0.0-alpha14"}, + io.github.swirrl/dogstatsd {:mvn/version "0.1.39"}, + org.clojure/algo.monads {:mvn/version "0.1.6"}, + io.lambdaforge/datalog-parser {:mvn/version "0.1.9"}, + clj-stacktrace/clj-stacktrace {:mvn/version "0.2.8"}, + clojure-msgpack/clojure-msgpack {:mvn/version "1.2.1"}, + cli-matic/cli-matic + {:git/url "https://github.com/l3nz/cli-matic.git", + :git/sha "9cd53ba7336363e3d06650dbad413b6f8b06e471"}, + + aysylu/loom {:mvn/version "1.0.2"}, + com.layerware/hugsql-core {:mvn/version "0.5.3"}, + com.github.seancorfield/expectations {:mvn/version "2.0.157"}, + com.rpl/specter {:mvn/version "1.1.4"}, + com.github.askonomm/clarktown {:mvn/version "1.1.2"}, + org.clojure/math.numeric-tower + {:git/tag "math.numeric-tower-0.0.5", + :git/sha "12eb9c5", + :git/url "https://github.com/clojure/math.numeric-tower"}, + + prismatic/schema + {:git/url "https://github.com/plumatic/schema", + :git/sha "6846dc7c3a9df5bfd718f68f183c683ce0f621ff", + :git/tag "schema-1.3.0"}, + + metosin/malli + {:git/url "https://github.com/metosin/malli", + :git/sha "588147ef49b2e41c7d12a8aa994b39c1c6fedd99", + :git/tag "0.8.9"}, + + meander/epsilon + {:git/url "https://github.com/noprompt/meander", + :git/sha "55f5ce70e6ef717e95c58260f6bc725d70c0cb6d"}, + + cc.qbits/auspex + {:git/url "https://github.com/mpenet/auspex", + :git/sha "1a9d7427e60e1a434a764aa820d1c53f7e22504a", + :deps/manifest :deps}, + + exoscale/interceptor + {:git/url "https://github.com/exoscale/interceptor", + :git/sha "ca115fe00a0abf3a2f78452ab309c3aa4c00fc4e", + :deps/manifest :deps}, + + lambdaisland/uri + {:git/url "https://github.com/lambdaisland/uri", + :git/sha "ac4f1f9c8e4f45a088db1c6383ce2191c973987c", + :deps/manifest :deps}, + + clj-commons/fs {:mvn/version "1.6.310"}, + postmortem/postmortem + {:git/url "https://github.com/athos/Postmortem", + :git/sha "1a29775a3d286f9f6fe3f979c78b6e2bf298d5ba"}, + + com.github.rawleyfowler/sluj + {:git/url "https://github.com/rawleyfowler/sluj", + :git/sha "4a92e772b4e07bf127423448d4140748b5782198", + :deps/manifest :deps}, + + net.cgrand/xforms + {:git/url "https://github.com/cgrand/xforms", + :git/sha "550dbc150a79c6ecc148d8a7e260e10bc36321c6", + :deps/manifest :deps}}, + + :classpath-overrides {org.clojure/clojure nil, org.clojure/spec.alpha nil}}, + + :clj-nvd + {:extra-deps + {clj-nvd/clj-nvd + {:git/url "https://github.com/miikka/clj-nvd.git", + :sha "f2ec98699e057a379baf170cb49cf7ad76874a70"}}, + + :main-opts ["-m" "clj-nvd.core"]}, + + :test + {:extra-paths ["test"], + :extra-deps + {io.github.cognitect-labs/test-runner + {:git/tag "v0.5.0", :git/sha "b3fd0d2"}, + + nubank/matcher-combinators {:mvn/version "3.6.0"}}, + + :main-opts ["-m" "cognitect.test-runner"], + :exec-fn cognitect.test-runner.api/test}, + + :test-pod + {:extra-paths ["test-resources"], + :main-opts ["-m" "babashka.main" "test-resources/pod.clj"]}}} \ No newline at end of file diff --git a/test/resources/snapshots/add-reagent-1.2.0/project.clj b/test/resources/snapshots/add-reagent-1.2.0/project.clj new file mode 100644 index 0000000..395e32b --- /dev/null +++ b/test/resources/snapshots/add-reagent-1.2.0/project.clj @@ -0,0 +1,52 @@ +(defproject clj-http "3.12.4-SNAPSHOT" + :description "A Clojure HTTP library wrapping the Apache HttpComponents client." + :url "https://github.com/dakrone/clj-http/" + :license {:name "The MIT License" + :url "http://opensource.org/licenses/mit-license.php" + :distribution :repo} + :global-vars {*warn-on-reflection* false} + :min-lein-version "2.0.0" + :exclusions [org.clojure/clojure] + :dependencies [[org.apache.httpcomponents/httpcore "4.4.14"] + [org.apache.httpcomponents/httpclient "4.5.13"] + [org.apache.httpcomponents/httpclient-cache "4.5.13"] + [org.apache.httpcomponents/httpasyncclient "4.1.4"] + [org.apache.httpcomponents/httpmime "4.5.13"] + [commons-codec "1.15"] + [commons-io "2.8.0"] + [slingshot "0.12.2"] + [potemkin "0.4.5"] + [reagent "1.2.0"]] + :resource-paths ["resources"] + :profiles {:dev {:dependencies [;; optional deps + [cheshire "5.10.0"] + [crouton "0.1.2" :exclusions [[org.jsoup/jsoup]]] + [org.jsoup/jsoup "1.13.1"] + [org.clojure/tools.reader "1.3.5"] + [com.cognitect/transit-clj "1.0.324"] + [ring/ring-codec "1.1.3"] + ;; other (testing) deps + [org.clojure/clojure "1.10.3"] + [org.clojure/tools.logging "1.1.0"] + [ring/ring-jetty-adapter "1.9.3"] + [ring/ring-devel "1.9.3"] + ;; caching example deps + [org.clojure/core.cache "1.0.207"] + ;; logging + [org.apache.logging.log4j/log4j-api "2.17.1"] + [org.apache.logging.log4j/log4j-core "2.17.1"] + [org.apache.logging.log4j/log4j-1.2-api "2.17.1"]] + :plugins [[lein-ancient "0.7.0"] + [jonase/eastwood "0.2.5"] + [lein-kibit "0.1.5"] + [lein-nvd "0.5.2"]]} + :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} + :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]} + :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} + :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} + :1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}} + :aliases {"all" ["with-profile" "dev,1.6:dev,1.7:dev,1.8:dev,1.9:dev,1.10:dev"]} + :plugins [[codox "0.6.4"]] + :test-selectors {:default #(not (:integration %)) + :integration :integration + :all (constantly true)}) \ No newline at end of file diff --git a/test/resources/snapshots/add-reagent-1.2.0/shadow-cljs.edn b/test/resources/snapshots/add-reagent-1.2.0/shadow-cljs.edn new file mode 100644 index 0000000..337274e --- /dev/null +++ b/test/resources/snapshots/add-reagent-1.2.0/shadow-cljs.edn @@ -0,0 +1,51 @@ +{:source-paths ["src" "repl-tooling/src" "repl-tooling/test" + "repl-tooling/resources"] + + :dependencies [[check "0.2.0-SNAPSHOT"] + [com.cognitect/transit-cljs "0.8.264"] + [funcool/promesa "6.0.0"] + [paprika "0.1.3-SNAPSHOT"] + [borkdude/sci "0.1.1-alpha.7"] + [compliment "0.4.0-SNAPSHOT"] + [reagent "0.10.0"] + [devcards "0.2.5"] + [org.rksm/suitable "0.3.2"] + [cider/orchard "0.5.8"] + [com.wsscode/pathom "2.3.1"] + [org.pinkgorilla/gorilla-renderable-ui "0.1.33"] + [link.szabo.mauricio/duck-repled "0.1.1-SNAPSHOT"] + [reagent "1.2.0"]] + + :jvm-opts ["-Xmx800M"] + :builds + {:dev {:target :node-library + :js-options {:js-provider :shadow + :keep-native-requires true + :keep-as-require #{"atom"}} + + :dev {:closure-defines {chlorine.aux/TESTS true + com.wsscode.pathom.misc.INCLUDE_SPECS false}} + :compiler-options {:warnings {:fn-deprecated false} + :external-config + {:devtools/config + {:features-to-install [:formatters :hints] + :fn-symbol "F" + :print-config-overrides true}}} + :exports {:config chlorine.core/config + :commands chlorine.core/commands + :aux chlorine.core/aux + :repl chlorine.repl/exports + + :everything-provider + chlorine.providers-consumers.everything/activate + + :autocomplete-provider + chlorine.providers-consumers.autocomplete/provider + + :status-bar-consumer + chlorine.providers-consumers.status-bar/activate} + + :output-dir "lib/js" + :output-to "lib/cmds.js" + :devtools {:before-load-async chlorine.core/before + :after-load chlorine.core/after}}}} \ No newline at end of file diff --git a/test/resources/snapshots/update-all/bb.edn b/test/resources/snapshots/update-all/bb.edn deleted file mode 100644 index 3e314a2..0000000 --- a/test/resources/snapshots/update-all/bb.edn +++ /dev/null @@ -1,5 +0,0 @@ -{:paths ["src" "test"], - :deps - {reagent/reagent {:mvn/version "1.2.0"}, - emotion-cljs/emotion-cljs {:mvn/version "0.2.0"}, - metosin/malli {:mvn/version "0.11.0"}}} \ No newline at end of file diff --git a/test/resources/snapshots/update-all/deps.edn b/test/resources/snapshots/update-all/deps.edn deleted file mode 100644 index 3e314a2..0000000 --- a/test/resources/snapshots/update-all/deps.edn +++ /dev/null @@ -1,5 +0,0 @@ -{:paths ["src" "test"], - :deps - {reagent/reagent {:mvn/version "1.2.0"}, - emotion-cljs/emotion-cljs {:mvn/version "0.2.0"}, - metosin/malli {:mvn/version "0.11.0"}}} \ No newline at end of file diff --git a/test/resources/snapshots/update-all/project.clj b/test/resources/snapshots/update-all/project.clj deleted file mode 100644 index ec126a0..0000000 --- a/test/resources/snapshots/update-all/project.clj +++ /dev/null @@ -1,4 +0,0 @@ -(defproject input-config "0.0.0" - :dependencies [[reagent "1.2.0"] - [emotion-cljs "0.2.0"] - [metosin/malli "0.11.0"]]) \ No newline at end of file diff --git a/test/resources/snapshots/update-all/shadow-cljs.edn b/test/resources/snapshots/update-all/shadow-cljs.edn deleted file mode 100644 index 0217336..0000000 --- a/test/resources/snapshots/update-all/shadow-cljs.edn +++ /dev/null @@ -1,17 +0,0 @@ -{:dependencies - {reagent/reagent {:mvn/version "1.2.0"}, - emotion-cljs/emotion-cljs {:mvn/version "0.2.0"}, - metosin/malli {:mvn/version "0.11.0"}}, - :dev-http {8080 "public"}, - :builds - {:app - {:target :browser, - :output-dir "public", - :release {:compiler-options {:optimizations :advanced}}, - :devtools {:reload-strategy :full}, - :modules {:main {:entries [app.core]}}}, - :unit-tests - {:target :node-test, - :output-to "out/unit-tests.js", - :ns-regexp "-unit-test$", - :autorun true}}} \ No newline at end of file