Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for the Bun and pnpm package managers.#231

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
commiterate wants to merge1 commit intoclojure:master
base:master
Choose a base branch
Loading
fromcommiterate:deps-cmd-add-bun-pnpm
Open
Show file tree
Hide file tree
Changes fromall 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
6 changes: 3 additions & 3 deletionssrc/main/clojure/cljs/cli.clj
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -638,7 +638,7 @@ generic - the combinations must be explicitly supported"}
:doc (str "Set the output directory to use. If "
"supplied, cljsc_opts.edn in that directory "
"will be used to set ClojureScript compiler "
"options")}
"options")}
["-w" "--watch"] {:group ::compile :fn watch-opt
:arg "paths"
:doc (str "Continuously build, only effective with the "
Expand All@@ -649,7 +649,7 @@ generic - the combinations must be explicitly supported"}
:doc "Set the output compiled file"}
["--deps-cmd"] {:group ::compile :fn deps-cmd-opt
:arg "string"
:doc "Set the node dependency manager. Only npm oryarn supported"}
:doc "Set the node dependency manager. Only npm, bun, pnpm, andyarn are supported"}
["-O" "--optimizations"] {:group ::compile :fn optimize-opt
:arg "level"
:doc
Expand All@@ -661,7 +661,7 @@ generic - the combinations must be explicitly supported"}
:doc
(str "The JavaScript target. Configures environment bootstrap and "
"defaults to browser. Supported values: node or nodejs, "
"webworker, bundle, none")}
"webworker, bundle, none")}
["-ro" "--repl-opts"] {:group ::main&compile :fn repl-env-opts-opt
:arg "edn"
:doc (str "Options to configure the repl-env, can be an EDN string or "
Expand Down
10 changes: 8 additions & 2 deletionssrc/main/clojure/cljs/closure.clj
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2623,7 +2623,11 @@
(let [proc (-> (ProcessBuilder.
(into (cond->>
[deps-cmd
({"npm" "install" "yarn" "add"} deps-cmd)
({"npm" "install"
"bun" "add"
"pnpm" "add"
"yarn" "add"}
deps-cmd)
"@cljs-oss/module-deps"]
util/windows? (into ["cmd" "/c"]))
(map (fn [[dep version]] (str (name dep) "@" version)))
Expand DownExpand Up@@ -2667,7 +2671,9 @@
(string/replace "CLJS_TARGET" (str "" (when target (name target))))
(string/replace "MAIN_ENTRIES" main-entries)
(string/replace "FILE_SEPARATOR" (escape-backslashes File/separator)))
proc (-> (ProcessBuilder. ["node" "--eval" code])
proc (-> (ProcessBuilder. (case (:deps-cmd opts)
"bun" ["bun" "--eval" code]
["node" "--eval" code]))
.start)
is (.getInputStream proc)
iw (StringWriter. (* 16 1024 1024))
Expand Down
6 changes: 3 additions & 3 deletionssrc/test/clojure/cljs/foreign/node_test.clj
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,8 +11,8 @@
([f]
(test-util/delete-node-modules)
(doseq [f (map io/file
["package.json" "package-lock.json" "yarn.lock"
"yarn-error.log"])]
["package.json" "package-lock.json" "bun.lockb"
"pnpm-lock.yaml" "yarn.lock""yarn-error.log"])]
(when (.exists f)
(io/delete-file f)))
(f)))
Expand All@@ -21,7 +21,7 @@
([lib version]
(install :npm lib version))
([cmd lib version]
(let [action ({:npm "install" :yarn "add"} cmd)]
(let [action ({:npm "install" :bun "add" :pnpm "add" :yarn "add"} cmd)]
(sh/sh (name cmd) action (str lib "@" version)))))

(test/use-fixtures :once cleanup)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp