Merge pull request #6777 from penpot/niwinz-staging-hotfix-1

🐛 Remove qualified keyword keys from colors
This commit is contained in:
Alejandro Alonso 2025-06-25 12:13:53 +02:00 committed by GitHub
commit c51ae35fc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 9 deletions

View file

@ -37,7 +37,6 @@
{:mvn/version "1.3.1002"}
metosin/reitit-core {:mvn/version "0.9.1"}
nrepl/nrepl {:mvn/version "1.3.1"}
cider/cider-nrepl {:mvn/version "0.56.0"}
org.postgresql/postgresql {:mvn/version "42.7.6"}
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}

View file

@ -40,7 +40,6 @@
[app.svgo :as-alias svgo]
[app.util.time :as dt]
[app.worker :as-alias wrk]
[cider.nrepl :refer [cider-nrepl-handler]]
[clojure.test :as test]
[clojure.tools.namespace.repl :as repl]
[cuerdas.core :as str]
@ -605,7 +604,7 @@
(let [p (promise)]
(when (contains? cf/flags :nrepl-server)
(l/inf :hint "start nrepl server" :port 6064)
(nrepl/start-server :bind "0.0.0.0" :port 6064 :handler cider-nrepl-handler))
(nrepl/start-server :bind "0.0.0.0" :port 6064))
(start)
(deref p))

View file

@ -595,7 +595,11 @@
(teams/check-read-permissions! conn profile-id team-id)
(->> (db/exec! conn [sql:team-shared-files team-id])
(into #{} (comp
(map decode-row)
;; NOTE: this decode operation is a workaround for a
;; fast fix, this should be approached with a more
;; efficient implementation, for now it loads all
;; the files in memory.
(map (partial bfc/decode-file cfg))
(map (fn [row]
(if-let [media-id (:media-id row)]
(-> row

View file

@ -1468,14 +1468,21 @@
(update :pages-index d/update-vals update-container)
(d/update-when :components d/update-vals update-container))))
(defmethod migrate-data "0008-fix-library-colors-opacity"
(defmethod migrate-data "0008-fix-library-colors"
[data _]
(letfn [(update-color [color]
(letfn [(clear-color-opacity [color]
(if (and (contains? color :opacity)
(nil? (get color :opacity)))
(assoc color :opacity 1)
color))]
(d/update-when data :colors d/update-vals update-color)))
color))
(clear-color [color]
(-> color
(d/without-nils)
(d/without-qualified)
(clear-color-opacity)))]
(d/update-when data :colors d/update-vals clear-color)))
(def available-migrations
(into (d/ordered-set)
@ -1540,4 +1547,4 @@
"0005-deprecate-image-type"
"0006-fix-old-texts-fills"
"0007-clear-invalid-strokes-and-fills-v2"
"0008-fix-library-colors-opacity"]))
"0008-fix-library-colors"]))