Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #47

Merged
merged 4 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Find newer versions of your dependencies in your `deps.edn` file using the [Cloj
You can try it out easily with this one liner:

```bash
$ clojure -Sdeps '{:deps {olical/depot {:mvn/version "2.0.1"}}}' -m depot.outdated.main
$ clojure -Sdeps '{:aliases {:outdated {:replace-deps {olical/depot {:mvn/version "2.0.1"}}}}}' -M:outdated -m depot.outdated.main
Checking for old versions in: deps.edn
org.clojure/clojure {:mvn/version "1.9.0"} -> {:mvn/version "1.10.1"}
```
Expand All @@ -24,7 +24,7 @@ I'd recommend adding depot as an alias in your own `deps.edn` file, this will al

```clojure
{:deps {}
:aliases {:outdated {:extra-deps {olical/depot {:mvn/version "..."}}
:aliases {:outdated {:replace-deps {olical/depot {:mvn/version "..."}}
:main-opts ["-m" "depot.outdated.main"]}}}
```

Expand Down
10 changes: 5 additions & 5 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

:deps
{org.clojure/clojure {:mvn/version "1.10.1"}
org.clojure/tools.deps.alpha {:mvn/version "0.8.677"}
org.clojure/tools.deps.alpha {:mvn/version "0.9.857"}
org.clojure/tools.cli {:mvn/version "1.0.194"}
rewrite-clj {:mvn/version "0.6.1"}
version-clj {:mvn/version "0.1.2"}}
rewrite-clj/rewrite-clj {:mvn/version "0.6.1"}
version-clj/version-clj {:mvn/version "0.1.2"}}

:aliases
{:cider
Expand All @@ -20,8 +20,8 @@
:test
{:extra-deps {;; Only here to check depot functionality.
org.slf4j/slf4j-simple {:mvn/version "1.7.30"}
clj-time {:mvn/version "0.15.2"}
cider/cider-nrepl {:mvn/version "0.22.0"}
clj-time/clj-time {:mvn/version "0.15.2"}
cider/cider-nrepl {:mvn/version "0.25.5"}
olical/cljs-test-runner {:git/url "https://github.com/Olical/cljs-test-runner.git"
:sha "5a18d41648d5c3a64632b5fec07734d32cca7671"}

Expand Down
5 changes: 3 additions & 2 deletions src/depot/outdated/update.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns depot.outdated.update
(:require [clojure.tools.deps.alpha.reader :as reader]
(:require [clojure.tools.deps.alpha :as deps.alpha]
[depot.zip :as dzip]
[rewrite-clj.zip :as rzip]))

Expand Down Expand Up @@ -77,7 +77,8 @@
[file consider-types include-alias? write? messages new-versions]
(let [start-message ((if write? :start-write :start-read-only) messages)]
(printf (str start-message "\n") file))
(let [deps (reader/read-deps (reader/default-deps))
(let [{:keys [root-edn user-edn project-edn]} (deps.alpha/find-edn-maps)
deps (deps.alpha/merge-edns [root-edn user-edn project-edn])
config (-> deps
(select-keys [:mvn/repos :mvn/local-repo])
(assoc :consider-types consider-types))
Expand Down