diff --git a/README.md b/README.md index b9f39e0..447ae64 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ This workflow will comment on your PR as shown below. clojure -Ttools install-latest :lib io.github.namenu/deps-diff :as deps-diff` # resolve deps before changes -clojure -X:deps tree :project '"base/deps.edn"' > __before.edn +clojure -X:deps tree :dir '"./before"' > __before.edn # resolve deps after changes -clojure -X:deps tree :project '"after/deps.edn"' > __after.edn +clojure -X:deps tree :dir '"./after"' > __after.edn # then compare clojure -Tdeps-diff diff :base '"__before.edn"' :target '"__after.edn"' :format :cli diff --git a/action.yml b/action.yml index 6cd7d10..49c4d89 100644 --- a/action.yml +++ b/action.yml @@ -10,10 +10,10 @@ inputs: required: true description: git/sha of base commit default: ${{ github.event.pull_request.base.sha }} - project: + dir: required: false - description: path of the target deps.edn - default: "deps.edn" + description: root directory of deps.edn + default: "." aliases: required: false description: aliases to create basis @@ -42,7 +42,7 @@ runs: - name: Install clojure tools uses: DeLaGuardo/setup-clojure@12.5 with: - cli: 1.11.1.1413 + cli: 1.11.2.1446 - name: Cache maven uses: actions/cache@v4 @@ -64,8 +64,8 @@ runs: - name: Resolve base shell: bash run: | - PROJECT=${{ inputs.project }} - clojure -X:deps tree :project '"'$PROJECT'"' :aliases '${{ inputs.aliases }}' :format :edn > __base.edn + DIR=${{ inputs.dir }} + clojure -X:deps tree :dir '"'$DIR'"' :aliases '${{ inputs.aliases }}' :format :edn > __base.edn - name: Checkout target uses: actions/checkout@v4 @@ -75,8 +75,8 @@ runs: - name: Resolve target shell: bash run: | - PROJECT=${{ inputs.project }} - clojure -X:deps tree :project '"'$PROJECT'"' :aliases '${{ inputs.aliases }}' :format :edn > __target.edn + DIR=${{ inputs.dir }} + clojure -X:deps tree :dir '"'$DIR'"' :aliases '${{ inputs.aliases }}' :format :edn > __target.edn - name: Install deps-diff shell: bash diff --git a/deps.edn b/deps.edn index 4395fe5..f9a9842 100644 --- a/deps.edn +++ b/deps.edn @@ -1,10 +1,11 @@ {:paths ["src"] - :deps {org.clj-commons/pretty {:mvn/version "2.2.1"} - org.clojure/tools.deps {:mvn/version "0.18.1398"} + :deps {org.clojure/clojure {:mvn/version "1.11.2"} + org.clj-commons/pretty {:mvn/version "2.2.1"} + org.clojure/tools.deps {:mvn/version "0.19.1417"} org.slf4j/slf4j-nop {:mvn/version "2.0.10"}} :tools/usage {:ns-default namenu.tools.deps-diff} :aliases {:dev {:extra-paths ["dev"] - :extra-deps {org.clojure/tools.deps.cli {:local/root "./tools.deps.cli"}} + :extra-deps {org.clojure/tools.deps.cli {:mvn/version "0.10.55"}} :ns-default clojure.tools.deps.cli.api} :test {:extra-paths ["test" "test-resources"] - :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}}}}} \ No newline at end of file + :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}}}}} diff --git a/dev/user.clj b/dev/user.clj index 260406b..55b32df 100644 --- a/dev/user.clj +++ b/dev/user.clj @@ -1,7 +1,11 @@ (ns user (:require [clojure.tools.deps.cli.api :as cli])) - (comment - (cli/tree {:project "./test-resources/base/deps.edn" - :aliases [:dev]})) \ No newline at end of file + (= (with-out-str + (cli/tree {:project "./test-resources/base/deps.edn" + :aliases [:dev]})) + (with-out-str + (cli/tree {:dir "./test-resources/base" + :aliases [:dev]}))) + ) \ No newline at end of file