Merge pull request #5196 from penpot/niwinz-remove-graaljs

⬆️ Update deps (part 1) and remove graalvm js
This commit is contained in:
Alejandro 2024-10-29 08:48:50 +01:00 committed by GitHub
commit e7d7291947
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 2738 additions and 46535 deletions

View file

@ -6,6 +6,7 @@
(ns app.main.data.workspace.media
(:require
["svgo" :as svgo]
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.exceptions :as ex]
@ -14,7 +15,6 @@
[app.common.logging :as log]
[app.common.math :as mth]
[app.common.schema :as sm]
[app.common.svg :refer [optimize]]
[app.common.svg.shapes-builder :as csvg.shapes-builder]
[app.common.types.container :as ctn]
[app.common.types.shape :as cts]
@ -37,15 +37,15 @@
[promesa.core :as p]
[tubax.core :as tubax]))
(def ^:private svgo-config
{:multipass false
:plugins ["safeAndFastPreset"]})
(defn- optimize
[input]
(svgo/optimize input svgo/defaultOptions))
(defn svg->clj
[[name text]]
(try
(let [text (if (contains? cf/flags :frontend-svgo)
(optimize text svgo-config)
(optimize text)
text)
data (-> (tubax/xml->clj text)
(assoc :name name))]