From 97bf20dd4cc630ec9eea5eae4efcb5774a88ae23 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 11:18:02 +0200 Subject: [PATCH 1/6] :arrow_up: Update dependencies --- backend/deps.edn | 20 ++++++++++---------- common/deps.edn | 12 ++++++------ common/package.json | 2 +- common/yarn.lock | 8 ++++---- docker/devenv/Dockerfile | 8 ++++---- exporter/deps.edn | 6 +++--- exporter/package.json | 2 +- exporter/yarn.lock | 8 ++++---- frontend/deps.edn | 12 ++++++------ frontend/package.json | 2 +- frontend/shadow-cljs.edn | 2 +- frontend/yarn.lock | 8 ++++---- manage.sh | 2 +- 13 files changed, 46 insertions(+), 46 deletions(-) diff --git a/backend/deps.edn b/backend/deps.edn index 34e62ccb9..b9591d827 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -1,13 +1,13 @@ {:deps {penpot/common {:local/root "../common"} - org.clojure/clojure {:mvn/version "1.10.3"} + org.clojure/clojure {:mvn/version "1.11.1"} org.clojure/core.async {:mvn/version "1.5.648"} ;; Logging org.zeromq/jeromq {:mvn/version "0.5.2"} com.taoensso/nippy {:mvn/version "3.1.1"} - com.github.luben/zstd-jni {:mvn/version "1.5.2-2"} + com.github.luben/zstd-jni {:mvn/version "1.5.2-3"} org.clojure/data.fressian {:mvn/version "1.0.0"} io.prometheus/simpleclient {:mvn/version "0.15.0"} @@ -17,23 +17,23 @@ org.eclipse.jetty/jetty-servlet]} io.prometheus/simpleclient_httpserver {:mvn/version "0.15.0"} - io.lettuce/lettuce-core {:mvn/version "6.1.6.RELEASE"} + io.lettuce/lettuce-core {:mvn/version "6.1.8.RELEASE"} java-http-clj/java-http-clj {:mvn/version "0.4.3"} funcool/yetti {:git/tag "v9.1" :git/sha "63f35d9" :git/url "https://github.com/funcool/yetti.git" :exclusions [org.slf4j/slf4j-api]} - com.github.seancorfield/next.jdbc {:mvn/version "1.2.772"} - metosin/reitit-core {:mvn/version "0.5.16"} - org.postgresql/postgresql {:mvn/version "42.3.3"} + com.github.seancorfield/next.jdbc {:mvn/version "1.2.780"} + metosin/reitit-core {:mvn/version "0.5.18"} + org.postgresql/postgresql {:mvn/version "42.4.0"} com.zaxxer/HikariCP {:mvn/version "5.0.1"} funcool/datoteka {:mvn/version "2.0.0"} buddy/buddy-hashers {:mvn/version "1.8.158"} buddy/buddy-sign {:mvn/version "3.4.333"} - org.jsoup/jsoup {:mvn/version "1.14.3"} + org.jsoup/jsoup {:mvn/version "1.15.1"} org.im4java/im4java {:mvn/version "1.4.0"} org.lz4/lz4-java {:mvn/version "1.8.0"} @@ -43,11 +43,11 @@ io.sentry/sentry {:mvn/version "5.6.1"} dawran6/emoji {:mvn/version "0.1.5"} - markdown-clj/markdown-clj {:mvn/version "1.11.0"} + markdown-clj/markdown-clj {:mvn/version "1.11.1"} ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} - software.amazon.awssdk/s3 {:mvn/version "2.17.136"}} + software.amazon.awssdk/s3 {:mvn/version "2.17.209"}} :paths ["src" "resources" "target/classes"] :aliases @@ -64,7 +64,7 @@ :build {:extra-deps - {io.github.clojure/tools.build {:git/tag "v0.7.7" :git/sha "1474ad6"}} + {io.github.clojure/tools.build {:git/tag "v0.8.2" :git/sha "ba1a2bf"}} :ns-default build} :test diff --git a/common/deps.edn b/common/deps.edn index 019017255..01cb47c92 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -1,9 +1,9 @@ {:deps - {org.clojure/clojure {:mvn/version "1.10.3"} + {org.clojure/clojure {:mvn/version "1.11.1"} org.clojure/data.json {:mvn/version "2.4.0"} org.clojure/tools.cli {:mvn/version "1.0.206"} - metosin/jsonista {:mvn/version "0.3.5"} - org.clojure/clojurescript {:mvn/version "1.11.4"} + metosin/jsonista {:mvn/version "0.3.6"} + org.clojure/clojurescript {:mvn/version "1.11.57"} ;; Logging org.apache.logging.log4j/log4j-api {:mvn/version "2.17.2"} @@ -13,7 +13,7 @@ org.apache.logging.log4j/log4j-slf4j18-impl {:mvn/version "2.17.2"} org.slf4j/slf4j-api {:mvn/version "2.0.0-alpha1"} - selmer/selmer {:mvn/version "1.12.50"} + selmer/selmer {:mvn/version "1.12.51"} criterium/criterium {:mvn/version "0.4.6"} expound/expound {:mvn/version "0.9.0"} @@ -33,7 +33,7 @@ com.sun.mail/jakarta.mail {:mvn/version "2.0.1"} ;; exception printing - fipp/fipp {:mvn/version "0.6.25"} + fipp/fipp {:mvn/version "0.6.26"} io.aviso/pretty {:mvn/version "1.1.1"} environ/environ {:mvn/version "1.2.0"}} :paths ["src"] @@ -42,7 +42,7 @@ {:extra-deps {org.clojure/tools.namespace {:mvn/version "RELEASE"} org.clojure/test.check {:mvn/version "RELEASE"} - thheller/shadow-cljs {:mvn/version "2.17.8"} + thheller/shadow-cljs {:mvn/version "2.19.3"} com.bhauman/rebel-readline {:mvn/version "RELEASE"} criterium/criterium {:mvn/version "RELEASE"} mockery/mockery {:mvn/version "RELEASE"}} diff --git a/common/package.json b/common/package.json index 990c172ad..d8e1a16c0 100644 --- a/common/package.json +++ b/common/package.json @@ -13,7 +13,7 @@ "test": "yarn run compile-test && yarn run run-test" }, "devDependencies": { - "shadow-cljs": "2.17.8", + "shadow-cljs": "2.19.3", "source-map-support": "^0.5.19", "ws": "^7.4.6" } diff --git a/common/yarn.lock b/common/yarn.lock index 22f689b46..83766bc49 100644 --- a/common/yarn.lock +++ b/common/yarn.lock @@ -533,10 +533,10 @@ shadow-cljs-jar@1.3.2: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.2.tgz#97273afe1747b6a2311917c1c88d9e243c81957b" integrity sha512-XmeffAZHv8z7451kzeq9oKh8fh278Ak+UIOGGrapyqrFBB773xN8vMQ3O7J7TYLnb9BUwcqadKkmgaq7q6fhZg== -shadow-cljs@2.17.3: - version "2.17.3" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.17.3.tgz#748e31f67cffdc401691c0cd1bf733a1da53ab5d" - integrity sha512-GxyczUuCtACq/uEOvdTc61wT/aDOZFy8G/AGc322uTX/oUiZaeTJrwpClXe+0+e7VKG9E9RCqP/cjuG3cAG0fw== +shadow-cljs@2.19.3: + version "2.19.3" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.19.3.tgz#115a33917f8bca1495e0f815dca7ec3957f669af" + integrity sha512-9TsTCRlmR8m1g2ekwblgomRUgJpbifQI99VlRrlH9NMqEzklev3zYAD1dvy4d5h8BoAhgdxOOEg7ld2d45CWTA== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" diff --git a/docker/devenv/Dockerfile b/docker/devenv/Dockerfile index 98ae0514f..4523423ed 100644 --- a/docker/devenv/Dockerfile +++ b/docker/devenv/Dockerfile @@ -3,10 +3,10 @@ LABEL maintainer="Andrey Antukh " ARG DEBIAN_FRONTEND=noninteractive -ENV NODE_VERSION=v16.14.2 \ - CLOJURE_VERSION=1.11.0.1100 \ - CLJKONDO_VERSION=2022.03.09 \ - BABASHKA_VERSION=0.8.0 \ +ENV NODE_VERSION=v16.15.1 \ + CLOJURE_VERSION=1.11.1.1124 \ + CLJKONDO_VERSION=2022.05.31 \ + BABASHKA_VERSION=0.8.156 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 diff --git a/exporter/deps.edn b/exporter/deps.edn index b171da17c..5351336d2 100644 --- a/exporter/deps.edn +++ b/exporter/deps.edn @@ -1,9 +1,9 @@ {:paths ["src" "vendor" "resources" "test"] :deps {penpot/common {:local/root "../common"} - org.clojure/clojure {:mvn/version "1.10.3"} + org.clojure/clojure {:mvn/version "1.11.1"} binaryage/devtools {:mvn/version "RELEASE"} - metosin/reitit-core {:mvn/version "0.5.16"} + metosin/reitit-core {:mvn/version "0.5.18"} funcool/beicon {:mvn/version "2021.07.05-1"} } :aliases @@ -15,7 +15,7 @@ :dev {:extra-deps - {thheller/shadow-cljs {:mvn/version "2.17.8"}}} + {thheller/shadow-cljs {:mvn/version "2.19.3"}}} :shadow-cljs {:main-opts ["-m" "shadow.cljs.devtools.cli"]} diff --git a/exporter/package.json b/exporter/package.json index 83f70bfca..def47f835 100644 --- a/exporter/package.json +++ b/exporter/package.json @@ -21,7 +21,7 @@ "xregexp": "^5.0.2" }, "devDependencies": { - "shadow-cljs": "^2.17.8", + "shadow-cljs": "^2.19.3", "source-map-support": "^0.5.21" } } diff --git a/exporter/yarn.lock b/exporter/yarn.lock index a33887816..4f240216e 100644 --- a/exporter/yarn.lock +++ b/exporter/yarn.lock @@ -1098,10 +1098,10 @@ shadow-cljs-jar@1.3.2: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.2.tgz#97273afe1747b6a2311917c1c88d9e243c81957b" integrity sha512-XmeffAZHv8z7451kzeq9oKh8fh278Ak+UIOGGrapyqrFBB773xN8vMQ3O7J7TYLnb9BUwcqadKkmgaq7q6fhZg== -shadow-cljs@^2.17.8: - version "2.17.8" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.17.8.tgz#7ee27ccf7585991f6c042f66f07f17582c0b70af" - integrity sha512-O39cLA7ukEh+OeH1yZlaWjGFinPOsDD87TetAWPe1QBD9TZQ0Ail+2ovaXeAyZpJ+6Z37joFfival+LNuCgsmQ== +shadow-cljs@^2.19.3: + version "2.19.3" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.19.3.tgz#115a33917f8bca1495e0f815dca7ec3957f669af" + integrity sha512-9TsTCRlmR8m1g2ekwblgomRUgJpbifQI99VlRrlH9NMqEzklev3zYAD1dvy4d5h8BoAhgdxOOEg7ld2d45CWTA== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" diff --git a/frontend/deps.edn b/frontend/deps.edn index a1d592e32..c94b5246b 100644 --- a/frontend/deps.edn +++ b/frontend/deps.edn @@ -5,7 +5,7 @@ org.clojure/clojure {:mvn/version "1.10.3"} binaryage/devtools {:mvn/version "RELEASE"} - metosin/reitit-core {:mvn/version "0.5.17"} + metosin/reitit-core {:mvn/version "0.5.18"} funcool/beicon {:mvn/version "2021.07.05-1"} funcool/okulary {:mvn/version "2022.04.11-16"} @@ -13,9 +13,9 @@ funcool/rumext {:mvn/version "2022.04.19-148"} funcool/tubax {:mvn/version "2021.05.20-0"} - instaparse/instaparse {:mvn/version "1.4.10"} - garden/garden {:mvn/version "1.3.10"} - + instaparse/instaparse {:mvn/version "1.4.12"} + garden/garden {:git/url "https://github.com/noprompt/garden" + :git/sha "05590ecb5f6fa670856f3d1ab400aa4961047480"} } :aliases @@ -32,9 +32,9 @@ :dev {:extra-paths ["dev"] :extra-deps - {thheller/shadow-cljs {:mvn/version "2.17.8"} + {thheller/shadow-cljs {:mvn/version "2.19.3"} org.clojure/tools.namespace {:mvn/version "RELEASE"} - cider/cider-nrepl {:mvn/version "0.28.3"}}} + cider/cider-nrepl {:mvn/version "0.28.4"}}} :shadow-cljs {:main-opts ["-m" "shadow.cljs.devtools.cli"]} diff --git a/frontend/package.json b/frontend/package.json index 104be4665..d1e140ca7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -48,7 +48,7 @@ "prettier": "^2.6.1", "rimraf": "^3.0.0", "sass": "^1.49.9", - "shadow-cljs": "2.17.8" + "shadow-cljs": "2.19.3" }, "dependencies": { "@sentry/browser": "^6.17.4", diff --git a/frontend/shadow-cljs.edn b/frontend/shadow-cljs.edn index 60985de8c..9945e0ac3 100644 --- a/frontend/shadow-cljs.edn +++ b/frontend/shadow-cljs.edn @@ -29,7 +29,7 @@ :depends-on #{:shared}}} :compiler-options - {:output-feature-set :es8 + {:output-feature-set :es2020 :output-wrapper false :warnings {:fn-deprecated false}} diff --git a/frontend/yarn.lock b/frontend/yarn.lock index fee26840a..f3c3236e2 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -5013,10 +5013,10 @@ shadow-cljs-jar@1.3.2: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.2.tgz#97273afe1747b6a2311917c1c88d9e243c81957b" integrity sha512-XmeffAZHv8z7451kzeq9oKh8fh278Ak+UIOGGrapyqrFBB773xN8vMQ3O7J7TYLnb9BUwcqadKkmgaq7q6fhZg== -shadow-cljs@2.17.8: - version "2.17.8" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.17.8.tgz#7ee27ccf7585991f6c042f66f07f17582c0b70af" - integrity sha512-O39cLA7ukEh+OeH1yZlaWjGFinPOsDD87TetAWPe1QBD9TZQ0Ail+2ovaXeAyZpJ+6Z37joFfival+LNuCgsmQ== +shadow-cljs@2.19.3: + version "2.19.3" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.19.3.tgz#115a33917f8bca1495e0f815dca7ec3957f669af" + integrity sha512-9TsTCRlmR8m1g2ekwblgomRUgJpbifQI99VlRrlH9NMqEzklev3zYAD1dvy4d5h8BoAhgdxOOEg7ld2d45CWTA== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" diff --git a/manage.sh b/manage.sh index c86ef23a7..293a074b2 100755 --- a/manage.sh +++ b/manage.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -ex export ORGANIZATION="penpotapp"; export DEVENV_IMGNAME="$ORGANIZATION/devenv"; From 65e99cabbfe147ca9f317a341c76d4954f1beb36 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 11:18:35 +0200 Subject: [PATCH 2/6] :paperclip: Fix linter issues Related to the linter update on devenv --- backend/src/app/db.clj | 2 +- backend/src/app/rpc/mutations/ldap.clj | 3 ++- backend/src/app/storage/s3.clj | 3 ++- backend/src/app/util/emails.clj | 6 ++++-- frontend/src/app/main/ui/shapes/attrs.cljs | 14 +++++++------- frontend/src/app/main/ui/shapes/custom_stroke.cljs | 2 +- frontend/src/app/main/ui/shapes/export.cljs | 4 ++-- frontend/src/app/main/ui/shapes/group.cljs | 8 ++++---- frontend/src/app/main/ui/shapes/shape.cljs | 3 +-- frontend/src/app/main/ui/shapes/svg_defs.cljs | 3 +-- frontend/src/app/main/ui/shapes/text/fo_text.cljs | 4 ++-- .../src/app/main/ui/viewer/handoff/render.cljs | 8 ++++---- frontend/src/app/util/object.cljs | 4 ++-- 13 files changed, 33 insertions(+), 31 deletions(-) diff --git a/backend/src/app/db.clj b/backend/src/app/db.clj index c874fb9cc..9b923495b 100644 --- a/backend/src/app/db.clj +++ b/backend/src/app/db.clj @@ -213,7 +213,7 @@ [& args] `(jdbc/with-transaction ~@args)) -(defn ^Connection open +(defn open [pool] (jdbc/get-connection pool)) diff --git a/backend/src/app/rpc/mutations/ldap.clj b/backend/src/app/rpc/mutations/ldap.clj index b4cc37afb..8ff5c2305 100644 --- a/backend/src/app/rpc/mutations/ldap.clj +++ b/backend/src/app/rpc/mutations/ldap.clj @@ -27,7 +27,8 @@ (s/def ::info-data (s/keys :req-un [::fullname ::email ::backend])) -(defn ^java.lang.AutoCloseable connect +(defn connect + ^java.lang.AutoCloseable [] (let [params {:ssl? (cfg/get :ldap-ssl) :startTLS? (cfg/get :ldap-starttls) diff --git a/backend/src/app/storage/s3.clj b/backend/src/app/storage/s3.clj index f169f6bcf..9c2129638 100644 --- a/backend/src/app/storage/s3.clj +++ b/backend/src/app/storage/s3.clj @@ -130,7 +130,8 @@ (def default-timeout (dt/duration {:seconds 30})) -(defn- ^Region lookup-region +(defn- lookup-region + ^Region [region] (Region/of (name region))) diff --git a/backend/src/app/util/emails.clj b/backend/src/app/util/emails.clj index 7136a288c..dca9b732e 100644 --- a/backend/src/app/util/emails.clj +++ b/backend/src/app/util/emails.clj @@ -30,7 +30,8 @@ [v] (InternetAddress/parse ^String v)) -(defn- ^Message$RecipientType resolve-recipient-type +(defn- resolve-recipient-type + ^Message$RecipientType [type] (case type :to Message$RecipientType/TO @@ -157,7 +158,8 @@ (.setDebug session debug) session)) -(defn ^MimeMessage smtp-message +(defn smtp-message + ^MimeMessage [cfg message] (let [^Session session (smtp-session cfg)] (build-message cfg session message))) diff --git a/frontend/src/app/main/ui/shapes/attrs.cljs b/frontend/src/app/main/ui/shapes/attrs.cljs index 3eb2d1377..32353e9f7 100644 --- a/frontend/src/app/main/ui/shapes/attrs.cljs +++ b/frontend/src/app/main/ui/shapes/attrs.cljs @@ -169,7 +169,7 @@ [svg-attrs svg-styles] (extract-svg-attrs render-id svg-defs svg-attrs) - styles (-> (obj/get props "style" (obj/new)) + styles (-> (obj/get props "style" (obj/create)) (obj/merge! svg-styles) (add-layer-props shape)) @@ -211,24 +211,24 @@ (defn extract-style-attrs [shape] - (-> (obj/new) + (-> (obj/create) (add-style-attrs shape))) (defn extract-fill-attrs [fill-data render-id index type] - (let [fill-styles (-> (obj/get fill-data "style" (obj/new)) + (let [fill-styles (-> (obj/get fill-data "style" (obj/create)) (add-fill fill-data render-id index type))] - (-> (obj/new) + (-> (obj/create) (obj/set! "style" fill-styles)))) (defn extract-stroke-attrs [stroke-data index render-id] - (let [stroke-styles (-> (obj/get stroke-data "style" (obj/new)) + (let [stroke-styles (-> (obj/get stroke-data "style" (obj/create)) (add-stroke stroke-data render-id index))] - (-> (obj/new) + (-> (obj/create) (obj/set! "style" stroke-styles)))) (defn extract-border-radius-attrs [shape] - (-> (obj/new) + (-> (obj/create) (add-border-radius shape))) diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index 5c5782b02..775a2eb6d 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -428,7 +428,7 @@ elem-name (obj/get child "type") render-id (or (obj/get props "render-id") (mf/use-ctx muc/render-ctx)) stroke-id (dm/fmt "strokes-%" (:id shape)) - stroke-props (-> (obj/new) + stroke-props (-> (obj/create) (obj/set! "id" stroke-id) (cond-> ;; There is a blur diff --git a/frontend/src/app/main/ui/shapes/export.cljs b/frontend/src/app/main/ui/shapes/export.cljs index c5b548ccf..c59b46a6b 100644 --- a/frontend/src/app/main/ui/shapes/export.cljs +++ b/frontend/src/app/main/ui/shapes/export.cljs @@ -262,7 +262,7 @@ (when (= (:type shape) :svg-raw) (let [shape (-> shape (d/update-in-when [:content :attrs :style] str->style)) props - (-> (obj/new) + (-> (obj/create) (obj/set! "penpot:x" (:x shape)) (obj/set! "penpot:y" (:y shape)) (obj/set! "penpot:width" (:width shape)) @@ -328,7 +328,7 @@ (mf/defc export-data [{:keys [shape]}] - (let [props (-> (obj/new) (add-data shape) (add-library-refs shape))] + (let [props (-> (obj/create) (add-data shape) (add-library-refs shape))] [:> "penpot:shape" props (export-shadow-data shape) (export-blur-data shape) diff --git a/frontend/src/app/main/ui/shapes/group.cljs b/frontend/src/app/main/ui/shapes/group.cljs index 403a9f2a0..88dc6186d 100644 --- a/frontend/src/app/main/ui/shapes/group.cljs +++ b/frontend/src/app/main/ui/shapes/group.cljs @@ -34,18 +34,18 @@ ; Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1734805 [clip-wrapper clip-props] (if masked-group? - ["g" (-> (obj/new) + ["g" (-> (obj/create) (obj/set! "clipPath" (clip-url render-id mask)))] [mf/Fragment nil]) [mask-wrapper mask-props] (if masked-group? - ["g" (-> (obj/new) - (obj/set! "mask" (mask-url render-id mask)))] + ["g" (-> (obj/create) + (obj/set! "mask" (mask-url render-id mask)))] [mf/Fragment nil]) ;; This factory is generic, it's used for viewer, workspace and handoff. - ;; These props are generated in viewer wrappers only, in the rest of the + ;; These props are generated in viewer wrappers only, in the rest of the ;; cases these props will be nil, not affecting the code. delta (unchecked-get props "delta") fixed? (unchecked-get props "fixed?")] diff --git a/frontend/src/app/main/ui/shapes/shape.cljs b/frontend/src/app/main/ui/shapes/shape.cljs index 6ec138194..c22da29d8 100644 --- a/frontend/src/app/main/ui/shapes/shape.cljs +++ b/frontend/src/app/main/ui/shapes/shape.cljs @@ -55,9 +55,8 @@ type (:type shape) render-id (mf/use-memo #(str (uuid/next))) filter-id (str "filter_" render-id) - styles (-> (obj/new) + styles (-> (obj/create) (obj/set! "pointerEvents" pointer-events) - (cond-> (and (:blend-mode shape) (not= (:blend-mode shape) :normal)) (obj/set! "mixBlendMode" (d/name (:blend-mode shape))))) diff --git a/frontend/src/app/main/ui/shapes/svg_defs.cljs b/frontend/src/app/main/ui/shapes/svg_defs.cljs index d127361cb..d46007c9f 100644 --- a/frontend/src/app/main/ui/shapes/svg_defs.cljs +++ b/frontend/src/app/main/ui/shapes/svg_defs.cljs @@ -11,7 +11,6 @@ [app.common.geom.matrix :as gmt] [app.common.geom.shapes :as gsh] [app.main.ui.shapes.filters :as f] - [app.util.object :as obj] [app.util.svg :as usvg] [rumext.alpha :as mf])) @@ -68,7 +67,7 @@ [wrapper wrapper-props] (if (= tag :mask) ["g" #js {:className "svg-mask-wrapper" :transform (str transform)}] - [mf/Fragment (obj/new)])] + [mf/Fragment #js {}])] [:> (name tag) (clj->js attrs) [:> wrapper wrapper-props diff --git a/frontend/src/app/main/ui/shapes/text/fo_text.cljs b/frontend/src/app/main/ui/shapes/text/fo_text.cljs index 1e6a259d1..8f3f53575 100644 --- a/frontend/src/app/main/ui/shapes/text/fo_text.cljs +++ b/frontend/src/app/main/ui/shapes/text/fo_text.cljs @@ -212,11 +212,11 @@ :y y :id id :data-colors (->> colors (str/join ",")) - :data-mapping (-> color-mapping-inverse (clj->js) (js/JSON.stringify)) + :data-mapping (-> color-mapping-inverse clj->js js/JSON.stringify) :transform transform :width (if (#{:auto-width} grow-type) 100000 width) :height (if (#{:auto-height :auto-width} grow-type) 100000 height) - :style (-> (obj/new) (attrs/add-layer-props shape)) + :style (-> (obj/create) (attrs/add-layer-props shape)) :ref ref} ;; We use a class here because react has a bug that won't use the appropriate selector for ;; `background-clip` diff --git a/frontend/src/app/main/ui/viewer/handoff/render.cljs b/frontend/src/app/main/ui/viewer/handoff/render.cljs index a016077cc..d46c2eabd 100644 --- a/frontend/src/app/main/ui/viewer/handoff/render.cljs +++ b/frontend/src/app/main/ui/viewer/handoff/render.cljs @@ -89,7 +89,7 @@ childs (mapv #(get objects %) (:shapes shape)) shape (geom/transform-shape shape) - props (-> (obj/new) + props (-> (obj/create) (obj/merge! props) (obj/merge! #js {:shape shape :childs childs}))] @@ -105,7 +105,7 @@ [props] (let [shape (unchecked-get props "shape") childs (mapv #(get objects %) (:shapes shape)) - props (-> (obj/new) + props (-> (obj/create) (obj/merge! props) (obj/merge! #js {:childs childs}))] [:> group-wrapper props])))) @@ -121,7 +121,7 @@ (let [shape (unchecked-get props "shape") children (->> (cph/get-children-ids objects (:id shape)) (select-keys objects)) - props (-> (obj/new) + props (-> (obj/create) (obj/merge! props) (obj/merge! #js {:childs children}))] [:> bool-wrapper props])))) @@ -136,7 +136,7 @@ [props] (let [shape (unchecked-get props "shape") childs (mapv #(get objects %) (:shapes shape)) - props (-> (obj/new) + props (-> (obj/create) (obj/merge! props) (obj/merge! #js {:childs childs}))] [:> svg-raw-wrapper props])))) diff --git a/frontend/src/app/util/object.cljs b/frontend/src/app/util/object.cljs index 0abdd9c90..325cfe344 100644 --- a/frontend/src/app/util/object.cljs +++ b/frontend/src/app/util/object.cljs @@ -6,12 +6,12 @@ (ns app.util.object "A collection of helpers for work with javascript objects." - (:refer-clojure :exclude [set! get get-in merge clone contains?]) + (:refer-clojure :exclude [set! new get get-in merge clone contains?]) (:require ["lodash/omit" :as omit] [cuerdas.core :as str])) -(defn new [] #js {}) +(defn create [] #js {}) (defn get ([obj k] From e5cb5860a8befe6ef200ffa852494fbe2f9c7ef1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 13:01:31 +0200 Subject: [PATCH 3/6] :arrow_up: Update cuerdas dep (fixes dm/str nil handling) --- common/deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/deps.edn b/common/deps.edn index 01cb47c92..b267ccefc 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -22,7 +22,7 @@ java-http-clj/java-http-clj {:mvn/version "0.4.3"} funcool/promesa {:mvn/version "8.0.450"} - funcool/cuerdas {:mvn/version "2022.03.27-397"} + funcool/cuerdas {:mvn/version "2022.06.13-401"} lambdaisland/uri {:mvn/version "1.13.95" :exclusions [org.clojure/data.json]} From 1174590af430a13af5a0f819b6af5f95255f306e Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 13:10:36 +0200 Subject: [PATCH 4/6] :paperclip: Add hack for devtools unhandled rejection --- frontend/src/app/main/errors.cljs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/errors.cljs b/frontend/src/app/main/errors.cljs index 604b0b039..9bacf35c5 100644 --- a/frontend/src/app/main/errors.cljs +++ b/frontend/src/app/main/errors.cljs @@ -184,14 +184,19 @@ (defn on-unhandled-error [error] - (if (instance? ExceptionInfo error) - (-> error ex-data ptk/handle-error) - (let [hint (ex-message error) - msg (dm/str "Unhandled Internal Error: " hint)] - (ts/schedule #(st/emit! (rt/assign-exception error))) - (js/console.group msg) - (ex/ignoring (js/console.error error)) - (js/console.groupEnd msg)))) + (letfn [(is-ignorable-exception? [cause] + (condp = (ex-message cause) + "Possible side-effect in debug-evaluate" true + false))] + (if (instance? ExceptionInfo error) + (-> error ex-data ptk/handle-error) + (when-not (is-ignorable-exception? error) + (let [hint (ex-message error) + msg (dm/str "Unhandled Internal Error: " hint)] + (ts/schedule #(st/emit! (rt/assign-exception error))) + (js/console.group msg) + (ex/ignoring (js/console.error error)) + (js/console.groupEnd msg)))))) (defonce uncaught-error-handler (letfn [(on-error [event] From 65753cdc17a453bec94bf56a517c366ef2b31066 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 13:42:32 +0200 Subject: [PATCH 5/6] :arrow_up: Update yetti dep (fix multipart field size validation params handling) --- backend/deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/deps.edn b/backend/deps.edn index b9591d827..506510a99 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -20,7 +20,7 @@ io.lettuce/lettuce-core {:mvn/version "6.1.8.RELEASE"} java-http-clj/java-http-clj {:mvn/version "0.4.3"} - funcool/yetti {:git/tag "v9.1" :git/sha "63f35d9" + funcool/yetti {:git/tag "v9.2" :git/sha "4ddcc03" :git/url "https://github.com/funcool/yetti.git" :exclusions [org.slf4j/slf4j-api]} From 6190ce9b35b20f79dc8d66765ca28bcd7e0432ed Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 13 Jun 2022 14:44:40 +0200 Subject: [PATCH 6/6] :bug: Add missing resolver to frontend docker image --- docker/images/files/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/images/files/nginx.conf b/docker/images/files/nginx.conf index 52922f3a0..35863895b 100644 --- a/docker/images/files/nginx.conf +++ b/docker/images/files/nginx.conf @@ -38,6 +38,8 @@ http { gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json; + resolver 127.0.0.11; + map $http_upgrade $connection_upgrade { default upgrade; '' close;