Files
webstudio/package.json
T
Oleg Isonen 4273b7001f refactor: Organize Builder development and test tooling (#6285)
## Outcome

Builder development, backend, E2E, and CI tooling now share one
ownership model: Builder defines named commands and backend modes, while
CI only schedules those commands.

## Technical choices

- Group shared Compose files, PostgreSQL initialization, and backend
helpers under `apps/builder/backend`.
- Resolve `compose.<mode>.yaml` by convention instead of maintaining
Compose filename lists in scripts and workflows.
- Keep persistent development and disposable test Compose projects
separate by default, while allowing the standard `COMPOSE_PROJECT_NAME`
override.
- Make schema snapshots invalidate from discovered migration sources and
backend files.
- Move E2E behavior recipes into named Builder commands; retain concise
root proxies for developer entry points.
- Let Vitest allocate available browser ports instead of maintaining a
cross-package port registry.
- Keep test-suite scheduling explicit in `main.yml`, but move executable
test commands to root package scripts.
- Move fixture-size enforcement from inline GitHub JavaScript into a
locally runnable repository script.

## Todo

- [x] Consolidate Builder backend and Compose ownership.
- [x] Add named development, E2E, schema-cache, Supabase, and CI-shard
commands.
- [x] Remove Compose topology and behavior flags from CI.
- [x] Remove the static Vitest browser-port registry.
- [x] Extract fixture-size checking from the workflow.
- [x] Verify migration bootstrap, snapshot-backed E2E, tests, builds,
types, formatting, lint, generated contracts, and workflow syntax.
- [x] Review documentation impact: updated the E2E developer guide; no
user-facing `docs/` content is affected.

## Verification

- Full package, CLI, Builder core, and Builder app test suites
- Full workspace typecheck
- Builder production build
- Schema-cache generation through the complete migration history
- Supabase migration compatibility
- Snapshot-backed Playwright animation workflow
- Backend regression tests, including demonstrated fail/pass coverage
- All four Compose mode configurations
- `oxfmt`, `oxlint`, package boundaries, generated API, and generated
docs checks
- `actionlint` and Bash syntax checks

The fixture-size checker preserves the existing Linux `du` thresholds.
Its three inputs build locally; macOS allocation sizes are not directly
comparable to the Linux CI thresholds, so CI remains the authoritative
size result.
2026-08-31 21:09:54 +02:00

113 lines
6.5 KiB
JSON

{
"packageManager": "pnpm@9.14.4",
"name": "webstudio-root",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "pnpm -r --filter='!./fixtures/*' build",
"webstudio": "node packages/cli/local.js",
"dts": "pnpm -r dts",
"dev": "pnpm --filter=@webstudio-is/builder dev:local",
"evaluations": "pnpm --filter webstudio evaluations",
"lint": "oxlint --deny-warnings",
"check:package-boundaries": "node scripts/check-package-boundaries.mjs",
"check:generated-api": "pnpm --filter @webstudio-is/project-build generate-runtime-operation-contracts && pnpm --filter @webstudio-is/builder generate-server-only-api-metadata && node scripts/check-clean-files.mjs packages/project-build/src/contracts/__generated__/runtime-operation-contracts.ts packages/protocol/src/builder-api/__generated__/server-only-router-operation-metadata.ts",
"check:generated-docs": "pnpm --filter @webstudio-is/project-build generate-docs && pnpm --filter webstudio generate-docs && pnpm docs:mcp:test && pnpm docs:mcp:typecheck && pnpm docs:content-engine:test && pnpm docs:mcp:check && pnpm docs:content-engine:check && node scripts/check-clean-files.mjs packages/project-build/src/docs.generated.ts packages/cli/src/docs.generated.ts",
"check:fixture-sizes": "tsx scripts/check-fixture-sizes.ts",
"docs:mcp:sync": "tsx scripts/docs/generate-mcp-docs.ts",
"docs:mcp:check": "pnpm docs:mcp:sync && node scripts/check-clean-files.mjs docs/university/mcp.md",
"docs:mcp:test": "tsx --test scripts/docs/generate-mcp-docs.test.ts",
"docs:mcp:typecheck": "tsc --noEmit -p scripts/docs/tsconfig.json",
"docs:content-engine:sync": "tsx scripts/docs/generate-content-engine-docs.ts",
"docs:content-engine:check": "pnpm docs:content-engine:sync && node scripts/check-clean-files.mjs docs/university/foundations/content-engine-reference.md",
"docs:content-engine:test": "tsx --test scripts/docs/generate-content-engine-docs.test.ts && pnpm --filter webstudio exec vitest run src/content-engine-reference.test.ts",
"test:packages": "pnpm -r --filter '!@webstudio-is/builder' --filter '!webstudio' test",
"test:cli": "pnpm --filter webstudio test",
"test:builder:core": "pnpm --filter @webstudio-is/builder exec vitest run --project 'core-*'",
"test:builder:app": "pnpm --filter @webstudio-is/builder exec vitest run --project 'app-*'",
"fixtures": "pnpm -r fixtures:link && pnpm -r fixtures:sync && pnpm -r fixtures:build",
"checks": "pnpm -r test && pnpm -r typecheck && pnpm lint && pnpm check:package-boundaries && pnpm check:generated-api && pnpm check:generated-docs && pnpm fixtures",
"e2e:builder": "pnpm --filter=@webstudio-is/builder e2e",
"e2e:builder:build": "pnpm --filter=@webstudio-is/builder build",
"e2e:builder:dev:backend": "pnpm --filter=@webstudio-is/builder e2e:dev:backend",
"e2e:builder:dev": "pnpm --filter=@webstudio-is/builder e2e:dev",
"e2e:builder:refresh-schema-cache": "pnpm --filter=@webstudio-is/builder e2e:schema-cache",
"e2e:builder:check-supabase-migrations": "pnpm --filter=@webstudio-is/builder e2e:supabase-migrations",
"playwright": "pnpm -r playwright-init",
"format": "oxfmt",
"storybook:dev": "storybook dev -p 6006",
"storybook:build": "storybook build",
"visual-regression": "tsx --conditions=webstudio scripts/visual-regression/run.ts",
"visual-regression:ui": "tsx --conditions=webstudio scripts/visual-regression/run.ts --open-report",
"visual-regression:report": "tsx scripts/visual-regression/open-report.ts",
"visual-regression:test": "tsx --test scripts/visual-regression/*.test.ts",
"visual-regression:typecheck": "tsc -p scripts/visual-regression/tsconfig.json",
"migrations": "pnpm --filter=@webstudio-is/prisma-client generate && pnpm --filter=./packages/prisma-client migrations --dev --cwd ../../apps/builder",
"prepare": "which git && git config core.hooksPath .git/hooks/ && simple-git-hooks || echo git not installed",
"local:version-snapshot": "pnpm -r exec pnpm version prepatch --preid $(cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | fold -w 8 | head -n 1)",
"local:publish-snapshot": "pnpm -r publish --access public --no-git-checks --registry http://localhost:4873",
"local:dangerously-undo-version-snapshot": "git restore --source=$(git branch --show-current) '**/*/package.json'",
"local:release": "pnpm build && pnpm dts && pnpm local:version-snapshot && pnpm local:publish-snapshot && pnpm local:dangerously-undo-version-snapshot && echo \"now execute\npnpm up -r -L '@webstudio-is/*' --registry http://localhost:4873\"",
"clean:deep": "bash ./cleanup.sh"
},
"simple-git-hooks": {
"pre-commit": "./node_modules/.bin/nano-staged"
},
"devDependencies": {
"@fontsource-variable/inter": "^5.0.20",
"@fontsource-variable/manrope": "^5.0.20",
"@fontsource/roboto-mono": "^5.0.18",
"@modelcontextprotocol/sdk": "^1.10.0",
"@radix-ui/react-tooltip": "^1.2.4",
"@storybook/addon-actions": "^8.6.4",
"@storybook/addon-backgrounds": "^8.6.4",
"@storybook/addon-controls": "^8.6.4",
"@storybook/addon-toolbars": "^8.6.4",
"@storybook/react": "^8.6.4",
"@storybook/react-vite": "^8.6.4",
"@types/node": "^22.13.10",
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.25",
"@webstudio-is/project-build": "workspace:^",
"@webstudio-is/vision": "workspace:^",
"esbuild": "^0.25.3",
"nano-staged": "^0.8.0",
"oxfmt": "0.58.0",
"oxlint": "^1.73.0",
"parse5": "7.3.0",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"simple-git-hooks": "^2.11.1",
"storybook": "^8.6.4",
"tsx": "^4.19.3",
"typescript": "7.0.2",
"webstudio": "workspace:^",
"vite": "^6.3.4"
},
"engines": {
"node": "22",
"pnpm": "^9.14.0",
"yarn": "This project is configured to use pnpm"
},
"nano-staged": {
"*.{ts,tsx,js,json,css,md}": "oxfmt"
},
"pnpm": {
"overrides": {
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.25",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"playwright": "1.50.1",
"@playwright/test": "1.50.1",
"vite@<7": "6.3.4"
},
"patchedDependencies": {
"@stitches/react@1.3.1-1": "patches/@stitches__react@1.3.1-1.patch",
"@radix-ui/react-scroll-area@1.0.5": "patches/@radix-ui__react-scroll-area@1.0.5.patch",
"@remix-run/dev": "patches/@remix-run__dev.patch"
}
}
}