babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
377 stars 27 forks source link

`dep add`: avoid long lines in `:aliases` #225

Closed teodorlu closed 5 months ago

teodorlu commented 5 months ago

Please answer the following questions and leave the below in as part of your PR.

Behavior before this PR

Given this deps.edn

{:aliases
 {:dev {}}}

, neil dep add nrepl would produce this deps.edn:

{:aliases
 {:dev {}
  :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "1.1.2"} cider/cider-nrepl {:mvn/version "0.49.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
          :main-opts ["-m" "nrepl.cmdline" "--interactive" "--color" "--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}}}

Behavior after this PR

With the same deps.edn, neil dep add nrepl would produce this deps.edn:

{:aliases
 {:dev {}
  :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "1.1.2"}
                       cider/cider-nrepl {:mvn/version "0.49.0"}
                       refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
          :main-opts ["-m" "nrepl.cmdline" "--interactive" "--color" "--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}}}
teodorlu commented 5 months ago

I think I'm happy with the code now.