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
chore: Post merge fixes (#5860)
Oleg Isonenda13e301c92c
diff --git a/.github/workflows/fixtures-test.yml b/.github/workflows/fixtures-test.ymlindex 74980f2791..9062792579 100644--- a/.github/workflows/fixtures-test.yml+++ b/.github/workflows/fixtures-test.yml@@ -54,7 +54,16 @@ jobs:run: pnpm --filter='./fixtures/*' --sequential run fixtures:link- name: Testing cli sync command- run: pnpm --filter='./fixtures/*' run --parallel fixtures:sync+ shell: bash+ run: |+ set +e+ pnpm --filter='./fixtures/*' --sequential run fixtures:sync 2>&1 | tee fixtures-sync.log+ sync_status=${PIPESTATUS[0]}+ if [ "$sync_status" -ne 0 ]; then+ message=$(tail -n 40 fixtures-sync.log | sed -e 's/%/%25/g' -e 's/\r/%0D/g' -e 's/$/%0A/' | tr -d '\n')+ echo "::error title=Fixture sync failed::$message"+ exit "$sync_status"+ fi- name: Testing cli build commandrun: pnpm --filter='./fixtures/*' run --parallel fixtures:builddiff --git a/.github/workflows/vercel-deploy-staging.yml b/.github/workflows/vercel-deploy-staging.ymlindex 7ee0980e34..ce65d3d961 100644--- a/.github/workflows/vercel-deploy-staging.yml+++ b/.github/workflows/vercel-deploy-staging.yml@@ -123,11 +123,27 @@ jobs:outputs:builder-host: "${{ steps.vercel.outputs.alias }}.${{ matrix.environment }}.webstudio.is"+ deployment-host:+ runs-on: ubuntu-latest+ outputs:+ development-builder-host: ${{ steps.host.outputs.value }}+ steps:+ - id: host+ shell: bash+ env:+ REF_NAME: ${{ github.event_name == 'pull_request_target' && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}+ run: |+ clean_name="${REF_NAME/.staging/}"+ clean_name=$(echo "${clean_name}" | sed 's/[^a-zA-Z0-9_-]//g' | tr A-Z a-z | tr _ - | sed 's/-\{2,\}/-/g')+ echo "value=${clean_name}.development.webstudio.is" >> "$GITHUB_OUTPUT"+fixtures-test:- needs: deployment+ needs:+ - deployment+ - deployment-hostuses: ./.github/workflows/fixtures-test.ymlwith:- builder-host: ${{ needs.deployment.outputs.builder-host }}+ builder-host: ${{ needs.deployment-host.outputs.development-builder-host }}environment: developmentsecrets:# We are not passing the secret here (as it does not exist in the current environment).diff --git a/.github/workflows/vis-reg-tests.yml b/.github/workflows/vis-reg-tests.ymlindex 01f653f06c..db45a8d9c3 100644--- a/.github/workflows/vis-reg-tests.yml+++ b/.github/workflows/vis-reg-tests.yml@@ -19,10 +19,15 @@ permissions:jobs:lost-pixel:# Run on push, regular PR (for repo branches), or labeled PR with safe-to-deploy (for forks)+ # Release branches are assembled from already-reviewed changes, and visual+ # diffs should not block publishing the release branch itself.if: |- github.event_name == 'push' ||- github.event_name == 'pull_request' ||- (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy')+ (+ github.event_name == 'push' ||+ github.event_name == 'pull_request' ||+ (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-deploy')+ ) &&+ !startsWith(github.head_ref || github.ref_name, 'release-')timeout-minutes: 20runs-on: ubuntu-latestdiff --git a/packages/cli/package.json b/packages/cli/package.jsonindex c0dac472b5..b573df8445 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -34,10 +34,12 @@"@webstudio-is/protocol": "workspace:*","@webstudio-is/sdk-components-registry": "workspace:*","acorn": "^8.14.1",+ "acorn-jsx": "^5.3.2","acorn-walk": "^8.3.4","change-case": "^5.4.4","chrome-launcher": "^1.2.1","deepmerge": "^4.3.1",+ "decode-named-character-reference": "^1.0.2","env-paths": "^3.0.0","fast-deep-equal": "^3.1.3","immer": "^10.1.1",diff --git a/packages/cli/vite.config.ts b/packages/cli/vite.config.tsindex 1f263ca4ec..8202547955 100644--- a/packages/cli/vite.config.ts+++ b/packages/cli/vite.config.ts@@ -3,14 +3,22 @@ import {defaultServerConditions,defineConfig,} from "vite";+import { createRequire } from "node:module";import pkg from "./package.json";+const require = createRequire(import.meta.url);+const nodeDecodeNamedCharacterReference = require.resolve(+ "decode-named-character-reference"+);+const externalDependencies = new Set(Object.keys(pkg.dependencies).filter((name) => {return name.startsWith("@webstudio-is/") === false;}));+const bundledDependencies = new Set(["acorn"]);+const getPackageName = (id: string) => {if (id.startsWith("@")) {return id.split("/").slice(0, 2).join("/");@@ -18,11 +26,20 @@ const getPackageName = (id: string) => {return id.split("/")[0];};-const isExternal = (id: string) =>- id.startsWith("node:") || externalDependencies.has(getPackageName(id));+const isExternal = (id: string) => {+ const packageName = getPackageName(id);+ return (+ id.startsWith("node:") ||+ (externalDependencies.has(packageName) &&+ bundledDependencies.has(packageName) === false)+ );+};export default defineConfig({resolve: {+ alias: {+ "decode-named-character-reference": nodeDecodeNamedCharacterReference,+ },conditions: ["webstudio", ...defaultClientConditions],},ssr: {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 4f5f025a95..84d9fe3f6d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1173,6 +1173,9 @@ importers:acorn:specifier: ^8.14.1version: 8.14.1+ acorn-jsx:+ specifier: ^5.3.2+ version: 5.3.2([email protected])acorn-walk:specifier: ^8.3.4version: 8.3.4@@ -1182,6 +1185,9 @@ importers:chrome-launcher:specifier: ^1.2.1version: 1.2.1+ decode-named-character-reference:+ specifier: ^1.0.2+ version: 1.0.2deepmerge:specifier: ^4.3.1version: 4.3.1@@ -15298,6 +15304,10 @@ snapshots:acorn-walk: 8.3.5optional: true+ dependencies:+ acorn: 8.14.1+dependencies:acorn: 8.17.0