Skip to content

Commit

Permalink
Update package.jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Sep 29, 2024
1 parent 0c3165b commit 9e56eb5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"express": "^4.19.2",
"squint-cljs": "^0.7.110"
"squint-cljs": "0.8.114"
}
}
2 changes: 1 addition & 1 deletion examples/solid-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"type": "module",
"dependencies": {
"solid-js": "^1.8.5",
"squint-cljs": "^0.4.54"
"squint-cljs": "0.8.114"
}
}
2 changes: 1 addition & 1 deletion examples/threejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dat.gui": "^0.7.9",
"easing": "^1.2.1",
"postprocessing": "^6.33.3",
"squint-cljs": "^0.3.38",
"squint-cljs": "0.8.114",
"stats.js": "^0.17.0",
"three": "^0.158.0",
"vite": "^4.5.0"
Expand Down
19 changes: 19 additions & 0 deletions script/bump_versions.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(ns bump-versions
(:require [babashka.fs :as fs]
[clojure.string :as str]
[cheshire.core :as json]))

(def current-version (-> (slurp "package.json")
(json/parse-string true)
:version))

(def package-jsons (fs/glob "." "examples/**/package.json"))

(doseq [p package-jsons]
(let [p (fs/file p)
s (slurp p)
re #"\"squint-cljs\": \"([^?]\d.*)\""]
(when (re-find re s)
(spit p (str/replace s re
(fn [[x v]]
(str/replace x v current-version)))))))

0 comments on commit 9e56eb5

Please sign in to comment.