0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-03 11:25:27 -05:00

🐛 Fix nodejs incompatibility with common tests prepend script (#5730)

* 🐛 Fix nodejs incompatibility with common tests prepend script

* 📎 Fix linter issues

Related to the upcoming update of clj-kondo
This commit is contained in:
Andrey Antukh 2025-01-30 14:32:43 +01:00 committed by GitHub
parent 773debafda
commit 0870910dcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 19 additions and 12 deletions

View file

@ -58,6 +58,12 @@
:redundant-do
{:level :off}
:redundant-ignore
{:level :off}
:redundant-nested-call
{:level :off}
:earmuffed-var-not-dynamic
{:level :off}

View file

@ -9,7 +9,7 @@
:modules
{:test {:init-fn common-tests.runner/-main
:prepend-js "globalThis.navigator = {userAgent: \"\"}"}}}
:prepend-js ";if (typeof globalThis.navigator?.userAgent === 'undefined') { globalThis.navigator = {userAgent: ''}; };"}}}
:bench
{:target :node-script

View file

@ -4,7 +4,6 @@
;;
;; Copyright (c) KALEIDOS INC
#_:clj-kondo/ignore
(ns app.common.data.macros
"Data retrieval & manipulation specific macros."
(:refer-clojure :exclude [get-in select-keys str with-open min max])

View file

@ -496,7 +496,7 @@
(let [repair-shape
(fn [shape]
;; Remove the swap slot
(log/debug :hint (str " -> remove swap-slot"))
(log/debug :hint " -> remove swap-slot")
(ctk/remove-swap-slot shape))]
(log/dbg :hint "repairing shape :misplaced-slot" :id (:id shape) :name (:name shape) :page-id page-id)

View file

@ -174,8 +174,10 @@
bounds
(cond
(or (empty? (:shapes shape))
(or (:masked-group shape) (= :bool (:type shape)))
(and (cfh/frame-shape? shape) (not (:show-content shape))))
(:masked-group shape)
(cfh/bool-shape? shape)
(and (cfh/frame-shape? shape)
(not (:show-content shape))))
[base-bounds]
:else

View file

@ -432,7 +432,7 @@ __metadata:
luxon: "npm:^3.4.4"
nodemon: "npm:^3.1.7"
sax: "npm:^1.4.1"
shadow-cljs: "npm:2.28.18"
shadow-cljs: "npm:2.28.20"
source-map-support: "npm:^0.5.21"
ws: "npm:^8.17.0"
languageName: unknown
@ -1793,9 +1793,9 @@ __metadata:
languageName: node
linkType: hard
"shadow-cljs@npm:2.28.18":
version: 2.28.18
resolution: "shadow-cljs@npm:2.28.18"
"shadow-cljs@npm:2.28.20":
version: 2.28.20
resolution: "shadow-cljs@npm:2.28.20"
dependencies:
node-libs-browser: "npm:^2.2.1"
readline-sync: "npm:^1.4.7"
@ -1805,7 +1805,7 @@ __metadata:
ws: "npm:^7.4.6"
bin:
shadow-cljs: cli/runner.js
checksum: 10c0/4732cd11a5722644a0a91ae5560a55f62432ae5317bd2d1fd5bf12af8354c81776f4fcfce5c477b43af1ac2ecd4a216887337e1b92cca37a1b8cb9c157a393c1
checksum: 10c0/f4aaa5127ffd7b717f00fec0b3e1d01df5f31effbaa741e4980a87432783d09a400807c39e3dcaeb4d7b3c13f432f55e96ead22291a9b90d437c8994d72fb2c2
languageName: node
linkType: hard

View file

@ -147,7 +147,7 @@
:modules
{:test {:init-fn frontend-tests.runner/init
:prepend-js "globalThis.navigator = {userAgent: \"\"}"}}}
:prepend-js ";if (typeof globalThis.navigator?.userAgent === 'undefined') { globalThis.navigator = {userAgent: ''}; };"}}}
:lib-penpot
{:target :esm

View file

@ -72,7 +72,7 @@
([context type id media]
(let [file-id (:file-id context)
path (case type
:manifest (str "manifest.json")
:manifest "manifest.json"
:page (str file-id "/" id ".svg")
:colors-list (str file-id "/colors.json")
:colors (let [ext (cm/mtype->extension (:mtype media))]