mirror of
https://github.com/penpot/penpot.git
synced 2026-11-23 19:00:36 +00:00
The frontend replay of generated component programs runs in node, where the WASM render engine is not available. A `test-wasm` build runs the same replay in a browser page: it loads the engine on a canvas, turns on render-wasm/v1 and loads the shapes of the replayed page into the engine whenever they change, so every layout goes through it. Text edits commit through the SVG editor, as the WASM editor needs its own editing session. The page reads the programs the common tests pin, which a script writes out, and reports each one to the console. Build with `pnpm run build:test-wasm`, then open `/test-wasm.html?programs=programs.js`. Test tooling only; the benchmark is not run. AI-assisted-by: claude-opus-5-5
147 lines
6.8 KiB
JSON
147 lines
6.8 KiB
JSON
{
|
|
"name": "frontend",
|
|
"version": "1.0.0",
|
|
"license": "MPL-2.0",
|
|
"author": "Kaleidos INC Sucursal en España SL",
|
|
"private": true,
|
|
"packageManager": "pnpm@12.21.0+sha512.66fd8278ee28935ce951792d34367ff3af5c432a2756445823029533835b8da529bbe0be5130afd56ed0713fb8789e47bad82d93bd5ae2fe54b15562d6276ef0",
|
|
"browserslist": [
|
|
"defaults"
|
|
],
|
|
"type": "module",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/penpot/penpot"
|
|
},
|
|
"scripts": {
|
|
"build:app:assets": "node ./scripts/build-app-assets.js",
|
|
"build:fonts-preview": "node ./scripts/build-fonts-preview.js",
|
|
"build:storybook": "(cd packages/ui && pnpm run build) && pnpm run build:storybook:assets && pnpm run build:storybook:cljs && storybook build",
|
|
"build:storybook:assets": "node ./scripts/build-storybook-assets.js",
|
|
"build:storybook:cljs": "clojure -M:dev:shadow-cljs compile storybook",
|
|
"build:wasm": "../render-wasm/build frontend",
|
|
"build:renderer-benchmarks:runner": "clojure -M:dev:renderer-bench release bench-render-wasm-commands bench-render-wasm-runner",
|
|
"render-bench": "sh -c 'w=; [ \"${PENPOT_GPU:-0}\" = 1 ] && w=\"xvfb-run -a\"; exec $w node target/performance/render-wasm/runner.cjs \"$@\"' render-bench",
|
|
"build:app:libs": "node ./scripts/build-libs.js",
|
|
"build:app:main": "clojure -M:dev:shadow-cljs release main worker",
|
|
"build:app:worker": "clojure -M:dev:shadow-cljs release worker",
|
|
"build:app": "pnpm run clear:shadow-cache && pnpm run build:app:main && pnpm run build:app:libs",
|
|
"check-fmt:clj": "cljfmt check --parallel=true src/ performance/ test/",
|
|
"check-fmt:js": "prettier -c src/**/*.stories.jsx -c playwright/**/*.js -c scripts/**/*.js -c text-editor/**/*.js",
|
|
"check-fmt:scss": "prettier -c resources/styles -c src/**/*.scss",
|
|
"fmt:clj": "cljfmt fix --parallel=true src/ performance/ test/",
|
|
"fmt:js": "prettier -c src/**/*.stories.jsx -c playwright/**/*.js -c scripts/**/*.js -c text-editor/**/*.js -w",
|
|
"fmt:scss": "prettier -c resources/styles -c src/**/*.scss -w",
|
|
"lint:clj": "clj-kondo --fail-level error --config-dir ../.clj-kondo --lint ../common/src src/ performance/ test/performance_tests/render_wasm/",
|
|
"lint:js": "exit 0",
|
|
"lint:renderer-benchmarks": "clj-kondo --config-dir ../.clj-kondo --lint performance/ test/performance_tests/render_wasm/",
|
|
"lint:scss": "pnpm exec stylelint '{src,resources}/**/*.scss'",
|
|
"build:test": "pnpm run build:wasm && clojure -M:dev:shadow-cljs compile test",
|
|
"build:renderer-benchmarks:tests": "clojure -M:dev:shadow-cljs compile performance-tests",
|
|
"build:test-wasm": "clojure -M:dev:shadow-cljs compile test-wasm && node ./scripts/build-test-wasm.js && clojure -M scripts/test-wasm-programs.clj",
|
|
"test": "pnpm run build:test && node target/tests/test.js",
|
|
"test:quiet": "node ./scripts/test-quiet.js",
|
|
"test:renderer-benchmarks": "pnpm run build:renderer-benchmarks:tests && node target/performance-tests/test.js",
|
|
"test:coverage": "pnpm run build:test && node ./scripts/coverage.js",
|
|
"test:storybook": "vitest run --project=storybook",
|
|
"watch:test": "mkdir -p target/tests && concurrently \"clojure -M:dev:shadow-cljs watch test\" \"nodemon -C -d 2 -w target/tests --exec 'node target/tests/test.js'\"",
|
|
"test:e2e": "playwright test --project default",
|
|
"translations": "node ./scripts/translations.js",
|
|
"watch:app:assets": "node ./scripts/watch.js",
|
|
"watch:app:libs": "node ./scripts/build-libs.js --watch",
|
|
"watch:app:main": "clojure -M:dev:shadow-cljs watch main worker storybook",
|
|
"clear:shadow-cache": "rm -rf .shadow-cljs",
|
|
"clear:wasm": "../render-wasm/clean frontend",
|
|
"watch": "exit 0",
|
|
"watch:app": "pnpm run clear:shadow-cache && pnpm run clear:wasm && pnpm run build:wasm && concurrently --kill-others-on-fail \"pnpm run watch:app:assets\" \"pnpm run watch:app:main\" \"pnpm run watch:app:libs\"",
|
|
"watch:storybook": "pnpm run build:storybook:assets && concurrently --kill-others-on-fail \"storybook dev -p 3451 -h 0.0.0.0 --no-open\" \"node ./scripts/watch-storybook.js\"",
|
|
"postinstall": "(cd ../plugins/libs/plugins-runtime; pnpm install; pnpm run build) && (cd packages/ui && pnpm run build)"
|
|
},
|
|
"devDependencies": {
|
|
"@penpot/draft-js": "link:packages/draft-js",
|
|
"@penpot/mousetrap": "link:packages/mousetrap",
|
|
"@penpot/plugins-runtime": "link:../plugins/libs/plugins-runtime",
|
|
"@penpot/svgo": "penpot/svgo#3.3.0",
|
|
"@penpot/text-editor": "link:text-editor",
|
|
"@penpot/ua-parser": "penpot/ua-parser#1.0.0",
|
|
"@playwright/test": "1.65.1",
|
|
"@storybook/addon-docs": "10.6.7",
|
|
"@storybook/addon-themes": "10.6.7",
|
|
"@storybook/addon-vitest": "10.6.7",
|
|
"@storybook/react-vite": "10.6.7",
|
|
"@tokens-studio/sd-transforms": "2.0.3",
|
|
"@types/node": "^26.6.6",
|
|
"@vitest/browser": "5.1.1",
|
|
"@vitest/browser-playwright": "5.1.1",
|
|
"@vitest/coverage-v8": "5.1.1",
|
|
"@vitest/istanbul-lib-coverage": "2.1.1",
|
|
"@vitest/istanbul-lib-report": "2.1.1",
|
|
"@zip.js/zip.js": "2.8.34",
|
|
"acorn": "8.19.0",
|
|
"ast-v8-to-istanbul": "1.0.8",
|
|
"autoprefixer": "^10.6.2",
|
|
"compression": "^1.8.2",
|
|
"concurrently": "^10.0.7",
|
|
"date-fns": "^4.4.0",
|
|
"esbuild": "^0.28.2",
|
|
"eventsource-parser": "^4.1.3",
|
|
"express": "^5.3.0",
|
|
"fancy-log": "^2.0.0",
|
|
"getopts": "^2.3.0",
|
|
"gettext-parser": "^10.0.0",
|
|
"highlight.js": "^11.12.0",
|
|
"js-beautify": "^2.0.3",
|
|
"jsdom": "^31.0.1",
|
|
"lodash": "^4.18.1",
|
|
"lodash.debounce": "^4.0.8",
|
|
"map-stream": "0.0.7",
|
|
"marked": "^18.2.1",
|
|
"mkdirp": "^3.0.1",
|
|
"mustache": "^4.2.0",
|
|
"nodemon": "^3.1.14",
|
|
"npm-run-all": "^4.1.5",
|
|
"opentype.js": "^2.0.0",
|
|
"p-limit": "^7.3.3",
|
|
"playwright": "1.65.1",
|
|
"postcss": "^8.5.33",
|
|
"postcss-clean": "^1.2.2",
|
|
"postcss-modules": "^9.1.2",
|
|
"postcss-scss": "^4.0.9",
|
|
"prettier": "3.10.1",
|
|
"pretty-time": "^1.1.0",
|
|
"prop-types": "^15.8.1",
|
|
"randomcolor": "^0.6.2",
|
|
"react": "19.3.1",
|
|
"react-dom": "19.3.1",
|
|
"react-error-boundary": "^6.1.6",
|
|
"react-virtualized": "^9.22.6",
|
|
"rimraf": "^6.1.4",
|
|
"rxjs": "8.0.0-alpha.14",
|
|
"sass": "^1.108.2",
|
|
"sass-embedded": "^1.108.2",
|
|
"sax": "^1.6.1",
|
|
"scheduler": "^0.28.0",
|
|
"source-map-support": "^0.5.21",
|
|
"storybook": "10.6.7",
|
|
"style-dictionary": "5.8.0",
|
|
"stylelint": "^18.0.0",
|
|
"stylelint-config-standard-scss": "^18.0.0",
|
|
"stylelint-plugin-logical-css": "^2.1.1",
|
|
"stylelint-scss": "^7.5.0",
|
|
"svg-sprite": "^2.0.4",
|
|
"tdigest": "^0.1.3",
|
|
"tinycolor2": "^1.6.0",
|
|
"typescript": "^6.0.3",
|
|
"vite": "^8.3.8",
|
|
"vitest": "^5.1.1",
|
|
"wait-on": "^9.5.1",
|
|
"watcher": "^2.3.1",
|
|
"workerpool": "^10.0.3",
|
|
"xregexp": "^5.1.3"
|
|
},
|
|
"dependencies": {
|
|
"@penpot/ui": "link:packages/ui",
|
|
"react-aria-components": "^1.22.1"
|
|
}
|
|
}
|