Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
build: upgrade prettier (#3892)
Bogdan Chadkin4429b19c0e98
diff --git a/apps/builder/app/builder/features/settings-panel/resource-panel.tsx b/apps/builder/app/builder/features/settings-panel/resource-panel.tsxindex 0636cce694..45057e9c44 100644--- a/apps/builder/app/builder/features/settings-panel/resource-panel.tsx+++ b/apps/builder/app/builder/features/settings-panel/resource-panel.tsx@@ -507,11 +507,11 @@ const BodyField = ({value={isBodyLiteral? value- : JSON.stringify(+ : (JSON.stringify(evaluateExpressionWithinScope(value, scope),null,2- ) ?? ""+ ) ?? "")}onChange={onChange}onBlur={() => bodyRef.current?.checkValidity()}@@ -938,11 +938,11 @@ export const GraphqlResourceForm = forwardRef<value={isVariablesLiteral? variables- : JSON.stringify(+ : (JSON.stringify(evaluateExpressionWithinScope(variables, scope),null,2- ) ?? ""+ ) ?? "")}onChange={setVariables}onBlur={() => variablesRef.current?.checkValidity()}diff --git a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-layers.ts b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-layers.tsindex 72a4342153..9cad122a9e 100644--- a/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-layers.ts+++ b/apps/builder/app/builder/features/style-panel/sections/backgrounds/background-layers.ts@@ -275,8 +275,8 @@ export const setLayerProperty =: Array.from(Array(newValue.value.length), (_, index) =>// Do not override existing values with defaults for layerNum layerindex === 0- ? newPropertyStyle.value[layerNum] ??- layeredBackgroundPropsDefaults[property]+ ? (newPropertyStyle.value[layerNum] ??+ layeredBackgroundPropsDefaults[property]): layeredBackgroundPropsDefaults[property]);diff --git a/apps/builder/app/builder/features/style-panel/sections/position/position-control.tsx b/apps/builder/app/builder/features/style-panel/sections/position/position-control.tsxindex bab71c4653..db7add90ba 100644--- a/apps/builder/app/builder/features/style-panel/sections/position/position-control.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/position/position-control.tsx@@ -35,7 +35,7 @@ const Cell = ({}) => {const styleInfo = currentStyle[property];const finalValue: StyleValue | undefined = scrubStatus.isActive- ? scrubStatus.values[property] ?? styleInfo?.value+ ? (scrubStatus.values[property] ?? styleInfo?.value): styleInfo?.value;const styleSource = getStyleSource(styleInfo);diff --git a/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts b/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.tsindex 9fd7123b29..f2cf5210a6 100644--- a/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts+++ b/apps/builder/app/builder/features/style-panel/shared/css-value-input/parse-intermediate-or-invalid-value.ts@@ -33,7 +33,7 @@ export const parseIntermediateOrInvalidValue = (valueInfo.types.flat().includes("string") === false &&valueInfo.types.flat().includes("custom-ident") === false) {- const testUnit = "unit" in styleValue ? styleValue.unit ?? "px" : "px";+ const testUnit = "unit" in styleValue ? (styleValue.unit ?? "px") : "px";const styleInput = parseCssValue(property, `${value}${testUnit}`);if (styleInput.type !== "invalid") {@@ -86,7 +86,7 @@ export const parseIntermediateOrInvalidValue = (if (mathResult != null) {const unit =- matchedUnit ?? ("unit" in styleValue ? styleValue.unit ?? "px" : "px");+ matchedUnit ?? ("unit" in styleValue ? (styleValue.unit ?? "px") : "px");styleInput = parseCssValue(property, `${String(mathResult)}${unit}`);if (styleInput.type !== "invalid") {diff --git a/apps/builder/app/builder/features/style-panel/shared/style-info.ts b/apps/builder/app/builder/features/style-panel/shared/style-info.tsindex d422092169..e4358c7b27 100644--- a/apps/builder/app/builder/features/style-panel/shared/style-info.ts+++ b/apps/builder/app/builder/features/style-panel/shared/style-info.ts@@ -844,7 +844,7 @@ export const useStyleInfoByInstanceId = (const styleSourceIds =selectedInstanceId !== undefined- ? styleSourceSelections.get(selectedInstanceId)?.values ?? []+ ? (styleSourceSelections.get(selectedInstanceId)?.values ?? []): [];const lastStyleSourceId = styleSourceIds.at(-1);diff --git a/apps/builder/app/builder/features/topbar/publish.tsx b/apps/builder/app/builder/features/topbar/publish.tsxindex 2e6ed67c70..e9095b9a03 100644--- a/apps/builder/app/builder/features/topbar/publish.tsx+++ b/apps/builder/app/builder/features/topbar/publish.tsx@@ -601,7 +601,7 @@ const Content = (props: {const latestBuilds = useMemo(() => [- projectData?.success ? projectData.project.latestBuild ?? null : null,+ projectData?.success ? (projectData.project.latestBuild ?? null) : null,...domainsToPublish.map((domain) => domain.latestBuid),],[domainsToPublish, projectData]diff --git a/apps/builder/app/routes/$.tsx b/apps/builder/app/routes/$.tsxindex 476b7bd85f..04e5b8005d 100644--- a/apps/builder/app/routes/$.tsx+++ b/apps/builder/app/routes/$.tsx@@ -55,7 +55,7 @@ export const ErrorBoundary = () => {console.error({ error });const message = isRouteErrorResponse(error)- ? error.data.message ?? error.data+ ? (error.data.message ?? error.data): error instanceof Error? error.message: String(error);diff --git a/apps/builder/app/routes/builder.$projectId.tsx b/apps/builder/app/routes/builder.$projectId.tsxindex 5ddaf8c7df..7217f15803 100644--- a/apps/builder/app/routes/builder.$projectId.tsx+++ b/apps/builder/app/routes/builder.$projectId.tsx@@ -143,7 +143,7 @@ export const ErrorBoundary = () => {const error = useRouteError();console.error({ error });const message = isRouteErrorResponse(error)- ? error.data.message ?? error.data+ ? (error.data.message ?? error.data): error instanceof Error? error.message: String(error);diff --git a/fixtures/ssg/package.json b/fixtures/ssg/package.jsonindex cc83543923..83fad11da1 100644--- a/fixtures/ssg/package.json+++ b/fixtures/ssg/package.json@@ -25,7 +25,7 @@"@types/react": "^18.2.70","@types/react-dom": "^18.2.25","@vitejs/plugin-react": "^4.3.1",- "prettier": "3.3.2",+ "prettier": "3.3.3","typescript": "5.5.2","vite": "^5.3.5","webstudio": "workspace:*"diff --git a/package.json b/package.jsonindex 319d960069..0bf0ca0ec4 100644--- a/package.json+++ b/package.json@@ -45,14 +45,14 @@"eslint-plugin-unicorn": "^55.0.0","jest": "^29.7.0","nano-staged": "^0.8.0",- "prettier": "3.3.2",+ "prettier": "3.3.3","react": "18.3.0-canary-14898b6a9-20240318","react-dom": "18.3.0-canary-14898b6a9-20240318","simple-git-hooks": "^2.11.1","storybook": "^8.2.4","tsx": "^4.16.2","typescript": "5.5.2",- "typescript-eslint": "^8.0.0",+ "typescript-eslint": "^8.0.1","vite": "^5.3.5"},"engines": {diff --git a/packages/css-data/src/parse-css-value.ts b/packages/css-data/src/parse-css-value.tsindex a087238cd8..3dafcdc007 100644--- a/packages/css-data/src/parse-css-value.ts+++ b/packages/css-data/src/parse-css-value.ts@@ -366,7 +366,7 @@ export const parseCssValue = (// prevent infinite splitting into layers for itemsif (repeatedProps.has(property) && topLevel) {- const nodes = "children" in ast ? ast.children?.toArray() ?? [] : [ast];+ const nodes = "children" in ast ? (ast.children?.toArray() ?? []) : [ast];let invalid = false;const layersValue: StyleValue = {type: "layers",@@ -401,7 +401,7 @@ export const parseCssValue = (}if (property === "fontFamily") {- const nodes = "children" in ast ? ast.children?.toArray() ?? [] : [ast];+ const nodes = "children" in ast ? (ast.children?.toArray() ?? []) : [ast];return {type: "fontFamily",value: splitRepeated(nodes).map((nodes) => {diff --git a/packages/design-system/src/components/section-title.tsx b/packages/design-system/src/components/section-title.tsxindex 9cea259d67..f46d5a6a39 100644--- a/packages/design-system/src/components/section-title.tsx+++ b/packages/design-system/src/components/section-title.tsx@@ -124,7 +124,7 @@ export const SectionTitle = forwardRef(ref: Ref<HTMLButtonElement>) => {const state = props["data-state"] ?? "closed";- const finalDots = state === "open" ? [] : dots ?? [];+ const finalDots = state === "open" ? [] : (dots ?? []);return (<context.Provider value={{ state }}>diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e223d15922..6e50efa62e 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -92,8 +92,8 @@ importers:specifier: ^0.8.0version: 0.8.0prettier:- specifier: 3.3.2- version: 3.3.2+ specifier: 3.3.3+ version: 3.3.3react:specifier: 18.3.0-canary-14898b6a9-20240318version: 18.3.0-canary-14898b6a9-20240318@@ -113,8 +113,8 @@ importers:specifier: 5.5.2version: 5.5.2typescript-eslint:- specifier: ^8.0.0- version: 8.0.0([email protected])([email protected])+ specifier: ^8.0.1+ version: 8.0.1([email protected])([email protected])vite:specifier: ^5.3.5version: 5.3.5(@types/[email protected])@@ -508,8 +508,8 @@ importers:specifier: ^4.3.1version: 4.3.1([email protected](@types/[email protected]))prettier:- specifier: 3.3.2- version: 3.3.2+ specifier: 3.3.3+ version: 3.3.3typescript:specifier: 5.5.2version: 5.5.2@@ -5397,8 +5397,8 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0@@ -5408,8 +5408,8 @@ packages:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-pS1hdZ+vnrpDIxuFXYQpLTILglTjSYJ9MbetZctrUawogUsPdz31DIIRZ9+rab0LhYNTsk88w4fIzVheiTbWOQ==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-5IgYJ9EO/12pOUwiBKFkpU7rS3IU21mtXzB81TNwq2xEybcmAZrE9qwDtsb5uQd9aVO9o0fdabFyAmKveXyujg==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:eslint: ^8.57.0 || ^9.0.0@@ -5418,12 +5418,12 @@ packages:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-mJAFP2mZLTBwAn5WI4PMakpywfWFH5nQZezUQdSKV23Pqo6o9iShQg1hP2+0hJJXP2LnZkWPphdIq4juYYwCeg==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:typescript: '*'@@ -5431,12 +5431,12 @@ packages:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:typescript: '*'@@ -5444,14 +5444,14 @@ packages:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:eslint: ^8.57.0 || ^9.0.0- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}'@ungap/[email protected]':@@ -8470,8 +8470,8 @@ packages:engines: {node: '>=10.13.0'}hasBin: true- resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==}+ resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}engines: {node: '>=14'}hasBin: true@@ -9450,8 +9450,8 @@ packages:resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}engines: {node: '>= 0.6'}- resolution: {integrity: sha512-yQWBJutWL1PmpmDddIOl9/Mi6vZjqNCjqSGBMQ4vsc2Aiodk0SnbQQWPXbSy0HNuKCuGkw1+u4aQ2mO40TdhDQ==}+ resolution: {integrity: sha512-V3Y+MdfhawxEjE16dWpb7/IOgeXnLwAEEkS7v8oDqNcR1oYlqWhGH/iHqHdKVdpWme1VPZ0SoywXAkCqawj2eQ==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:typescript: '*'@@ -13221,7 +13221,7 @@ snapshots:globby: 14.0.1jscodeshift: 0.15.2(@babel/[email protected](@babel/[email protected]))lodash: 4.17.21- prettier: 3.3.2+ prettier: 3.3.3recast: 0.23.7tiny-invariant: 1.3.3transitivePeerDependencies:@@ -13627,14 +13627,14 @@ snapshots:dependencies:'@types/yargs-parser': 21.0.0- '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':+ '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':dependencies:'@eslint-community/regexpp': 4.11.0- '@typescript-eslint/parser': 8.0.0([email protected])([email protected])- '@typescript-eslint/scope-manager': 8.0.0- '@typescript-eslint/type-utils': 8.0.0([email protected])([email protected])- '@typescript-eslint/utils': 8.0.0([email protected])([email protected])- '@typescript-eslint/visitor-keys': 8.0.0+ '@typescript-eslint/parser': 8.0.1([email protected])([email protected])+ '@typescript-eslint/scope-manager': 8.0.1+ '@typescript-eslint/type-utils': 8.0.1([email protected])([email protected])+ '@typescript-eslint/utils': 8.0.1([email protected])([email protected])+ '@typescript-eslint/visitor-keys': 8.0.1eslint: 9.8.0graphemer: 1.4.0ignore: 5.3.1@@ -13645,12 +13645,12 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:- '@typescript-eslint/scope-manager': 8.0.0- '@typescript-eslint/types': 8.0.0- '@typescript-eslint/typescript-estree': 8.0.0([email protected])- '@typescript-eslint/visitor-keys': 8.0.0+ '@typescript-eslint/scope-manager': 8.0.1+ '@typescript-eslint/types': 8.0.1+ '@typescript-eslint/typescript-estree': 8.0.1([email protected])+ '@typescript-eslint/visitor-keys': 8.0.1debug: 4.3.4eslint: 9.8.0optionalDependencies:@@ -13658,15 +13658,15 @@ snapshots:transitivePeerDependencies:- supports-color- '@typescript-eslint/[email protected]':+ '@typescript-eslint/[email protected]':dependencies:- '@typescript-eslint/types': 8.0.0- '@typescript-eslint/visitor-keys': 8.0.0+ '@typescript-eslint/types': 8.0.1+ '@typescript-eslint/visitor-keys': 8.0.1dependencies:- '@typescript-eslint/typescript-estree': 8.0.0([email protected])- '@typescript-eslint/utils': 8.0.0([email protected])([email protected])+ '@typescript-eslint/typescript-estree': 8.0.1([email protected])+ '@typescript-eslint/utils': 8.0.1([email protected])([email protected])debug: 4.3.4ts-api-utils: 1.3.0([email protected])optionalDependencies:@@ -13675,12 +13675,12 @@ snapshots:- eslint- supports-color- '@typescript-eslint/[email protected]': {}+ '@typescript-eslint/[email protected]': {}- '@typescript-eslint/[email protected]([email protected])':+ '@typescript-eslint/[email protected]([email protected])':dependencies:- '@typescript-eslint/types': 8.0.0- '@typescript-eslint/visitor-keys': 8.0.0+ '@typescript-eslint/types': 8.0.1+ '@typescript-eslint/visitor-keys': 8.0.1debug: 4.3.4globby: 11.1.0is-glob: 4.0.3@@ -13692,20 +13692,20 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:'@eslint-community/eslint-utils': 4.4.0([email protected])- '@typescript-eslint/scope-manager': 8.0.0- '@typescript-eslint/types': 8.0.0- '@typescript-eslint/typescript-estree': 8.0.0([email protected])+ '@typescript-eslint/scope-manager': 8.0.1+ '@typescript-eslint/types': 8.0.1+ '@typescript-eslint/typescript-estree': 8.0.1([email protected])eslint: 9.8.0transitivePeerDependencies:- supports-color- typescript- '@typescript-eslint/[email protected]':+ '@typescript-eslint/[email protected]':dependencies:- '@typescript-eslint/types': 8.0.0+ '@typescript-eslint/types': 8.0.1eslint-visitor-keys: 3.4.3'@ungap/[email protected]': {}@@ -17582,7 +17582,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -18328,7 +18328,7 @@ snapshots:jscodeshift: 0.15.2(@babel/[email protected](@babel/[email protected]))leven: 3.1.0ora: 5.4.1- prettier: 3.3.2+ prettier: 3.3.3prompts: 2.4.2semver: 7.6.2strip-json-comments: 3.1.1@@ -18670,11 +18670,11 @@ snapshots:media-typer: 0.3.0mime-types: 2.1.35dependencies:- '@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])- '@typescript-eslint/parser': 8.0.0([email protected])([email protected])- '@typescript-eslint/utils': 8.0.0([email protected])([email protected])+ '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])+ '@typescript-eslint/parser': 8.0.1([email protected])([email protected])+ '@typescript-eslint/utils': 8.0.1([email protected])([email protected])optionalDependencies:typescript: 5.5.2transitivePeerDependencies: