Skip to content

Improve shadow cljs support #271

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

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [#256](https://github.com/clojure-emacs/refactor-nrepl/pull/256) ignore malformed artifact coordinates when fetching from Clojars.
* [#264](https://github.com/clojure-emacs/refactor-nrepl/pull/264) less bandwidth used to fetch artifacts from Clojars
* [#268](https://github.com/clojure-emacs/refactor-nrepl/pull/268) added support for fetching artifact versions from Clojars
* [#271](https://github.com/clojure-emacs/refactor-nrepl/pull/271) improved shadow-cljs support

## 2.4.0

Expand Down
2 changes: 1 addition & 1 deletion src/refactor_nrepl/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
start (if (fs/directory? path-or-file-in-project)
path-or-file-in-project
(fs/parent path-or-file-in-project))
names-at-root #{"project.clj" "build.boot" "build.gradle" "pom.xml" "deps.edn"}
names-at-root #{"project.clj" "build.boot" "build.gradle" "pom.xml" "deps.edn" "shadow-cljs.edn"}
known-root-file? (fn [^File f] (some (fn [known-root-name]
(.endsWith (.getCanonicalPath f)
known-root-name))
Expand Down
2 changes: 1 addition & 1 deletion src/refactor_nrepl/ns/libspecs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(defn- aliases-by-frequencies [libspecs]
(->> libspecs
(mapcat aliases) ; => [[str clojure.string] ...]
(sort-by second)
(sort-by (comp str second))
(group-by first) ; => {str [[str clojure.string] [str clojure.string]] ...}
(map (comp seq frequencies second)) ; => (([[set clojure.set] 4] [set set] 1) ...)
(map (partial sort-by second >)) ; by decreasing frequency
Expand Down