Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ See the [New Clojure project quickstart](https://blog.michielborkent.nl/new-cloj

- [#230](https://github.com/babashka/neil/issues/230): neil dep upgrade inserts git/url into upgraded dep ([@teodorlu](https://github.com/teodorlu))
- [#237](https://github.com/babashka/neil/issues/230): more specific error reporting on invalid github token ([@teodorlu](https://github.com/teodorlu))
- [#235](https://github.com/babashka/neil/issues/230): neil dep upgrade changes git url ([@teodorlu](https://github.com/teodorlu))

## 0.3.66

Expand Down
2 changes: 1 addition & 1 deletion src/babashka/neil.clj
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ details on the search syntax.")))
version (assoc :version version)
tag (assoc :tag tag)
(and (not tag) sha) (assoc :sha sha)
(not (:git/url current)) (assoc :omit-git-url true))}))))))
true (assoc :omit-git-url true))}))))))

(defn dep-upgrade [{:keys [opts]}]
(when (or (:h opts) (:help opts))
Expand Down
10 changes: 10 additions & 0 deletions test/babashka/neil/dep_upgrade_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,13 @@
(is (neil/dep->upgrade {:lib 'com.wsscode/pathom3
:current {:mvn/version "2023.01.31-alpha"}
:unstable true})))

(deftest neil-dep-upgrade-does-not-change-git-urls
(testing "When we upgrade a dep with :git/url, we don't want that git url shall not change."
(let [original-git-url "https://github.com/babashka/babashka.pods"
original-deps {:deps {'babashka/pods {:git/url original-git-url
:git/sha "6ad6045b94bc871c5107bfc75d39643b6c1bc8ba"}}}]
(spit test-file-path original-deps)
(test-util/neil "dep upgrade" :test-file-path test-file-path)
(is (= original-git-url
(:git/url (get-dep-version 'babashka/pods)))))))